repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
jamiebull1/transport-carbon
transport_carbon/distance.py
1
3345
''' Created on 9 Jan 2014 @author: Jamie ''' import math import requests import re from pygeocoder import Geocoder import stations from g_directions import GoogleDirections ''' Distance conversion constants ''' CHAINS_PER_MILE = 0.0125 KM_PER_MILE = 1.6093 EARTH_RADIUS = 6378137 # earth radius in meters ''' GCD_UPL...
mit
-1,925,966,121,862,075,100
29.697248
85
0.625411
false
3.302073
false
false
false
SavinaRoja/challenges
Project_Euler/pemaths/py_maths.py
1
2656
#A library of utility methods that can be used in multiple problems presented #by Project Euler. #By Paul Barton import math import time def Eratosthenes(n): """ A Sieve of Eratosthenes method for the rapid computation of primes less than or equal to the provided integer n. Coerces to integer. Returns a l...
unlicense
1,077,721,230,768,148,900
32.2
80
0.591491
false
3.794286
false
false
false
deepmind/dm_control
dm_control/mjcf/skin_test.py
1
1410
# Copyright 2020 The dm_control 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 applicable law or agreed to i...
apache-2.0
1,139,408,963,325,310,500
30.333333
78
0.696454
false
3.643411
true
false
false
googleads/google-ads-python
google/ads/googleads/v6/errors/types/enum_error.py
1
1100
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-4,778,896,397,649,906,000
27.947368
74
0.701818
false
3.900709
false
false
false
iankirkman/Stat-558
compare_to_scikit.py
1
1093
''' Compare results to scikit-learn's ElasticNetCV function. Note that the lambda/alpha parameters are different in sklearn's objective function. Scikit alpha_ = lambda * (2-alpha) / 2 Scikit l1_ratio_ = alpha / (2-alpha) ''' import numpy as np import matplotlib.pyplot as plt import elastic_net from sklearn.linear_m...
gpl-3.0
1,068,368,223,651,237,500
29.361111
96
0.717292
false
2.767089
false
false
false
DaniLabs/rexploit
rexploit/modules/routers/pirelli/drga225_mac2wpa.py
1
1155
# coding=utf-8 from rexploit.interfaces.iexploit import IExploit class Exploit(IExploit): def __init__(self): super(Exploit, self).__init__( name="DRG A225 WiFi router default WPA", category="generator", authors={ "Vulnerability discovery": "Muris Kurgas...
gpl-3.0
-8,720,566,525,411,298,000
31
114
0.500868
false
3.388235
false
false
false
matthazinski/youtube2internetarchive
youtube2internetarchive.py
1
8885
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright (C) 2012 emijrp # Copyright (C) 2015 Matt Hazinski <matt@hazinski.net> # 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 ...
gpl-3.0
4,083,559,178,138,422,300
43.873737
484
0.650647
false
3.357899
false
false
false
ptphp/PyLib
src/dev/spider/config.py
1
7777
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys,hashlib,os #add isDEV=0 def getDefaultVal(flg): dict={} if str(flg)=="1": dict['house_flag']=1 dict['borough_name']="" dict['house_addr']="" dict['house_title']="" dict['house_city']="" dict['house_region']=""...
apache-2.0
692,675,300,925,219,100
20.752187
70
0.456373
false
2.804887
false
false
false
Groestlcoin/electrumx-grs
electrumx_rpc.py
1
2898
#!/usr/bin/env python3 # # Copyright (c) 2016, Neil Booth # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. '''Script to send RPC commands to a running ElectrumX server.''' import argparse import asyncio import json from functools import p...
mit
-8,563,575,540,143,616,000
30.16129
79
0.615252
false
3.823219
false
false
false
botswana-harvard/ambition-subject
ambition_subject/constants.py
1
1107
from ambition_prn.constants import AZT_3TC_with_ATZ_r_or_Lopinavir_r from ambition_prn.constants import AZT_3TC_with_EFV_NVP_or_DTG from ambition_prn.constants import TDF_3TC_FTC_with_ATZ_r_or_Lopinavir_r from ambition_prn.constants import TDF_3TC_FTC_with_EFV_or_NVP from ambition_validators import HEADACHE, VISUAL_LOS...
gpl-3.0
-505,848,286,590,011,140
35.9
79
0.766938
false
2.268443
false
true
false
nukru/Swarm-Surveys
app/surveys/forms.py
1
12147
from flask.ext.wtf import Form from flask.ext.babel import gettext from wtforms import TextField, BooleanField, RadioField from wtforms.validators import Required, Regexp, Optional from wtforms import IntegerField, HiddenField from wtforms import ValidationError from wtforms.validators import StopValidation from wtform...
apache-2.0
3,480,353,636,565,798,000
44.669173
124
0.54639
false
4.689961
false
false
false
pavanky/arrayfire-python
arrayfire/tests/simple/algorithm.py
1
2636
#!/usr/bin/python ####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ####################################...
bsd-3-clause
4,533,998,014,543,162,400
27.344086
62
0.597876
false
2.709147
false
false
false
savant-nz/carbon
Scripts/SCons/iOS.sconscript.py
1
3869
# # 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 glob import os import sys Import('*') vars = Variables() vars.AddVariables( ('architecture', 'Sets the ta...
mpl-2.0
-4,635,211,874,022,274,000
37.306931
115
0.679504
false
3.485586
false
false
false
get9/monkeyshines
robotsparser.py
1
1038
import requests import logging from fetcher import fetch from os.path import join from urlobj import URLObj from urllib.parse import urljoin, urlsplit, urlunsplit class RobotsParser: def __init__(self, domain): self.domain = domain # Check if the file even exists first. def exists(self): r...
apache-2.0
617,103,501,883,788,000
31.4375
77
0.597303
false
4.070588
false
false
false
srdp11/kd-tree
discrete_slider.py
1
1244
from matplotlib.widgets import Slider class DiscreteSlider(Slider): """A matplotlib slider widget with discrete steps.""" def __init__(self, *args, **kwargs): """Identical to Slider.__init__, except for the "increment" kwarg. "increment" specifies the step size that the slider will be discritiz...
mit
-839,302,486,298,906,000
40.466667
79
0.606109
false
3.875389
false
false
false
shantnu/ntlk_intro
Nltk_Intro_Part2.py
1
1403
#!/usr/bin/env python # coding: utf-8 # In[1]: import nltk.classify.util from nltk.classify import NaiveBayesClassifier from nltk.corpus import movie_reviews from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.corpus import wordnet # In[2]: stopwords.words('english')[:16] # In[3...
agpl-3.0
-2,384,037,332,292,930,000
20.921875
641
0.751247
false
3.152809
false
false
false
RPGOne/Skynet
pytorch-master/torch/legacy/nn/LookupTable.py
1
5017
import torch from .Module import Module from .utils import clear class LookupTable(Module): def __init__(self, nIndex, nOutput, paddingValue=-1, maxNorm=None, normType=None): super(LookupTable, self).__init__() self.weight = torch.Tensor(nIndex, nOutput) self.gradWeight = torch.Tensor(nIn...
bsd-3-clause
-1,934,741,924,229,302,500
32.006579
93
0.586805
false
4.119048
false
false
false
Peter92/MouseTrack
mousetracks/image/scipy/gaussian.py
1
8012
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
gpl-3.0
3,616,977,460,178,571,000
34.928251
73
0.611208
false
3.917848
false
false
false
hehongliang/tensorflow
tensorflow/python/keras/layers/normalization.py
1
30004
# Copyright 2015 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,833,905,877,213,097,000
43.64881
80
0.639748
false
4.119731
true
false
false
MacHu-GWU/uszipcode-project
uszipcode/search.py
1
31542
# -*- coding: utf-8 -*- """ This module allows developer to query zipcode with super clean API. """ import heapq import math import sys from collections import OrderedDict import sqlalchemy as sa from pathlib_mate import Path from six import integer_types, string_types from sqlalchemy.orm import sessionmaker from ....
mit
1,295,276,514,535,288,300
35.447552
97
0.535271
false
4.10771
false
false
false
evidation-health/bokeh
bokeh/crossfilter/models.py
1
30616
from __future__ import absolute_import import logging import six import pandas as pd import numpy as np from ..plotting import curdoc from ..models import ColumnDataSource, GridPlot, Panel, Tabs, Range from ..models.widgets import Select, MultiSelect, InputWidget # crossfilter plotting utilities from .plotting impo...
bsd-3-clause
4,780,065,910,283,773,000
32.278261
82
0.559805
false
4.371841
false
false
false
fcalo/crawler_comics
crawler/updater.py
1
7386
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, os, urllib2, urllib, cookielib import time, logging, logging.handlers from datetime import datetime from pprint import pprint import csv, shutil, re from ftplib import FTP_TLS, error_perm from db import DB from utils import * from urllib import quote import trac...
mit
3,110,870,707,839,183,000
30.404255
133
0.63252
false
2.937898
true
false
false
relic7/prodimages
python/magickLoad_PrdCmpFile3.py
1
14644
#!/usr/bin/env python ## Walk Root Directory and Return List or all Files in all Subdirs too def recursive_dirlist(rootdir): import os regex_CR2 = re.compile(r'.+?\.[CR2cr2]{3}') regex_jpg = re.compile(r'.+?\.[JPGjpg]{3}') regex_png = re.compile(r'.+?\.[pngPNG]{3}') walkedlist = [] for dirname,...
mit
-1,768,923,151,258,156,500
31.470067
142
0.60926
false
3.345671
true
false
false
schristakidis/p2ner
p2ner/core/statsDecorators.py
1
4884
# -*- coding: utf-8 -*- # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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 # # U...
apache-2.0
-5,578,088,276,203,119,000
33.394366
76
0.518428
false
4.232236
false
false
false
gregleno/romi
rominet/robot_wii_controler.py
1
3816
#!/usr/bin/env python import logging import math from wiiremote import WiiRemote from robot import Robot try: import cwiid except ImportError: cwiid = None class RobotWiiController(object): def __init__(self, robot): self.log = logging.getLogger('romi') self.robot = robot self.r...
gpl-3.0
3,825,865,961,917,650,000
31.338983
95
0.5587
false
3.321149
false
false
false
RedHenLab/Audio
CNN/speaker/recognition.py
1
3110
import numpy as np import cPickle as pickle from AudioPipe.features import mfcc from silence import remove_silence import scipy.io.wavfile as wav import librosa from skgmm import GMMSet, GMM class GMMRec(object): def __init__(self): self.features = [] self.gmmset = GMMSet() self.classes =...
gpl-2.0
-5,686,258,323,994,095,000
31.395833
80
0.548232
false
3.587082
false
false
false
scampion/pimpy
pimpy/image/features/bindct.py
1
2404
#-*- coding:utf-8 -*-""" u""" pimpy.image.features.bindct enable to compute a binary dct .. module:: bindct :synopsis: Tools for video :platform: Unix, Mac, Windows .. moduleauthor:: Sebastien Campion <sebastien.campion@inria.fr> """ # pimpy # Copyright (C) 2010 Sebastien Campion <sebastien.campion@inria.f...
agpl-3.0
6,329,867,416,227,239,000
31.486486
118
0.654326
false
3.55096
false
false
false
dpadula85/ExSPy
dev/QM_parser/parser/guess.py
1
1572
#!/usr/bin/env python import sys from g03 import * from g09 import * from gamess import * from nwchem import * from orca import * from qchem import * from xyz import * def guess(filename): '''Returns the correct class needed to parse filename, if it exists.''' # # Dictionary of unique sentences in QM pa...
gpl-3.0
4,241,806,235,388,976,600
22.117647
76
0.578244
false
4.041131
false
false
false
tcalmant/python-javaobj
setup.py
1
2899
""" javaobj module exposes an API familiar to users of the standard library marshal, pickle and json modules. See: http://download.oracle.com/javase/6/docs/platform/serialization/spec/protocol.html :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 :version: 0.4.3 :status: Alpha .. Copyright...
apache-2.0
8,115,348,423,694,601,000
30.51087
82
0.613315
false
4.12963
false
false
false
Kynarth/pyqtcli
tests/test_new.py
1
3387
import os from lxml import etree from click.testing import CliRunner from pyqtcli.cli import pyqtcli from pyqtcli.qrc import read_qrc from pyqtcli import verbose as v from pyqtcli.test.verbose import format_msg def test_new_default(config): runner = CliRunner() result = runner.invoke(pyqtcli, ["new", "qrc",...
mit
5,417,025,726,680,844,000
28.973451
73
0.626218
false
3.61859
true
false
false
rsachetto/harpia
harpia/bpGUI/dilate.py
1
7542
# -*- coding: utf-8 -*- # [HARPIA PROJECT] # # # S2i - Intelligent Industrial Systems # DAS - Automation and Systems Department # UFSC - Federal University of Santa Catarina # Copyright: 2006 - 2007 Luis Carlos Dill Junges (lcdjunges@yahoo.com.br), Clovis Peruchi Scotti (scotti@ieee.org), # Guilh...
gpl-2.0
1,858,193,419,530,253,800
40.9
139
0.541236
false
3.959055
false
false
false
abbacode/sshautomator
auto_data.py
1
15629
from multiprocessing import Process import multiprocessing as mp class Database(object): def __init__(self, filename): self.raw_data = {} self.devices = {} self.tasks = {} self.read_database_from_file(filename) self.initalise_devices() self.initalise_tasks() d...
mit
-1,770,843,887,671,624,400
43.400568
124
0.509182
false
4.644577
false
false
false
diogo149/CauseEffectPairsPaper
configs/numerical_pca1_none.py
1
7426
import numpy as np from scipy.stats import skew, kurtosis, shapiro, pearsonr, ansari, mood, levene, fligner, bartlett, mannwhitneyu from scipy.spatial.distance import braycurtis, canberra, chebyshev, cityblock, correlation, cosine, euclidean, hamming, jaccard, kulsinski, matching, russellrao, sqeuclidean from sklearn.p...
mit
-7,695,201,876,462,839,000
29.186992
246
0.74091
false
3.439555
false
false
false
hashedin/squealy
squealy/parameters.py
1
4246
import arrow import datetime from .exceptions import DateParseException, DateTimeParseException, NumberParseException class Parameter(): def __init__(self): pass def to_internal(self, value): return value class String(Parameter): def __init__(self, name, description=None, default_value...
mit
1,300,850,493,574,552,600
31.914729
120
0.585021
false
4.441423
false
false
false
DHI-GRAS/processing_workflow
DeleteWorkflowAction.py
1
2927
""" *************************************************************************** DeleteWorkflowAction.py ------------------------------------- Copyright (C) 2014 TIGER-NET (www.tiger-net.org) *************************************************************************** * This plugin is part of the Water Observatio...
gpl-3.0
-891,885,053,092,444,400
51.267857
94
0.51452
false
5.24552
false
false
false
neithere/timetra.diary
timetra/diary/reporting/drift.py
1
10499
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Timetra is a time tracking application and library. # Copyright © 2010-2014 Andrey Mikhaylenko # # This file is part of Timetra. # # Timetra is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public Li...
lgpl-3.0
-521,854,092,180,889,100
28.181058
88
0.583142
false
3.618653
false
false
false
UPDDI/dds-database-server
interactions/models.py
1
2307
from __future__ import unicode_literals from django.db import models from compounds.models import Compound from targets.models import Target from dds.base.models import * class BalestraInteraction(TrackableModel): """Describes an interaction predicted by Balestra""" class Meta: unique_together = (('c...
mit
7,467,893,095,995,026,000
31.041667
78
0.664066
false
4.194545
false
false
false
garybake/comic_server
src/server.py
1
1296
#!/usr/bin/env python2 import tornado.ioloop import tornado.options import tornado.web import settings from handlers.RootHandler import * from handlers.ComicPageHandler import * from handlers.AdminRefreshHandler import * from handlers.AdminInfoHandler import * from handlers.common import * from tornado.options impo...
mit
8,650,072,469,735,207,000
26.574468
68
0.641204
false
3.963303
false
false
false
jazdev/udacity-cs262
hw-1/hw-1.5.py
1
2630
# Title: Simulating Non-Determinism # Each regular expression can be converted to an equivalent finite state # machine. This is how regular expressions are implemented in practice. # We saw how non-deterministic finite state machines can be converted to # deterministic ones (often of a different size). It is also pos...
mit
5,539,027,058,160,855,000
39.461538
82
0.678707
false
3.662953
true
false
false
jcu-eresearch/Edgar
importing/edgar_importing/costa_rica_db_wipe_and_import.py
1
6796
#!/usr/bin/python # Custom import script to process the Costa Rica import csv files. # NOTE: Will wipe the database before performing import. from edgar_importing import db import json import sys import csv from datetime import datetime import logging.handlers import re def main(): # make sure this isn't run acc...
bsd-3-clause
3,558,361,944,605,682,700
38.976471
91
0.482637
false
4.33695
false
false
false
EdDev/vdsm
lib/yajsonrpc/betterAsyncore.py
1
7572
# Copyright (C) 2014-2017 Saggi Mizrahi, Red Hat Inc. # # 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 # WITHOU...
gpl-2.0
6,120,996,274,666,271,000
29.532258
78
0.590597
false
4.351724
false
false
false
netheosgithub/pcs_api
python/pcs_api/providers/swift.py
1
18057
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Netheos (http://www.netheos.net) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
apache-2.0
3,351,635,114,639,010,000
43.806452
110
0.605748
false
4.163477
false
false
false
cernops/CloudMan
backends/LSF/egroup_add.py
1
3095
import httplib from user_list import * import re from xml.dom.minidom import Document for egroup in egroup_user_list: users = egroup_user_list[egroup] users = re.sub(' +',' ',users) user_list = users.split(" ") print user_list for user in user_list: doc = Document() soap_envelope =...
apache-2.0
-7,128,206,079,514,752,000
50.583333
117
0.668174
false
3.742443
false
false
false
stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/tools/hermitepoly/benchmark/python/scipy/benchmark.py
1
2797
#!/usr/bin/env python # # @license Apache-2.0 # # Copyright (c) 2018 The Stdlib 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 # # ...
apache-2.0
-6,285,319,350,684,256,000
23.112069
88
0.626028
false
3.769542
false
false
false
jucacrispim/toxicbuild
tests/functional/test_rest_api.py
1
8986
# -*- coding: utf-8 -*- # Copyright 2018 Juca Crispim <juca@poraodojuca.net> # This file is part of toxicbuild. # toxicbuild is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
agpl-3.0
-8,899,801,015,763,612,000
33.964981
77
0.588694
false
3.719371
true
false
false
angr/angr
angr/storage/memory_mixins/paged_memory/pages/cooperation.py
1
10362
import claripy from typing import List, Tuple, Set, Dict, Optional from angr.storage.memory_object import SimMemoryObject, SimLabeledMemoryObject from .multi_values import MultiValues class CooperationBase: """ Any given subclass of this class which is not a subclass of MemoryMixin should have the property t...
bsd-2-clause
5,655,431,235,116,192,000
39.319066
130
0.552596
false
4.006961
false
false
false
capitalk/treelearn
treelearn/constant_leaf.py
1
1342
# TreeLearn # # Copyright (C) Capital K Partners # Author: Alex Rubinsteyn # Contact: alex [at] capitalkpartners [dot] com # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # vers...
lgpl-3.0
5,538,997,137,237,971,000
28.822222
68
0.628912
false
3.845272
false
false
false
gam17/QAD
cmd/qad_generic_cmd.py
1
28152
# -*- coding: utf-8 -*- """ /*************************************************************************** QAD Quantum Aided Design plugin classe base per un comando ------------------- begin : 2013-05-22 copyright : iiiii emai...
gpl-3.0
-8,385,118,722,843,134,000
39.272727
112
0.621607
false
3.786387
true
false
false
hich28/mytesttxx
tests/python/ipnbdoctest.py
1
9236
#!/usr/bin/env python """ simple example script for running and testing notebooks. Usage: `ipnbdoctest.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook. """ from __future__ import print_function import os,sys,time import base64 impo...
gpl-3.0
5,010,272,085,975,349,000
31.069444
77
0.540385
false
3.602184
true
false
false
nradulovic/pyeds
docs/conf.py
1
5186
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # pyeds documentation build configuration file, created by # sphinx-quickstart on Thu Aug 17 23:46:06 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # auto...
gpl-3.0
6,859,326,541,434,775,000
28.976879
79
0.670459
false
3.864382
true
false
false
cordis/pycloudia
pycloudia/streams/zmq_impl/streams.py
1
5878
from zmq.eventloop.zmqstream import ZMQStream as ZmqStream from zmq.sugar import Socket as ZmqSocket from zmq.sugar import constants as zmq_constants from pysigslot import Signal from pycloudia.streams.zmq_impl.messages import Message from pycloudia.streams.zmq_impl.strategies import * __all__ = [ 'RouterStream...
mit
-9,053,838,330,434,262,000
33.988095
103
0.698027
false
3.584146
false
false
false
codio/install_software
helper_postgres/files/helper_postgres.py
1
1671
#!/usr/bin/env python # sudo apt install libpq-dev # pip install psycopg2 import argparse import sys import csv import psycopg2 from psycopg2 import OperationalError def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--db_host', required=True) parser.add_argument('--db_port', required=T...
mit
4,885,482,179,502,441,000
22.222222
93
0.668462
false
3.503145
false
false
false
elmoneto/eng-civil-2017-2
lista2/ex8-alt.py
1
1662
#Exercício 8 (alternativa) - mostra todos os números negativos de uma vez só no final da execução #Leia quatro valores reais, faça um programa que: #a) Imprima os valores negativos. #b) Calcule e imprima a média dos valores positivos. somatorio = 0 #variável que acumula cada valor positivo qtdePositivos = 0 #variáv...
gpl-3.0
924,525,842,654,970,400
33.87234
145
0.706528
false
2.295518
false
false
false
jensenbox/singnet
agent-web/sn_agent_web/jinja.py
1
2216
from pathlib import Path import aiohttp_jinja2 import jinja2 from aiohttp_jinja2 import APP_KEY as JINJA2_APP_KEY from sn_agent_web.settings import WebSettings THIS_DIR = Path(__file__).parent BASE_DIR = THIS_DIR.parent settings = WebSettings() @jinja2.contextfilter def reverse_url(context, name, **parts): """...
mit
2,174,384,206,165,030,400
30.657143
117
0.681408
false
3.435659
false
false
false
Azure/azure-sdk-for-python
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_virtual_clusters_operations.py
1
26731
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-7,111,888,725,640,066,000
49.058052
220
0.649022
false
4.405241
true
false
false
lucasgr7/silverplate
crawler/migrations/0001_initial.py
1
1879
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-09-15 01:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DataIng...
mit
6,140,656,679,003,715,000
36.58
114
0.549228
false
4.280182
false
false
false
joefutrelle/noaa_floats
orm.py
1
2801
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, Integer, BigInteger, Numeric, DateTime, ForeignKey from sqlalchemy.orm import backref, relationship from geoalchemy2 import Geometry """ Object-relational model of floats database. See etl.py for extract/transform/load proce...
mit
-7,995,724,253,051,001,000
33.158537
89
0.63156
false
3.816076
false
false
false
arnarb/greenhousedb
apps/greenhousedb/migrations/0001_initial.py
1
9867
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('taxonomy', '0001_initial'), ] operations = [ migrations.CreateModel( name='Clones', fields=[ ...
gpl-3.0
7,366,565,536,940,805,000
54.745763
832
0.551231
false
3.812597
false
false
false
foarsitter/decide-exchange-model
decide/data/tests/test_read.py
1
3081
import os import pytest import typesystem from decide import input_folder from typesystem import ValidationError from .. import reader, types def test_cop2(): data_file = reader.InputDataFile.open(os.path.join(input_folder, "cop21.csv")) assert len(data_file.errors) == 0 assert len(data_file.rows) == 2...
gpl-3.0
7,987,551,020,900,307,000
21.326087
90
0.60727
false
3.493197
true
false
false
silenteddie/modisTrackL1L2
ui/modisTrack_about_ui.py
1
3984
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'modisTrack_about_ui.ui' # # Created: Sat Jan 16 05:12:28 2016 # by: PyQt4 UI code generator 4.10.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 e...
gpl-2.0
-2,103,810,686,616,972,300
52.12
514
0.68499
false
3.557143
false
false
false
hgarrereyn/Th3g3ntl3man-CTF-Writeups
2017/picoCTF_2017/problems/cryptography/Encrypted_Shell/myEnd.py
1
2554
#!/usr/bin/python2 -u from hashlib import sha256 from Crypto import Random from Crypto.Random import random from Crypto.Cipher import AES from subprocess import check_output, STDOUT, CalledProcessError #Get password from getPassword.py # Now we communicate with server here to get flag BLOCK_SIZE = 16 R = Random.new()...
gpl-3.0
-9,042,055,279,052,747,000
36.014493
313
0.767032
false
2.731551
false
false
false
igel-kun/pyload
module/plugins/accounts/DebridlinkFr.py
1
3869
# -*- coding: utf-8 -*- import time import pycurl from module.network.HTTPRequest import BadHeader from ..hoster.DebridlinkFr import error_description from ..internal.misc import json from ..internal.MultiAccount import MultiAccount class DebridlinkFr(MultiAccount): __name__ = "DebridlinkFr" __type__ = "ac...
gpl-3.0
-1,079,396,690,344,485,100
37.69
165
0.566296
false
3.763619
false
false
false
dibondar/PyPhotonicReagents
projetcs/ODD_pulse_shaper/odd_tab.py
1
50785
######################################################################## # # GA for optimal dynamic discrimination experiment # ######################################################################## import wx from wx.lib.agw.floatspin import FloatSpin as wxFloatSpin import h5py from h5py._hl.group import Group as H...
bsd-3-clause
4,869,455,647,902,441,000
36.9
137
0.680102
false
3.448194
false
false
false
christopherfujino/dotfiles
scripts/hash-zip.py
1
1683
#!/usr/bin/env python2 import hashlib import json import subprocess # for subprocess import os # for path import sys # for reading args import zipfile # for zippin' def checksum(input_path): """Generates a sha256 checksum of a local file and returns its path. Args: input_path: (str) The local path to the fi...
gpl-2.0
-8,134,052,726,814,396,000
26.145161
80
0.617944
false
3.50625
false
false
false
SanPen/GridCal
src/GridCal/Engine/IO/plexos.py
1
31983
# This file is part of GridCal. # # GridCal is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # GridCal is distributed in the hope that...
gpl-3.0
-787,465,231,036,459,900
32.175311
119
0.550702
false
3.995128
false
false
false
hannesrauhe/skyhog
scihog/creator.py
1
6386
''' Copyright 2012 Hannes Rauhe This file is part of Skyhog. Skyhog is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Skyhog is distribu...
gpl-3.0
-4,446,262,235,041,394,700
39.163522
139
0.549953
false
3.89153
false
false
false
adamrvfisher/TechnicalAnalysisLibrary
MinMaxDirectionalStrategyOpt.py
1
3927
# -*- coding: utf-8 -*- """ Created on Fri Mar 2 14:48:09 2018 @author: AmatVictoriaCuramIII """ #pseudoturtle from YahooGrabber import YahooGrabber import numpy as np import time as t import random as rand import pandas as pd Dataset = pd.DataFrame() Dataset2 = pd.DataFrame() ticker = 'UVXY' iteration...
apache-2.0
490,627,533,851,954,240
33.396396
88
0.582124
false
2.742318
false
false
false
mlandry1/CarND
Labs/Term3/Lesson 4 - 16/python3/CarND - Behavior Planner/cost_functions.py
1
4808
from __future__ import division from collections import namedtuple from math import sqrt,exp import pdb TrajectoryData = namedtuple("TrajectoryData", [ 'proposed_lane', 'avg_speed', 'max_acceleration', 'rms_acceleration', 'closest_approach', 'end_distance_to_goal', 'end_lanes_from_goal', 'collides...
mit
-780,695,010,356,536,300
23.183246
90
0.661398
false
2.879042
false
false
false
ratnania/python_games
src/ex2/main.py
1
1675
import sys, pygame import numpy as np from numpy.random import random pygame.init() size = width, height = 1000, 800 amplitude_max = 4. amplitude = amplitude_max * random() speed = [amplitude*random(), amplitude*random()] black = 0, 0, 0 screen = pygame.display.set_mode(size) done = False is_blue = True x = 30 y = ...
mit
5,481,576,881,047,000,000
25.171875
94
0.608358
false
3.148496
false
false
false
ChillarAnand/junction
junction/proposals/views.py
1
17603
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals # Standard Library import collections # Third Party Stuff from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.core.urlresolvers import...
mit
-5,767,455,551,367,484,000
41.725728
118
0.667329
false
4.005233
false
false
false
lhess/rpi-gpio-7segment-display
seven_seg/display.py
1
5797
import asyncio import time from gpiozero import DigitalOutputDevice from .message import TimedMessage from .symbol_mapping import SYMBOL class SevenSegmentDisplayMessageData: def __init__(self, display, message): self._data = [] self._length = 0 self._display_window_size = display.windo...
unlicense
-2,273,662,236,797,265,700
31.385475
115
0.54925
false
4.073788
false
false
false
clu8/2048
gameStateQ.py
1
8091
import random import agents from subprocess import Popen, PIPE, STDOUT import time import json import sys last_score = 0 ind = 0 p = Popen(['th', 'gameStateQ.lua'], stdout=PIPE, stdin=PIPE, stderr=STDOUT) score_record = [] max_score = 0 ave_score = 550 class Move: up, right, down, left = list(range(4)) def ...
gpl-2.0
9,165,192,687,026,689,000
30.858268
168
0.56569
false
3.646237
false
false
false
alejob/mdanalysis
testsuite/MDAnalysisTests/analysis/test_psa.py
1
13612
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
gpl-2.0
38,365,685,381,503,860
40.883077
102
0.610491
false
3.498329
true
false
false
appleseedhq/cortex
contrib/scripts/fixIncludes.py
5
8737
########################################################################## # # Copyright (c) 2018, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
bsd-3-clause
-195,548,871,833,200,400
25.883077
110
0.680668
false
3.252792
false
false
false
gnmerritt/casino
matchmaker/profile.py
1
1965
from matchmaker import app import datetime from sqlalchemy import or_ from models import BotIdentity, MatchResult, BotSkill, BotRank from util import serialize from matchmaker import db class PlayerData(object): def __init__(self, user): today = datetime.date.today() self.bots = db.session.query...
mit
-6,623,255,820,069,998,000
32.87931
77
0.563359
false
3.700565
false
false
false
serika00/shadowsocks
shadowsocks/tcprelay.py
1
29030
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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 b...
apache-2.0
8,154,809,660,064,895,000
39.431755
90
0.536238
false
4.230545
true
false
false
intellimath/pyaxon
lib/axon/utils.py
1
3472
# coding: utf-8 # The MIT License (MIT) # # Copyright (c) <2011-2014> <Shibzukhov Zaur, szport at gmail dot com> # # 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, incl...
mit
1,645,698,536,154,112,300
32.066667
95
0.663882
false
3.542857
false
false
false
michaelhenry/Localizr
project/views.py
1
1072
from rest_framework import status from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.views import APIView from django.contrib.auth import authenticate from .serializers import ( UserAuthSerializer, UserLoginSerializer ) class UserLoginView(APIView)...
mit
-5,094,926,811,715,896,000
27.972973
68
0.622201
false
4.828829
false
false
false
astrorigin/oroboros
oroboros/core/colors.py
1
1871
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Colors. Create a color instance. >>> clr = RGBColor(120, 120) >>> clr.set(blue=30) >>> print clr 120,120,30 """ __all__ = ['RGBColor'] class RGBColor(object): """RGB color type. rgb = RGBColor(128, 128, 128) """ __slots__ = ['_red', '_green'...
gpl-3.0
-5,240,345,545,872,783,000
17.71
74
0.595404
false
2.796712
false
false
false
silent-money/beanstalk-py
beanstalk/job.py
1
1972
#!/usr/bin/env python # coding: utf8 # # Copyright 2016 hdd # # 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 applicabl...
apache-2.0
4,072,566,094,084,134,400
29.8125
79
0.601927
false
3.720755
false
false
false
adaptive-learning/proso-apps
proso_configab/management/commands/load_configab_experiments.py
1
4484
from django.core.management.base import BaseCommand, CommandError from jsonschema import validate from proso_configab.models import Experiment, Variable, PossibleValue, ExperimentSetup from datetime import datetime from django.db import transaction import os import json class Command(BaseCommand): def add_argume...
mit
132,686,475,717,860,270
53.024096
158
0.598127
false
4.580184
false
false
false
atiqueahmedziad/addons-server
src/olympia/addons/forms.py
1
28581
import os from datetime import datetime from urlparse import urlsplit from django import forms from django.conf import settings from django.core.files.storage import default_storage as storage from django.forms.formsets import BaseFormSet, formset_factory from django.utils.translation import ugettext, ugettext_lazy a...
bsd-3-clause
-283,230,548,772,504,220
37.057257
78
0.598684
false
4.042574
false
false
false
acacar/MIN545
Circle.py
1
1415
import math class Circle: def __init__(self, r=1): self._radius = self._validate_dimension(r) def radius(self, r=None): if r is None: return self._radius else: self._radius = self._validate_dimension(r) def diameter(self, d=None): if d is None: ...
mit
-365,317,996,415,012,860
20.439394
75
0.531449
false
3.704188
false
false
false
theju/django-comments-apps
auth_comments/templatetags/auth_comments.py
1
2294
import settings from django import template from django.contrib.comments.templatetags.comments import BaseCommentNode, CommentFormNode register = template.Library() DEFAULT_UNAUTH_COMMENT_MESSAGE = getattr(settings, 'DEFAULT_UNAUTH_COMMENT_MESSAGE', None) or \ """<p>Please register/si...
mit
8,431,826,545,183,318,000
36
101
0.570619
false
4.125899
false
false
false
angelcoto/arkolect
arkolect.py
1
10912
#!/usr/bin/python # -*- coding: utf-8 -*- # arkolect.py # # Copyright 2014 Ángel Coto <codiasw@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 2 of the ...
gpl-3.0
7,228,152,538,118,227,000
32.742236
114
0.673263
false
2.740227
false
false
false
ahuei123456/Ruby-Bot
rubybot/cogs/info.py
1
1433
from discord.ext import commands from rubybot.utils import llparser from seiutils import linkutils, discordutils MAX_CHAR = 2000 class Info(commands.Cog): def __init__(self, bot): self.bot = bot @commands.group() async def lyrics(self, ctx): pass async def send_lyrics...
mit
7,162,024,890,457,394,000
26.098039
65
0.511514
false
3.64631
false
false
false
jjhelmus/wradlib
examples/plot_cg_ppi_example.py
1
11893
# ------------------------------------------------------------------------------ # Name: plot_cg_ppi_example.py # Purpose: show a few examples on how to use wradlib.vis.plot_cg_ppi # # Author: Kai Muehlbauer # # Created: 25.02.2014 # Copyright: (c) Kai Muehlbauer 2014 # Licence: The MI...
mit
-3,029,740,857,933,278,700
39.152249
106
0.530648
false
3.336045
false
false
false
guillaumelenoir/WAVEPAL
wavepal/detrending.py
1
1300
import numpy as np import numpy.linalg as la import sys def detrending(t,data,pol_degree): """ detrending returns the least-squares polynomial trend of a time series. Inputs: - t [1-dim numpy array of floats]: the times of the time series. - data [1-dim numpy array of floats - size=t.size]: the data values of...
mit
-1,352,322,912,024,705,300
35.138889
219
0.682308
false
2.869757
false
false
false
trichter/sito
bin/noise/noise_s_final_stretching.py
1
4877
#!/usr/bin/env python # by TR from obspy.core import UTCDateTime as UTC from sito.data import IPOC from sito.noisexcorr import (prepare, get_correlations, plotXcorrs, noisexcorrf, stack) from sito import util import matplotlib.pyplot as plt from sito.stream import read from multiprocessing ...
mit
8,972,894,135,669,870,000
40.330508
132
0.605085
false
2.929129
false
false
false
udragon/pyxcm
pyxcm/clumgr/models.py
1
2823
""" @file: models.py @description: Django ORM model for cluster manager @author: Ido Nahshon """ import os from django.db import models from pyxcm.config import EXPORTDIR, IMAGEDIR, KICKSTARTDIR class OperatingSystem(models.Model): name = models.CharField(max_length=32, primary_key=True) distro =...
gpl-2.0
7,017,117,620,645,942,000
26.676471
77
0.62593
false
3.51995
false
false
false
traios/HarvesterPlugins
ckanext-metaschemaform/ckanext/metaschemaform/controllers/SaveLabels.py
1
5282
from bs4 import BeautifulSoup import urllib2 import requests import time from xml.dom.minidom import parseString import re import difflib import logging ahref="" #--list of non label data nonlabel=[] a_link=[] # list of label data label=[] ids=[] ids1=[] links=[] all_ids=[] parent_attrs_list=[] parent_name_list=...
gpl-2.0
-5,510,598,081,160,433,000
16.375
131
0.634987
false
2.745322
false
false
false
66eli77/kolibri
kolibri/auth/api.py
1
7620
from __future__ import absolute_import, print_function, unicode_literals from django.contrib.auth import authenticate, get_user, login, logout from django.contrib.auth.models import AnonymousUser from rest_framework import filters, permissions, status, viewsets from rest_framework.exceptions import ValidationError fro...
mit
3,934,867,075,267,207,700
38.481865
152
0.645013
false
4.409722
false
false
false
maxli99/SmartChecker
modules/flexins/FlexiNS_Basic_System_UnitState.py
1
4813
# -*- coding: utf-8 -*- u""" 检查FlexiNS 各个CPU 单元状态 - 检查指令: ZUSI:COMP; 该指令列出当前的CPU 单元状态情况。 """ import re,sys,time from libs.checker import ResultInfo from libs.checker import CheckStatus from libs.infocache import shareinfo from libs.log_spliter import LogSpliter ,LOG_TYPE_FLEXI_NS __author__ = 'OuYan...
mit
-5,505,028,390,775,647,000
27.802548
99
0.607609
false
2.778734
false
false
false
anselmobd/fo2
src/lotes/forms/forms.py
1
27515
from datetime import datetime, timedelta from django import forms from produto.models import ProdutoItem from systextil.models import Colecao, Familia class LoteForm(forms.Form): lote = forms.CharField( label='Lote/OC', max_length=9, min_length=9, widget=forms.TextInput(attrs={'type': 'number', ...
mit
-2,173,638,318,042,508,800
33.212235
76
0.559298
false
3.537826
false
false
false
ciarams87/PyU4V
PyU4V/system.py
1
41778
# Copyright (c) 2020 Dell Inc. or its subsidiaries. # # 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...
mit
-6,136,081,430,095,448,000
42.884454
79
0.602135
false
4.445414
false
false
false
rndusr/stig
stig/views/peer.py
1
3310
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful # but...
gpl-3.0
2,866,162,990,326,962,700
21.214765
76
0.60423
false
3.440748
false
false
false
dpattiso/igraph
lama/translate/instantiate.py
1
2899
#! /usr/bin/env python # -*- coding: latin-1 -*- from __future__ import with_statement import build_model import pddl_to_prolog import pddl import timers def get_fluent_facts(task, model): fluent_predicates = set() for action in task.actions: for effect in action.effects: fluent_predicates.add(effect.l...
gpl-2.0
-2,008,164,249,225,554,400
31.211111
83
0.668506
false
3.596774
false
false
false
IHEC/ihec-ecosystems
version_metadata/utils.py
1
4287
import json import os import sys import time from collections import defaultdict def sanity_check_fail(msg): print(msg) sys.exit(1) class NonUniqException(Exception): def __init__(self, message, iterable): self.message = message self.iterable = iterable class Logger: def __init__(self): self.debug = Fal...
apache-2.0
-2,003,639,113,808,124,000
23.780347
100
0.651271
false
2.856096
false
false
false
googleapis/python-retail
google/cloud/retail_v2/services/catalog_service/transports/base.py
1
7267
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-6,824,882,282,865,593,000
38.069892
103
0.647172
false
4.259672
false
false
false
jbalogh/zamboni
apps/addons/helpers.py
1
10906
import jinja2 from jingo import register, env from tower import ugettext as _ from . import buttons from amo.utils import chunked import amo register.function(buttons.install_button) register.function(buttons.big_install_button) register.function(buttons.mobile_install_button) @register.filter @jinja2.contextfilt...
bsd-3-clause
6,958,098,505,147,752,000
30.33908
79
0.676967
false
3.526027
false
false
false