repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
magicjohnson/targetprocess-client
tests/tests_serializers.py
1
2681
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from datetime import datetime from unittest import TestCase from pytz import UTC from targetprocess.serializers import TargetProcessSerializer class Ta...
mit
7,321,765,493,372,442,000
28.461538
72
0.419247
false
4.590753
true
false
false
mzweilin/EvadeML-Zoo
attacks/adaptive/adaptive_adversary.py
1
13504
""" Demo if adaptive adversary works against feature squeezing. Embed the diffrentiable filter layers in a model. Pass in the (average) gradient (part of loss) to an attack algorithm. Implement the gaussian-noise-iterative method for non-diffrentiable filter layers (bit depth reduction.) Introduce ...
mit
-4,588,822,924,115,411,500
41.332288
261
0.61878
false
3.259474
false
false
false
google-research/google-research
pse/jumping_task/training_helpers.py
1
8970
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
3,118,179,143,913,050,600
36.219917
80
0.675362
false
3.246471
false
false
false
tomas-mazak/taipan
taipan/dictionary.py
1
11826
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os import re import itertools import gtk import tegakigtk.recognizer import cjklib.dictionary import cjklib.dictionary.search import cjklib.reading import cjklib.characterlookup import tagtable import sorder MODULE_DIR = os.path.dirname(os.path.abspath( __file__ )) ...
gpl-3.0
-4,708,782,873,489,502,000
38.551839
78
0.568155
false
3.914598
false
false
false
erikriver/eduIntelligent-cynin
src/ubify.viewlets/ubify/viewlets/browser/addnewmenu.py
1
10384
############################################################################### #cyn.in is an open source Collaborative Knowledge Management Appliance that #enables teams to seamlessly work together on files, documents and content in #a secure central environment. # #cyn.in v2 an open source appliance is distributed un...
gpl-3.0
952,695,614,535,909,400
50.92
210
0.562307
false
4.650246
false
false
false
bruth/restlib2
restlib2/params.py
1
5458
import logging import warnings import collections from six import add_metaclass from functools import partial logger = logging.getLogger(__name__) class Param(object): "Describes a single parameter and defines a method for cleaning inputs." def __init__(self, default=None, allow_list=False, description=None,...
bsd-2-clause
-2,967,277,310,874,502,700
32.484663
113
0.562294
false
4.328311
false
false
false
UI-DataScience/summer2014
hw5/FirstName-LastName-twittercloud.py
1
4434
#!/usr/bin/python # Week 5 problem 3. Twitter. # Do not delete the comments. # Do not chnage the functions names, do not change the input parameters. # Do not change the return types of the functions. # Your code goes to the part where it says your code goes here. # Do not change anything else other than the part whe...
mit
-2,413,207,903,548,857,300
33.379845
84
0.656067
false
3.815835
false
false
false
T2DREAM/t2dream-portal
src/encoded/commands/generate_ontology.py
1
28527
from rdflib import ConjunctiveGraph, exceptions, Namespace from rdflib import RDFS, RDF, BNode from rdflib.collection import Collection import json EPILOG = __doc__ OWLNS = Namespace("http://www.w3.org/2002/07/owl#") OBO_OWL = Namespace("http://www.geneontology.org/formats/oboInOwl#") EFO = Namespace("http://www.ebi....
mit
6,067,716,353,645,445,000
34.3933
160
0.539138
false
3.511015
false
false
false
jamesbeebop/flask-admin
flask_admin/tests/test_model.py
4
19143
import wtforms from nose.tools import eq_, ok_ from flask import Flask from werkzeug.wsgi import DispatcherMiddleware from werkzeug.test import Client from wtforms import fields from flask_admin import Admin, form from flask_admin._compat import iteritems, itervalues from flask_admin.model import base, filters fro...
bsd-3-clause
2,735,496,905,942,665,700
28.092705
94
0.593846
false
3.231431
true
false
false
isb-cgc/ISB-CGC-API
apiv4/user_views.py
1
8547
# # Copyright 2019, Institute for Systems Biology # # 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
6,568,610,399,595,830,000
39.7
217
0.652042
false
4.165205
false
false
false
ddxgz/surveydog
models.py
1
2043
import datetime from django.db import models from django.utils import timezone class Survey(models.Model): survey_head = models.CharField(max_length=100) survey_text = models.TextField() pub_date = models.DateTimeField('date published') # num_question = models.PositiveSmallIntegerField(default=0) ...
gpl-2.0
-1,759,011,401,925,384,000
28.608696
71
0.704356
false
3.936416
false
false
false
davidzchen/tensorflow
tensorflow/python/framework/experimental/nn_ops.py
1
1669
# Copyright 2020 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
-4,668,100,517,460,849,000
41.794872
80
0.729179
false
4.012019
false
false
false
2buntu/2buntu-blog
twobuntu/accounts/migrations/0001_initial.py
1
1459
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import twobuntu.utils class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.CreateModel( ...
apache-2.0
-3,980,062,107,136,659,000
35.475
141
0.561343
false
4.368263
false
false
false
honggyukim/uftrace
tests/t227_read_pmu_cycle2.py
2
1661
#!/usr/bin/env python from runtest import TestBase class TestCase(TestBase): def __init__(self): TestBase.__init__(self, 'abc', """ # DURATION TID FUNCTION [ 32417] | main() { [ 32417] | a() { [ 32417] | b() { [ 32417] | /* read:pmu-cycle...
gpl-2.0
-5,240,308,492,642,902,000
35.108696
95
0.469597
false
3.308765
true
false
false
rybak/gpodder
src/gpodder/feedservice.py
2
2771
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2015 Thomas Perl and the gPodder Team # # gPodder 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...
gpl-3.0
8,455,788,956,784,504,000
33.209877
85
0.63515
false
3.759837
false
false
false
undefinedv/Jingubang
sqlmap/plugins/dbms/maxdb/enumeration.py
2
8846
#!/usr/bin/env python """ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.common import randomStr from lib.core.common import readInput from lib.core.common import safeSQLIdentificatorNaming from lib...
gpl-3.0
1,409,668,229,052,347,600
36.324895
193
0.585688
false
3.903795
false
false
false
google-research/realworldrl_suite
realworldrl_suite/utils/accumulators.py
1
6559
# coding=utf-8 # Copyright 2020 The Real-World RL Suite 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 appl...
apache-2.0
6,786,912,053,370,854,000
38.993902
80
0.674798
false
3.871901
false
false
false
craigulmer/rungen
rungen.py
1
9773
from math import * from random import * import numpy as np import xml.etree.ElementTree as et import sys, getopt, time import pytz from datetime import * from dateutil import parser ZULU_FMT="%Y-%m-%dT%H:%M:%SZ" KML_URL="http://earth.google.com/kml/2.2" def parseTimeToUTC(time_string, time_zone): src_time = par...
mit
234,825,387,619,238,530
31.576667
290
0.586105
false
3.036036
false
false
false
dgpt/GCMIS_scripts
master_off_list_advanced.py
1
1308
#$language = "python" #$interface = "1.0" import sys def main(): """ Enter a list of sessions to kill separated by spaces, script kills them and handles all possible scenarios This version shows all sessions logged into store at the end (info.us -l store#)""" screen = crt.Screen dlg = crt.Dialog ...
gpl-2.0
-5,087,455,663,526,578,000
30.902439
121
0.597095
false
3.780347
false
false
false
dpaleino/new-osm-stats
osmstats/output/html.py
1
1325
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright © 2010-2011, David Paleino <d.paleino@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 Foundation, either version 3 of the License, or ...
gpl-3.0
6,173,986,325,670,334,000
32.948718
125
0.688822
false
3.511936
false
false
false
bdecoste/cct_module
datagrid-openshift/added/probes/probe/jdg/jolokia.py
1
5968
""" Copyright 2017 Red Hat, Inc. Red Hat licenses this file to you 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 agreed to...
apache-2.0
-6,897,469,345,434,861,000
32.340782
119
0.574564
false
4.372161
true
false
false
janusnic/initpy
initpy/templates/falcon.py
3
1293
#!/usr/bin/env python # -*- coding:utf-8 -*- from string import Template app_init = Template(""" #!/usr/bin/env python # -*- coding:utf-8 -*- import falcon # from .middleware import * from .resources import ${module_title}Resource ${module}Resource = ${module_title}Resource() def create_app(): app = falcon.AP...
mit
-3,236,203,294,690,416,600
16.712329
61
0.617943
false
3.248744
false
false
false
jccotou/panther
setup/database/etl/processors/drug_response.py
1
6694
from decimal import Decimal from setup.database.etl.data_sources.drug_information import DrugInformationDataSource from setup.database.etl.data_sources.drug_response import DrugResponseDataSource from setup.database.etl.processors.etl_processor import ETLProcessor from setup.database.metadata.database import CCLEDataba...
gpl-3.0
-26,876,317,098,191,264
46.475177
119
0.628025
false
3.226024
false
false
false
bbsadowsky/bbsadowsky
qinf.py
1
1544
#!python # Solves for basic information from a standard form quadratic equation # Copyright Bradley Sadowsky, 10/3/2016; MIT License # qinf (Q)uadratic (IN)formation (F)inder import cmath import sys def main(): # Take (floating point) input into form y = ax^2 + bx + c a = float(input("A: ")) b = float(inpu...
mit
5,574,299,784,683,715,000
32.565217
87
0.58614
false
2.98646
false
false
false
anselmobd/fo2
src/lotes/queries/pedido/sortimento.py
1
8366
from utils.functions.models import GradeQtd from utils.functions import arg_def def sortimento(cursor, **kwargs): def argdef(arg, default): return arg_def(kwargs, arg, default) pedido = argdef('pedido', None) tipo_sort = argdef('tipo_sort', 'rc') descr_sort = argdef('descr_sort', True) m...
mit
-3,758,643,150,027,135,500
32.047431
76
0.518718
false
3.145598
false
false
false
Eureka22/ASM_xf
PythonD/site_python/twisted/python/context.py
2
2456
# -*- test-case-name: twisted.test.test_context -*- # Twisted, the Framework of Your Internet # Copyright (C) 2001-2002 Matthew W. Lefkowitz # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free So...
gpl-2.0
-9,052,679,563,768,801,000
31.315789
88
0.709691
false
4.02623
false
false
false
mxmaslin/Test-tasks
tests_django/apps/loans/migrations/0001_initial.py
1
4400
# Generated by Django 2.1.1 on 2018-09-29 18:12 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
gpl-3.0
-5,729,019,905,014,535,000
56.028169
181
0.594221
false
3.362957
false
false
false
labordoc/labordoc-next
modules/bibformat/lib/elements/bfe_ILO_authors_publ.py
1
5979
## -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN. ## ## Invenio 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 v...
gpl-2.0
-1,766,203,646,659,372,800
38.596026
155
0.578859
false
4.186975
false
false
false
uw-it-aca/course-dashboards
coursedashboards/views/page.py
1
2962
import json from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponseRedirect from django.shortcuts import render from coursedashboards.dao.user import get_current_user from coursedashboards.dao.term import ( get_current_coda_term, get_given_and_previous_quarters) from courseda...
apache-2.0
6,265,254,528,811,069,000
32.659091
73
0.63133
false
4.002703
false
false
false
gkunter/coquery
coquery/gui/pyqt_compat.py
1
2132
# -*- coding: utf-8 -*- """ pyqt_compat.py is part of Coquery. Copyright (c) 2016-2018 Gero Kunter (gero.kunter@coquery.org) Coquery is released under the terms of the GNU General Public License (v3). For details, see the file LICENSE that you should have received along with Coquery. If not, see <http://www.gnu.org/l...
gpl-3.0
4,065,255,312,328,707,600
24.686747
76
0.658068
false
3.820789
false
false
false
dhondta/tinyscript
tests/test_timing.py
1
1536
#!/usr/bin/env python # -*- coding: UTF-8 -*- """Timing module assets' tests. """ import time from tinyscript.helpers.timeout import TimeoutError from tinyscript.timing import set_time_items from utils import * args.stats = True args.timings = True set_time_items(globals()) class TestTiming(TestCase): def te...
agpl-3.0
-1,160,874,004,725,543,400
26.927273
71
0.611979
false
3.888608
true
false
false
google/novm
novm/memory.py
3
1855
# Copyright 2014 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
-316,468,238,062,058,200
27.106061
74
0.58814
false
4.023861
false
false
false
beernarrd/gramps
gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py
3
3143
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 you...
gpl-2.0
996,183,622,077,085,600
33.922222
79
0.538339
false
4.305479
false
false
false
vasyabigi/ds-flow
dsflow/tasks.py
1
4015
from __future__ import with_statement import json from datetime import datetime from fabric.api import local, prompt, task, quiet from fabric.colors import green, cyan, red from fabric.contrib.console import confirm from settings import GITHUB, UPSTREAM_ONLY, BRANCH_FORMAT_STRING, GIT_REMOTE_NAME, GIT_DEFAULT_BASE f...
mit
-3,058,465,067,527,867,000
27.076923
99
0.628892
false
3.50655
false
false
false
orezahc/IRProjectAPIServer
app/main.py
1
1759
# Imports import asyncio import tornado import tornado.web import tornado.platform.asyncio import googlehandler import yelphandler import bunyan import logging import os import sys import argparse import googlehandler import yelphandler _PRETTY_FORMAT = '%(asctime)s :: %(levelname)s :: %(name)s :: %(message)s' _logg...
mit
-5,078,912,192,931,598,000
21.844156
92
0.629335
false
3.832244
false
false
false
NitorCreations/nitor-deploy-tools
n_utils/cli.py
1
46343
# Copyright 2016-2017 Nitor Creations Oy # # 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 agreed to ...
apache-2.0
3,418,491,037,571,517,000
41.517431
162
0.610491
false
4.062681
false
false
false
jeliasherrero/SeminarioTheano2015
convTheano.py
1
7606
""" Diseno de LeNET (red convolucional) para reconocer los digitos del fichero de matlab digits.mat """ import time import scipy.io as io import numpy import theano import theano.tensor as T from theano.tensor.signal import downsample from theano.tensor.nnet import conv # Importamos las clases que ya hemos definido e...
gpl-2.0
-3,203,256,579,341,251,600
30.962185
95
0.643571
false
3.346238
false
false
false
ajavadia/ScaffCC
scaffold/flatten-qasm.py
1
8016
import argparse import re def process_qasm(fname): qgates = ['H','X','CNOT','Y','Z','S','T','Tdag','Sdag','Rz','PrepX','PrepZ','MeasX','MeasZ','Toffoli','Fredkin'] qgates_1 = ['H','X','Y','Z','S','T','Tdag'] qgates_1a = ['Sdag'] qgates_2 = ['CNOT'] qgates_3 = ['Toffoli','Fredkin'] qga...
bsd-2-clause
-2,705,765,999,966,634,500
31.322581
139
0.42228
false
3.208967
false
false
false
d2emon/newspaperizer
src/article/migrations/0011_auto_20160912_1900.py
1
3451
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-12 19:00 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('article', '0010_auto_20160905_1127'), ] operations =...
gpl-3.0
2,359,491,300,905,442,300
38.215909
147
0.587946
false
4.418694
false
false
false
kanafghan/fiziq-backend
src/api/default/__init__.py
1
1182
''' Created on 08/03/2015 @author: Ismail Faizi ''' import datetime import endpoints import re defaultApi = endpoints.api( name='default', version='v1', title='Fiziq Default API', description='The API for Fiziq smarthphone applications.' ) class Utilities(object): """ Utility logic for defaul...
gpl-2.0
518,741,908,262,074,560
23.122449
88
0.598139
false
3.94
false
false
false
kobotoolbox/kobocat
onadata/apps/logger/models/instance.py
1
16503
# coding: utf-8 from datetime import date, datetime from hashlib import sha256 import reversion from django.contrib.auth.models import User from django.contrib.gis.db import models from django.contrib.gis.geos import GeometryCollection, Point from django.db import transaction from django.db.models import F from django...
bsd-2-clause
-6,849,813,254,606,204,000
34.33833
99
0.636612
false
3.955657
false
false
false
Agiroq/VW
gas.py
1
1152
import machine, time from machine import Timer GASANALOG = 0 ALARMLED = 13 gasA = machine.ADC(GASANALOG) gasLED = machine.Pin(ALARMLED, machine.Pin.OUT) class CheckGas(): """docstring for checkGas.""" def __init__(self, led, sensor, time=5000, level=480): super(CheckGas, self).__init__() self....
cc0-1.0
-591,044,774,667,530,100
23
58
0.545139
false
3.418398
false
false
false
GNOME/pygoocanvas
demo/simple_demo/clipping_demo.py
1
5063
import goocanvas import gtk import cairo def on_button_press (item, target, event, id): print "%s received 'button-press' signal at %f, %f (root: %f, %f)" % \ (id, event.x, event.y, event.x_root, event.y_root) return True def setup_canvas (canvas): root = canvas.get_root_item () #Plain ite...
lgpl-2.1
4,378,497,605,375,581,700
34.907801
76
0.439265
false
4.063403
false
false
false
magfest/ubersystem
tests/locust/locustfile.py
1
2821
""" Load tests using locust.io. """ import urllib3 import faker from locust import HttpLocust, TaskSet, task urllib3.disable_warnings() fake = faker.Faker() faker.providers.phone_number.en_US.Provider.formats = ('888-555-####',) class AttendeeBehavior(TaskSet): min_wait = 1000 max_wait = 10000 def on...
agpl-3.0
7,510,887,857,052,802,000
33.402439
115
0.562212
false
3.746348
false
false
false
christofdamian/gpodder
src/gpodder/model.py
1
44899
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2010 Thomas Perl and the gPodder Team # # gPodder 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...
gpl-3.0
8,254,401,442,655,830,000
37.606191
140
0.596093
false
4.053354
false
false
false
renatopp/aerolito
setup.py
1
1829
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Renato de Pontes Pereira' __author_email__ = 'renato.ppontes@gmail.com' __version__ = '0.1' __date__ = '2011 10 15' try: import setuptools except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, fin...
mit
-8,713,495,379,147,179,000
31.087719
104
0.65883
false
4.04646
false
false
false
apdjustino/DRCOG_Urbansim
src/drcog/models/gwr_hedonic.py
1
19704
import numpy as np, pandas as pd, os from synthicity.utils import misc from drcog.models import dataset dset = dataset.DRCOGDataset(os.path.join(misc.data_dir(),'drcog.h5')) np.random.seed(1) import statsmodels.api as sm #import pygwr_kernel import random """ This program estimates an hedonic model for prices of resid...
agpl-3.0
8,107,236,233,041,884,000
37.484375
161
0.625355
false
2.775602
false
false
false
CZ-NIC/thug
src/Classifier/BaseClassifier.py
5
2022
#!/usr/bin/env python # # BaseClassifier.py # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARR...
gpl-2.0
-3,254,794,300,303,039,000
31.612903
111
0.652324
false
3.94152
false
false
false
JungWinter/HongikFood
app/menu.py
1
9137
from app import db from .models import Menu, Poll class PlaceMenu(): def __init__(self, place): self.title = None # date + place self.date = None self.dayname = None self.items = { "아침": { "정보": None, "메뉴": [], "평점": None...
mit
2,723,474,008,122,156,500
30.522901
82
0.407676
false
2.709646
false
false
false
AllanSSX/IonNIPT
utils/coverageYspecificGenes.py
1
4361
#!/usr/bin/env python # -*- coding: utf-8 -*- #================================================================# import os import sys import re import json import subprocess #================================================================# def main(): # Y linked genes Y = { "HSFY1" : "chr...
gpl-3.0
8,446,687,236,552,019,000
37.60177
109
0.494153
false
3.542648
false
false
false
pydata/conf_site
symposion/schedule/models.py
1
7752
from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.utils.translation import gettext_lazy as _ from autoslug.fields import AutoSlugField from symposion.markdown_parser import parse from symposion.proposals.models import ProposalBase, AdditionalSpeaker from symposion.conferenc...
mit
3,761,150,195,929,748,500
28.142857
79
0.603586
false
4.116835
false
false
false
chrisism/plugin.program.advanced.emulator.launcher
resources/attic/objects.py
3
37135
# # Old or obsolete code. # # ------------------------------------------------------------------------------------------------- # Kodi favorites launcher # Do not use, AEL must not access favoruites.xml directly. Otherwise, addon will not be # accepted in the Kodi official repository. # -------------------------------...
gpl-2.0
-1,525,348,331,375,710,000
43.313842
146
0.612145
false
3.841817
false
false
false
freedomtan/tensorflow
tensorflow/python/kernel_tests/aggregate_ops_test.py
1
5259
# Copyright 2017 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
-1,037,729,551,034,319,600
40.085938
80
0.646891
false
3.764495
true
false
false
mittagessen/kraken
kraken/contrib/forced_alignment_overlay.py
1
3194
#!/usr/bin/env python """ Draws a transparent overlay of the forced alignment output over the input image. Needs OpenFST bindings installed. """ import re import os import click import unicodedata from itertools import cycle from collections import defaultdict from PIL import Image, ImageDraw cmap = cycle([(230, 25, ...
apache-2.0
-3,424,175,375,749,796,000
34.488889
126
0.586725
false
3.679724
false
false
false
tectronics/nyctos
src/data.res/scripts/weapons/dagger.py
1
1085
import parole from parole.colornames import colors from parole.display import interpolateRGB import pygame, random import sim_items from util import * class Dagger(sim_items.Weapon): def __init__(self): bonuses = { 'hitMod': +4, 'damageSkewMod': -4, } # TOD...
gpl-2.0
-8,417,306,946,014,794,000
29.138889
80
0.490323
false
4.35743
false
false
false
Garfielt/Joyaay
libs/utils.py
1
1489
# -*- coding: utf-8 -*- import os import time import string import datetime try: from hashlib import md5 except ImportError: from md5 import md5 class dict_to_object(dict): def __getattr__(self, key): try: return self[key] except: return '' def __setattr__(self,...
mit
-5,403,358,708,990,215,000
18.350649
60
0.572196
false
3.294248
false
false
false
orbkit/orbkit
orbkit/read/cclib_parser.py
1
7730
import numpy from orbkit.qcinfo import QCinfo from orbkit.orbitals import AOClass, MOClass from orbkit.units import aa_to_a0, ev_to_ha from orbkit.display import display from orbkit.tools import l_deg, lquant, get_atom_symbol from importlib import import_module def read_with_cclib(filename, cclib_parser=None, all_mo=...
lgpl-3.0
-1,085,317,817,685,771,900
34.296804
94
0.596248
false
3.191577
false
false
false
scraperwiki/spreadsheet-download-tool
pyexcelerate/tests/test_Workbook.py
1
2784
from ..Workbook import Workbook import time import numpy import nose import os from datetime import datetime from nose.tools import eq_ from .utils import get_output_path def test_get_xml_data(): wb = Workbook() ws = wb.new_sheet("Test") ws[1][1].value = 1 eq_(ws[1][1].value, 1) ws[1][3].value = 3 ...
bsd-2-clause
-2,669,089,527,514,485,000
21.819672
64
0.619612
false
2.41039
true
false
false
joachimmetz/plaso
tests/parsers/winreg_plugins/officemru.py
2
4501
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Microsoft Office MRUs Windows Registry plugin.""" import unittest from plaso.lib import definitions from plaso.parsers.winreg_plugins import officemru from tests.parsers.winreg_plugins import test_lib class OfficeMRUPluginTest(test_lib.RegistryPluginT...
apache-2.0
-3,769,384,684,929,349,000
35.893443
77
0.652966
false
3.309559
true
false
false
ernestyalumni/Propulsion
Physique/Source/TemperatureConversion.py
1
1435
""" @name TemperatureConversion.py @file TemperatureConversion.py @author Ernest Yeung @date 20150913 @email ernestyalumni@gmail.com @brief I implement temperature conversion with symbolic computation in sympy @ref @details @copyright If you find this code useful, feel free to donate directly and easily at this direct ...
gpl-2.0
-8,275,377,455,991,462,000
38.861111
210
0.772125
false
3.014706
false
true
false
RRCKI/pilot
VmPeak.py
4
3453
# This script is run by the PanDA pilot # Its purpose is to extract the VmPeak, its average and the rss value from the *.pmon.gz file(s), and # place these values in a file (VmPeak_values.txt) which in turn is read back by the pilot # VmPeak_values.txt has the format: # <VmPeak max>,<VmPeam max mean>,<rss mean> # No...
apache-2.0
-2,558,018,875,590,486,000
38.238636
145
0.593687
false
3.215084
false
false
false
gdikov/vae-playground
third_party/ite/cost/base_a.py
1
19263
""" Base association measure estimators. """ from numpy import mean, prod, triu, ones, dot, sum, maximum, all from scipy.special import binom from ite.cost.x_initialization import InitX from ite.cost.x_verification import VerOneDSubspaces, VerCompSubspaceDims from ite.shared import copula_transformation class BASpe...
mit
8,382,078,373,014,410,000
33.708108
79
0.581633
false
3.928819
false
false
false
ChinaQuants/Engine
Examples/Example_1/xlwings/excel_view.py
2
1929
import xlwings as xw from xlwings import Workbook, Sheet, Range, Chart import time import datetime from subprocess import call import matplotlib.pyplot as plt # connect to the active workbook #wb = Workbook('run.xlsm') wb = Workbook.active() # log status Range('B8').value = 'running upload ...' file = 'Output/exposu...
bsd-3-clause
6,174,453,772,711,315,000
25.791667
92
0.652151
false
2.840943
false
false
false
KellenSunderland/sockeye
sockeye/data_io.py
1
25786
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
apache-2.0
6,141,320,080,320,133,000
43.003413
120
0.591406
false
3.993495
false
false
false
Kazade/NeHe-Website
google_appengine/google/appengine/tools/devappserver2/python/runtime_test.py
6
1591
#!/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...
bsd-3-clause
1,352,857,910,737,410,600
29.596154
74
0.69956
false
3.815348
true
false
false
mpirnat/aoc2016
day04/test.py
1
2286
#!/usr/bin/env python import unittest from day04 import parse_room, make_checksum, is_real_room, sum_of_sectors from day04 import decrypt_room_name, find_decrypted_room_name class TestIdentifiesRealRooms(unittest.TestCase): """ aaaaa-bbb-z-y-x-123[abxyz] is a real room because the most common letters are a (5), ...
mit
7,679,181,208,555,895,000
34.169231
86
0.632546
false
3.072581
true
false
false
pathfinder14/OpenSAPM
osamp/source.py
1
2026
import numpy as np """ This class describes the source of propagating waves source it's a addition to initial system this class contains defenition of many source current contained in the variable source Different types: Spherical """ class Source: """This class is responsible for creating external sources ...
mit
184,709,055,575,299,870
36.518519
89
0.603653
false
3.354305
false
false
false
praveenv253/sht
sht/sht.py
1
5547
#!/usr/bin/env python3 """ Module providing forward and inverse Spherical Harmonic Transforms. The algorithm followed is that given in the paper: Zubair Khalid, Rodney A. Kennedy, Jason D. McEwen, ``An Optimal-Dimensionality Sampling Scheme on the Sphere with Fast Spherical Harmonic Transforms'', IEEE Transactions on...
mit
5,698,515,137,838,680,000
35.735099
79
0.538129
false
3.107563
false
false
false
voxie-viewer/voxie
scripts/decode-qr.py
1
3165
#!/usr/bin/python import sys import dbus import mmap import numpy import tempfile import os import zbar import Image import ImageDraw import voxie args = voxie.parser.parse_args() instance = voxie.Voxie(args) slice = instance.getSlice(args) dataSet = slice.getDataSet() data = dataSet.getFilteredData() with ins...
mit
-5,471,549,011,903,401,000
29.142857
107
0.593365
false
3.331579
false
false
false
jinty/zgres
zgres/show.py
1
1988
import sys import argparse from pprint import pformat, pprint from .config import parse_args from .deadman import App, willing_replicas def indented_pprint(obj): lines = [] for line in pformat(obj).splitlines(True): lines.append(' ') lines.append(line) print(''.join(lines)) def show_cl...
mit
6,152,439,788,185,614,000
37.980392
90
0.605131
false
3.968064
true
false
false
gitaarik/adyengo
adyengo/migrations/0018_auto_20161013_1848.py
1
4315
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-10-13 16:48 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('adyengo', '0017_auto_20161013_1848'), ] operations = [ migrations.AlterField( ...
lgpl-3.0
-3,672,662,236,803,558,400
77.454545
750
0.604867
false
3.413766
false
false
false
gems-uff/labsys
test/admissions/test_models.py
1
5521
import unittest from labsys.app import create_app, db from labsys.admissions.models import ( Patient, Address, Admission, Symptom, ObservedSymptom, Method, Sample, InfluenzaExam, Vaccine, Hospitalization, UTIHospitalization, ClinicalEvolution,) from . import mock class TestModelsRelationships(unittest.TestCa...
mit
3,225,911,390,693,592,600
37.880282
84
0.641188
false
3.63942
true
false
false
fercopa/topography-report
src/libs/Interface/template.py
1
18464
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'plantilla.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui import matplotlib.pyplot as plt from matplotlib.backends.backend_qt4agg import FigureCanva...
gpl-3.0
-7,943,037,277,970,612,000
52.507246
116
0.692037
false
3.882229
false
false
false
rafafigueroa/edison-quad
motor_calibration.py
1
2147
#!/usr/bin/python import curses import shelve from Adafruit_PWM_Servo_Driver import PWM import time import numpy as np # Initialise the PWM device using the default address pwm = PWM(0x40, debug=False) pulseMin = 2000 # Min pulse length out of 4096 pulseLow = 2500 pulseMax = 3047 pulseStop = 0 motorChannel = 0 pw...
gpl-2.0
-8,695,745,289,481,325,000
26.525641
72
0.549604
false
3.190193
false
false
false
WojciechMigda/TCO-PCFStupskiPrize1
src/cell_patches_kmeans.py
1
8216
#!/opt/anaconda2/bin/python # -*- coding: utf-8 -*- """ ################################################################################ # # Copyright (c) 2015 Wojciech Migda # All rights reserved # Distributed under the terms of the MIT license # ####################################################################...
mit
-4,096,860,922,282,649,600
28.66065
131
0.516796
false
3.721014
false
false
false
jachym/pywps-4-demo
processes/buffer.py
1
2616
import os import tempfile __author__ = 'Brauni' from pywps import Process, LiteralInput, ComplexInput, ComplexOutput, Format, get_format class Buffer(Process): def __init__(self): inputs = [ComplexInput('poly_in', 'Input1', supported_formats=[get_format('GML')], ...
mit
5,689,942,538,740,844,000
34.351351
119
0.573394
false
4.288525
false
false
false
pattonwebz/ScheduledTweetBot
search.py
1
1764
#!/usr/bin/env python # -*- coding: utf-8 -*- # Scheduled Tweet Bot written in Python intended to run on a Raspberry Pi # (will work anywhere Python and the dependancies are installed though) # version: 0.9 import tweepy, sys import dbconnect import twitterfunctions from configuration import dbconfig getKeySecretQuery...
agpl-3.0
8,095,361,641,197,468,000
31.072727
124
0.700113
false
3.260628
false
false
false
racheliel/My-little-business
MyLittleBuisness/api/createPageBus.py
1
1438
from google.appengine.ext.webapp import template import webapp2 import json from models.user import User from models.page import Page import time class createPageBus(webapp2.RequestHandler): def get(self): user = User.checkToken(self.request.cookies.get('session')) if self.request.cookies.get('...
mit
-7,398,409,846,378,320,000
31.681818
102
0.630737
false
3.631313
false
false
false
13xforever/webserver
admin/CTK/CTK/Box.py
5
2753
# CTK: Cherokee Toolkit # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2009-2014 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free Software Foundation....
gpl-2.0
-3,335,221,350,368,491,000
31.77381
72
0.593898
false
4.108955
false
false
false
elena/django-starterkit-userauth
project/settings.py
1
3229
""" Django settings for project project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
mit
4,738,676,723,596,372,000
19.967532
71
0.682874
false
3.190711
false
false
false
arannasousa/pagseguro_xml
build/lib/pagseguro_xml/consultas/v3/__init__.py
2
1268
# coding=utf-8 # --------------------------------------------------------------- # Desenvolvedor: Arannã Sousa Santos # Mês: 12 # Ano: 2015 # Projeto: pagseguro_xml # e-mail: asousas@live.com # --------------------------------------------------------------- from .. impor...
gpl-2.0
4,163,932,741,889,303,000
34.166667
123
0.595577
false
3.057971
false
false
false
khosrow/hcron
hcron/scripts/hcron_info.py
1
2803
#! /usr/bin/env python # # hcron-info.py # GPL--start # This file is part of hcron # Copyright (C) 2008-2010 Environment/Environnement Canada # # 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; v...
gpl-2.0
-5,623,088,466,478,454,000
24.026786
83
0.624331
false
3.697889
false
false
false
christinahedges/PyKE
pyke/keptrial.py
2
13904
from .utils import PyKEArgumentHelpFormatter import numpy as np from astropy.io import fits as pyfits from matplotlib import pyplot as plt from astropy.stats import LombScargle from tqdm import tqdm from . import kepio, kepmsg, kepkey, kepfit, kepfunc, kepstat __all__ = ['keptrial'] def keptrial(infile, outfile=Non...
mit
-7,235,509,604,369,279,000
43.851613
87
0.596231
false
3.892497
false
false
false
Zelgadis87/Sick-Beard
lib/guessit/language.py
8
13739
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
8,712,618,466,136,381,000
33.249377
110
0.59684
false
3.783471
false
false
false
userdw/RaspberryPi_3_Starter_Kit
08_Image_Processing/Smoothing_Filter/averaging/averaging.py
1
2619
import os, cv2 import numpy as np import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec _projectDirectory = os.path.dirname(__file__) _imagesDirectory = os.path.join(_projectDirectory, "images") _images = [] for _root, _dirs, _files in os.walk(_imagesDirectory): for _file in _files: i...
mit
9,209,321,182,256,391,000
31.576923
86
0.668958
false
2.299385
false
false
false
olivierdalang/QGIS
python/plugins/processing/tests/GdalAlgorithmsRasterTest.py
3
124779
# -*- coding: utf-8 -*- """ *************************************************************************** GdalAlgorithmRasterTest.py --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch ******************...
gpl-2.0
-3,146,958,377,692,507,600
46.808046
240
0.416785
false
4.772576
true
false
false
caedesvvv/metanomon
metanomon/nomon.py
1
13700
#!/usr/bin/env python import gtk import pango from kiwi.ui.gadgets import quit_if_last from kiwi.ui.delegates import GladeDelegate from kiwi.ui.objectlist import ObjectList, Column, ObjectTree from xmlrpclib import ServerProxy from urllib import urlencode import gtkmozembed import gtksourceview #import gtksource...
gpl-3.0
-249,630,894,693,975,870
33.59596
102
0.6
false
3.595801
false
false
false
cloudbase/maas
src/maasserver/tests/test_forms.py
1
46400
# Copyright 2012, 2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test forms.""" from __future__ import ( absolute_import, print_function, unicode_literals, ) str = None __metaclass__ = type __all__ = [] import json ...
agpl-3.0
-9,010,222,038,021,368,000
37.893546
79
0.629353
false
3.974985
true
false
false
karlind/ewu-v4
accounts/migrations/0012_auto_20160714_1522.py
1
1153
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-14 07:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0011_auto_20160714_1521'), ] operations = [ migrations.AlterFiel...
gpl-3.0
209,679,865,083,511,330
28.564103
74
0.556808
false
4.302239
false
false
false
Jianlong-Peng/rp
python/scale.py
1
6507
''' #============================================================================= # FileName: scale.py # Desc: # Author: jlpeng # Email: jlpeng1201@gmail.com # HomePage: # Created: 2013-09-23 20:43:19 # LastChange: 2014-04-09 10:49:21 # History: #=============================...
gpl-2.0
2,984,936,988,208,512,000
33.428571
111
0.510988
false
3.649467
false
false
false
pmaigutyak/mp-shop
attributes/forms.py
1
4450
from django import forms from django.utils.translation import ugettext from django.core.exceptions import ValidationError from django.utils.functional import cached_property from apps.products.models import Product from attributes.models import ( Attribute, AttributeValue, AttributeOption) class Filter...
isc
2,767,729,096,030,983,700
24.428571
75
0.542697
false
4.48137
false
false
false
drejc/piRadio
test/button_test.py
1
1190
# Simple script to test read button state (pressed / not pressed) for TFT buttons # Buttons are located on pins 12, 16 and 18 # BCM (Broadcom SOC channel) numbers are 18, 23 and 24 import os import sys import RPi.GPIO as GPIO # import needed modules lib_path = os.path.abspath(os.path.join('..')) sys.path.append(lib_...
gpl-3.0
4,584,571,388,344,891,400
21.471698
81
0.70084
false
3.035714
false
false
false
fugitifduck/exabgp
lib/exabgp/netlink/message.py
1
3747
# encoding: utf-8 """ interface.py Created by Thomas Mangin on 2015-03-31. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ import os import socket from struct import pack from struct import unpack from struct import calcsize from collections import namedtuple from exabgp.netlink import NetLinkError fr...
bsd-3-clause
3,252,601,582,341,618,700
26.350365
127
0.697625
false
2.95738
false
false
false
dairin0d/transform-utils
space_view3d_transform_utils/dairin0d/utils_ui.py
5
22675
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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. # # This program is distrib...
gpl-3.0
6,859,048,113,327,889,000
35.690939
110
0.557089
false
3.954482
false
false
false
RossLote/cloudplayer
music/migrations/0001_initial.py
1
4646
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('cloudplayer', '0002_file_play_count'), ...
mit
7,446,969,337,703,704,000
38.042017
114
0.525183
false
4.716751
false
false
false
bkfunk/Quilltery
app/__init__.py
1
2879
from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.sqlalchemy import SQLAlchemy import os from flask.ext.login import LoginManager from flask.ext.openid import OpenID from flask.ext.admin import Admin from config import basedir, ADMINS, MAIL_SERVER, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD ...
gpl-2.0
-3,894,619,358,932,330,500
30.988889
169
0.688086
false
3.275313
false
true
false
bjss/BJSS_liveobs_automation
liveobs_ui/selectors/mobile/list.py
2
1120
""" Selectors for List Component The list component is used in the mobile to show the list of tasks and the list of patients """ from selenium.webdriver.common.by import By LIST_CONTAINER = (By.CLASS_NAME, 'tasklist') LIST_ITEM = (By.CSS_SELECTOR, '.tasklist li a') UNKNOWN_CLINICAL_RISK_LIST_ITEM = \ (By.CSS_SELE...
gpl-3.0
3,052,244,055,259,454,000
45.666667
79
0.713393
false
2.8
false
false
false
anchor/make-magic
tools/showtask.py
1
2514
#! /usr/bin/env python '''monitor a task in realtime This should use the HTTP interface. It currently doesn't ''' title = "make-magic stat" from gi.repository import Gtk as gtk from gi.repository import Gdk as gdk from gi.repository import GObject import sys import traceback import lib.magic # Deal with keyboard ...
bsd-3-clause
-2,601,557,388,117,879,000
24.393939
68
0.665076
false
2.694534
false
false
false
mrrudy/esp2homie2openhab
tools/mqttConvert2retained.py
1
1215
import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) # Subscribing in on_connect() means that if we lose the connection and # reconnect then subscriptions wi...
gpl-3.0
-624,525,163,891,914,400
35.818182
79
0.725926
false
3.626866
false
false
false
aplanas/hackweek11
repo-log.py
1
1704
#! /usr/bin/env python import argparse import csv import git if __name__ == '__main__': parser = argparse.ArgumentParser(description='Extract git history information.') parser.add_argument('-f', '--from', dest='from_', help='from revno') parser.add_argument('-t', '--to', help='to revno') parser.add_...
mit
4,325,897,972,822,850,000
33.77551
91
0.565141
false
3.908257
false
false
false