repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
kfoss/neon
neon/datasets/sparsenet.py
1
5254
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
apache-2.0
-2,070,562,520,108,554,800
41.032
79
0.557099
false
4.169841
true
false
false
wuher/devil
devil/util.py
1
3000
# -*- coding: utf-8 -*- # util.py --- # # Created: Fri Dec 30 23:27:52 2011 (+0200) # Author: Janne Kuuskeri # import re charset_pattern = re.compile('.*;\s*charset=(.*)') def camelcase_to_slash(name): """ Converts CamelCase to camel/case code ripped from http://stackoverflow.com/questions/1175208/does-...
mit
3,430,907,829,229,489,700
25.086957
144
0.581667
false
3.667482
false
false
false
cclljj/AnySense_7688
pending/pm_hpm.py
1
3267
import mraa import time from multiprocessing import Queue,Process import move_avge NUM_INCOME_BYTE = 8 CHAR_PRELIM = 0x40 NUM_DATA_BYTE = 7 CHECK_BYTE = 7 PM1_BYTE = -1 PM25_BYTE = 3 PM10_BYTE = 5 class sensor(Process): def __init__(self, q): Process.__init__(self) self.q = q s...
gpl-3.0
4,554,266,414,521,395,700
23.380597
119
0.53015
false
2.65394
false
false
false
Larisa123/Kviz
main.py
1
12835
from tkinter import * from tkinter import ttk import random button_width = 17 number_of_characters_per_row = 56 diff_for_answers = 8 color = '#%02x%02x%02x' % (231, 231, 231) import subprocess # poskusile 5 razlicnih modulov: pyglet, mp3play, sound in se dva pa noben ni delal # pygame se nama zdi prevelika knjizni...
apache-2.0
391,766,898,711,221,760
39.05625
144
0.61359
false
3.4
false
false
false
geometalab/OSMTagFinder
OSMTagFinder/thesaurus/mapsemnet.py
1
1602
# -*- coding: utf-8 -*- ''' Created on 08.11.2014 @author: Simon Gwerder ''' from rdflib.namespace import SKOS from semnet.osmsemanticnet import OSMSemanticNet from thesaurus.rdfgraph import RDFGraph from utilities.configloader import ConfigLoader class MapOSMSemanticNet: def __init__(self, tagFinderRDF, osnSem...
mit
-4,895,832,965,683,772,000
32.375
128
0.611735
false
3.814286
false
false
false
bellowsj/aiopogo
aiopogo/pogoprotos/settings/master/quest_settings_pb2.py
1
3401
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/settings/master/quest_settings.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.pr...
mit
2,925,874,700,893,986,300
40.987654
424
0.757424
false
3.09745
false
true
false
seung-lab/cloud-volume
cloudvolume/storage/storage_interfaces.py
1
15070
import six from collections import defaultdict import json import os.path import posixpath import re import boto3 import botocore from glob import glob import google.cloud.exceptions from google.cloud.storage import Batch, Client import requests import tenacity from cloudvolume.connectionpools import S3ConnectionPool...
bsd-3-clause
6,737,976,082,698,986,000
27.76145
118
0.633046
false
3.628702
false
false
false
SCPR/kpcc_backroom_handshakes
measure_finance/models.py
1
7431
from django.conf import settings from django.db import models from django.utils.encoding import smart_str from django.utils import timezone from django.template.defaultfilters import slugify from django.shortcuts import get_object_or_404 from election_registrar import models as registrar import logging import time impo...
mit
9,157,139,782,778,764,000
59.909836
114
0.704885
false
3.609034
false
false
false
ttroy50/cmake-examples
04-static-analysis/clang-format/cmake/scripts/clang-format-check-changed.py
1
5095
#!/usr/bin/env python import argparse import os import sys import subprocess def check_file(filename, excludes, extensions): """ Check if a file should be included in our check """ name, ext = os.path.splitext(filename) if len(ext) > 0 and ext in extensions: if len(excludes) == 0: ...
mit
-7,903,845,470,487,237,000
30.257669
120
0.575466
false
4.245833
false
false
false
datapythonista/pandas
pandas/tests/indexing/test_scalar.py
4
9940
""" test scalar indexing, including at and iat """ from datetime import ( datetime, timedelta, ) import numpy as np import pytest from pandas import ( DataFrame, Series, Timedelta, Timestamp, date_range, ) import pandas._testing as tm from pandas.tests.indexing.common import Base class T...
bsd-3-clause
5,832,607,505,893,796,000
30.356467
88
0.520523
false
3.328868
true
false
false
SahSih/ARStreaming360Display
RealTimeVideoStitch/motion_detector.py
1
2815
# USAGE # python motion_detector.py # python motion_detector.py --video videos/example_01.mp4 # import the necessary packages import argparse import datetime import imutils import time import cv2 # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-v", "--video", he...
mit
7,161,149,992,135,203,000
28.946809
84
0.705151
false
2.896091
false
false
false
BronyTV/bronytv.net
btv_site/assets.py
1
2355
from flask_assets import Environment, Bundle assets = Environment() global_css = ["css/vendor/bootstrap.css", "css/global.css"] global_js = ["js/vendor/jquery.js", "js/vendor/angular.js", "js/angular/common.js", "js/header.js"] def make_css(name, assets): return Bundle(*assets, filters="cssmin", ou...
gpl-3.0
-5,187,518,734,788,820,000
32.642857
137
0.6
false
3.078431
false
false
false
device42/nix_bsd_mac_inventory
module_hpux.py
1
10053
import paramiko import math import json class GetHPUXData: def __init__(self, ip, ssh_port, timeout, usr, pwd, use_key_file, key_file, get_serial_info, get_hardware_info, get_os_details, get_cpu_info, get_memory_info, ignore_domain, upload_ipv6, debug): self.mach...
mit
6,703,414,946,404,267,000
39.721992
112
0.468915
false
4.030874
false
false
false
rmcgibbo/openmoltools
openmoltools/amber.py
1
17246
import mdtraj as md import tempfile import logging import os import shutil from distutils.spawn import find_executable from mdtraj.utils.delay_import import import_ import mdtraj.utils try: from subprocess import getoutput # If python 3 except ImportError: from commands import getoutput # If python 2 logger...
gpl-2.0
6,290,256,106,830,964,000
38.555046
247
0.650586
false
3.757298
false
false
false
nimbusproject/dashi
dashi/bootstrap/containers.py
1
5837
#!/usr/bin/env python __author__ = 'Adam R. Smith' __license__ = 'Apache 2.0' import collections class DotNotationGetItem(object): """ Drive the behavior for DotList and DotDict lookups by dot notation, JSON-style. """ def _convert(self, val): """ Convert the type if necessary and return if a conver...
apache-2.0
2,652,685,822,307,659,300
31.433333
108
0.588145
false
3.832567
false
false
false
nuagenetworks/vspk-python
vspk/v6/nusubnet.py
1
58844
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyrigh...
bsd-3-clause
-5,173,366,400,604,724,000
30.167903
358
0.585667
false
4.479939
false
false
false
levelrf/level_basestation
level/examples/test_transmit.py
1
3457
#!/usr/bin/python # python ~/workspace/level_basestation/pre-cog/examples/simple_trx.py --port 12345 --radio-addr 85 --dest-addr 86 --args serial=E8R10Z2B1 # python ~/workspace/level_basestation/pre-cog/examples/simple_trx.py --port 12346 --radio-addr 86 --dest-addr 85 --args serial=E4R11Y0B1 from gnuradio import gr ...
gpl-3.0
-749,694,025,709,994,400
33.227723
137
0.558577
false
3.372683
false
false
false
dagar/Firmware
Tools/HIL/run_tests.py
1
3547
#! /usr/bin/python import serial, time import subprocess from subprocess import call, Popen from argparse import ArgumentParser import re def do_test(port, baudrate, test_name): databits = serial.EIGHTBITS stopbits = serial.STOPBITS_ONE parity = serial.PARITY_NONE ser = serial.Serial(port, baudrate, d...
bsd-3-clause
-5,418,919,410,731,338,000
31.245455
132
0.620242
false
3.374881
true
false
false
chrischambers/django-calendartools
calendartools/views/agenda.py
1
1141
from datetime import date from calendartools import defaults from calendartools.views.calendars import ( YearView, TriMonthView, MonthView, WeekView, DayView ) class YearAgenda(YearView): template_name = 'calendar/agenda/year.html' paginate_by = defaults.MAX_AGENDA_ITEMS_PER_PAGE class MonthAgenda(Month...
bsd-3-clause
3,052,311,570,141,808,600
30.694444
89
0.72305
false
3.117486
false
false
false
dzeban/batti-gtk
src/Notificator.py
1
2868
''' This file is part of batti, a battery monitor for the system tray. Copyright (C) 2010 Arthur Spitzer This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the ...
gpl-2.0
959,022,370,888,630,300
30.877778
126
0.589958
false
4.138528
false
false
false
DrGFreeman/RasPiBot202
maze.py
1
7175
import networkx as nx import math class Maze: def __init__(self): self.g = nx.MultiGraph() self.newNodeUid = 0 self.startNode = None self.finishNode = None self.distTol = 75 # Distance tolerance to consider two nodes to be the same self.farAway = 10000 # A long dist...
mit
-6,924,944,892,534,273,000
35.794872
122
0.605714
false
3.986111
true
false
false
naototty/vagrant-lxc-ironic
ironic/drivers/modules/ipmitool.py
1
42906
# coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, INC. # Copyright 2014 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance ...
apache-2.0
-437,569,069,582,017,540
38.617729
79
0.600289
false
4.156753
false
false
false
Ictp/indico
indico/MaKaC/user.py
1
59857
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; eith...
gpl-3.0
-3,996,122,456,246,659,600
34.671633
123
0.549794
false
4.354503
false
false
false
eomahony/Numberjack
examples/Tsccd.py
1
3117
from Numberjack import * def get_model(k, v, n): design = Matrix(v, n) pairs = Matrix(v * (v - 1) // 2, n) index = [[0 for i in range(v)] for j in range(v)] a = 0 for i in range(v - 1): for j in range(i + 1, v): index[i][j] = a index[j][i] = a a += 1 ...
lgpl-2.1
2,552,755,813,298,700,300
32.880435
145
0.494386
false
2.910364
false
false
false
Azure/azure-sdk-for-python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/_configuration.py
1
3182
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-3,418,886,602,235,532,300
46.492537
134
0.678504
false
4.526316
true
false
false
pdear/verilib
pytools/vlparse/types/primary.py
1
5043
# # primary.py - Primary verilog syntax tree types # # Verilib - A Verilog HDL development framework # Copyright (c) 2014, Patrick Dear, All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free ...
lgpl-3.0
-3,968,423,585,559,523,000
32.845638
77
0.611541
false
3.656998
false
false
false
felipet/fca3103_pytool
fca3103_tool.py
1
5035
#! /usr/bin/env python3 # -*- coding: utf-8 -* ''' Terminal tool to make Time Interval measures using the Tektronix FCA3103 @file @date Created on Sep. 16, 2015 @author Felipe Torres (torresfelipex1<AT>gmail.com) @copyright LGPL v2.1 ''' # --------------------------------------------------------------------------...
gpl-2.0
-1,453,097,992,371,775,000
44.772727
117
0.562066
false
3.86416
false
false
false
qunying/gps
share/support/core/gcov.py
1
7246
""" Provides the "Tools/Gcov/Compute coverage files" and "Remove coverage files" menus, which executes gcov automatically. This script will also perform checks along the way to guide through the procedure of obtaining gcov info. The output of the gcov process is displayed in a separate console. At the end of the proce...
gpl-3.0
-8,241,168,727,739,678,000
31.78733
86
0.569418
false
3.976948
false
false
false
cproctor/hex
server/hexserver/hexserver/models/spell.py
1
3379
from db import db_connection from user import _user_name_exists, _authenticate_user import json import time import logging log = logging.getLogger(__name__) def get_spells(request): conn = db_connection(request) cursor = conn.cursor() cursor.execute("SELECT * FROM spells;") result = cursor.fetchall() ...
mit
-1,238,376,574,511,584,300
29.441441
87
0.600474
false
3.897347
false
false
false
great-expectations/great_expectations
tests/datasource/test_sqlalchemy_datasource.py
1
10417
import os from unittest import mock import pandas as pd import pytest from ruamel.yaml import YAML import great_expectations.dataset.sqlalchemy_dataset from great_expectations.core.batch import Batch from great_expectations.core.expectation_suite import ExpectationSuite from great_expectations.dataset import SqlAlche...
apache-2.0
-650,419,896,327,268,100
37.724907
90
0.679274
false
3.822752
true
false
false
diego-d5000/MisValesMd
env/lib/python2.7/site-packages/django/conf/locale/da/formats.py
1
1035
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:...
mit
4,936,223,680,368,423,000
33.689655
77
0.590338
false
2.8125
false
true
false
F5Networks/f5-common-python
f5/bigip/tm/asm/policies/response_pages.py
1
2162
# coding=utf-8 # # Copyright 2017 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-1,259,872,560,900,174,800
36.894737
109
0.674074
false
4.007421
false
false
false
itsvismay/ElasticBodies
Pipeline/Optimizations/cobyla_beam_heightwidthlength_test.py
1
2030
from scipy.optimize import fmin_cobyla import sys, os, subprocess, numpy P, E = 1000.0, 69e9 # N, Pa, m, m fileName = 'optimizeTest.txt' resultName = '../TestsResults/opt.txt' def objective(x): height = x[0] width = x[1] length = x[2] volume = length * width * height return volume def g0(x): ...
mpl-2.0
-2,741,182,944,111,957,500
28.42029
206
0.575369
false
2.847125
false
false
false
rr-/docstring_parser
docstring_parser/numpydoc.py
1
10211
"""Numpydoc-style docstring parsing. .. seealso:: https://numpydoc.readthedocs.io/en/latest/format.html """ import inspect import itertools import re import typing as T from .common import ( Docstring, DocstringDeprecated, DocstringMeta, DocstringParam, DocstringRaises, DocstringReturns, ...
mit
-4,061,001,772,794,959,000
29.756024
79
0.590442
false
3.984003
false
false
false
low-sky/h2codumb
h2co_mm.py
1
6796
""" =========================== Formaldehyde mm-line fitter =========================== This is a formaldehyde 3_03-2_02 / 3_22-221 and 3_03-2_02/3_21-2_20 fitter. It is based entirely on RADEX models. This is the EWR fork of the fitter in pyspeckit. """ import numpy as np import pyspeckit.spectrum.models.hyperfi...
gpl-2.0
-8,952,912,852,867,932,000
31.208531
142
0.617716
false
2.995152
false
false
false
vongola12324/Linking-Loader
main.py
1
3185
import os import sys # Open File filename = "" filename = input("Enter Input Filename: ") if filename == "": filename = "linkin.txt" fin = open(filename, "r") fout = open("out.txt", "w") # Variable Prepare PGBLOCKS = {} MODIFY = [] OBJCODE = [] # Method Prepare def splitline(line): word = line.strip().split...
gpl-3.0
8,571,556,472,533,741,000
28.229358
122
0.513344
false
3.113392
false
false
false
miyataken999/weblate
weblate/trans/admin.py
1
8516
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eith...
gpl-3.0
8,613,016,902,550,696,000
32.124514
79
0.633267
false
3.989222
false
false
false
Gaha/intranet
ce/models.py
1
2664
#-*- coding:utf-8 -*- from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ class Agent(models.Model): LISTE_CONTRAT = ( ('CDI', 'CDI'), ('CDD', 'CDD'), ('PRE', 'Prestataire'), ('INT', 'Intérime'), ) nom = mode...
gpl-2.0
4,657,869,429,667,921,000
27.826087
82
0.597662
false
3.073001
false
false
false
effigies/mne-python
examples/realtime/ftclient_rt_average.py
2
2816
""" ======================================================== Compute real-time evoked responses with FieldTrip client ======================================================== This example demonstrates how to connect the MNE real-time system to the Fieldtrip buffer using FieldTripClient class. This example was tested ...
bsd-3-clause
8,140,795,396,231,081,000
30.288889
77
0.638849
false
3.506849
false
false
false
justmedude/librenms
services-wrapper.py
1
13762
#! /usr/bin/env python3 """ services-wrapper A small tool which wraps around check-services.php and tries to guide the services process with a more modern approach with a Queue and workers. Based on the original version of poller-wrapper.py by Job Snijders Author: Neil Lathwo...
gpl-3.0
-8,893,147,896,201,469,000
36.807692
229
0.58102
false
4.02045
true
false
false
mohou/Mohou_Box-master
boxPrint/print_service/__init__.py
1
10414
# coding=utf-8 #from threading import Thread import Queue import sys import time import logging import re import os import psutil class PrintService(object): def __init__(self, profile, serialInfo): # super(PrintService, self).__init__(name="PrintService") self.profile = profile ...
apache-2.0
6,482,249,820,652,363,000
35.194245
163
0.499516
false
3.915184
false
false
false
IcyMint/Barchine
Barchine_gui.py
1
66916
import PySimpleGUI as sg from Ingredient_Library import restoreIngredientLibrary, storeIngredientLibrary, createIngredient from Ingredient_Library import listIngredients, getFamilyTypes, getBaseTypes, deleteIngredient from Ingredient_Library import restoreBases from Drink_Library import restoreDrinkLibrary, storeDrinkL...
mit
-2,645,147,178,557,540,400
41.298989
167
0.569505
false
3.767156
false
false
false
jmuhlich/indra
indra/preassembler/hierarchy_manager.py
1
11321
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import os import rdflib import logging try: from functools import lru_cache except ImportError: from functools32 import lru_cache logger = logging.getLogger('hierarchy_manager') class HierarchyManager(objec...
bsd-2-clause
83,850,203,100,852,430
35.756494
78
0.536083
false
4.403345
false
false
false
wisdomchuck/TestBot
utils/fun/lists.py
1
2804
# Image urls for the psat command psat_memes = [ "http://i.imgur.com/5eJ5DbU.jpg", "http://i.imgur.com/HBDnWVc.jpg", "http://i.imgur.com/RzZlq2j.jpg", "http://i.imgur.com/mVRNUIG.jpg", "http://i.imgur.com/OvOmC6g.jpg", "http://i.imgur.com/QqlSxaZ.png", "http://i.imgur.com/finNuzx.jpg", "...
gpl-3.0
-5,187,740,992,660,968,000
29.813187
103
0.634807
false
2.593895
false
false
false
ProjectQ-Framework/FermiLib-Plugin-Psi4
fermilibpluginpsi4/_run_psi4.py
1
8415
# FermiLib plugin to interface with Psi4 # # Copyright (C) 2017 ProjectQ-Framework (www.projectq.ch) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or ...
lgpl-3.0
7,315,284,371,011,495,000
37.424658
79
0.579085
false
4.226519
false
false
false
kubevirt/vAdvisor
vadvisor/virt/parser.py
1
1627
from xml.etree.ElementTree import XMLParser class GuestXmlParser: int_tags = ["currentMemory", "memory"] int_attribs = ["index", "port", "startport", "vram"] def __init__(self): self.json = {} self.stack = [self.json] self.catogory = None def start(self, tag, attrib): ...
gpl-3.0
795,762,384,408,859,900
27.54386
56
0.533497
false
3.828235
false
false
false
gri-is/lodjob
crom_scripts/deprecated/acquisition_manual.py
1
1582
import pprint from cromulent.model import * # imports models from cromulent.vocab import * # imports model subcomponents from utils.aat_labels import aat_labels from utils.aat_label_fetcher import get_or_fetch from utils.data_parsing import find_values from utils.crom_helpers import props, toJSON, toString, printStr...
agpl-3.0
-9,017,786,665,425,611,000
31.285714
80
0.733881
false
2.790123
false
false
false
moggers87/django-bitfield
bitfield/tests/tests.py
1
17505
from __future__ import absolute_import import pickle from django.db import connection, models from django.db.models import F from django.test import TestCase from bitfield import BitHandler, Bit, BitField from bitfield.tests import BitFieldTestModel, CompositeBitFieldTestModel, BitFieldTestModelForm from bitfield.co...
apache-2.0
-1,557,695,423,243,655,400
42.87218
578
0.649357
false
3.406305
true
false
false
adewynter/Tools
MLandDS/SpeechRecognition/dataPreprocessor.py
1
5683
# Data preprocessor for speech recognition # Arguably the most important part of our infrastructure # WARNING -- Disgustingly long class # (c) Adrian deWynter, 2017, where applicable from __future__ import print_function from six.moves import urllib,xrange from random import shuffle from enum import Enum import os,re...
mit
-1,158,133,404,492,838,400
22.105691
98
0.672356
false
2.923354
false
false
false
MerlijnWajer/lewd
src/net.py
1
1721
""" This file is part of the LEd Wall Daemon (lewd) project Copyright (c) 2009-2012 by ``brainsmoke'' and Merlijn Wajer (``Wizzup'') lewd is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either ver...
gpl-3.0
3,525,649,452,878,843,400
29.732143
74
0.669959
false
3.790749
false
false
false
landscapeio/pylint-common
setup.py
1
1633
# -*- coding: UTF-8 -*- import sys from setuptools import find_packages, setup _version = '0.2.5' _packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) _short_description = ("pylint-common is a Pylint plugin to improve Pylint " "error analysis of the standard Python li...
gpl-2.0
-4,498,307,940,988,987,400
28.690909
99
0.620943
false
3.55
false
false
false
barberscore/barberscore-api
project/apps/salesforce/models.py
1
21997
import json # Third-Party from model_utils import Choices from distutils.util import strtobool # Local from apps.bhs.models import Convention, Award, Chart, Group, Person from apps.registration.models import Contest, Session, Assignment, Entry class SfConvention: def parse_sf_notification(n): d = {} ...
bsd-2-clause
-6,375,111,616,845,028,000
28.927891
116
0.519525
false
3.108677
false
false
false
aaronn/django-rest-framework-passwordless
drfpasswordless/urls.py
1
1129
from drfpasswordless.settings import api_settings from django.urls import path from drfpasswordless.views import ( ObtainEmailCallbackToken, ObtainMobileCallbackToken, ObtainAuthTokenFromCallbackToken, VerifyAliasFromCallbackToken, ObtainEmailVerificationCallbackToken, ObtainMobileVerifica...
mit
6,030,230,326,098,474,000
52.761905
134
0.772365
false
3.827119
false
true
false
yuanchima/Activation-Visualization-Histogram
datasets/svhn.py
1
2526
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path import numpy as np import scipy.io import scipy.ndimage as sn import h5py from util import log # __PATH__ = os.path.abspath(os.path.dirname(__file__)) __PATH__ = './datasets/svhn' rs = np.rand...
mit
8,197,584,550,295,132,000
25.041237
96
0.563737
false
3.350133
false
false
false
simplelist/python_test01
mechine/KNY.py
1
3559
#-*- coding: utf-8 -*- from numpy import * import operator # 读取数据到矩阵 def file2matrix(filename): # 打开数据文件,读取每行内容 fr = open(filename) arrayOLines = fr.readlines() # 初始化矩阵 numberOfLines = len(arrayOLines) returnMat = zeros((numberOfLines,3)) # 初始化类标签向量 classLabelVector = [] # 循环读取...
lgpl-3.0
314,112,716,281,400,060
21
111
0.641604
false
2.084328
true
false
false
darrencheng0817/AlgorithmLearning
Python/leetcode/uglyNumber.py
1
2890
''' Created on 2015年12月11日 https://leetcode.com/problems/ugly-number/ https://leetcode.com/problems/ugly-number-ii/ https://leetcode.com/problems/super-ugly-number/ @author: Darren ''' ''' Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only incl...
mit
3,427,185,567,020,352,500
32.5
390
0.651042
false
2.894472
false
false
false
proggy/fns
frogs.py
1
1401
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright notice # ---------------- # # Copyright (C) 2014 Daniel Jung # Contact: djungbremen@gmail.com # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Fo...
gpl-2.0
796,572,170,233,028,400
34.025
77
0.683797
false
3.848901
false
false
false
kapadia/toplotly
toplotly/__init__.py
1
2486
import os import json from dateutil.parser import parse import plotly from plotly.graph_objs import Histogram, Scatter, Scatter3d, Data, Layout, XAxis, YAxis, ZAxis, Figure __version__ = '0.0.1' def is_numeric(x): try: float(x) return True except ValueError: return False def...
mit
-6,038,778,973,686,361,000
18.429688
102
0.530571
false
3.501408
false
false
false
Liorst4/pysteamcli
pysteamcli/app_manifest.py
1
1745
#!/usr/bin/env python3 """ Parse Steam's application manifest files. """ import itertools def next_data(it): """ Advances an iterator until new data is found. :param it: Character iterator. :returns: Data found. """ quotation_mark = lambda c: c != '"' data_begin = itertools.dropwhile...
mit
4,851,794,010,905,452,000
18.388889
62
0.525501
false
3.93018
false
false
false
xaime/sneaks
modules/report.py
1
31061
# - *- coding: utf- 8 - *- . # SNEAKS - Snooping Early Alert Knowledge Service from datetime import timedelta from boomslang import * import math import pygeoip import socket from ConfigParser import RawConfigParser import html2text from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart ...
gpl-2.0
-1,516,157,296,209,164,800
39.462842
120
0.619816
false
3.235846
false
false
false
rcbuild-info/scrape
rcbi/rcbi/spiders/MultirotorSuperstore.py
1
3983
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part import copy import os import urlparse import urllib MANUFACTURERS = ["Cobra", "Dinogy", "SkyRC", "DYS", "HQProp", "iPower", "Tattu", "GemFan", "SunnySky", "Emax...
apache-2.0
1,018,846,798,764,537,900
38.435644
359
0.614361
false
3.415952
false
false
false
mchung94/solitaire-player
pysolvers/solvers/deck.py
1
2238
"""Card and Deck definitions. Cards are strings containing a rank character followed by a suit character, because it's simpler than defining a class or named tuple while still being immutable, hashable, easy to create, and human-readable. I also want to define a deck as just a tuple of cards that contain exactly all ...
mit
-3,498,415,241,772,121,600
32.402985
78
0.714924
false
3.705298
false
false
false
vlegoff/tsunami
src/secondaires/navigation/chantier_naval.py
1
4209
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
bsd-3-clause
7,937,201,013,783,846,000
38.54717
79
0.673903
false
3.638889
false
false
false
bhaveshAn/crisscross
crisscross/facades/email.py
1
1397
''' Email ===== The :class:`Email` provides access to public methods to use email of your device. .. note:: On Android `INTERNET` permission is needed. Simple Examples --------------- To send an e-mail:: >>> from crisscross import email >>> recipient = 'abc@gmail.com' >>> subject = 'Hi' >>> tex...
mit
5,783,431,339,681,985,000
24.87037
73
0.601288
false
4.352025
false
false
false
jvivian/rnaseq-lib
src/rnaseq_lib/utils/expando.py
1
2336
# Taken from: https://github.com/BD2KGenomics/bd2k-python-lib class Expando(dict): """ Pass inital attributes to the constructor: >>> o = Expando(foo=42) >>> o.foo 42 Dynamically create new attributes: >>> o.bar = 'hi' >>> o.bar 'hi' Expando is a dictionary: >>> isinst...
mit
-5,991,703,706,041,165,000
18.305785
88
0.51113
false
3.481371
false
false
false
QualiSystems/OpenStack-Shell
package/tests/test_cp/test_openstack/test_command/test_operations/test_connectivity_operation.py
1
1574
from unittest import TestCase from mock import Mock from cloudshell.cp.openstack.command.operations.connectivity_operation import ConnectivityOperation class TestConnectivityOperation(TestCase): def setUp(self): self.connectivity_service = Mock() self.conn_operation = ConnectivityOperation(connect...
isc
-8,626,905,349,689,318,000
49.774194
109
0.551461
false
5.503497
false
false
false
gtalarico/pyrevitplus
pyRevitPlus.tab/VP Tools.panel/Levels.pulldown/Save Levels.pushbutton/script.py
1
4676
""" Save Levels Save the view dependant properties - endpoint locations, level heads and leaders of the selected building levels for re-use Non-level elements will be skipped with dialog, so it's advisable to apply filtering beforehead TESTED REVIT API: 2020 @ejs-ejs This script is part of PyRevitPlus: Extensions...
gpl-3.0
-4,241,314,254,409,846,300
36.408
182
0.565013
false
3.529057
false
false
false
ec429/sexpy
sml.py
1
4208
#!/usr/bin/python from sexpy import SExp, tok_STRING class HtmlNodeType(object): def __init__(self, name, allowed_children): self.name = name self.ac = allowed_children def __call__(self, context, *args): if self.ac is None: # not specified return for arg in args: ...
mit
5,023,051,822,639,744,000
38.327103
95
0.533745
false
3.903525
false
false
false
thepizzaking/whaawmp
src/common/lists.py
1
5662
# -*- coding: utf-8 -*- # A few useful lists. # Copyright © 2007-2011, Jeff Bailes <thepizzaking@gmail.com>. # This file is part of Whaaw! Media Player (whaawmp) # # whaawmp is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
gpl-3.0
9,084,138,836,555,284,000
51.906542
106
0.583819
false
3.328042
false
false
false
babbageclunk/gatesym
gatesym/core_ffi.py
1
1467
from cffi import FFI import os SO_PATH = os.path.expanduser('~/Dropbox/code/rust/gatesymcore/target/release/libgatesymcore.so') ffi = FFI() ffi.cdef(""" void *network_new(); void network_free(void *ptr); size_t network_add_gate(void *ptr, uint8_t kind, uint32_t cookie); void network_add_link...
mit
7,358,668,042,376,080,000
28.938776
96
0.629857
false
3.161638
false
false
false
blckshrk/Weboob
weboob/applications/traveloob/traveloob.py
1
4156
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon, Julien Hébert # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License...
agpl-3.0
-5,384,248,984,045,821,000
32.24
112
0.633694
false
3.916117
false
false
false
clones/django-evolution
django_evolution/tests/multi_db.py
1
29302
from django_evolution.tests.utils import test_sql_mapping tests = r""" >>> from django.db import models >>> from django_evolution.mutations import ChangeField >>> from django_evolution.tests.utils import test_proj_sig_multi, execute_test_sql, register_models_multi, deregister_models >>> from django_evolution.diff imp...
bsd-3-clause
8,471,837,691,026,984,000
41.652111
225
0.687769
false
3.223542
true
false
false
StephenKinger/privaan
setup.py
1
5110
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages from setuptools.command.develop import develop from setuptools.command.install import install import os # notez qu'on import la lib # donc assurez-vous que l'importe n'a pas d'effet de bord import privaan class PostDevelopComm...
mit
-9,133,602,008,088,023,000
35.731884
96
0.65654
false
3.148447
false
false
false
plinecom/JobManager
gui/submit/fileinfo/fileinfo.py
1
1576
from PyQt4 import QtGui, QtCore import gui.submit.fileinfo.common import gui.submit.fileinfo.maya1 import gui.submit.fileinfo.maya2 import gui.submit.fileinfo.maya_mentalray import gui.submit.fileinfo.nuke class FileInfoPanel(QtGui.QTabWidget): def __init__(self, job_list, dispatcher_list, config_info, parent=No...
mit
884,643,911,518,618,900
40.473684
112
0.654188
false
3.216327
false
false
false
aziele/alfpy
tests/test_word_distance.py
1
10504
import unittest from alfpy import word_pattern from alfpy import word_vector from alfpy import word_distance from alfpy.utils import distmatrix from . import utils class DistanceTest(unittest.TestCase, utils.ModulesCommonTest): def __init__(self, *args, **kwargs): super(DistanceTest, self).__init__(*ar...
mit
4,758,581,940,622,395,000
43.134454
77
0.564261
false
3.378578
true
false
false
mitsuhiko/celery
celery/contrib/batches.py
1
1489
from itertools import count from collections import deque, defaultdict from celery.task.base import Task class Batches(Task): abstract = True flush_every = 10 def __init__(self): self._buffer = deque() self._count = count().next def execute(self, wrapper, pool, loglevel, logfile): ...
bsd-3-clause
-4,240,570,643,636,673,000
25.589286
68
0.599731
false
3.991957
false
false
false
dgfree/Minesweeper-Clone
screen.py
1
6335
# -*- coding: utf-8 -*- """ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. date: Mon Jan 19 14:52:04 2015 @author: daniel """ import pygame from block import Block from con...
mpl-2.0
1,783,015,336,399,862,800
35.408046
78
0.576006
false
3.579096
false
false
false
datadreamer/research-chronology-revisited
cgi-bin/pydeliciouslibs/feedparser/feedparser.py
2
121876
#!/usr/bin/env python """Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds Visit http://feedparser.org/ for the latest version Visit http://feedparser.org/docs/ for the latest documentation Required: Python 2.1 or later Recommended: Python 2.3 or later Recommended: CJKCodecs...
mit
-7,598,199,181,045,882,000
42.02012
214
0.587925
false
3.606439
false
false
false
jhmatthews/cobra
source/plotspec.py
1
2652
#! /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ''' Generic plotting script for PYTHONRT ''' import read_output as rd import os, sys import matplotlib.pyplot as plt import numpy as np import cobra_sub as sub rd.setpars() def strip(character, string): ''' strip a c...
gpl-2.0
-2,380,292,950,757,573,600
16
95
0.647436
false
2.830309
false
false
false
newcastlemakerspace/mkrspc_web
data_migration.py
1
2090
import redis import datetime from site_config import REDIS_DB import site_utils import uuid def _was_migration_applied(redis_conn, seq): value = redis_conn.get('migration_%d' % seq) if value is not None: print "migration_%d - exists" % seq return True print "migration_%d - executing" % s...
gpl-3.0
2,701,100,883,988,187,000
23.022989
72
0.606699
false
3.328025
false
false
false
RyanBalfanz/reservoir-sampling-cli
sampler/command_line.py
1
1294
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import operator import random import sys def get_parser(): parser = argparse.ArgumentParser("Randomly sample k items from an input S containing n items.") parser.add_argument("infile", nargs='?', type=argparse.FileType('r'), default=sys.stdin) parser.ad...
mit
1,964,912,365,201,834,000
28.409091
110
0.693972
false
3.066351
false
false
false
aldryn/aldryn-redirects
aldryn_redirects/admin.py
1
8613
from __future__ import unicode_literals from tablib import Dataset from django.conf import settings from django.contrib import admin, messages from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import redirect, render from django.utils import timezone from django.u...
bsd-3-clause
7,284,398,277,118,702,000
37.797297
119
0.615929
false
4.030416
false
false
false
ai-se/XTREE
src/Planners/XTREE/smote.py
1
3196
#! /Users/rkrsn/anaconda/bin/python from pdb import set_trace from os import environ, getcwd from os import walk from os.path import expanduser from pdb import set_trace import sys # Update PYTHONPATH HOME = expanduser('~') axe = HOME + '/git/axe/axe/' # AXE pystat = HOME + '/git/pystats/' # PySTAT cwd = getcwd() #...
mit
-2,068,732,287,555,262,000
27.792793
78
0.572904
false
3.102913
false
false
false
MatthewWilkes/mw4068-packaging
src/melange/src/soc/models/timeline.py
1
1544
#!/usr/bin/env python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
apache-2.0
4,690,625,934,440,829,000
28.692308
74
0.738342
false
3.879397
false
false
false
Nydareld/IaGameServer
Server/PlayerThread.py
1
4282
from Server.Game import * from threading import Thread from CodIa.tuto.models import User from CodIa.tuto.app import db import threading import time import random class PlayerThread(Thread): def __init__(self, GameThread, username, ia): Thread.__init__(self) self.GameThread = GameThread se...
gpl-3.0
7,055,425,905,077,996,000
35.57265
131
0.535172
false
3.644804
false
false
false
atmega/ipkg-utils
ipkg.py
1
11947
#!/usr/bin/env python # Copyright (C) 2001 Alexander S. Guy <a7r@andern.org> # Andern Research Labs # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version ...
mit
-7,228,900,134,880,194,000
29.633333
131
0.572612
false
3.531481
false
false
false
Nanguage/BioInfoCollections
others/bedgraph2bed.py
1
1815
import pandas as pd import click def skip_lines(path): n = 0 with open(path) as f: for line in f: if line.startswith("track"): n += 1 else: break return n def read_bed(path): n_skip = skip_lines(path) df = pd.read_table(path, sep="\t...
gpl-3.0
-4,500,874,446,086,020,600
24.928571
75
0.539394
false
3.282098
false
false
false
zhy0216/random-read
utils/image_crawler.py
1
2041
import os.path import shutil from urlparse import urlparse, urljoin import base64 import requests from bs4 import BeautifulSoup from blue.settings import DOWNLOAD_IMAGE_FOLDER, IMAGE_PREFIX ''' download the image from the article ''' IMAGE_DOWNLOAD_FOLDER = DOWNLOAD_IMAGE_FOLDER def get_absolute_url(article_url, im...
mit
6,987,141,486,954,231,000
24.835443
70
0.627634
false
3.843691
false
false
false
DrDos0016/z2
museum_site/migrations/0011_auto_20170112_0208.py
1
2385
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-12 02:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0010_auto_20160826_2152'), ] operations = [ migrations.Alter...
mit
-992,943,723,689,504,300
30.381579
93
0.534172
false
4.525617
false
false
false
jaeilepp/eggie
mne/coreg.py
1
40760
"""Coregistration between different coordinate frames""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) from .externals.six.moves import configparser import fnmatch from glob import glob, iglob import os import re import shutil from warnings import warn import numpy as np from ...
bsd-2-clause
-7,231,553,313,191,468,000
34.259516
79
0.5934
false
3.698394
true
false
false
nthien/flaskup
flaskup/console.py
2
1462
# -*- coding: utf-8 -*- import os import argparse from datetime import date from flaskup.models import SharedFile from flaskup.filters import filesizeformat def action_clean(quiet): today = date.today() count = 0 deleted_files = [] for f in SharedFile.find_all(): if f.expire_date < today: ...
bsd-3-clause
-4,315,482,644,957,705,700
25.581818
82
0.596443
false
4.189112
false
false
false
jimmy201602/webterminal
permission/commons.py
1
3118
from django.contrib.auth.models import Permission from django.utils.translation import ugettext_lazy as _ def parse_permission_tree(): permission_tree = {} permission_tree_list = [] queryset = Permission.objects.filter(content_type__app_label__in=[ 'common', 'permission'], codename__contains='can_...
gpl-3.0
-1,413,970,611,561,117,400
46.242424
114
0.395125
false
4.849145
false
false
false
revesansparole/oacontainer
src/openalea/container/property_graph.py
1
9223
# -*- python -*- # # OpenAlea.Core # # Copyright 2006-2009 INRIA - CIRAD - INRA # # File author(s): Fred Boudon <fred.boudon@cirad.fr> # # Distributed under the Cecill-C License. # See accompanying file LICENSE.txt or copy at # http://www.cecill.info/licences/Licence_CeCILL-C_V1-...
mit
-70,432,156,574,563,224
31.475352
80
0.545809
false
4.620741
false
false
false
jds2001/sos
sos/plugins/mongodb.py
1
1619
# Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # ...
gpl-2.0
880,026,662,020,041,000
30.745098
73
0.662137
false
3.679545
false
false
false
wasade/american-gut-web
amgut/handlers/auth_handlers.py
1
4373
#!/usr/bin/env python from tornado.web import authenticated from tornado.escape import json_encode from amgut.util import AG_DATA_ACCESS from amgut.lib.mail import send_email from amgut.handlers.base_handlers import BaseHandler from amgut import media_locale, text_locale # login code modified from https://gist.githu...
bsd-3-clause
-3,059,562,258,704,055,000
36.059322
85
0.584038
false
3.822552
false
false
false
felipenaselva/repo.felipe
plugin.video.uwc/favorites.py
1
2571
''' Ultimate Whitecream Copyright (C) 2015 mortael This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
gpl-2.0
-3,299,589,569,647,617,000
28.215909
85
0.668222
false
3.693966
false
false
false
getefesto/efesto
tests/unit/handlers/BaseHandler.py
1
1059
# -*- coding: utf-8 -*- from efesto.handlers import BaseHandler from pytest import fixture @fixture def handler(magic): handler = BaseHandler(magic()) handler.q = magic() return handler def test_basehandler_init(magic): model = magic() handler = BaseHandler(model) assert handler.model == mo...
gpl-3.0
1,938,557,776,759,132,400
24.214286
74
0.663834
false
3.49505
false
false
false
qinjunjerry/PyKeyBox
keybox.py
1
15148
#!/usr/bin/env python """A mini key/password manager written in python using the AES encryption algorithm.""" import os import sys import time import os.path import random import sqlite3 import hashlib import getpass import argparse import Crypto.Cipher.AES class KeyBox(object): TABLE_NAME = "keybox" MASTE...
apache-2.0
3,663,396,818,684,847,600
38.75853
118
0.57057
false
3.79174
false
false
false
DigitalSlideArchive/large_image
large_image/constants.py
1
1924
############################################################################# # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licen...
apache-2.0
-6,192,587,494,464,616,000
28.6
77
0.591476
false
3.562963
false
false
false
facebookresearch/ParlAI
parlai/tasks/taskntalk/agents.py
1
3737
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.core.teachers import Teacher from parlai.utils.io import PathManager from .build import build import json i...
mit
5,102,321,009,451,953,000
27.968992
87
0.587905
false
3.896767
false
false
false