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
ivandeex/dz
dz/tables/actions.py
1
1812
from django import forms from django.utils.decorators import classproperty from django.contrib.contenttypes.models import ContentType from django.urls import reverse from django.utils.html import mark_safe class BaseModelActionForm(forms.Form): @classproperty def MODEL_CHOICES(cls): choices = sorted(C...
mit
-9,042,203,168,422,368,000
36.75
84
0.662804
false
3.713115
false
false
false
jason-weirather/AlignQC
alignqc/depth_to_coverage_report.py
1
2305
#!/usr/bin/env python import argparse, sys, os, gzip from shutil import rmtree from multiprocessing import cpu_count from tempfile import mkdtemp, gettempdir def main(args): chrcovs = {} total = {} inf = gzip.open(args.input) for line in inf: f = line.rstrip().split("\t") chr = f[0] start = i...
apache-2.0
4,521,522,282,382,113,300
31.464789
124
0.634707
false
2.92142
false
false
false
pearu/sympycore
sympycore/matrices/tests/test_functions.py
1
1806
from sympycore import * def test_eye(): assert eye(3).tolist()==[[1,0,0],[0,1,0],[0,0,1]] assert eye(3,2).tolist()==[[1,0],[0,1],[0,0]] assert eye(2,3).tolist()==[[1,0,0],[0,1,0]] assert eye(3,k=1).tolist()==[[0,1,0],[0,0,1],[0,0,0]] assert eye(3,k=2).tolist()==[[0,0,1],[0,0,0],[0,0,0]] asser...
bsd-3-clause
-872,190,487,526,632,300
42
70
0.300111
false
2.975288
false
false
false
ActiveState/code
recipes/Python/466298_IPv4_address_set_type/recipe-466298.py
1
10398
# -*- coding: iso-8859-15 -*- """IP4 address range set implementation. Implements an IPv4-range type. Copyright (C) 2006, Heiko Wundram. Released under the MIT-license: Copyright (c) 2006, Heiko Wundram. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated doc...
mit
-4,765,388,904,975,555,000
34.731959
79
0.545009
false
3.911964
false
false
false
OCA/reporting-engine
setup/_metapackage/setup.py
1
1466
import setuptools with open('VERSION.txt', 'r') as f: version = f.read().strip() setuptools.setup( name="odoo12-addons-oca-reporting-engine", description="Meta package for oca-reporting-engine Odoo addons", version=version, install_requires=[ 'odoo12-addon-bi_sql_editor', 'odoo12-a...
agpl-3.0
5,888,421,381,126,631,000
33.904762
68
0.627558
false
3.301802
false
false
false
DataONEorg/d1_python
client_onedrive/src/d1_onedrive/impl/drivers/fuse/d1_fuse.py
1
1631
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2017 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
apache-2.0
-2,271,301,674,721,078,500
35.244444
86
0.699571
false
3.592511
false
false
false
steinarvk/notify
notify_email.py
1
1836
import config import smtplib from contextlib import contextmanager @contextmanager def smtp_server(): server = smtplib.SMTP(config.lookup("smtp.server")) def activate_tls(): server.starttls() security = config.lookup("smtp.security") if security: { "tls": activate_tls, ...
mit
-4,886,208,775,788,247,000
28.142857
73
0.623094
false
3.965443
true
false
false
Sookhaal/auri_maya_rigging_scripts
animal/fish_spine.py
1
26087
from PySide2 import QtWidgets, QtCore, QtGui from pymel import core as pmc from auri.auri_lib import AuriScriptView, AuriScriptController, AuriScriptModel, grpbox from auri.scripts.Maya_Scripts import rig_lib from auri.scripts.Maya_Scripts.rig_lib import RigController reload(rig_lib) class View(AuriScriptView): ...
mit
7,920,600,291,846,194,000
47.579143
197
0.589029
false
3.21308
false
false
false
tonyczeh/vootstrap
vootstrap/__init__.py
1
5176
#!/usr/bin/env python import sys import textwrap try: import virtualenv # @UnresolvedImport except: from .lib import virtualenv # @Reimport from . import snippits __version__ = "0.9.1" def file_search_dirs(): dirs = [] for d in virtualenv.file_search_dirs(): if "vootstrap" not in d: ...
mit
-3,026,638,890,149,839,000
25.818653
79
0.596986
false
4.059608
false
false
false
sassoftware/rpath-product-definition
rpath_proddef/xml_1_1/subs.py
1
12263
#!/usr/bin/env python # # Generated by generateDS.py. # import sys from string import lower as str_lower from xml.dom import minidom import supers as supermod # # Globals # ExternalEncoding = 'utf-8' # # Data representation classes # class stageTypeSub(supermod.stageType): def __init__(self, labelSuffix=Non...
apache-2.0
5,551,633,009,803,838,000
45.627376
352
0.771263
false
3.577305
true
false
false
jasonwee/asus-rt-n14uhp-mrtg
src/lesson_developer_tools/pyclbr_readmodule.py
1
1150
import pyclbr import os from operator import itemgetter def show_class(name, class_data): print('Class:', name) filename = os.path.basename(class_data.file) print(' File: {0} [{1}]'.format( filename, class_data.lineno)) show_super_classes(name, class_data) show_methods(name, class_data) ...
apache-2.0
8,879,276,034,585,815,000
28.487179
58
0.611304
false
3.549383
false
false
false
SRabbelier/Melange
thirdparty/google_appengine/google/appengine/api/urlfetch_stub.py
1
11740
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
apache-2.0
-798,771,447,929,471,200
35.01227
90
0.644634
false
4.122191
false
false
false
pacoqueen/bbinn
formularios/resultados_permeabilidad.py
1
13671
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
gpl-2.0
-6,659,807,670,657,372,000
43.152104
178
0.524518
false
3.497308
false
false
false
catdevrandom/ankiaddon-wiktionarygrabber
src/wiktionarygrabber/dutchparser.py
1
5161
''' Created on 8 Oct 2015 @author: MBRANDAOCA ''' import logging logger = logging.getLogger('ankiwiktionarygrabber') import re from .entities import Word import pprint class DutchParser: def __init__(self, wordName, sourceText): self.wordName = wordName self.sourceText = sourceText s...
gpl-3.0
7,278,212,354,187,801,000
36.671533
204
0.542531
false
3.753455
false
false
false
JulienPeloton/s4cmb
s4cmb/instrument.py
1
39278
#!/usr/bin/python # Copyright (c) 2016-2021 Julien Peloton, Giulio Fabbian. # # This file is part of s4cmb # # 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 #...
gpl-3.0
-6,834,741,840,215,536,000
33.244115
85
0.538444
false
3.663651
true
false
false
dismantl/NOISE
noise.py
1
4145
import argparse import ConfigParser import sys import sched import time import random from noise_generate import noise_generator from noise_dispatch import email_dispatcher, twitter_dispatcher prog_desc = """This is the NOISE program. Turn up the noise! NOISE was written in July of 2013 as a way to create "real-looki...
gpl-3.0
6,736,526,299,350,407,000
39.252427
128
0.696261
false
3.859404
true
false
false
halbbob/dff
modules/mem/Volatility-1.3_Beta/forensics/win32/info.py
1
7264
# Volatility # Copyright (C) 2007,2008 Volatile Systems # # Volatools Basic # Copyright (C) 2007 Komoku, Inc. # # 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, o...
gpl-2.0
-8,891,313,473,644,752,000
35.686869
95
0.699064
false
3.599604
false
false
false
GaretJax/django-click
djclick/test/testprj/testprj/settings.py
1
2683
""" Django settings for testprj project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
mit
-5,417,445,698,062,638,000
24.552381
71
0.688781
false
3.439744
false
false
false
kmee/kmee_odoo_brasil_addons
__unported__/l10n_br_account_payment_boleto/report/report.py
1
2687
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2012 KMEE (http://www.kmee.com.br) # @author Luis Felipe Miléo <mileo@kmee.com.br> # # This prog # ram is free software: you can redistribut...
agpl-3.0
-2,170,624,790,258,959,000
34.289474
84
0.605744
false
3.781382
false
false
false
DGrady/pandas
pandas/core/reshape/merge.py
1
57172
""" SQL-style merge routines """ import copy import warnings import string import numpy as np from pandas.compat import range, lzip, zip, map, filter import pandas.compat as compat from pandas import (Categorical, Series, DataFrame, Index, MultiIndex, Timedelta) from pandas.core.frame import _mer...
bsd-3-clause
2,599,999,120,300,223,500
35.813909
79
0.534492
false
3.888458
false
false
false
rcooke-ast/ALIS
alis/alfunc_chebyshev.py
1
4918
import numpy as np from alis import almsgs from alis import alfunc_polynomial msgs=almsgs.msgs() class Chebyshev(alfunc_polynomial.Polynomial) : """ Returns a Chebyshev polynomial of the first kind: p[0] = coefficient of the term : 1 p[1] = coefficient of the term : x p[2] = coefficient of the te...
gpl-3.0
-6,934,683,241,125,425,000
53.043956
175
0.51037
false
3.571532
false
false
false
symbolicdata/code
src/sdeval/classes/templates/comp/GB_Z_lp/Magma/template.py
1
1414
""" This is the template for the computation problem of computing a Groebner basis of an ideal generated by a finite set of polynomials with integer coefficients (commutative). It creates code for the computer algebra system Magma. .. moduleauthor:: Albert Heinle <albert.heinle@rwth-aachen.de> """ #------------------...
gpl-3.0
2,560,823,852,814,164,500
34.35
116
0.51768
false
4.324159
false
false
false
probstj/pyMPB
examples/2D_PhC_W1defect_effective_epsilon_kdependent.py
1
4472
# -*- coding:utf-8 -*- # ---------------------------------------------------------------------- # Copyright 2017 Juergen Probst # # This file is part of pyMPB. # # pyMPB 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 Fou...
gpl-3.0
-4,076,110,634,177,354,000
35.357724
75
0.585197
false
2.755391
false
false
false
pombreda/xhtml2pdf
sx/pisa3/pisa_wsgi.py
1
2868
# -*- coding: UTF-8 -*- ############################################# ## (C)opyright by Dirk Holtwick, 2008 ## ## All rights reserved ## ############################################# __version__ = "$Revision: 103 $" __author__ = "$Author: holtwick $" __date__ = "$Date: 2007-10-31 17:08:54 ...
gpl-2.0
-7,949,622,899,037,190,000
31.235955
72
0.507671
false
4.261516
false
false
false
geobricks/Playground
playground/data_processing/ghg.py
1
3353
import calendar import glob import os import datetime # from pgeo.config.settings import settings, read_template from pgeo.metadata.metadata import Metadata from pgeo.manager.manager import Manager from pgeo.utils.log import logger # from pgeo.metadata.metadata import merge_layer_metadata # from data_processing.process...
gpl-2.0
-6,264,452,278,795,995,000
37.988372
134
0.663287
false
4.109069
false
false
false
coffeestats/coffeestats-django
coffeestats/caffeine/tests/test_forms.py
1
9584
from datetime import timedelta from django.conf import settings from django.test import TestCase from django.utils import timezone from django.contrib.auth import get_user_model from caffeine.forms import ( CoffeestatsRegistrationForm, DUPLICATE_EMAIL_ERROR, DUPLICATE_USER_ERROR, EMPTY_TIMEZONE_ERROR,...
mit
7,493,655,205,363,400,000
36.4375
77
0.601941
false
3.78515
true
false
false
jeffmarcom/checkbox
plainbox/plainbox/impl/session.py
1
36601
# This file is part of Checkbox. # # Copyright 2012, 2013 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Checkbox 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 ...
gpl-3.0
-8,459,465,772,003,060,000
40.592045
79
0.607934
false
4.500307
false
false
false
ResearchSoftwareInstitute/MyHPOM
hs_file_types/nc_functions/nc_meta.py
1
17016
""" Module extracts metadata from NetCDF file to complete the required MyHPOM NetCDF Science Metadata References reprojection http://gis.stackexchange.com/questions/78838/how-to-convert-projected-coordinates-to- lat-lon-using-python datatype http://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html ...
bsd-3-clause
-5,467,599,347,081,636,000
32.040777
99
0.58733
false
3.617347
false
false
false
lihf2015/python_exportemail
pytest/src/pytest/blog/export.py
1
1539
import MySQLdb mysql_config = { 'host':'127.0.0.1', 'user':'root', 'password':'***', 'port':3306, 'database':'Center', 'charset':'utf8', } def isset(v): try: type (eval(v)) except: return False else: return True def LoadFile(): try: cnn = MySQLdb....
apache-2.0
-2,823,865,944,555,348,000
27.518519
165
0.568551
false
3.31681
false
false
false
Flamacue/pretix
src/pretix/presale/views/event.py
1
5575
import sys from importlib import import_module from django.conf import settings from django.core.exceptions import PermissionDenied from django.db.models import Count, Prefetch, Q from django.shortcuts import redirect from django.utils.decorators import method_decorator from django.utils.timezone import now from djang...
apache-2.0
-4,503,766,492,321,768,400
40.917293
108
0.636233
false
3.882312
false
false
false
ThomasLecat/learning-to-learn-1
test.py
1
5843
import argparse import os import sys from six.moves import shlex_quote parser = argparse.ArgumentParser(description="Run commands") parser.add_argument('-w', '--num-workers', default=1, type=int, help="Number of workers") parser.add_argument('-r', '--remotes', default=None, help...
mit
8,103,161,750,969,680,000
43.946154
187
0.582235
false
3.449233
false
false
false
rc/gensei
gensei/intersectors.py
1
3866
from scipy.linalg import eig, inv from gensei.base import np, Object, pause class Intersector(Object): """ Base class defining the intersector interface. An intersector is a generalization of the concept of bounding box. Its purpose is to quickly decide that two objects do not intersect. False po...
bsd-3-clause
4,912,420,647,663,925,000
27.014493
75
0.491981
false
3.779081
false
false
false
ISIFoundation/influenzanet-website
apps/reminder/send.py
1
4225
import datetime import smtplib from traceback import format_exc from django.db.models import Q from django.core.mail import EmailMultiAlternatives from django.conf import settings from django.template import Context, loader, Template from django.core.urlresolvers import reverse from django.conf import settings from dj...
agpl-3.0
4,509,921,113,591,727,000
29.178571
123
0.648521
false
3.465956
false
false
false
matejcik/weblate
weblate/trans/machine/weblatetm.py
1
2463
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2016 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,728,391,191,519,856,000
28.285714
71
0.65935
false
4
false
false
false
galaxy-genome-annotation/python-apollo
apollo/annotations/__init__.py
1
47751
""" Contains possible interactions with the Apollo's Annotations """ import logging import sys import time from enum import Enum from timeit import default_timer from BCBio import GFF from apollo import util from apollo.client import Client from apollo.util import features_to_feature_schema, retry log = logging.getL...
mit
5,805,841,505,600,629,000
33.034925
172
0.496283
false
4.504811
false
false
false
ZzZxL/tf
function/devices.py
1
1071
import yaml import os.path import libs.common_tools as U import libs.adb_tools as AT __uuid = [] for device in U.bash('adb devices').stdout.readlines(): str_device = device.decode('utf-8') if 'device' in str_device and 'devices' not in str_device: # print(str_device.split('\t')[0]) __uuid.appen...
apache-2.0
8,090,016,514,319,673,000
21.787234
77
0.59944
false
3.025424
false
false
false
FrodeSolheim/fs-uae-launcher
amitools/vamos/lib/dos/FileHandle.py
1
3209
import os import sys from amitools.vamos.astructs import FileHandleStruct class FileHandle: """represent an AmigaOS file handle (FH) in vamos""" def __init__(self, obj, ami_path, sys_path, need_close=True, is_nil=False): self.obj = obj self.name = os.path.basename(sys_path) self.ami_path = ami_path ...
gpl-2.0
4,183,077,147,604,944,000
22.086331
148
0.568401
false
3.158465
false
false
false
Ledoux/ShareYourSystem
Pythonlogy/ShareYourSystem/Specials/Predicters/Predicter/tests/03_tests_chaotic/01_03_test_rate_chaotic_sparse_ExampleCell.py
1
1675
#/###################/# # Import modules # #ImportModules import ShareYourSystem as SYS #/###################/# # Build the model # #Simulation time SimulationTimeFloat=150. #SimulationTimeFloat=0.2 BrianingDebugVariable=0.1 if SimulationTimeFloat<0.5 else 25. #Define MyPredicter=SYS.PredicterClass( ).mapSet( { ...
mit
-5,692,480,365,674,930,000
18.940476
98
0.61791
false
2.878007
false
true
false
caperren/Archives
OSU Robotics Club/Mars Rover 2016-2017/ground_station/Framework/FreeSkyControllerCore.py
1
5259
""" This file contains the live logs page sub-class """ ##################################### # Imports ##################################### # Python native imports from PyQt5 import QtCore, QtWidgets, QtGui import logging from inputs import devices, GamePad import time #############################...
gpl-3.0
-4,046,768,298,055,876,000
31.711538
104
0.505039
false
3.869757
false
false
false
seibert/blaze-core
blaze/cgen/kernels.py
1
6746
# -*- coding: utf-8 -*- import ast from _ast import AST from blirgen import * from astprint import to_source from utils import anon #------------------------------------------------------------------------ # Kernel Manipulation #------------------------------------------------------------------------ IN = 0 OUT ...
bsd-2-clause
-6,924,290,979,154,296,000
24.946154
90
0.517937
false
4.357881
false
false
false
Jelby-John/HatalogicoWeatherStation
testLEDs.py
1
1477
#!/usr/bin/python from Adafruit_PWM_Servo_Driver import PWM import time, os, sys from random import randint # Initialise the PWM device using the default address pwm = PWM(0x70) pwm.setPWMFreq(100) brightRed = 3 brightGreen = 5 humidRed = 7 humidGreen = 9 tempRed = 11 tempGreen = 13 pwm.setPWM(brightRed, 0, 0) pwm....
mit
-7,273,160,462,105,087,000
23.229508
53
0.737982
false
2.25841
false
false
false
spjmurray/openstack-sentinel
sentinel/tests/functional/matchers.py
1
2021
# Copyright 2017 DataCentred Ltd # # 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 ag...
apache-2.0
5,151,791,077,368,259,000
32.131148
78
0.65908
false
4.149897
false
false
false
adfernandes/pcp
src/python/distutils-setup.py
6
2709
""" Build script for the PCP python package """ # # Copyright (C) 2012-2019 Red Hat. # Copyright (C) 2009-2012 Michael T. Werner # # This file is part of the "pcp" module, the python interfaces for the # Performance Co-Pilot toolkit. # # This program is free software; you can redistribute it and/or modify it # under th...
lgpl-2.1
-693,427,241,142,172,500
42
101
0.632706
false
4.02526
false
false
false
sensusaps/RoboBraille.Web.API
WorkingDirectory/DaisyPipeline/transformers/ca_cnib_rtf2dtbook/rtf2xml-py/rtf2xml/old_rtf.py
1
4940
######################################################################### # # # # # copyright 2002 Paul Henry Tremblay # # ...
apache-2.0
-8,214,136,676,771,880,000
27.888889
73
0.402024
false
4.402852
false
false
false
thefab/thr
thr/redis2http/queue.py
1
2315
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of thr library released under the MIT license. # See the LICENSE file for more information. import six from thr import DEFAULT_HTTP_PORT from thr.utils import UnixResolver # Trick to be able to iter over Queues class MetaQueues(type): def __ite...
mit
5,299,596,482,381,203,000
27.231707
79
0.598704
false
3.957265
false
false
false
Micronaet/micronaet-mx
l10n_it_iban_cin/cin.py
1
2078
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 # Associazione OpenERP Italia (<http://www.openerp-italia.org>) # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
-2,302,832,254,373,347,300
38.207547
78
0.581809
false
3.812844
false
false
false
CAST-Extend/com.castsoftware.uc.checkanalysiscompleteness
xlsxwriter/chart_bar.py
1
4234
############################################################################### # # ChartBar - A class for writing the Excel XLSX Bar charts. # # Copyright 2013-2015, John McNamara, jmcnamara@cpan.org # from . import chart class ChartBar(chart.Chart): """ A class for writing the Excel XLSX Bar charts. ...
mit
-429,550,489,637,466,100
27.039735
79
0.471658
false
4.255276
false
false
false
gbenson/i8c
src/i8c/compiler/exceptions.py
1
4619
# -*- coding: utf-8 -*- # Copyright (C) 2015-16 Red Hat, Inc. # This file is part of the Infinity Note Compiler. # # The Infinity Note Compiler 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 ...
lgpl-2.1
-5,116,232,908,992,785,000
34.045802
77
0.620344
false
3.620662
false
false
false
piantado/LOTlib
LOTlib/Projects/SetFunctionLearning/ExportToGPU.py
1
5579
import pickle from LOTlib import break_ctrlc import LOTlib # if we want to set LOTlib.SIG_INTERRUPTED=False for resuming ipython import numpy def build_conceptlist(c,l): return "CONCEPT_%s__LIST_%s.txt"%(c,l) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Load the hypotheses # ~~~~~...
gpl-3.0
1,487,308,069,296,301,600
34.762821
155
0.553683
false
3.405983
false
false
false
google/pymql
mql/graph/connector.py
1
14544
#!/usr/bin/python2.6 # Copyright 2020 Google LLC # # 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
6,251,589,412,407,532,000
30.894737
78
0.65429
false
3.621514
false
false
false
Teino1978-Corp/Teino1978-Corp-light_.gitignore
light_actions_views.py
1
8820
import json from django.contrib.auth.decorators import login_required from django.core import serializers from django.db.models import Count, Avg, Sum from django.http import HttpResponse, Http404 from django.views.generic import TemplateView, DetailView from actions.models import AccLocal, Dispersion, AnalisisDescuent...
mit
30,009,245,249,043,516
66.853846
319
0.659637
false
3.222506
false
false
false
chrishepner/sh-mitm
inject_shell.py
1
1642
#!/usr/bin/python # Usage: mitmdump -s "inject_shell.py payload.sh" # (this script works best with --anticache) from libmproxy.protocol.http import decoded def start(context, argv): if len(argv) != 2: raise ValueError('Usage: -s "inject_shell.py payload.sh"') context.payload = get_payload(argv[1]) ...
mit
-3,254,637,690,357,368,000
25.934426
67
0.608404
false
3.698198
false
false
false
natewlew/mythtvarchiveserver
MythTVArchiveServer/models/queue.py
1
1098
""" :synopsis: Queue Model :copyright: 2014 Nathan Lewis, See LICENSE.txt .. moduleauthor:: Nathan Lewis <natewlew@gmail.com> """ from datetime import datetime from sqlalchemy import Column, Integer, String, DateTime, Boolean from MythTVArchiveServer.controllers.registry import Base from MythTVArchiveServer.ut...
gpl-2.0
-7,859,828,193,317,172,000
28.675676
65
0.668488
false
3.553398
false
false
false
jeroanan/GameCollection
Tests/Interactors/Hardware/TestGetHardwareListInteractor.py
1
2277
# Copyright (c) David Wilson 2015 # Icarus 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. # Icarus is distributed in the hope that it...
gpl-3.0
2,535,090,522,206,172,000
42.788462
115
0.722442
false
3.953125
true
false
false
Pierre-Sassoulas/django-survey
survey/migrations/0009_auto_20181211_1908.py
1
1040
# Generated by Django 2.1.2 on 2018-12-11 19:08 import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("survey", "0008_translated_name_for_models")] operations = [ migrations.AlterField( ...
agpl-3.0
-7,784,223,999,061,182,000
27.888889
66
0.527885
false
4.60177
false
false
false
lampwins/netbox
netbox/virtualization/api/serializers.py
1
4632
from drf_yasg.utils import swagger_serializer_method from rest_framework import serializers from taggit_serializer.serializers import TaggitSerializer, TagListSerializerField from dcim.api.nested_serializers import NestedDeviceRoleSerializer, NestedPlatformSerializer, NestedSiteSerializer from dcim.constants import IF...
apache-2.0
-5,382,760,341,874,619,000
38.931034
114
0.720423
false
4.045415
false
false
false
praekelt/txtalert
txtalert/apps/general/jquery/views.py
1
1444
# Copyright (c) 2009, Jurie-Jan Botha # # This file is part of the 'jquery' Django application. # # 'jquery' 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 optio...
gpl-3.0
-5,582,317,714,049,177,000
40.257143
76
0.715374
false
3.750649
false
false
false
rockfruit/bika.lims
bika/lims/validators.py
1
39038
# This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. from Acquisition import aq_parent from Products.CMFPlone.utils import safe_unicode from bika.lims import bikaMessageFactory as _ from bika.lims.utils import to_utf8 from Products.CMFCore.util...
agpl-3.0
-7,776,938,878,244,990,000
33.669627
80
0.55218
false
4.360326
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/r-annotationdbi/package.py
1
2017
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
4,221,430,556,890,492,000
44.840909
131
0.670798
false
3.76306
false
false
false
amaork/raspi-io
raspi_io/i2c.py
1
3875
# -*- coding: utf-8 -*- from .client import RaspiWsClient from .core import RaspiBaseMsg, RaspiAckMsg __all__ = ['I2C', 'I2CDevice' 'I2CRead', 'I2CWrite'] class I2CRead(RaspiBaseMsg): READ, IOCTL = 0, 1 _handle = 'read' _properties = {'addr', 'size', 'type'} def __init__(self, **kwargs): kwar...
mit
-7,469,172,214,675,612,000
35.904762
106
0.616774
false
3.519528
false
false
false
mcrewson/squib
squib/utility.py
1
4011
# vim:set ts=4 sw=4 et nowrap syntax=python ff=unix: # # Copyright 2011-2018 Mark Crewson <mark@crewson.net> # # 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/lice...
apache-2.0
-2,185,374,145,809,257,500
29.853846
111
0.547993
false
3.805503
false
false
false
pizzapanther/metapile
metapile/settings.py
1
3368
""" Django settings for metapile project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import o...
mit
7,017,270,099,466,307,000
24.709924
99
0.696556
false
3.447288
false
false
false
pcolmant/repanier
repanier/views/home_info_ajax.py
1
2866
from django.conf import settings from django.http import Http404, JsonResponse from django.urls import reverse from django.utils.html import format_html from django.utils.safestring import mark_safe from django.views.decorators.cache import never_cache from django.views.decorators.http import require_GET from repanier...
gpl-3.0
8,776,966,631,521,111,000
35.74359
142
0.5
false
4.355623
false
false
false
maximilianhuber/myconfig
nix/nixpkgs/pkgs/development/tools/analysis/radare2/update.py
1
3938
#!/usr/bin/env nix-shell #!nix-shell -p nix -p python3 -p git -i python # USAGE - just run the script: ./update.py # When editing this file, make also sure it passes the mypy typecheck # and is formatted with black. import fileinput import json import re import subprocess import tempfile import urllib.request from date...
mit
-6,107,129,288,490,350,000
29.061069
87
0.571864
false
3.273483
false
false
false
eile/ITK
Wrapping/Generators/Python/itkTemplate.py
1
15636
#========================================================================== # # Copyright Insight Software Consortium # # 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...
apache-2.0
-1,918,399,550,691,768,300
35.704225
79
0.571374
false
4.533488
false
false
false
cea-sec/ivre
ivre/tools/scanstatus.py
1
3285
#! /usr/bin/env python # This file is part of IVRE. # Copyright 2011 - 2021 Pierre LALET <pierre@droids-corp.org> # # IVRE 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 #...
gpl-3.0
3,568,734,017,957,122,600
34.322581
88
0.525419
false
3.967391
false
false
false
ternaus/kaggle_wallmart
src/sklearn_random_cv.py
1
2139
#!/usr/bin/env python __author__ = 'Vladimir Iglovikov' ''' This script will do randomized search to find the best or almost the best parameters for this problem for sklearn package ''' # import xgboost as xgb import pandas as pd import numpy as np from xgboost import XGBRegressor from sklearn import cross_validatio...
mit
-9,178,384,911,977,075,000
31.424242
126
0.682094
false
3.384494
false
false
false
espressif/esp-idf
tools/esp_prov/transport/transport_http.py
1
2200
# Copyright 2018 Espressif Systems (Shanghai) PTE LTD # # 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 ...
apache-2.0
4,782,299,681,715,800,000
35.666667
99
0.669545
false
4.222649
false
false
false
simone-campagna/callerframe
docs/source/conf.py
1
11602
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # callerframe documentation build configuration file, created by # sphinx-quickstart on Thu Aug 20 13:21:39 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this ...
apache-2.0
-8,275,241,672,940,575,000
29.612137
91
0.701
false
3.630163
true
false
false
mardiros/creds
docker/creds/create_database.py
1
2076
#!/usr/bin/python """ Create the database and the user/role, associate it in case, the database does not exists. """ import sys import time import psycopg2 from pyramid.paster import get_appsettings, setup_logging, _getpathsec from urllib.parse import urlparse config_uri = sys.argv[1] setup_logging(config_uri) set...
bsd-3-clause
2,951,554,403,640,418,300
25.278481
72
0.543353
false
4.168675
false
false
false
niklasf/python-prompt-toolkit
prompt_toolkit/terminal/win32_input.py
1
10078
from ctypes import windll, pointer from ctypes.wintypes import DWORD from prompt_toolkit.key_binding.input_processor import KeyPress from prompt_toolkit.keys import Keys from prompt_toolkit.mouse_events import MouseEventTypes from prompt_toolkit.win32_types import EventTypes, KEY_EVENT_RECORD, MOUSE_EVENT_RECORD, INPU...
bsd-3-clause
-1,320,656,608,937,177,000
34.485915
119
0.571939
false
3.646165
false
false
false
psarka/uplift
uplift/tree/tree.py
1
37084
# Authors: Paulius Sarka <paulius.sarka@gmail.com> # # Based on sklearn/tree/tree.py (BSD 3 clause) # # Licence: BSD 3 clause from abc import ABC from abc import abstractmethod from math import ceil import numbers import numpy as np from scipy.sparse import issparse from ..base import BaseEstimator from ..base import...
bsd-3-clause
5,068,596,750,430,837,000
38.961207
101
0.57661
false
4.294615
false
false
false
jay-lau/magnum
magnum/tests/unit/conductor/handlers/common/test_cert_manager.py
1
11510
# Copyright 2015 NEC Corporation. All rights reserved. # # 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 l...
apache-2.0
-7,032,024,222,951,226,000
43.440154
78
0.611381
false
3.86501
true
false
false
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/canalc2.py
1
1831
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import parse_duration class Canalc2IE(InfoExtractor): IE_NAME = 'canalc2.tv' _VALID_URL = r'https?://(?:(?:www\.)?canalc2\.tv/video/|archives-canalc2\.u-strasbg\.fr/video\.asp\?.*\bidVideo=)(?P<id>\d+)...
gpl-3.0
-9,206,074,654,363,458,000
24.068493
126
0.57541
false
2.570225
false
false
false
bellettif/MultimodePIF
PythonWksp/classic_HMM/inference/Test_EM2.py
1
2135
''' Created on 9 mai 2014 @author: Francois Belletti ''' import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from surrogate.Markov_model import Markov_model from HMM_algos import Proba_computer initial = [0.1, 0.1, 0.1] A = [[0.3, 0.5, 0.3], [0.3, 0.3, 0.5], [0.5, 0.3, 0.3]] alphabet = ...
gpl-2.0
-1,066,241,989,006,704,400
21.967742
99
0.593911
false
2.912688
false
false
false
simplydallas/FSND-Project-4
models.py
1
5294
#!/usr/bin/env python """models.py Udacity conference server-side Python App Engine data & ProtoRPC models $Id: models.py,v 1.1 2014/05/24 22:01:10 wesc Exp $ created/forked from conferences.py by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import httplib import endpoints from protor...
apache-2.0
7,081,453,984,758,240,000
34.77027
86
0.684926
false
3.912786
false
false
false
neozhangthe1/coverage_model
groundhog/trainer/SGD_adadelta.py
1
8110
""" Stochastic Gradient Descent. TODO: write more documentation """ __docformat__ = 'restructedtext en' __authors__ = ("Razvan Pascanu " "KyungHyun Cho " "Caglar Gulcehre ") __contact__ = "Razvan Pascanu <r.pascanu@gmail>" import numpy import time import logging import theano import th...
bsd-3-clause
-1,388,273,615,656,422,100
37.803828
98
0.499753
false
3.827277
false
false
false
runcom/flocker
flocker/provision/_ca.py
1
2866
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Create certificates for a cluster. """ from twisted.python.filepath import FilePath from subprocess import check_call class CertAndKey(object): """ Paths to a matching pair of certificate and key files. :ivar FilePath certificate: Path to th...
apache-2.0
-7,344,248,221,622,199,000
36.220779
79
0.623866
false
4.147612
false
false
false
bcongdon/advent_of_code_2016
Day10-19/17.py
1
1249
import hashlib from collections import deque def pathfind(code, part=1): bfs_q, solutions = deque([(0, 0, '')]), [] dirs = [(0, -1, 'U'), (0, 1, 'D'), (-1, 0, 'L'), (1, 0, 'R') ] while bfs_q: x, y, path = bfs_q.popleft() if x > 3 or x < 0 or ...
mit
8,302,387,730,780,646,000
28.738095
67
0.489191
false
3.061275
false
false
false
ianblu1/alexandria
alexandria/app.py
1
2115
import os from flask import Flask, render_template from alexandria.extensions import db, migrate, bcrypt, login_manager from alexandria.models import users, documentlinks def create_app(config_setting='dev'): """An application factory, as explained here: http://flask.pocoo.org/docs/patterns/appfactories/...
mit
3,557,105,556,335,278,600
30.567164
86
0.699764
false
3.783542
true
false
false
drummonds/galleria
galleria/products/models.py
1
3217
from django.core.urlresolvers import reverse from django.db import models from model_utils.models import TimeStampedModel from contacts.models import Contact,Address class Product(models.Model): name = models.CharField(max_length=255) COLOUR_CHOICES = ( ('NR', 'Navy/Red'), ('NB', 'Navy/Blue')...
apache-2.0
-4,593,358,042,740,325,000
34.744444
113
0.639416
false
3.727694
false
false
false
synapsepayments/synapse_pay-python
synapsepay/endpoints/wire.py
1
1034
from ..apibits import * from ..resources import * class WireEndpoint(APIEndpoint): def all_incoming(self, params={}, headers={}): method = APIMethod("post", "/wirein/show", params, headers, self) json = self.client.execute(method) return APIList(Wire, json['wires'], method, self.client...
mit
4,455,233,046,553,996,300
42.083333
74
0.617021
false
3.931559
false
false
false
chromium/chromium
build/fuchsia/update_sdk.py
5
5212
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Updates the Fuchsia SDK to the given revision. Should be used in a 'hooks_os' entry so that it only runs when .gclient's target_os i...
bsd-3-clause
-772,706,109,524,942,200
30.02381
80
0.686493
false
3.57967
false
false
false
jotinha/scn2obj
python/tools.py
1
2950
# -*- coding: utf-8 -*- """ Created on Thu Apr 18 01:27:04 2013 @author: jsousa """ from scn import * import os #MAP = 'cubes' #scn = CScn(MAP + '.scn') ws = scn.solids[0] verts = [[v.x,v.y,v.z] for v in ws.verts] uvs = [[uv.u,uv.v] for uv in ws.uvs] idxs = list(ws.vertidxs) uvidxs = list(ws.uvidxs) def exists(t...
bsd-3-clause
-3,718,105,539,860,270,600
23.798319
89
0.615593
false
2.817574
false
false
false
tmenjo/cinder-2015.1.1
cinder/tests/targets/test_cxt_driver.py
1
12451
# Copyright 2015 Chelsio Communications Inc. # All Rights Reserved. # # 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 # # Unle...
apache-2.0
-4,467,270,175,578,526,000
44.112319
170
0.545177
false
3.616323
true
false
false
penkz/python-fundamentals
Assignment2/a2.py
1
3011
def get_length(dna): ''' (str) -> int Return the length of the DNA sequence dna. >>> get_length('ATCGAT') 6 >>> get_length('ATCG') 4 ''' return len(dna) def is_longer(dna1, dna2): ''' (str, str) -> bool Return True if and only if DNA sequence dna1 is longer than DNA sequence...
mit
8,645,785,911,774,364,000
19.214765
76
0.578213
false
3.182875
false
false
false
anthonyfok/frescobaldi
frescobaldi_app/engrave/custom.py
1
10295
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
gpl-2.0
-8,479,477,609,433,866,000
35.25
108
0.607965
false
3.964189
false
false
false
sideeffects/stats_houdini
houdini_stats/migrations/0003_auto__add_field_nodetypeusage_node_creation_mode.py
1
4506
# encoding: utf-8 import datetime import south.db from south.db import dbs from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db = dbs['stats'] db.dry_run = south.db.db.dry_run # Adding field 'NodeTypeUsage....
mit
-7,339,537,532,527,319,000
60.726027
154
0.570573
false
3.642684
true
false
false
mattvonrocketstein/smash
smashlib/ipy3x/qt/console/magic_helper.py
1
7580
"""MagicHelper - dockable widget showing magic commands for the MainWindow """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. #----------------------------------------------------------------------------- # Imports #------------------------------------------------...
mit
-7,352,684,746,488,661,000
34.092593
79
0.558047
false
4.54982
false
false
false
pombredanne/grr
lib/console_utils.py
1
19146
#!/usr/bin/env python """Utils for use from the console. Includes functions that are used by interactive console utilities such as approval or token handling. """ import getpass import os import time import logging from grr.lib import access_control from grr.lib import aff4 from grr.lib import client_index from grr...
apache-2.0
-433,375,290,531,408,800
35.608031
80
0.660347
false
3.658005
false
false
false
t3dev/odoo
addons/base_automation/models/base_automation.py
1
19219
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import logging import time import traceback from collections import defaultdict import dateutil from dateutil.relativedelta import relativedelta from odoo import _, api, fields, models, SUPERUSER_ID fro...
gpl-3.0
5,174,167,897,326,099,000
45.310843
173
0.575316
false
4.415116
false
false
false
Intel-Corporation/tensorflow
tensorflow/python/ops/while_v2.py
1
40053
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
apache-2.0
204,137,850,500,746,370
41.429025
110
0.695678
false
3.86612
false
false
false
cgranade/python-quaec
src/qecc/bsf_decomp.py
1
6220
#!/usr/bin/python # -*- coding: utf-8 -*- ## # bsf_decomp.py: Decomposes binary symplectic matrices into circuits. ## # © 2012 Christopher E. Granade (cgranade@gmail.com) and # Ben Criger (bcriger@gmail.com). # This file is a part of the QuaEC project. # Licensed under the AGPL version 3. ## # This program is free ...
agpl-3.0
-2,169,003,333,768,024,000
34.135593
102
0.579193
false
3.559817
false
false
false
jenfly/atmos-read
scripts/fram/merra-dudt_ana.py
1
3088
import sys sys.path.append('/home/jwalker/dynamics/python/atmos-tools') sys.path.append('/home/jwalker/dynamics/python/atmos-read') import os import xray import numpy as np from datetime import datetime import matplotlib.pyplot as plt import pandas as pd import atmos as atm import precipdat import merra # -----------...
mit
5,724,058,073,723,574,000
36.204819
80
0.593588
false
3.100402
false
false
false
atul-bhouraskar/closure-templates
python/runtime.py
1
15337
# Copyright 2015 Google Inc. All Rights Reserved. # # 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
-6,550,523,326,600,613
31.424947
80
0.699224
false
4.018077
false
false
false
Vagab0nd/SiCKRAGE
sickchill/oldbeard/databases/main.py
1
15696
import datetime import os.path from sickchill import logger from sickchill.helper.common import episode_num from sickchill.oldbeard import common, db, helpers MIN_DB_VERSION = 44 MAX_DB_VERSION = 44 class MainSanityCheck(db.DBSanityCheck): def check(self): self.fix_missing_table_indexes() self.f...
gpl-3.0
2,788,307,153,587,947,000
60.07393
631
0.657492
false
3.872687
false
false
false
takeflight/wagtail
wagtail/tests/settings.py
1
7684
import os DEBUG = False WAGTAIL_ROOT = os.path.dirname(os.path.dirname(__file__)) STATIC_ROOT = os.path.join(WAGTAIL_ROOT, 'tests', 'test-static') MEDIA_ROOT = os.path.join(WAGTAIL_ROOT, 'tests', 'test-media') MEDIA_URL = '/media/' TIME_ZONE = 'Asia/Tokyo' DATABASES = { 'default': { 'ENGINE': os.environ....
bsd-3-clause
5,152,247,584,401,198,000
31.421941
112
0.645627
false
3.717465
true
false
false
UWIT-IAM/uw-restclients
restclients/models/sws.py
1
35473
import pickle from django.db import models from django.template import Context, loader from base64 import b64encode, b64decode from datetime import datetime from restclients.exceptions import InvalidCanvasIndependentStudyCourse from restclients.exceptions import InvalidCanvasSection from restclients.util.date_formator ...
apache-2.0
1,117,354,499,662,058,600
35.951042
79
0.59823
false
3.786614
false
false
false
calmjs/calmjs
src/calmjs/indexer.py
1
10097
# -*- coding: utf-8 -*- """ Various loaders. """ from __future__ import absolute_import import fnmatch import pkg_resources from logging import getLogger from glob import iglob from os.path import exists from os.path import join from os.path import relpath from os.path import sep from os import walk logger = getLog...
gpl-2.0
-8,038,850,769,738,073,000
29.68997
79
0.659206
false
4.08951
false
false
false
pastgift/seed-website-py
app/site_auth/forms.py
1
2373
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask import session from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import Required, Length, Email, EqualTo from wtforms import ValidationError from flask.ext.babel im...
mit
4,919,729,316,273,682,000
32.9
91
0.644753
false
4.511407
false
false
false