repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
fpetitjean/DBA
cython/test.py
1
1196
from __future__ import division import numpy as np import matplotlib.pyplot as plt from DBA import performDBA def main(): #generating synthetic data n_series = 20 length = 200 series = list() padding_length=30 indices = range(0, length-padding_length) main_profile_gen = np.array(list(map(l...
gpl-3.0
4,572,878,366,180,518,000
29.666667
116
0.651338
false
3.294766
false
false
false
lvv/streamcorpus-filter
py/version.py
2
4118
# -*- coding: utf-8 -*- # Author: Douglas Creager <dcreager@dcreager.net> # This file is placed into the public domain. # Calculates the current version number. If possible, this is the # output of “git describe”, modified to conform to the versioning # scheme that setuptools uses. If “git describe” returns an erro...
mit
-6,325,591,045,610,398,000
27.915493
72
0.609596
false
3.649778
false
false
false
sshleifer/object_detection_kitti
lm_1b/lm_1b_eval.py
14
11428
# Copyright 2016 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
907,130,437,740,963,500
36.103896
80
0.583129
false
3.515226
false
false
false
johnbeard/kicad-git
pcbnew/scripting/plugins/sdip_wizard.py
1
6319
# 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 distributed in the hope that it will be useful,...
gpl-2.0
4,226,056,688,205,808,000
30.595
104
0.588068
false
3.301463
false
false
false
ufieeehw/IEEE2014
ros/ieee2014_mission_runner/src/ieee2014_mission_runner/fine_targeting.py
1
12947
from __future__ import division import math import operator import sys import time import os import numpy import cv2 from twisted.internet import threads, defer import roslib from tf import transformations from ieee2014_mission_runner import render store_path = os.path.join(os.path.expanduser('~'), str(int(time.ti...
gpl-2.0
-3,477,746,136,462,456,000
37.647761
225
0.595736
false
3.244862
false
false
false
kyeoh/csvkit
csvkit/__init__.py
21
1056
#!/usr/bin/env python """ This module contains csvkit's superpowered replacement for the builtin :mod:`csv` module. For Python 2 users, the greatest improvement over the standard library full unicode support. Python 3's :mod:`csv` module supports unicode internally, so this module is provided primarily for compatabili...
mit
-8,435,993,315,285,798,000
30.058824
305
0.744318
false
3.462295
false
false
false
xia2/xia2
src/xia2/Wrappers/Dials/Integrate.py
1
9862
import json import logging import math import os from xia2.Driver.DriverFactory import DriverFactory from xia2.Handlers.Phil import PhilIndex logger = logging.getLogger("xia2.Wrappers.Dials.Integrate") try: from typing import Optional except ImportError: pass class DIALSIntegrateError(RuntimeError): ""...
bsd-3-clause
-2,519,691,224,041,664,000
39.584362
96
0.562766
false
4.007314
false
false
false
ggianna/Foragers
abilities.py
1
9200
import soldiers; import towers; class Ability(object): def __init__(self, owner): self.targetType = None; self.group = "foes"; # friends/foes/traps self.frequency = "battle"; # battle/constant/# for uses/0.# for probability self.owner = owner; def applyTo(self, target, friends, foes, traps=[]...
apache-2.0
-4,838,270,695,442,621,000
29.769231
193
0.606304
false
3.308163
false
false
false
iut-ibk/DynaMind-UrbanSim
3rdparty/opus/src/randstad/gridcell/is_development_type_SSS.py
2
1806
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from variable_functions import my_attribute_label class is_development_type_SSS(Variable): """is of SSS development type""" def __i...
gpl-2.0
9,191,213,759,084,573,000
34.897959
115
0.644518
false
3.731405
true
false
false
HPPTECH/hpp_IOSTressTest
Refer/Example_Write_json_01.py
1
1105
#!/usr/bin/python # import simplejson import json data = {} data['people'] = [] data['people'].append({ 'name': 'Scott', 'website': 'stackabuse.com', 'from': 'Nebraska' }) data['people'].append({ 'name': 'Larry', 'website': 'google.com', 'from': 'Michigan' }) data['people'].append({ 'name...
mit
-8,175,887,880,295,380,000
19.109091
75
0.561086
false
2.92328
false
false
false
SpeedProg/eve-inc-waitlist
waitlist/utility/account/notes/note_renderer.py
1
2986
from waitlist.storage.database import AccountNote from waitlist.utility.constants import account_notes from waitlist.utility.eve_id_utils import get_character_by_id import json import logging logger = logging.getLogger(__name__) def render_note_text(note: AccountNote) -> str: if note.type == account_notes.TYPE_...
mit
8,958,728,330,523,195,000
40.472222
76
0.617883
false
3.954967
false
false
false
lbryio/lbryum
release/release.py
1
6603
"""Bump version and create Github release This script should be run locally, not on a build server. """ import argparse import contextlib import os import re import subprocess import sys import git import github import changelog ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) def main(): b...
mit
-5,492,217,341,238,083,000
30.898551
97
0.623807
false
3.57112
false
false
false
arunkgupta/gramps
gramps/gen/lib/date.py
1
64683
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2009 Douglas S. Blank # # 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; e...
gpl-2.0
4,048,488,742,861,294,000
36.716035
126
0.503393
false
3.904092
false
false
false
google-research/lasertagger
run_lasertagger_test.py
3
1196
# coding=utf-8 # Copyright 2019 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
9,144,926,343,302,260,000
28.9
74
0.728261
false
3.702786
false
false
false
s390guy/SATK
tools/gas_factory.py
1
27157
#!/usr/bin/python3 # Copyright (C) 2013,2014 Harold Grovesteen # # This file is part of SATK. # # SATK 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 ...
gpl-3.0
-3,930,123,986,905,736,700
37.741797
84
0.593291
false
3.605071
false
false
false
anugrah-saxena/pycroscopy
pycroscopy/visualizers/BEPSvisSHO/ioFuncs.py
1
13720
''' Created on Apr 20, 2016 @author: Chris Smith -- csmith55@utk.edu ''' import sys import numpy as np import h5py sys.path.append('../') from scipy.io import loadmat from pycroscopy.io.io_hdf5 import ioHDF5 from pycroscopy.io.hdf_utils import reshape_to_Ndims def loadDataFunc(filePath, **kwargs): ''' Functi...
mit
-9,054,821,965,329,217,000
34.002551
112
0.567493
false
3.146067
false
false
false
christopher-gillies/VCFScripts
flip_ref_alt.py
1
3630
#!/usr/bin/python import argparse import re import gzip import sys import string parser = argparse.ArgumentParser(description='Take results from checkVCF.py reference flips and flip ref and alt') parser.add_argument('--vcf', help='vcf file (bgzip or vcf)', required=True) parser.add_argument('--ref_flips', help='ref fl...
apache-2.0
2,272,086,091,766,703,000
24.215278
114
0.636364
false
2.657394
false
false
false
jdswinbank/Comet
comet/protocol/subscriber.py
1
3744
# Comet VOEvent Broker. # VOEventSubscriber: subscribe to a stream of events from a broker. # Twisted protocol definition from twisted.protocols.policies import TimeoutMixin from twisted.internet.protocol import Factory # Base protocol definitions from comet.protocol.base import EventHandler # Constructors for trans...
bsd-2-clause
-8,978,415,455,360,821,000
32.72973
86
0.62313
false
4.378947
false
false
false
corona10/Simple-MiniC-Compiler
lib/llvm-3.5.0.src/utils/lit/lit/formats/base.py
81
3910
from __future__ import absolute_import import os import sys import lit.Test import lit.util class TestFormat(object): pass ### class FileBasedTest(TestFormat): def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig): source_path = testSuite.getSour...
mit
622,338,794,079,331,700
32.135593
79
0.533248
false
4.383408
true
false
false
rdio/sentry
src/sentry/web/forms/fields.py
4
3954
""" sentry.web.forms.teams ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django.core.validators import URLValidator from django.forms.widgets import RadioFieldRenderer, TextInput, Textarea from django.forms impor...
bsd-3-clause
4,122,972,896,517,574,700
30.133858
113
0.622408
false
4.042945
false
false
false
lucianamaroun/review_recommendation
test/test_author_voter_modeling.py
1
5462
from math import log, sqrt from unittest import TestCase, main from numpy import mean from networkx import DiGraph import preprocessing.author_voter_modeling as av class IsolatedJaccardTestCase(TestCase): """ Test case for jaccard coefficient calculation between two sets. """ def setUp(self): self.set_a =...
mit
-5,131,376,035,320,382,000
35.657718
81
0.594105
false
2.72419
true
false
false
liushuaikobe/GitArchiveUtils
gitradar/handlers/rank.py
1
2639
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: liushuai # @Date: 2013-12-22 21:44:19 # @Last Modified by: liushuai # @Last Modified time: 2013-12-22 21:57:26 from tornado.web import RequestHandler from tornado.web import asynchronous from tornado import gen import ujson class RankHandler(RequestHandler)...
gpl-2.0
5,168,954,315,585,356,000
36.895522
122
0.512013
false
3.616809
false
false
false
Jajcus/pyxmpp2
examples/roster.py
1
15269
#!/usr/bin/python # -*- coding: utf-8 -*- """ A roster interface example. Usage: roster.py JID show [--presence] roster.py JID monitor [--presence] roster.py JID add [--subscribe] [--approve] CONTACT [NAME] [GROUP ...] roster.py JID remove CONTACT roster.py JID update CONTACT [NAME] [GROUP [G...
lgpl-2.1
2,724,390,202,447,776,000
38.051151
80
0.529701
false
4.261513
false
false
false
abyrne55/osvr-review
old/parameterisation.py
1
4063
# Direct Port of constructParams.m import numpy as np def construct_admm_parameters(dataset, labelset, epsilon, bias, flag): datacells = dataset.T labelcells = labelset.T N = datacells.size T = np.zeros((N,1)) num_pairs_max = 0; num_intensity = 0; # Collect Statistics of the ...
mit
-4,781,927,368,594,976,000
36.284404
136
0.556239
false
3.068731
false
false
false
ktan2020/legacy-automation
win/Lib/site-packages/wx-3.0-msw/wx/lib/wxcairo.py
1
19787
#---------------------------------------------------------------------- # Name: wx.lib.wxcairo # Purpose: Glue code to allow the pycairo package to be used # with a wx.DC as the cairo surface. # # Author: Robin Dunn # # Created: 3-Sept-2008 # RCS-ID: $Id$ # C...
mit
-5,070,888,691,294,046,000
39.569328
98
0.562491
false
3.914342
false
false
false
nakul02/incubator-systemml
src/main/python/systemml/defmatrix.py
7
47077
#------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under...
apache-2.0
-5,462,916,862,089,890,000
36.782504
987
0.57629
false
3.854979
false
false
false
luminescence/PolyLibScan
Tools/pdb2lmp.py
1
16735
import itertools as it import Bio.PDB as PDB import PolyLibScan.Database.db as DB import numpy as np import yaml from lmp_creator import LmpCreator from lmp_particlesAndInteractions import * class protonation_methods_bundled(particle_methods_bundled): def add_protonation(self, molecule, protonation_data, ph=8.0...
mit
6,690,618,139,333,620,000
44.475543
138
0.572214
false
3.716411
true
false
false
Arelle/Arelle
arelle/CntlrQuickBooks.py
3
31806
''' Created on Jan 19, 2012 This module implements Quick Books server mode @author: Mark V Systems Limited (c) Copyright 2012 Mark V Systems Limited, All rights reserved. ''' from lxml import etree import uuid, io, datetime from arelle import XmlUtil clientVersion = None userName = None sessions = {} # use when int...
apache-2.0
-6,019,559,263,500,777,000
57.146252
183
0.616865
false
4.09133
false
false
false
DropMuse/DropMuse
scripts/MyScraper.py
1
3741
import spotipy import sys import json import pymysql.cursors import os import codecs def Scraper(name): spotify = spotipy.Spotify() #text_file = open("Artists.txt", "r") #txt file containing artists, 1 per line #Artists = text_file.readlines() #text_file.close() #change the above ...
mit
-1,830,413,508,955,925,800
36.787879
136
0.601978
false
3.186542
false
false
false
CiscoSystems/os-sqe
lab/nodes/n9/n9_neighbour.py
1
2885
class N9neighbourLLDP(object): def __init__(self, n9, dic): self.n9 = n9 self._dic = dic def __repr__(self): return u'{} {} {}'.format(self.n9, self.chassis_id, self.mac) @property def chassis_id(self): return self._dic.get('chassis_id', '010101010101').replace('.', '')...
apache-2.0
-7,166,830,991,684,524,000
34.617284
168
0.569497
false
2.955943
false
false
false
pravic/pysciter
sciter/dom.py
1
30945
"""DOM access methods.""" import ctypes import sciter.error import sciter.capi.scdef from sciter.capi.scdom import * from sciter.capi.screquest import SciterResourceType from sciter.capi.scbehavior import BEHAVIOR_EVENTS, CLICK_REASON _api = sciter.SciterAPI() # TODO: behaviors support, create behavior # # Not imp...
mit
1,824,833,108,510,715,100
32.49026
154
0.585426
false
3.724723
false
false
false
vaibhavi-r/CSE-415
Assignment1/vaibhavi_knowledge.py
1
17803
from random import choice from re import * ###################################################################################################### """KNOWLEDGE MAP - Lists of People, Places, Foods, Colors, Drinks, Greetings and Excuses etc. - Count Variables Initialization for Cyclic Responses - Lists of Random and (De...
mit
-6,119,305,712,485,058,000
38.12967
161
0.592484
false
3.3314
false
false
false
WheelBarrow2/EzFileSender
app/filerecieveddialog.py
1
3795
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'filerecieveddialog.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 try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fro...
mit
624,499,379,812,742,700
44.722892
114
0.721212
false
3.961378
false
false
false
kkmonlee/Project-Euler-Solutions
Python/p340.py
1
1509
import sys class Foo(): def get(self, n, a, b, c): if n > b: return n - c delta = 1 - 4 * a + 3 * c delta_pos, in_delta_pos = divmod(b - n, a) return b - c + 1 - (delta_pos + 1) * delta - in_delta_pos - (a - 1) * delta_pos def get_sum(self, a, b, c): gayNum...
gpl-3.0
-6,341,704,751,142,150,000
28.038462
87
0.516236
false
2.857955
false
false
false
mtyka/pd
examples/md/gbsa_langevin/run.py
1
1988
# PD is a free, modular C++ library for biomolecular simulation with a # flexible and scriptable Python interface. # Copyright (C) 2003-2013 Mike Tyka and Jon Rea # # 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...
gpl-3.0
4,539,349,145,380,731,000
24.487179
71
0.732394
false
3.077399
false
false
false
mpinner/Active
python/greyscale.py
2
1561
#!/usr/bin/python from PIL import Image, ImageStat import sys, getopt def is_color_image(file, thumb_size=40, MSE_cutoff=22, adjust_color_bias=True): pil_img = Image.open(file) bands = pil_img.getbands() if bands == ('R','G','B') or bands== ('R','G','B','A'): thumb = pil_img.resize((thumb_size,...
mit
-3,059,884,083,896,012,300
20.680556
92
0.553491
false
3.001923
false
false
false
finjin/finjin-engine
tools/generate-vulkan-includes/generate_vulkan_includes.py
1
19740
#!/usr/bin/env python3 #Copyright (c) 2017 Finjin # #This file is part of Finjin Engine (finjin-engine). # #Finjin Engine is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # #This Source Code Form is ...
mpl-2.0
7,561,918,902,794,470,000
39.617284
188
0.593465
false
3.780161
false
false
false
JasonGross/mozjs
testing/mozbase/mozdevice/mozdevice/droid.py
2
7928
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import StringIO import moznetwork import re import threading from Zeroconf import Zeroconf, ServiceBrowser from devicem...
mpl-2.0
-36,199,751,316,902,850
39.44898
169
0.616423
false
4.114167
false
false
false
PaddlePaddle/cloud
python/paddlecloud/paddlejob/cloudprovider/k8s_provider.py
2
17077
# Copyright (c) 2018 PaddlePaddle 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 app...
apache-2.0
-3,133,628,937,177,711,000
43.240933
97
0.560754
false
4.109988
false
false
false
pyrrho314/recipesystem
trunk/dontload-astrodata_Gemini/ADCONFIG_Gemini/descriptors/MICHELLE/MICHELLE_Descriptors.py
1
3486
from astrodata import Descriptors from astrodata import Errors from astrodata.Calculator import Calculator from astrodata.Descriptors import DescriptorValue from MICHELLE_Keywords import MICHELLE_KeyDict from GEMINI_Descriptors import GEMINI_DescriptorCalc class MICHELLE_DescriptorCalc(GEMINI_DescriptorCalc): # U...
mpl-2.0
-7,557,318,449,665,937,000
43.692308
79
0.635972
false
4.498065
false
false
false
klingebj/regreg
doc/examples/scripts/tfocs.py
4
1568
import pylab import numpy as np import scipy.sparse from regreg.algorithms import FISTA from regreg.smooth import quadratic from regreg.atoms import l1norm, maxnorm from regreg.seminorm import seminorm D = (np.diag(np.ones(500)) - np.diag(np.ones(499),1))[:-1] DT = scipy.sparse.csr_matrix(D.T) D = scipy.sparse.csr_ma...
bsd-3-clause
-2,211,531,475,761,593,300
30.36
69
0.740434
false
2.5088
false
true
false
ua-snap/downscale
snap_scripts/epscor_sc/merge_raw_prism_akcan_epscor_sc.py
1
7386
# # # # # # # # # merge PRISM data from 2016 acquisition from the PRISM Climate Group # # # # # # # # def fill_mask_mismatch( in_arr, value_to_fill=-1000, final_value=-9999, count_missing=(0,1) ): ''' recurse through the sea ice array and the error locations array and fill in the missing data that is not inland a...
mit
-2,260,472,215,169,708,300
41.94186
175
0.642296
false
2.764222
false
false
false
Diddit/diddit
legacy/diddit-old/login_develop/logintest.py
1
1105
import cgi from google.appengine.api import users import webapp2 import gaut config = {} config['webapp2_extras.sessions'] = { 'secret_key': 'e9c3848d099ab861f85ab1e6b6dac123', } app = webapp2.WSGIApplication([], debug=True,config=config) MAIN_PAGE_HTML = """\ <html> <body> You are logged in as user_id {us...
gpl-2.0
-5,597,590,344,628,999,000
23.021739
71
0.691403
false
3.019126
false
false
false
jasonsbrooks/ARTIST
src/artist_generator/iter/chord_iterator.py
1
3528
from db import get_sessions,Song,Track,Note from song_iterator import SongIterator from optparse import OptionParser class Chord(object): """ Chord: a list of notes ~ starting at the same time ~ lasting the same time """ def __init__(self): """ Initialize a ChordSpan """...
mit
-6,469,462,000,515,891,000
26.787402
102
0.556406
false
4.036613
false
false
false
david-ragazzi/zebatis
zebatis/algorithms/temporal_memory.py
1
21618
# ---------------------------------------------------------------------- # Ragazzi & Rocha Robotics # Copyright (C) 2015, Ragazzi & Rocha Robotics, Inc. Unless you have an # agreement with Ragazzi & Rocha Robotics, Inc., for a separate license # for this software code, the following terms and conditions apply: # # Thi...
gpl-2.0
-693,461,282,617,008,400
33.097792
182
0.606439
false
4.620218
false
false
false
vinoth3v/In
In/themer/object_theme_cacher.py
1
2262
class ObjectThemeCacherBase: '''ObjectThemeCacherBase class.''' # TODO: allow in config theme_cache_enabled = False # default @IN.register('Object', type = 'ThemeCacher') class ObjectThemeCacher(ObjectThemeCacherBase): '''''' def __init__(self, objcls, key, mem_type): '''''' self.object_class = objcls...
apache-2.0
-1,960,552,756,542,351,000
25.313953
84
0.656499
false
3.107143
false
false
false
aqualid/aqualid
aql/entity/aql_entity.py
1
8227
# # Copyright (c) 2014-2015 The developers of Aqualid project # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, mo...
mit
5,149,489,858,527,390,000
27.565972
80
0.454601
false
5.394754
false
false
false
flacjacket/sympy
sympy/integrals/tests/test_trigonometry.py
2
3265
from sympy import Symbol, Rational, sin, cos, tan, csc, sec, cot from sympy.integrals.trigonometry import trigintegrate from sympy.functions.elementary.exponential import log x = Symbol('x') y = Symbol('y') def test_trigintegrate_odd(): assert trigintegrate(Rational(1), x) == x assert trigintegrate(x, x) ...
bsd-3-clause
-3,371,416,357,546,365,000
42.533333
83
0.501072
false
2.739094
false
false
false
heisencoder/route-finder
third_party/lib/python/django/db/backends/__init__.py
28
47401
import datetime import time from django.db.utils import DatabaseError try: from django.utils.six.moves import _thread as thread except ImportError: from django.utils.six.moves import _dummy_thread as thread from collections import namedtuple from contextlib import contextmanager from django.conf import setti...
mit
8,981,166,862,662,079,000
34.268601
101
0.623637
false
4.679731
false
false
false
philrhinehart/waterlogged
logger/migrations/0001_initial.py
1
1138
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Fountain', fields=[ ('id', models.AutoField(ver...
mit
4,240,480,962,472,595,000
30.611111
114
0.523726
false
4.480315
false
false
false
infobip/infobip-api-python-client
infobip/api/model/nc/query/NumberContextResponseDetails.py
1
5450
# -*- coding: utf-8 -*- """This is a generated class and is not intended for modification! """ from datetime import datetime from infobip.util.models import DefaultObject, serializable from infobip.api.model.Error import Error from infobip.api.model.nc.Network import Network from infobip.api.model.Status import Statu...
apache-2.0
7,014,991,909,372,351,000
23.665158
66
0.576697
false
3.797909
false
false
false
ShiveshM/GENIE
src/contrib/coopersmith/Validation_ESF_TE/generate_CCQE_events.py
7
1742
#!/usr/bin/python import subprocess import threading import os import sys mode_prefix = sys.argv[1] nucZs = [6] nucAs = [12] if mode_prefix == "EFF": nucZs = [1, 2, 6, 10, 13, 18, 26, 82 ] nucAs = [2, 4, 12, 20, 27, 40, 56, 208] energy = "3.0" num_ev = "50000" neut_pdgs = ["14", "-14"] if mode_prefix == "EFF": ...
gpl-3.0
4,945,042,442,791,912,000
22.863014
96
0.597589
false
2.510086
false
false
false
hyperion-rt/hyperion
hyperion/model/image.py
1
9588
import numpy as np import six from ..util.functions import FreezableClass, is_numpy_array from ..util.constants import c class Image(FreezableClass): """ Class to represent an image or set of images Parameters ---------- nu : ndarray The frequencies at which the image is defined, in Hz ...
bsd-2-clause
7,969,471,309,058,705,000
27.966767
180
0.552879
false
4.033656
false
false
false
telwertowski/Books-Mac-OS-X
Import Plugins/AmazonImporter/amazonScript.py
2
2554
#!/usr/bin/python from xml.dom.minidom import Document from xml.parsers.expat import * from ecs import * import ecs import sys localeArgs = sys.argv[1] fieldArgs = sys.argv[2] query = sys.argv[3] fieldMap = { "ASIN" : "ISBN", "Author" : "authors", "Manufacturer" : "publisher", "Title" : "title...
mit
2,690,728,988,930,645,500
21.803571
74
0.615505
false
3.489071
false
false
false
eufarn7sp/egads
egads/thirdparty/quantities/tests/test_persistence.py
2
7639
# -*- coding: utf-8 -*- import sys import pickle import copy from .. import units as pq from ..quantity import Quantity from ..uncertainquantity import UncertainQuantity from .. import constants from .common import TestCase class TestPersistence(TestCase): def test_unitquantity_persistence(self): x = p...
gpl-3.0
-1,186,301,036,829,230,800
83.888889
974
0.722739
false
2.003935
true
false
false
ellisdg/3DUnetCNN
legacy/brats/train.py
1
6323
import os import glob from unet3d.data import write_data_to_file, open_data_file from unet3d.generator import get_training_and_validation_generators from unet3d.model import isensee2017_model from unet3d.training import load_old_model, train_model config = dict() config["image_shape"] = (128, 128, 128) # This deter...
mit
3,399,229,770,701,461,500
49.584
119
0.677685
false
3.663384
true
false
false
RedSunCMX/qdismr
star_02_qcoocur2_mapper.py
1
1761
#!/usr/bin/env python # =*- coding:utf-8 -*- # # [Author]: Chen Mingxing, chenmingxing@360.cn # [Date]: 2013/07/26 import sys import os def printInPath1(words): qdict = {} udict = {} # uid\0001date for w in words[1:]: if w[0] == "q": query = w[1:] if query not in qdic...
gpl-2.0
-6,089,502,498,141,201,000
26.092308
127
0.53038
false
2.891626
false
false
false
erangre/Dioptas
dioptas/model/util/NewFileWatcher.py
1
5632
# -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher (clemens.prescher@gmail.com) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany ...
gpl-3.0
1,942,587,921,042,261,500
38.661972
118
0.643643
false
4.037276
false
false
false
eeshangarg/oh-mainline
mysite/search/views.py
14
10479
# This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2009, 2010, 2011 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 o...
agpl-3.0
-858,769,624,535,294,500
36.425
110
0.661704
false
3.625952
false
false
false
ARMmbed/yotta_osx_installer
workspace/lib/python2.7/site-packages/pip/_vendor/ipaddress.py
198
79659
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
apache-2.0
519,145,322,772,369,600
32.039818
86
0.568285
false
4.177627
false
false
false
gizela/gizela
bin/compare_obs.py
1
2987
#!/usr/bin/python ''' Script for comparison of observations comparison of vectors ''' # $Id: compare_obs.py 76 2010-10-22 21:19:21Z tomaskubin $ import sys from gizela.stat.CompareObs import CompareObs # nacteni vstupnich parametru from optparse import OptionParser usage = "usage: %prog [options] file1 file2"...
gpl-3.0
-6,090,360,086,435,128,000
26.40367
91
0.661533
false
3.260917
false
false
false
StefanRijnhart/website
website_event_register_free_with_sale/controllers/website_sale.py
8
4563
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2015 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) # Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # # This program is free software: you can redistribute it a...
agpl-3.0
6,567,838,045,016,017,000
48.064516
79
0.605523
false
4.228916
false
false
false
egemsoft/esef-yawd-translation
translations/middleware.py
1
2992
import re from django.conf import settings from django.core.urlresolvers import is_valid_path from django.http import HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware from django.utils import translation from django.utils.cache import patch_vary_headers from .utils import get_defaul...
bsd-3-clause
-1,914,540,230,343,944,000
41.140845
97
0.64873
false
4.697017
false
false
false
baverman/typetrainer
typetrainer/tutors/common.py
1
2383
import random import collections import itertools from typetrainer.generator import make_char_chain, generate_word class Filler(object): def __init__(self, words, make_lengths_seq): self.dist = {} self.first, self.other, self.word_chars = make_char_chain(words, 3, self.dist) self.lengths =...
mit
1,580,568,641,922,827,500
26.390805
86
0.502728
false
4.17338
false
false
false
lorenzogil/yith-library-server
yithlibraryserver/scripts/clean_access_codes.py
1
1809
# Yith Library Server is a password storage server. # Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publ...
agpl-3.0
-3,320,727,706,797,686,300
30.189655
78
0.679934
false
4.149083
false
false
false
CodaMais/CodaMais
CodaMais/CodaMais/settings.py
1
5689
# Standart Library. import os # Local Django. from theory import constants as theory_constants """ Django settings for CodaMais project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of set...
gpl-3.0
-7,292,693,667,727,375,000
25.584112
91
0.626296
false
3.575739
false
false
false
tensorflow/models
official/vision/detection/modeling/architecture/spinenet.py
1
17352
# Copyright 2021 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
8,874,854,924,061,644,000
33.360396
80
0.586849
false
3.699787
false
false
false
zepheira/amara
demo/atomtools.py
1
22725
# -*- encoding: utf-8 -*- #Tools for working with atom Syntax (RFC 4287) import sys from itertools import * from functools import * from operator import * from collections import defaultdict import re, copy from cStringIO import StringIO from datetime import datetime import amara from amara.namespaces import * from ...
apache-2.0
-5,444,932,538,526,893,000
40.168478
198
0.585743
false
3.462066
false
false
false
our-city-app/oca-backend
src/rogerthat/pages/admin/activation_logs.py
1
2352
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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
-1,620,839,977,851,505,700
40.263158
142
0.6875
false
3.607362
false
false
false
akshitamittel/Bumpiness_Detector
aggregateBumpiness.py
2
2574
import numpy as np import matplotlib.pyplot as plt import matplotlib.font_manager import sys import collections import argparse ## Get user inputs and check if they are entered correctly parser = argparse.ArgumentParser() parser.add_argument("--featureFile", default="MBHxFeatures.npy") parser.add_argument("--outputFi...
mit
-3,182,647,687,525,153,000
25.27551
81
0.745532
false
3.229611
false
false
false
awslabs/sockeye
sockeye/output_handler.py
1
9515
# Copyright 2017--2019 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" fi...
apache-2.0
744,001,947,982,460,300
32.503521
109
0.62123
false
4.138756
false
false
false
mgeplf/NeuroM
neurom/fst/sectionfunc.py
2
5475
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
bsd-3-clause
3,707,289,149,714,723,300
36.758621
89
0.707032
false
4.091928
false
false
false
getopenmono/monodocs
makeapi.py
1
1795
#!/usr/bin/env python # This software is part of OpenMono, see http://developer.openmono.com # Released under the MIT license, see LICENSE.txt def build_api_reference(inputfile = "api_classes.txt", destination = "reference"): #inputfile = "api_classes.txt" #destination = "reference" file = open(inputfile,"r") clas...
mit
-392,227,099,343,572,600
32.240741
180
0.654039
false
3.078902
false
false
false
tgquintela/pySpatialTools
pySpatialTools/FeatureManagement/features_retriever.py
1
49586
""" Feature Retriever ----------------- Information about features which groups all together in the homogenious ouput of features, but they can have heterogenous input as it is retrieved by the element retrievers. This module contains the tools to store and retrieve features from a pool of features, within the descrip...
mit
8,603,760,452,727,791,000
38.956487
82
0.559735
false
4.172501
false
false
false
duncanwp/cis_plugins
cis_no_postproc.py
1
2180
""" Don't drop points with invalid coordinates - there's currently no keyword arg for this """ from cis.data_io.products import cis import logging class cis_no_postproc(cis): def create_data_object(self, filenames, variable): data = self.create_coords(filenames, variable) # This is pretty hacky b...
lgpl-3.0
8,913,132,200,659,312,000
37.245614
117
0.649083
false
3.858407
false
false
false
PSJoshi/python_scripts
tor_exit_nodes.py
1
1747
#!/usr/bin/env python import requests import sys import logging import StringIO # tor exit nodes urls tor_urls = 'https://check.torproject.org/exit-addresses' tor_dan_uk_urls = 'https://www.dan.me.uk/torlist/' # logging logging.basicConfig(stream=sys.stdout, level=logging.ERROR) logger = logging.getLogger(__name__) ...
apache-2.0
421,712,267,402,277,440
28.610169
99
0.702919
false
3.086572
false
false
false
skawm/ig_upload_bot
instabot_v2/instabot.py
1
11257
#!/usr/bin/env python # -*- coding: utf-8 -*- # InstagramAPI repo : https://github.com/LevPasha/Instagram-API-python # APscheduler repo : https://github.com/agronholm/apscheduler/ from datetime import datetime import time import os import random from apscheduler.schedulers.background import BackgroundScheduler from ...
agpl-3.0
1,454,782,813,854,830,800
38.804965
128
0.591626
false
3.589703
false
false
false
TheAlgorithms/Python
project_euler/problem_058/sol1.py
1
2222
""" Project Euler Problem 58:https://projecteuler.net/problem=58 Starting with 1 and spiralling anticlockwise in the following way, a square spiral with side length 7 is formed. 37 36 35 34 33 32 31 38 17 16 15 14 13 30 39 18 5 4 3 12 29 40 19 6 1 2 11 28 41 20 7 8 9 10 27 42 21 22 23 24 25 26 43 44 45 46 4...
mit
-1,082,794,493,339,473,800
24.813953
76
0.636036
false
3.298663
false
false
false
mokachokokarbon/Tenny
src/core/tenny.py
1
2367
""" Core operations of Tenny the timer Demo import tenny tenny.start_timer() 'timer started at xx:xx:xx:xx (see tenny.now() to display current time) tenny.stop_timer() 'timer stops at xx:xx::xxx' tenny.reset_timer() 'timer reset at xx:xx:xxx' """ from PyQt5.QtCore import (QTime, ...
gpl-3.0
4,040,020,966,691,188,700
29.74026
124
0.679763
false
3.664087
false
false
false
pwarren/AGDeviceControl
agdevicecontrol/tests/test_preset.py
1
2030
# AGDeviceControl # Copyright (C) 2005 The Australian National University # # This file is part of AGDeviceControl. # # AGDeviceControl is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the ...
gpl-2.0
-217,087,693,976,890,400
27.194444
75
0.650739
false
3.670886
true
false
false
RealTimeWeb/wikisite
MoinMoin/events/emailnotify.py
1
7211
# -*- coding: iso-8859-1 -*- """ MoinMoin - email notification plugin from event system This code sends email notifications about page changes. TODO: refactor it to handle separate events for page changes, creations, etc @copyright: 2007 by Karol Nowak <grywacz@gmail.com> @license: GNU GPL, see CO...
apache-2.0
3,650,843,290,931,341,300
34.69802
100
0.651227
false
3.988385
false
false
false
jdsika/TUM_HOly
openrave/docs/breathe/renderer/rst/doxygen/index.py
4
1665
from breathe.renderer.rst.doxygen.base import Renderer class DoxygenTypeSubRenderer(Renderer): def render(self): nodelist = [] # Process all the compound children for compound in self.data_object.get_compound(): compound_renderer = self.renderer_factory.create_renderer(compo...
mit
9,094,006,427,515,278,000
28.210526
82
0.587988
false
4.347258
false
false
false
TkkrLab/py-artnet
Ledart/Patterns/RainPattern.py
2
1762
# raindrop by Duality from Ledart.Tools.Graphics import Graphics, BLACK import random class RainDrop(object): def __init__(self, game, color=(100, 255, 100)): self.color = color self.y = 0 self.x = random.randint(0, game.width) self.pos = (self.x, self.y) self.height = sel...
gpl-3.0
2,622,674,780,010,536,400
28.864407
63
0.561862
false
3.678497
false
false
false
sgmap/openfisca-france
openfisca_france/model/revenus/remplacement/rente_accident_travail.py
1
8954
# -*- coding: utf-8 -*- from openfisca_france.model.base import * class rente_accident_travail(Variable): value_type = float entity = Individu label = u"Montant mensuel de la rente d’accident du travail" reference = u"https://www.legifrance.gouv.fr/affichCodeArticle.do?cidTexte=LEGITEXT000006073189&i...
agpl-3.0
3,116,744,726,161,164,300
47.808743
206
0.715293
false
2.876651
false
false
false
nevins-b/lemur
lemur/authorities/models.py
1
2045
""" .. module: lemur.authorities.models :platform: unix :synopsis: This module contains all of the models need to create an authority within Lemur. :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <kglisson@netflix...
apache-2.0
-2,232,433,627,400,463,600
41.604167
142
0.702689
false
3.910134
false
false
false
jtpaasch/armyguys
armyguys/jobs/roles.py
1
6950
# -*- coding: utf-8 -*- """Jobs for IAM roles.""" import os from ..aws.iam import role as role_lib from .exceptions import FileDoesNotExist from .exceptions import ImproperlyConfigured from .exceptions import MissingKey from .exceptions import ResourceAlreadyExists from .exceptions import ResourceDoesNotExist from ...
mit
-4,409,478,892,126,116,000
22.166667
73
0.589353
false
4.156699
false
false
false
w2naf/pythonPropWeb
pyprop/voaAntennaChooser.py
1
4524
#!/usr/bin/env python # # File: voacapAntennaChooser # # Copyright (c) 2009 J.Watson # # 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 ...
gpl-2.0
3,123,678,959,624,448,500
33.534351
109
0.60389
false
3.830652
false
false
false
internship2016/sovolo
app/event/templatetags/event_tags.py
1
1141
from django import template from django.conf import settings register = template.Library() @register.inclusion_tag('event/event_list.html', takes_context=True) def event_list(context, events, title): request = context['request'] return {'events': events, 'title': title, 'user': request.user} @register.inc...
mit
-1,609,568,262,197,978,600
26.829268
77
0.665206
false
3.645367
false
false
false
antivirtel/Flexget
flexget/plugins/api/movie_queue.py
3
9040
from __future__ import unicode_literals, division, absolute_import import datetime from math import ceil from flask import jsonify, request from flask_restplus import inputs from flexget.api import api, APIResource from flexget.plugins.api.series import NoResultFound from flexget.plugins.filter import movie_queue as...
mit
-6,118,687,200,318,574,000
35.897959
115
0.569027
false
3.87152
false
false
false
proyectos-analizo-info/pyanalizo
src/app-per-lhorta/get-geojson.py
1
1508
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ...
gpl-3.0
-2,871,030,083,965,930,000
26.418182
79
0.602122
false
3.916883
false
false
false
irmen/Pyro5
Pyro5/nsc.py
1
4765
""" Name server control tool. Pyro - Python Remote Objects. Copyright by Irmen de Jong (irmen@razorvine.net). """ from . import errors, core def handle_command(namesrv, cmd, args): def print_list_result(resultdict, title=""): print("--------START LIST %s" % title) for name, (uri, metadata) in s...
mit
1,134,471,404,585,136,500
35.374046
122
0.58531
false
3.84895
false
false
false
ossobv/gocollect
servers/lib/handlers/directory/collector.py
1
2829
import json import os import tempfile from datetime import datetime from lib.file import file_is_equal from .directory_mixin import DirectoryMixin class Collector(DirectoryMixin): def __init__(self, regid, collectkey, seenip, data): self.regid = regid self.collectkey = collectkey self.se...
gpl-3.0
6,175,952,456,484,041,000
31.517241
72
0.534818
false
4.135965
false
false
false
guildenstern70/pyfab
src/numtoword/num2word_IT.py
1
4097
# coding=utf-8 from __future__ import division import num2word_EU class Num2Word_IT(num2word_EU.Num2Word_EU): def set_high_numwords(self, high): mx = 3 + 3*len(high) for word, n in zip(high, range(mx, 3, -3)): self.cards[10**n] = word + "ilioni" def setup(self): sel...
mit
323,768,090,802,164,030
33.720339
83
0.467659
false
3.198283
false
false
false
black-security/cyber-security-framework
network/modules/packets/ipv4.py
1
10617
import struct, socket, random from ctypes import Structure, c_ubyte, c_ushort, c_ulong from enum import Enum class DSCP(Enum): #Default Forwarding DF = 0 #AssuredForwarding ##Class 1 AF11 = 10 #Low drop probability AF12 = 12 #Med drop probability AF13 = 14 #High drop probability #...
mit
-2,709,536,646,489,337,000
46.186667
209
0.467081
false
3.080963
false
false
false
shiquanwang/numba
numba/tests/test_tuple.py
1
1139
#! /usr/bin/env python # ______________________________________________________________________ '''test_tuple Unit test aimed at testing symbolic execution of the BUILD_TUPLE opcode. ''' # ______________________________________________________________________ import numpy from numba import * from numba.decorators im...
bsd-2-clause
-6,239,468,473,210,604,000
26.119048
72
0.394205
false
4.25
true
false
false
anisyonk/pilot
movers/base.py
1
31956
""" Base class of site movers :author: Alexey Anisenkov """ import hashlib import os, re import time from subprocess import Popen, PIPE, STDOUT from pUtil import tolog # from PilotErrors import PilotErrors, PilotException from Node import Node class BaseSiteMover(object): """ File movers move files betw...
apache-2.0
-7,326,824,195,297,768,000
42.067385
288
0.589185
false
4.11645
false
false
false
elainenaomi/sciwonc-dataflow-examples
sbbd2016/experiments/1-postgres/3_workflow_full_10files_primary_nosh_nors_annot_with_proj_3s/pegasus.bDkvI/pegasus-4.6.0/lib/python2.7/dist-packages/Pegasus/service/ensembles/auth.py
1
1126
import os import logging from flask import request, Response, g, abort import pam from Pegasus import user from Pegasus.service.ensembles import emapp log = logging.getLogger(__name__) def authenticate(username, password): try: return pam.authenticate(username, password) except Exception, e: ...
gpl-3.0
4,146,604,952,876,871,000
24.590909
74
0.65897
false
3.728477
false
false
false
cpaulik/pyscaffold
src/pyscaffold/utils.py
1
9728
# -*- coding: utf-8 -*- """ Miscellaneous utilities and tools """ from __future__ import absolute_import, print_function import functools import keyword import os import re import shutil import sys from contextlib import contextmanager from operator import itemgetter from .exceptions import InvalidIdentifier, OldSetu...
mit
116,571,128,180,930,900
27.781065
79
0.623252
false
4.111581
false
false
false
blurstudio/cross3d
cross3d/studiomax/studiomaxapplication.py
1
16419
## # \namespace cross3d.abstract.studiomaxapplication # # \remarks The StudiomaxApplication class will define all operations for application interaction. It is a singleton class, so calling cross3d.Application() will # always return the same instance of Application. One of its main functions is connecting applicatio...
mit
-5,211,696,290,226,449,000
36.919169
183
0.734819
false
3.492661
false
false
false
siddse7en/defectdojo_api
tests/defectdojo_api_unit_test.py
1
6372
""" UnitTests written by Aaron Weaver <aaron.weaver@owasp.org> as part of the OWASP DefectDojo and OWASP AppSec Pipeline Security projects Description: Tests the functionality of the DefectDojo API. """ from defectdojo_api import defectdojo import unittest import os from datetime import datetime class TestDefectDojo...
mit
4,633,865,997,807,290,000
38.333333
185
0.62806
false
3.418455
true
false
false