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
vlegoff/tsunami
src/primaires/joueur/commandes/montrer/niveaux.py
1
2438
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
bsd-3-clause
7,708,689,610,241,708,000
44.90566
79
0.737772
false
3.849684
false
false
false
cryvate/project-euler
project_euler/library/number_theory/pells_equation.py
1
1029
from .continued_fractions import convergents_sqrt from typing import Generator, Tuple def solve_pells_equation(n: int) -> Generator[Tuple[int, int], None, None]: convergents = convergents_sqrt(n) for convergent in convergents: h = convergent.numerator k = convergent.denominator if h...
mit
-1,582,267,298,741,601,800
23.5
75
0.512148
false
3.118182
false
false
false
dmlc/xgboost
tests/python/test_with_pandas.py
1
10402
# -*- coding: utf-8 -*- import numpy as np import xgboost as xgb import testing as tm import pytest try: import pandas as pd except ImportError: pass pytestmark = pytest.mark.skipif(**tm.no_pandas()) dpath = 'demo/data/' rng = np.random.RandomState(1994) class TestPandas: def test_pandas(self): ...
apache-2.0
5,201,633,062,039,068,000
39.007692
82
0.506441
false
3.253675
true
false
false
welshjf/bitnomon
bitnomon/formatting.py
1
1555
# Copyright 2015 Jacob Welsh # # This file is part of Bitnomon; see the README for license information. """Text/number formatting""" class ByteCountFormatter(object): #pylint: disable=too-few-public-methods """Human-readable display of byte counts in various formats. By default, the formatter uses SI an...
apache-2.0
5,630,058,581,634,303,000
28.903846
72
0.560129
false
3.783455
false
false
false
warp1337/opencv_facerecognizer
src/ocvfacerec/facerec/classifier.py
1
9086
# Copyright (c) 2015. # Philipp Wagner <bytefish[at]gmx[dot]de> and # Florian Lier <flier[at]techfak.uni-bielefeld.de> and # Norman Koester <nkoester[at]techfak.uni-bielefeld.de> # # # Released to public domain under terms of the BSD Simplified license. # # Redistribution and use in source and binary forms, with or wit...
bsd-3-clause
3,765,346,731,640,892,000
39.5625
116
0.633832
false
4.133758
false
false
false
debbiedub/bcdef
features/steps/application.py
1
1080
import logging from multiprocessing import Process from bc import BCMain from fcp.CommunicationQueues import comm def run_create_first_block(queues, *args): global comm comm.set(queues=queues) try: logging.getLogger().setLevel(logging.DEBUG) # logging.getLogger().addHandler(comm.get_handl...
gpl-3.0
6,960,105,033,797,665,000
29.857143
63
0.671296
false
3.789474
false
false
false
google/capirca
capirca/lib/windows.py
1
12745
# Copyright 2016 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by applicable law or agr...
apache-2.0
6,289,347,090,319,784,000
34.013736
80
0.626991
false
4.028129
false
false
false
AlfredNeverKog/BrainCarya
src/my/kadenze/lesson3/mnist_autoencoder.py
1
2610
from mnist import MNIST import numpy as np import tensorflow as tf from src.my.lib.utils import montage import matplotlib.pyplot as plt from PIL import Image src = '../../../../data/mnist/' output='./content/1/%s.jpg' mndata = MNIST(src) data = np.array(mndata.load_testing()) X = data[0] Y = data[1] items = 100 im...
mit
2,853,203,673,216,453,000
28
101
0.589272
false
3.107143
false
false
false
icydoge/AdventOfCodeSolutions2
day3.py
1
1161
################################### # Many lines # # Such O(n) # # Very Doge # ################################### # By icydoge <icydoge@gmail.com> # ################################### with open("inputs/day3-1.txt") as f: content = f.readlines() #...
mit
-4,814,290,426,159,412,000
30.378378
141
0.51938
false
3.146341
false
false
false
shapiromatron/bmds-server
bmds_server/analysis/transforms.py
1
3196
from enum import Enum from typing import Dict, List, Union import bmds from bmds.bmds3.sessions import get_model from bmds.bmds3.types.continuous import ContinuousModelSettings from bmds.bmds3.types.dichotomous import DichotomousModelSettings from bmds.bmds3.types.priors import PriorClass, get_continuous_prior, get_di...
mit
4,329,694,989,769,762,300
37.506024
99
0.707447
false
3.481481
false
false
false
V155/qutebrowser
qutebrowser/components/zoomcommands.py
1
3262
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 Softwa...
gpl-3.0
-1,385,101,638,705,507,600
33.336842
77
0.658492
false
3.690045
false
false
false
bocajspear1/vulnfeed
vulnfeed/sender.py
1
6613
# This is the part of the code that sends the emails import os import threading from datetime import datetime, timedelta, date import calendar import re import time from util.email_sender import send_email from database.user import get_users, User from database.feed import get_feed_reports from database.rules import...
gpl-3.0
5,944,331,318,391,569,000
32.573604
127
0.536217
false
4.057055
false
false
false
philippbosch/django-tellafriend
docs/source/conf.py
1
7092
# -*- coding: utf-8 -*- # # django-tellafriend documentation build configuration file, created by # sphinx-quickstart on Fri Aug 6 20:14:06 2010. # # 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 # autogenerated fi...
mit
5,453,983,071,573,978,000
31.833333
80
0.710378
false
3.728707
true
false
false
AndyDiamondstein/vitess
py/vttest/run_local_database.py
1
5488
#!/usr/bin/env python """Command-line tool for starting a local Vitess database for testing. USAGE: $ run_local_database --port 12345 \ --topology test_keyspace/-80:test_keyspace_0,test_keyspace/80-:test_keyspace_1 \ --schema_dir /path/to/schema/dir It will run the tool, logging to stderr. On stdout, a sm...
bsd-3-clause
1,329,981,277,944,915,700
36.081081
84
0.662719
false
3.700607
true
false
false
flyingbanana1024102/transmission-line-simulator
src/views/contextmenu.py
1
3701
# # Transmission Line Simulator # # Author(s): Jiacong Xu # Created: Jul-10-2017 # from materialwidget import MaterialWidget from materialbutton import MaterialButton from kivy.properties import * from kivy.lang.builder import Builder from util.constants import * from kivy.animation import Animation from kivy.clock i...
mit
-6,667,060,846,733,342,000
27.689922
125
0.560929
false
3.883526
false
false
false
mitsuse/salada
tests/test_segmenter.py
1
1418
#!/usr/bin/env python # coding: utf-8 from salada import language from salada import segmenter class TestDefault: def test_segment_text_by_sequence_of_spaces(self): text = ' foo \n \n\n bar \t\n baz ' expectation = [ language.Segment('', True, False), language.Segmen...
mit
-2,338,574,573,679,739,000
33.585366
54
0.559944
false
4.051429
false
false
false
Onager/plaso
plaso/containers/tasks.py
1
6551
# -*- coding: utf-8 -*- """Task related attribute container definitions.""" import time import uuid from plaso.containers import interface from plaso.containers import manager from plaso.lib import definitions class Task(interface.AttributeContainer): """Task attribute container. A task describes a piece of wo...
apache-2.0
-8,643,982,626,627,538,000
34.22043
80
0.70203
false
4.278903
false
false
false
holvi/python-stdnum
stdnum/es/iban.py
1
2510
# iban.py - functions for handling Spanish IBANs # coding: utf-8 # # Copyright (C) 2016 Arthur de Jong # # 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 # version 2.1 of the Licens...
lgpl-2.1
2,566,745,078,822,567,400
30.746835
75
0.722887
false
3.634783
false
false
false
Azure/azure-sdk-for-python
sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01/models/_models.py
1
2367
# 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
6,230,837,319,939,194,000
34.328358
94
0.584284
false
4.060034
false
false
false
RTHMaK/RPGOne
deep_qa-master/deep_qa/data/instances/instance.py
1
15041
""" This module contains the base ``Instance`` classes that concrete classes inherit from. Specifically, there are three classes: 1. ``Instance``, that just exists as a base type with no functionality 2. ``TextInstance``, which adds a ``words()`` method and a method to convert strings to indices using a DataIndexer...
apache-2.0
979,567,012,326,318,200
39.761518
97
0.619773
false
4.74929
false
false
false
willo12/spacegrids
spacegrids/_iosg.py
1
5429
#encoding:utf-8 """ io related """ import numpy as np from _config import * import warnings warnings.formatwarning = warning_on_one_line # use_scientificio is set in config #use_scientificio = False # fallback is always scipy.io: least dependencies # cdf_lib set in _config.py and determines which library to use ...
bsd-3-clause
-3,902,353,986,811,476,500
21.810924
95
0.609136
false
3.546048
false
false
false
oso/qgis-etri
ui/inference_results.py
1
5734
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/inference_results.ui' # # Created: Tue Nov 19 19:57:44 2013 # 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 ...
gpl-3.0
-2,015,396,951,820,727,000
51.605505
137
0.720788
false
3.89538
false
false
false
molmod/yaff
yaff/external/test/test_lammpsio.py
1
2291
# -*- coding: utf-8 -*- # YAFF is yet another force-field code. # Copyright (C) 2011 Toon Verstraelen <Toon.Verstraelen@UGent.be>, # Louis Vanduyfhuys <Louis.Vanduyfhuys@UGent.be>, Center for Molecular Modeling # (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise # stated. # # This file is pa...
gpl-3.0
-4,221,619,580,670,450,000
37.183333
95
0.714535
false
3.379056
true
false
false
mathDR/BP-AR-HMM
OLDPY/compute_likelihood_unnorm.py
1
1820
import numpy as np def compute_likelihood_unnorm(data_struct,theta,obsModelType,Kz_inds,Kz,Ks): #function log_likelihood = # compute_likelihood_unnorm(data_struct,theta,obsModelType,Kz_inds,Kz,Ks) if obsModelType == 'Gaussian': invSigma = theta.invSigma mu = theta.mu dimu, T = (data_struct.obs).sh...
mit
-170,037,953,198,581,020
34.686275
102
0.625824
false
2.732733
false
false
false
skuda/client-python
kubernetes/client/models/v1_downward_api_volume_file.py
1
6558
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
5,237,129,877,225,858,000
32.804124
268
0.598353
false
4.239173
false
false
false
chrislyon/django_ds1
django_ds1/ds/models.py
1
2352
from django.db import models from ckeditor.fields import RichTextField # Create your models here. ## ------------------------------------------------- ## Meta Class contenant certaines donnees de bases ## ------------------------------------------------- DEF_TFAC='DEFAUT' class HoroDatage(models.Model): h_datcre ...
gpl-2.0
-8,140,727,402,061,289,000
35.184615
110
0.672619
false
2.850909
false
false
false
cscott/wikiserver
whoosh/support/dawg.py
1
19568
# Copyright 2009 Matt Chaput. All rights reserved. # # 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...
gpl-2.0
-5,617,002,949,850,297,000
28.874809
79
0.553659
false
4.015596
false
false
false
skyfromwell/paperwallet
encryption.py
1
1425
#remove all others only keep Bip38 here. Need to learn more about this. from bitcoin.bip38 import Bip38 from bitcoin.key import CKey from bitcoin.base58 import CBase58Data __b58chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" __b58base = len(__b58chars) def encode_pw(key, pw): key = CKey() ...
gpl-3.0
7,973,097,293,177,781,000
23.568966
73
0.554386
false
3.268349
false
false
false
UltronAI/Deep-Learning
Pattern-Recognition/hw2-Feature-Selection/skfeature/example/test_JMI.py
1
1528
import scipy.io from sklearn.metrics import accuracy_score from sklearn import cross_validation from sklearn import svm from skfeature.function.information_theoretical_based import JMI def main(): # load data mat = scipy.io.loadmat('../data/colon.mat') X = mat['X'] # data X = X.astype(fl...
mit
376,455,140,267,402,400
31.217391
89
0.628927
false
3.968831
false
false
false
naterh/chipsec
source/tool/chipsec/hal/cpuid.py
1
1845
#!/usr/local/bin/python #CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2015, Intel Corporation # #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; Version 2. # #This pr...
gpl-2.0
5,467,598,300,744,505,000
28.783333
129
0.601626
false
3.324324
false
false
false
carrdelling/project_euler
problem17.py
1
1728
#!/usr/bin/env python ################################################################################ # # Project Euler - Problem 17 # # If the numbers 1 to 5 are written out in words: one, two, three, four, five, # then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. # # If all the numbers from 1 to 1000 (on...
gpl-2.0
492,748,719,102,900,900
27.327869
80
0.513889
false
2.963979
false
false
false
aceway/cppite
src/py/cppite.py
1
13042
#!/usr/bin/env python # -*- coding:utf-8 -*- ######################################################## # ITE command start with: #// # ITE command keywords:quit,exit,byebye,bye, begin, end, # verbose, concise, dump_project, dump_make_file, dump_cpp, # dump_fragment,load_fragment, compile, run, edit # ##################...
mit
8,411,447,687,974,248,000
35.205556
143
0.491023
false
3.635704
false
false
false
bdh1011/wau
venv/lib/python2.7/site-packages/notebook/services/kernelspecs/handlers.py
1
2798
"""Tornado handlers for kernel specifications. Preliminary documentation at https://github.com/ipython/ipython/wiki/IPEP-25%3A-Registry-of-installed-kernels#rest-api """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import glob import json import os pjoin = os.p...
mit
4,596,191,801,277,789,700
28.765957
118
0.611866
false
3.755705
false
false
false
pythondigest/pythondigest
digest/forms.py
1
3789
# -*- encoding: utf-8 -*- from ckeditor.widgets import CKEditorWidget, json_encode from django import forms from django.contrib import admin from django.contrib.admin import widgets from django.contrib.admin.options import get_ul_class from django.forms import ChoiceField, ModelForm from django.template.loader import r...
mit
-280,419,232,003,009,540
29.892562
91
0.590155
false
3.86157
false
false
false
MrMinimal64/timezonefinder
build_n_install.py
1
1317
import os import sys PACKAGE = 'timezonefinder' VERSION_FILE = 'VERSION' VIRT_ENVS = ['APIenv'] VIRT_ENV_COMMAND = '. ~/miniconda3/etc/profile.d/conda.sh; conda activate {virt_env}; ' PY_VERSION_IDS = ['36', '37', '38'] # the supported python versions to create wheels for PYTHON_TAG = '.'.join([f'py{v}' for v in PY_...
mit
1,168,199,045,781,017,300
36.628571
102
0.664389
false
3.411917
false
false
false
ligovirgo/seismon
RfPrediction/BLRMS_Prediction/condor_seismic_peaks.py
1
1969
import os, sys import glob import optparse import tables import pandas as pd import numpy as np import h5py def parse_commandline(): """ Parse the options given on the command-line. """ parser = optparse.OptionParser() parser.add_option('-i','--ifos', type=str, default='LHO,LLO', help='GW Obser...
gpl-3.0
4,905,851,540,327,796,000
27.536232
122
0.655663
false
2.757703
false
false
false
lepinsk/pydub
setup.py
1
1425
__doc__ = """ Manipulate audio with an simple and easy high level interface. See the README file for details, usage info, and a list of gotchas. """ from setuptools import setup setup( name='pydub', version='0.9.0', author='James Robert', author_email='jiaaro@gmail.com', description='Manipulate a...
mit
3,066,871,106,902,735,400
34.625
80
0.602807
false
4.048295
false
false
false
keenondrums/sovrin-node
sovrin_client/agent/endpoint.py
1
2195
from typing import Callable from plenum import config from plenum.common.message_processor import MessageProcessor from stp_core.common.log import getlogger from stp_core.network.auth_mode import AuthMode from stp_raet.util import getHaFromLocalEstate from plenum.common.util import randomString from stp_core.crypto.u...
apache-2.0
-4,259,224,821,556,638,000
30.357143
75
0.62369
false
3.878092
false
false
false
ltucker/radarpost
radarpost/commands/useradmin.py
1
4133
from couchdb import Server, ResourceNotFound from radarpost.cli import COMMANDLINE_PLUGIN, BasicCommand, get_basic_option_parser from radarpost import plugins from radarpost.user import User, ROLE_ADMIN from getpass import getpass class CreateUserCommand(BasicCommand): command_name = 'create_user' description...
gpl-2.0
-4,687,873,527,966,541,000
36.926606
99
0.553109
false
4.453664
true
false
false
pcm17/tensorflow
tensorflow/contrib/distributions/python/ops/inverse_gamma.py
1
10539
# 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
5,066,371,313,782,107,000
34.365772
92
0.656988
false
3.981488
false
false
false
WorldViews/Spirals
YEI/foo_api.py
1
146347
#!/usr/bin/env python2.7 from __future__ import print_function """ This module is an API module for ThreeSpace devices. The ThreeSpace API module is a collection of classes, functions, structures, and static variables use exclusivly for ThreeSpace devices. This module can be used with a system running...
mit
2,051,369,659,077,840,100
39.913335
157
0.573452
false
3.788331
false
false
false
lioncui/pybix
client/plugin/RedisPlugin.py
1
3753
#!/usr/bin/python # -*- coding: utf-8 -*- from lib import pybixlib import traceback from p_class import plugins import redis class RedisPlugin(plugins.plugin): def __init__(self, uuid, taskConf, agentType): plugins.plugin.__init__( self, uuid, taskConf, agentType) def data_format_MB(sel...
gpl-3.0
-5,436,894,713,689,930,000
41.647727
159
0.565681
false
4.048544
false
false
false
kernsuite-debian/lofar
SAS/ResourceAssignment/ResourceAssignmentEditor/lib/webservice.py
1
39598
#!/usr/bin/env python3 # Copyright (C) 2012-2015 ASTRON (Netherlands Institute for Radio Astronomy) # P.O. Box 2, 7990 AA Dwingeloo, The Netherlands # # This file is part of the LOFAR software suite. # The LOFAR software suite is free software: you can redistribute it and/or # modify it under the terms of the GNU Gen...
gpl-3.0
-5,672,104,624,823,130,000
38.244797
197
0.632027
false
3.726169
false
false
false
moschlar/SAUCE
migration/versions/530b45f11128_public_submission.py
1
1291
"""public_submission Revision ID: 530b45f11128 Revises: 282efa88cdbc Create Date: 2013-10-02 18:31:40.722832 """ # # # SAUCE - System for AUtomated Code Evaluation # # Copyright (C) 2013 Moritz Schlarb # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU Affer...
agpl-3.0
4,536,200,629,361,021,000
29.738095
79
0.726569
false
3.576177
false
false
false
anurag03/integration_tests
cfme/configure/access_control/__init__.py
1
58461
import attr import six from navmazing import NavigateToSibling, NavigateToAttribute from widgetastic.widget import Checkbox, View, Text, ConditionalSwitchableView from widgetastic_patternfly import ( BootstrapSelect, Button, Input, Tab, CheckableBootstrapTreeview as CbTree, BootstrapSwitch, CandidateNotFound, ...
gpl-2.0
2,881,992,309,818,430,000
34.821691
100
0.600349
false
4.180265
true
false
false
uksf/modpack
tools/build.py
1
3612
#!/usr/bin/env python3 import os import sys import subprocess ######## GLOBALS ######### MAINPREFIX = "u" PREFIX = "uksf_" ########################## def tryHemttBuild(projectpath): hemttExe = os.path.join(projectpath, "hemtt.exe") if os.path.isfile(hemttExe): os.chdir(projectpath) ret = subp...
gpl-3.0
6,139,524,776,622,342,000
29.1
124
0.52381
false
3.89644
false
false
false
jacobgilroy/FinalYearProject
MainView.py
1
2934
from PyQt5.QtWidgets import QWidget, QSplitter, QVBoxLayout, QFrame, QFileDialog, QScrollArea, QMenuBar, QAction, QToolBar from PyQt5.QtCore import Qt from PyQt5.QtGui import QIcon from JamSpace.Views.LaneSpaceView import LaneSpaceView from JamSpace.Views.ControlBar import ControlBar class MainView(QWidget): ...
gpl-3.0
15,029,270,134,049,856
29.569892
122
0.647921
false
3.932976
false
false
false
evanbiederstedt/CMBintheLikeHoodz
source_code/CAMB_vary_OmegaB_lmax1100_Feb2016.py
1
137613
# coding: utf-8 # In[1]: # # # hundred_samples = np.linspace(0.05, 0.5, num=100) # # Planck found \Omega_CDM # GAVO simulated map set at \Omega_CDM = 0.122 # CAMB default below at omch2=0.122 # # In[2]: # # First output 200 CAMB scalar outputs # # 0.005 to 0.05 # # In[3]: from matplotlib import pyplot as plt ...
mit
5,311,655,598,611,238,000
26.201621
108
0.741165
false
2.454964
false
false
false
anish/buildbot
master/buildbot/reporters/gerrit_verify_status.py
1
8571
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
5,102,035,959,566,791,000
36.265217
123
0.582896
false
4.643012
false
false
false
lixiangning888/whole_project
modules/signatures_orginal_20151110/dyre_apis.py
1
6073
# Copyright (C) 2015 Optiv, Inc. (brad.spengler@optiv.com), KillerInstinct # # 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 vers...
lgpl-3.0
-8,487,877,113,169,990,000
38.435065
118
0.494978
false
4.067649
false
false
false
lafranceinsoumise/api-django
agir/people/management/commands/mailtrain_update.py
1
1382
from datetime import datetime import string from uuid import UUID from django.core.management import BaseCommand from django.utils import timezone from agir.lib.mailtrain import update_person from agir.people.models import Person PADDING = "0000000-0000-0000-0000-000000000000" class Command(BaseCommand): help ...
agpl-3.0
1,208,920,517,310,383,900
28.404255
110
0.586831
false
3.982709
false
false
false
DayGitH/Python-Challenges
DailyProgrammer/DP20140625B.py
1
4512
""" [6/25/2014] Challenge #168 [Intermediate] Block Count, Length & Area https://www.reddit.com/r/dailyprogrammer/comments/291x9h/6252014_challenge_168_intermediate_block_count/ #Description: In construction there comes a need to compute the length and area of a jobsite. The areas and lengths computed are used by est...
mit
-3,471,949,555,615,891,000
46.494737
119
0.649379
false
3.481481
false
false
false
Upward-Spiral-Science/team1
code/test_assumptions.py
1
1525
import numpy as np import matplotlib.pyplot as plt import urllib2 #%matplotlib inline sample_size = 1000 np.random.seed(1) url = ('https://raw.githubusercontent.com/Upward-Spiral-Science' '/data/master/syn-density/output.csv') data = urllib2.urlopen(url) csv = np.genfromtxt(data, delimiter=",")[1:] csv_rand ...
apache-2.0
4,933,376,767,457,469,000
23.596774
70
0.70623
false
2.602389
false
false
false
SUSE/kiwi
kiwi/storage/raid_device.py
1
4198
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi 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 la...
gpl-3.0
-406,493,287,530,871,200
30.096296
77
0.585279
false
4.111655
false
false
false
me-systeme/gsv8pypi
GSV6_FrameRouter.py
1
5296
# -*- coding: utf-8 -*- __author__ = 'Dennis Rump' ############################################################################### # # The MIT License (MIT) # # Copyright (c) 2015 Dennis Rump # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation...
mit
-4,542,068,685,750,619,600
43.066667
119
0.676187
false
3.527018
false
false
false
wq/wq.io
itertable/loaders.py
1
4908
from __future__ import print_function import requests try: # Python 2 (uses str) from StringIO import StringIO except ImportError: # Python 3 (Python 2 equivalent uses unicode) from io import StringIO from io import BytesIO from .version import VERSION from .exceptions import LoadFailed from zipfile imp...
mit
-7,850,386,608,032,571,000
23.41791
77
0.556031
false
4.134794
false
false
false
ulikoehler/UliEngineering
UliEngineering/SignalProcessing/Resampling.py
1
9018
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Utilities for selecting and finding specific attributes in datasets """ import math import functools import numpy as np import bisect import concurrent.futures import scipy.interpolate from UliEngineering.Utils.Concurrency import QueuedThreadExecutor from .Utils import...
apache-2.0
8,066,749,981,981,142,000
39.258929
103
0.675094
false
3.92599
false
false
false
Azure/azure-sdk-for-python
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models_py3.py
1
295755
# 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
6,072,001,635,998,820,000
38.26125
152
0.622387
false
3.792703
true
false
false
GbalsaC/bitnamiP
venv/src/edx-submissions/submissions/tests/test_models.py
1
5673
""" Tests for submission models. """ from django.test import TestCase from submissions.models import Submission, Score, ScoreSummary, StudentItem class TestScoreSummary(TestCase): """ Test selection of options from a rubric. """ def test_latest(self): item = StudentItem.objects.create( ...
agpl-3.0
-71,096,119,413,147,070
33.174699
83
0.600212
false
4.165198
true
false
false
mgraffg/simplegp
examples/simplify.py
1
2421
from SimpleGP import GP import numpy as np seed = 0 # if len(sys.argv) == 1 else int(sys.argv[1]) x = np.linspace(0, 1, 100) pol = np.array([0.2, -0.3, 0.2]) X = np.vstack((x**2, x, np.ones(x.shape[0]))) y = (X.T * pol).sum(axis=1) gp = GP(popsize=10, generations=100000, verbose=True, verbose...
apache-2.0
7,469,544,312,858,264,000
31.716216
66
0.608013
false
2.359649
false
true
false
karcio/checkSumValidatorGUI
checkSumVal/src/checkSumGui.py
1
2950
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'checkSumGui.ui' # # Created: Thu Jan 8 02:22:42 2015 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form)...
gpl-3.0
-6,674,606,078,571,181,000
36.820513
76
0.647119
false
3.710692
false
false
false
mkobos/tree_crawler
concurrent_tree_crawler/multithreaded_crawler.py
1
5649
import os import logging import time import datetime from concurrent_tree_crawler.common.file_helper import lenient_makedir from concurrent_tree_crawler.common.logger import Logger from concurrent_tree_crawler.common.activity_schedule import AlwaysActiveSchedule from concurrent_tree_crawler.crawlers_manager import Cra...
mit
-2,767,789,249,155,980,300
36.164474
81
0.725084
false
3.311254
false
false
false
elli0ttB/problems
sorting/quicksort.py
1
1524
#!/usr/bin/env python def quicksort(arr, partition): if (partition == "hoare"): quicksort_hoare(arr, 0, len(arr) -1) elif (partition == "lomuto"): quicksort_lomuto(arr, 0, len(arr) -1) else: raise ValueError() def quicksort_hoare(arr, lo, hi): # lo and hi follow standard method...
mit
-8,108,625,509,353,319,000
25.736842
94
0.532152
false
3.017822
false
false
false
Turgon37/OpenVPN_UAM
OpenVPNUAM/pki/pki_filetree.py
1
6143
# -*- coding: utf8 -*- # This file is a part of OpenVPN-UAM # # Copyright (c) 2015 Thomas PAJON, Pierre GINDRAUD # # 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, includ...
gpl-3.0
-2,542,147,906,521,464,000
33.318436
80
0.654892
false
3.988961
false
false
false
RNAcentral/rnacentral-import-pipeline
rnacentral_pipeline/databases/pirbase/fetch.py
1
1316
# -*- coding: utf-8 -*- """ Copyright [2009-2020] EMBL-European Bioinformatics Institute 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...
apache-2.0
-4,344,957,713,363,397,600
28.244444
72
0.713526
false
3.665738
false
false
false
acutesoftware/worldbuild
scripts/minecraft/go_minecraft.py
1
2260
# go_minecraft.py import sys import time import aikif.toolbox.interface_windows_tools as mod_tool players = ['DynamiteBuilder', 'craftandstore'] #server = '1.9' #server = '1.10' server = '1.11.2' seed = 0 if server == '1.11.2': seed = -7560993781265470572 locations = [ {'name':'home', ...
gpl-2.0
-5,863,558,261,222,107,000
31.285714
89
0.494248
false
3.033557
false
false
false
keenondrums/sovrin-node
sovrin_client/agent/walleted.py
1
42903
import asyncio import collections import inspect import json import time from datetime import datetime from typing import Dict, List, Union from base58 import b58decode from common.serializers.serialization import serialize_msg_for_signing from stp_core.common.log import getlogger from plenum.common.signer_did import...
apache-2.0
-2,601,363,187,121,016,000
40.016252
98
0.572687
false
4.309694
false
false
false
derks/cement
cement/core/arg.py
1
3461
""" Cement core argument module. """ from ..core import backend, exc, interface, handler Log = backend.minimal_logger(__name__) def argument_validator(klass, obj): """Validates a handler implementation against the IArgument interface.""" members = [ '_setup', 'parse', 'parsed_args', ...
bsd-3-clause
-439,128,202,592,356,900
27.138211
79
0.540306
false
5.196697
false
false
false
synnick/roboronya
roboronya/plugins/cholify.py
1
1871
import random from roboronya.plugins.plugin import Plugin class Cholificator(Plugin): description = 'Roboronya will use her *Automated Cholification Algorithm* (Patent Pending) to translate your text to a more sophisticated language.' name = 'cholify' @Plugin.requires_args def run(roboronya, conv, cm...
mit
2,323,757,040,166,518,300
36.42
152
0.405665
false
4.552311
false
false
false
geeag/kafka
tests/kafkatest/tests/core/reassign_partitions_test.py
4
5559
# 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 the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
136,403,551,534,332,140
49.536364
182
0.679799
false
4.09352
true
false
false
h4ck3rm1k3/gcc_py_introspector
gcc/tree/attic/query_function_example.py
1
42931
import prefix import types import json #import pprint from graphviz import Digraph from SPARQLWrapper import SPARQLWrapper, XML, N3, JSONLD, JSON, POST, GET, SELECT, CONSTRUCT, ASK, DESCRIBE from SPARQLWrapper.Wrapper import _SPARQL_DEFAULT, _SPARQL_XML, _SPARQL_JSON, _SPARQL_POSSIBLE, _RDF_XML, _RDF_N3, _RDF_JSONLD,...
gpl-2.0
5,027,496,312,322,403,000
53.828863
141
0.313759
false
4.432731
false
false
false
ollej/shoutbridge
src/bridges/XmppPyBridge.py
1
7001
# -*- coding: utf-8 -*- """ The MIT License Copyright (c) 2010 Olle Johansson 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,...
mit
4,904,962,323,956,999,000
32.821256
98
0.584202
false
4.108568
false
false
false
Diti24/python-ivi
ivi/agilent/agilent437B.py
1
14103
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2014-2016 Alex Forencich 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...
mit
-4,515,614,092,387,864,600
35.726563
99
0.612139
false
3.941587
false
false
false
CSysTeam/SecurityPackage
MainAlgorithms/Monoalphabetics/Monoalphabetic.py
1
3288
class Monoalphabetic: """ Frequency Information: E 12.51% T 9.25 A 8.04 O 7.60 I 7.26 N 7.09 S 6.54 R 6.12 H 5.49 L 4.14 D 3.99 C 3.06 U 2.71 M 2.53 F 2.30 P 2.00 ...
gpl-3.0
1,636,525,540,505,321,200
27.097345
81
0.439173
false
3.841121
false
false
false
averainy/averainy
python/wechat_test.py
1
7797
#!/usr/bin/python #coding=utf-8 import xml.dom.minidom def get_tagname(): doc = xml.dom.minidom.parseString(input_xml_string) class msg_parse: def __init__(self,msg): self.doc = xml.dom.minidom.parseString(msg) def _getData(self,tagName): nodes=self.doc.getElementsByTagName(tagName) ...
gpl-2.0
-3,903,680,879,921,830,400
31.786957
59
0.618486
false
3.112258
false
false
false
mjordan/pkppln
server.py
1
1777
#!/usr/bin/env python import sys import bottle from bottle import Bottle, request, error, response, Response from os.path import abspath, dirname import logging sys.path.append(dirname(abspath(__file__))) import pkppln from webapp.admin.terms_server import TermsApp from webapp.sword.sword_server import SwordServer fr...
gpl-3.0
2,497,417,321,384,419,300
28.616667
65
0.66798
false
3.525794
false
false
false
marshallmcdonnell/interactive_plotting
matplotlib/draggable_legend_code.py
1
3140
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as _plt class DraggableLegend: def __init__(self, legend): self.legend = legend self.gotLegend = False legend.figure.canvas.mpl_connect('motion_notify_event', self.on_motion) legend.figure.canvas.mpl_connect('pick_ev...
mit
-4,343,959,866,343,381,500
31.040816
101
0.560828
false
3.833944
false
false
false
gromitsun/sim-xrf
python/snr/pysnip.py
1
2468
import numpy as np from scipy.optimize import curve_fit def FWHM(x, noise=100, fano=0.114): sigma = np.sqrt((noise / 2.3548) ** 2 + 3.58 * fano * x) return 2.3548 * sigma def fit_FWHM(x, F): def _FWHM(x, noise, fano): return (noise / 2.3548) ** 2 + 3.58 * fano * x popt, pcov = curve_fit(_FW...
mit
2,221,596,909,784,448,800
25.537634
79
0.480146
false
2.924171
false
false
false
wesm/statsmodels
scikits/statsmodels/sandbox/tsa/examples/ex_mle_garch.py
1
10649
# -*- coding: utf-8 -*- """ Created on Fri Feb 12 01:01:50 2010 Author: josef-pktd latest result ------------- all are very close garch0 has different parameterization of constant ordering of parameters is different seed 2780185 h.shape (2000,) Optimization terminated successfully. Current function value: ...
bsd-3-clause
-5,336,992,565,001,653,000
31.269697
108
0.6302
false
2.360151
false
false
false
JCardenasRdz/Machine-Learning-4-MRI
Infection_vs_Inflammation/Code/Process_Data.py
1
2713
# Import Modules as needed import numpy as np #import seaborn as sn import pandas as pd from pylab import * from mylocal_functions import * # ======== T2 MSME============= # # Make list of all T2.txt files T2_list = get_ipython().getoutput('ls ../Study_03_CBA/*T2.txt') # Allocate variables needed for analysis T2DF=pd...
mit
3,666,962,277,034,696,000
28.172043
86
0.647991
false
2.448556
false
false
false
s-tar/just-a-chat
modules/chat/chat.py
1
5141
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'mr.S' from kernel.module import Module from kernel.server import app from bottle import jinja2_template as template, request from entities.s_chat import Chat from entities.s_message import Message from kernel.validator import Validator from kernel.socket impor...
mit
-6,152,623,473,492,803,000
32.090909
137
0.564475
false
3.414879
false
false
false
BeataBak/project-euler-problems
008.py
1
3404
""" Project Euler Problem 8 ======================= Find the greatest product of thirteen consecutive digits in the 1000-digit number. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 858615607891129494954595017379583319528532088...
mit
7,358,781,582,324,919,000
35.602151
74
0.765864
false
2.803954
false
false
false
CMUSV-VisTrails/WorkflowRecommendation
vistrails/db/versions/v1_0_0/domain/log.py
1
3092
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
bsd-3-clause
-260,436,497,900,556,860
42.549296
79
0.635834
false
4.13369
false
false
false
pypa/warehouse
warehouse/utils/db/windowed_query.py
1
2050
# 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 in writing, software # distributed under the Li...
apache-2.0
1,703,204,328,040,316,700
30.060606
79
0.666829
false
3.867925
false
false
false
UfSoft/ISPManCCP
extra-packages/pyperl-1.0.1d/t/apply.py
1
2941
import perl #if (perl.MULTI_PERL): # print "1..0" # raise SystemExit print "1..14" def ok(a, b=None): return "a=" + str(a) + ", b=" + str(b) perl.eval(""" use Python qw(apply); $| = 1; sub { my $f = shift; # First some tests that are expected to blow up eval { apply($f); }; #...
bsd-3-clause
-2,264,924,902,036,801,500
24.136752
131
0.50119
false
2.946894
false
false
false
a710128/Lesson9
API/course.py
1
3339
import re class CourseException(Exception): def __init__(self, msg, err): super(CourseException, self).__init__() self.msg = msg self.err = err def __str__(self): return "CourseError : " + self.msg def __repr__(self): return '<CourseException msg : "%s", errcode :...
mit
2,873,179,843,956,898,300
29.633028
141
0.48248
false
3.946809
false
false
false
robwarm/gpaw-symm
gpaw/cluster.py
1
6122
"""Extensions to the ase Atoms class """ import numpy as np from ase import Atoms from ase.io import read, write from ase.data import covalent_radii from ase.calculators.neighborlist import NeighborList class Cluster(Atoms): """A class for cluster structures to enable simplified manipulation""" def __in...
gpl-3.0
-2,736,821,158,500,044,300
30.556701
79
0.516335
false
4.198903
false
false
false
cggh/DQXServer
responders/recordinfo.py
1
1698
# This file is part of DQXServer - (C) Copyright 2014, Paul Vauterin, Ben Jeffery, Alistair Miles <info@cggh.org> # This program is free software licensed under the GNU Affero General Public License. # You can find a copy of this license in LICENSE in the top directory of the source code or at <http://opensource.org/...
agpl-3.0
-3,628,282,154,136,333,300
34.913043
136
0.630153
false
3.691304
false
false
false
hudora/huDjango
hudjango/management/commands/couchdb-init.py
1
1234
# encoding: utf-8 import couchdb from optparse import make_option from hudjango.management.couchdb.support import CouchDBBaseCommand from django.core.management.base import CommandError class Command(CouchDBBaseCommand): help = """ Creates a new couchdb database. """ option_list = CouchDBBaseCommand.option_l...
bsd-2-clause
-6,668,120,594,051,540,000
35.294118
105
0.636143
false
4.487273
false
false
false
T-R0D/JustForFun
aoc2016/aoc2016/day18/solution.py
1
2158
# This file is part of aoc2016. # # aoc2016 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. # # aoc2016 is distributed in the hope that...
gpl-2.0
2,805,949,098,795,429,000
34.966667
83
0.667285
false
3.022409
false
false
false
pyfa-org/Pyfa
gui/builtinViews/implantEditor.py
1
12699
import re # noinspection PyPackageRequirements import wx # noinspection PyPackageRequirements from wx.lib.buttons import GenBitmapButton import gui.builtinMarketBrowser.pfSearchBox as SBox import gui.display as d from gui.bitmap_loader import BitmapLoader from gui.marketBrowser import SearchBox from service.market im...
gpl-3.0
8,534,346,245,961,577,000
36.35
112
0.62438
false
3.907385
false
false
false
bchareyre/ratchet
py/ymport.py
1
14686
""" Import geometry from various formats ('import' is python keyword, hence the name 'ymport'). """ from yade.wrapper import * from yade import utils try: from minieigen import * except ImportError: from miniEigen import * def textExt(fileName,format='x_y_z_r',shift=Vector3.Zero,scale=1.0,**kw): """Load sphere co...
gpl-2.0
2,926,112,471,460,078,000
35.899497
216
0.702778
false
2.862768
false
false
false
nimiq/moogle-project
magpie/response.py
1
3599
from abc import ABCMeta, abstractmethod from utils.exceptions import ResponseError, InconsistentItemError, EntryNotToBeIndexed class AbstractApiResponse(metaclass=ABCMeta): """ Response got after a query to a `Provider`. Parameters: response -- a `requests.models.Response` instance. """ def...
apache-2.0
3,897,381,863,946,606,000
30.304348
95
0.571548
false
4.465261
false
false
false
pdsteele/DES-Python
rvms.py
1
20759
# ------------------------------------------------------------------------- # * This is an ANSI C library that can be used to evaluate the probability # * density functions (pdf's), cumulative distribution functions (cdf's), and # * inverse distribution functions (idf's) for a variety of discrete and # * cont...
mit
617,795,352,525,077,500
28.446809
86
0.366877
false
3.23047
false
false
false
NicholasColotouros/RaspiCorder
RaspiCorder/Menus.py
1
2928
#!/usr/bin/python from time import sleep from Adafruit_CharLCDPlate import Adafruit_CharLCDPlate class Instrument: drums = 1 guitar = 2 bass = 3 other = 4 @staticmethod def instrumentName(num): if num == 1: return "drums" elif num == 2: return "guitar" elif num == 3: return "bass" ...
gpl-2.0
9,203,748,813,401,811,000
22.246032
74
0.644467
false
3.078864
false
false
false
ppwwyyxx/tensorpack
examples/DoReFa-Net/resnet-dorefa.py
1
6148
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: resnet-dorefa.py import argparse import numpy as np import os import cv2 import tensorflow as tf from tensorpack import * from tensorpack.dataflow import dataset from tensorpack.tfutils.varreplace import remap_variables from dorefa import get_dorefa from imagenet...
apache-2.0
7,932,895,381,036,762,000
35.378698
100
0.544242
false
3.541475
false
false
false
ani2404/ee6761cloud
inference.py
1
1332
# Build the model, restore the variables and run the inference # Need to use SavedModel builder and loader instead - future work import sys sys.path.append('/home/ani2404/Desktop/ee6761cloud/') import numpy as np #Need to replace with the actual model from code_ref.model import Model class infer(object): de...
mit
3,867,639,695,548,613,600
27.340426
115
0.660661
false
3.940828
false
false
false
hzlf/openbroadcast
website/apps/alibrary/migrations/0100_auto__del_field_distributor_email_main__add_field_distributor_email.py
1
53909
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Distributor.email_main' db.delete_column('alibrary_distributor', 'email_main') # ...
gpl-3.0
-1,103,363,076,099,706,400
97.018182
240
0.555863
false
3.593454
false
false
false
jodygarnett/qgis-geoserver-plugin
src/geoserverexplorer/gui/gsoperations.py
1
6538
from PyQt4 import QtCore from qgis.core import * from geoserverexplorer.qgis import layers as qgislayers from geoserverexplorer.qgis.catalog import CatalogWrapper from geoserverexplorer.gui.confirm import publishLayer from geoserverexplorer.gui.dialogs.projectdialog import PublishProjectDialog from geoserver.catalog im...
gpl-2.0
-6,896,900,767,553,893,000
38.149701
112
0.620526
false
4.270411
false
false
false
crckyl/pixplus
tools/conf-parser.py
1
1750
import sys import json from xml.sax.saxutils import escape from xml.sax.saxutils import quoteattr format = ' <preference name="%(name)s" value=%(value)s />' if sys.argv[1] == 'safari': format = ''' <dict> <key>Title</key> <string>%(name)s</string> <key>Key</key> <string>%(name)s</string> ...
mit
-6,539,849,018,826,677,000
25.119403
70
0.487429
false
3.411306
false
false
false