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
protwis/protwis
structure/migrations/0033_auto_20201110_0856.py
1
3316
# Generated by Django 3.0.3 on 2020-11-10 07:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('structure', '0032_structure_author_state'), ] operations = [ migrations.RemoveField( model_name...
apache-2.0
-6,766,921,383,280,909,000
34.276596
154
0.578106
false
4.306494
false
false
false
aksh1/wagtail-cookiecutter-foundation
{{cookiecutter.repo_name}}/pages/models.py
1
7809
from django.db import models from wagtail.wagtailcore import blocks from wagtail.wagtailcore.models import Page, Orderable from wagtail.wagtailcore.fields import RichTextField, StreamField from wagtail.wagtailimages.edit_handlers import ImageChooserPanel from wagtail.wagtailimages.models import Image from wagtail.wagt...
mit
8,905,001,606,951,916,000
28.02974
79
0.670508
false
3.827941
false
false
false
JanusWind/FC
janus_dialog_opt.py
1
4015
################################################################################ ## ## Janus -- GUI Software for Processing Thermal-Ion Measurements from the ## Wind Spacecraft's Faraday Cups ## ## Copyright (C) 2016 Bennett A. Maruca (bmaruca@udel.edu) ## ## This program is free software: you can redistribute...
gpl-3.0
-7,468,845,605,748,541,000
30.367188
80
0.550685
false
3.802083
false
false
false
agoose77/hivesystem
dragonfly/logic/staticselector.py
1
2038
import bee from bee.segments import * class staticselector(bee.worker): # selection pointer v_sel = variable("int") startvalue(v_sel, 0) #get selected identifier selected = output("pull", "id") v_selected = variable("id") connect(v_selected, selected) @modifier def get_selected(s...
bsd-2-clause
-7,112,151,418,233,885,000
25.815789
85
0.604024
false
3.594356
false
false
false
steingrd/plistbin
plistbin.py
1
11602
#!/usr/bin/env python # encoding: utf-8 import struct, plistlib, datetime # TODO # - dicts with more than 14 keys # - allow pathOrFile to be a file-like object # - raise TypeError for unsupported types # - add writePlistToString to match plistlib API # - implement binary plist parser (readPlist) # - support >8 byte i...
bsd-3-clause
-3,162,125,917,361,272,300
37.290429
93
0.603086
false
3.893289
false
false
false
ginkgobioworks/edge
src/edge/tests/test_crispr.py
1
14767
import os import json from django.test import TestCase from edge.models import Genome, Operation, Fragment, Genome_Fragment from edge.blastdb import build_all_genome_dbs, fragment_fasta_fn from edge.crispr import find_crispr_target, crispr_dsb from Bio.Seq import Seq class GenomeCrisprDSBTest(TestCase): def build...
mit
646,624,546,337,562,500
41.191429
91
0.597413
false
2.874076
true
false
false
onaio/rapidpro
temba/msgs/models.py
1
84050
from __future__ import print_function, unicode_literals import logging import pytz import regex import six import time import traceback from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth.models import User from django.contrib.postgres.fields import ArrayField from djang...
agpl-3.0
-8,521,581,224,385,917,000
39.273119
152
0.585402
false
4.23981
false
false
false
lumirayz/PyMATE
src/pmpage.py
1
6002
# -------------------- # # PMPage.py # # Defines the PMPage class, which is a wrapper around wx.Panel that contains a # wx.stc.StyledTextCtrl. # -------------------- # # -------------------- # # Imports # -------------------- # import wx import wx.stc import os import pmconfig # -------------------- # # Class PMPage ...
gpl-3.0
7,874,631,614,272,535,000
26.787037
85
0.603799
false
2.893925
false
false
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_3_0_0/models/medicationadministration.py
1
12051
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MedicationAdministration) on 2017-03-22. # 2017, SMART Health IT. from . import domainresource class MedicationAdministration(domainresource.DomainResource): """ Administration of medicati...
bsd-3-clause
-13,979,819,665,890,296
41.734043
131
0.633889
false
4.378997
false
false
false
Lukasel/tron.ai
tron/ai/lukasAI/ai.py
1
3549
from tron.entity.player import Player import tron.ai.lukasAI.aiutils as util import copy class AI(Player): def __init__(self, pos, field, name="Lukas' AI"): super(AI, self).__init__(pos, field, name) self.live_enemies = [] # tracks whether enemies are still alive self.enemy_positions = [...
mit
3,414,837,319,004,907,500
38.311111
120
0.594404
false
3.347209
false
false
false
QuintoNetworks/connector-telephony
base_phone/base_phone.py
1
13193
# -*- encoding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo/OpenERP # Copyright (C) 2010-2014 Alexis de Lattre <alexis@via.ecp.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
7,248,069,067,032,661,000
44.027304
87
0.545744
false
4.188254
false
false
false
perfsonar/pscheduler
python-pscheduler/pscheduler/pscheduler/numericrange.py
1
2607
""" Range of numeric values """ from .jsonval import * from .psjson import * from .sinumber import * class NumericRange(object): "Range of numbers" def __init__(self, nrange): """Construct a range from a JSON NumericRange.""" # TODO: Would be nice if this class could treat missing #...
apache-2.0
-8,191,058,440,882,206,000
26.15625
87
0.520138
false
4.092622
false
false
false
openearth/delft3d-gt-server
delft3dworker/migrations/0060_auto_20160830_1258.py
1
1750
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ("delft3dworker", "0059_merge"), ] operations = [ migrations.AlterField...
gpl-3.0
-1,356,323,318,609,033,000
32.018868
87
0.445143
false
5.131965
false
false
false
open-power-ref-design-toolkit/cluster-genesis
tests/commit_message_validate.py
1
2491
#!/usr/bin/env python3 # Copyright 2019 IBM Corp. # # 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 requir...
apache-2.0
-8,875,099,313,073,283,000
35.101449
91
0.566038
false
3.910518
false
false
false
nens/threedi-qgis-plugin
models/tests.py
1
1854
from qgis.PyQt.QtCore import Qt from qgis.PyQt.QtGui import QColor from ThreeDiToolbox.models import base_fields import mock def test_row_field_value_set_value(): row = mock.Mock() field = mock.Mock() row_field_value = base_fields.RowFieldValue(row, field, 42) # For coverage, test that setting a valu...
gpl-3.0
8,123,810,322,816,943,000
33.981132
82
0.696872
false
3.328546
true
false
false
shirk3y/cyclone
setup.py
1
1712
#!/usr/bin/env python # # Copyright 2010 Alexandre Fiori # based on the original Tornado by Facebook # # 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/LIC...
apache-2.0
398,690,867,478,563,650
30.703704
75
0.702687
false
3.812918
false
false
false
ckhoward/iNat-SDM
src/Observation_Getter.py
1
4216
# coding: utf-8 # In[1]: import requests import json from IPython.display import display import time class ObsGrabber: ''' Grabs the observations for a specific species (with the taxonomy id) and a request delta. The request delta is the time in seconds to wait inbetween each request. ...
mit
8,064,178,914,359,620,000
31.9375
170
0.520636
false
4.341916
false
false
false
mlandry1/CarND
Labs/Term3/Lesson 4 - 16/python2/CarND - Behavior Planner/simulate_behavior.py
1
1382
#!/usr/bin/env python from road import Road import time # impacts default behavior for most states SPEED_LIMIT = 10 # all traffic in lane (besides ego) follow these speeds LANE_SPEEDS = [6,7,8,9] # LANE_SPEEDS = [5,6,7,8] # Number of available "cells" which should have traffic TRAFFIC_DENSITY ...
mit
2,195,356,966,508,949,200
23.678571
90
0.650507
false
2.607547
false
false
false
idlesign/django-siteblocks
siteblocks/templatetags/siteblocks.py
1
1691
from django import template from django.template.base import FilterExpression, Parser, Token from ..siteblocksapp import SiteBlocks register = template.Library() # Utility methods are implemented in SiteBlocks class siteblocks = SiteBlocks() @register.tag def siteblock(parser: Parser, token: Token): """Two not...
bsd-3-clause
-5,226,940,597,982,345,000
27.183333
89
0.613838
false
3.914352
false
false
false
trangel/OPTpy
OPTpy/Abinit/wfntask.py
1
7045
from __future__ import print_function import os from numpy import dot,round from .abinittask import AbinitTask __all__ = ['AbinitWfnTask'] class AbinitWfnTask(AbinitTask): """Charge density calculation.""" _TASK_NAME = 'Wavefunction task' _input_fname = 'wfn.in' _output_fname = 'wfn.out' def __...
gpl-3.0
8,476,997,307,665,605,000
31.16895
106
0.592193
false
3.401738
false
false
false
teto/home
config/i3/generate_monitors_config.py
1
1265
#!/usr/bin/python3 import xrandr as x import sys import logging import argparse # because map function in python3 stops to shortest list from itertools import zip_longest, starmap monitors = [] monitors = x.list_connected_monitors( ) log = logging.getLogger() if len(sys.argv) < 2: log.error("Usage: {name} <output...
gpl-2.0
8,147,698,140,679,650,000
21.589286
112
0.640316
false
2.762009
false
false
false
nmetts/sp2016-csci7000-bda-project
preprocess.py
1
7507
''' Created on Mar 5, 2016 A module for preprocessing raw data files from the KDD Cup 2009 dataset. @author: Nicolas Metts ''' import csv import numpy as np import argparse import os import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import OneHotEncoder from sklearn.preproc...
mit
-7,696,255,571,461,687,000
44.49697
107
0.650726
false
3.990962
false
false
false
mzxu/pyble
ble/log.py
1
1723
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014, Mingze # Author: Mingze (mxu@microstrategy.com) import logging, os class Formatter: command = "%(asctime)s - %(name)s - {%(pathname)s:%(lineno)d} - %(levelname)s - %(message)s" event = "%(asctime)s - %(name)s - {%(pathname)s:%(lineno)d} - %(lev...
mit
-9,060,249,119,927,200,000
27.716667
146
0.599536
false
3.778509
false
false
false
kaithar/muhubot
attic/connectors/irc.py
1
4498
from __future__ import print_function import traceback #import tornado.ioloop from twisted.words.protocols import irc from twisted.internet import reactor, protocol from internals.commandRegistry import CommandRegistry import re, codecs, json from utils import sock class IrcBot(irc.IRCClient): """Expose stuff t...
gpl-2.0
-8,181,730,127,086,813,000
34.140625
144
0.59004
false
3.831346
false
false
false
KanoComputing/kano-settings
kano_settings/bluetooth_config.py
1
8047
# # bluetooth_config.py # # Copyright (C) 2016 - 2018 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 # # Bluetooth setup screen # import os import threading from gi import require_version require_version('Gtk', '3.0') from gi.repository import Gtk, GObject from kano.gtk3.scrolled_w...
gpl-2.0
751,032,333,503,801,600
30.93254
74
0.609917
false
3.48808
false
false
false
geobricks/Playground
playground/numpy/multip.py
1
1846
import math from multiprocessing import Queue, Process import multiprocessing def factorize_naive(n): """ A naive factorization method. Take integer 'n', return list of factors. """ if n < 2: return [] factors = [] p = 2 while True: if n == 1: return factors...
gpl-2.0
-3,362,781,927,969,026,000
25.014085
105
0.552004
false
3.767347
false
false
false
red-hood/calendarserver
contrib/performance/loadtest/test_webadmin.py
1
4343
## # Copyright (c) 2012-2015 Apple 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 l...
apache-2.0
-1,065,291,813,557,171,100
29.159722
74
0.638038
false
4.287266
true
false
false
ingadhoc/multi-company
account_multic_fix/models/account_move.py
1
3565
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from odoo import models, api class AccountMove(models.Model): _inhe...
agpl-3.0
-167,141,714,008,664,500
50.666667
116
0.595231
false
4.116628
false
false
false
lochiiconnectivity/exabgp
qa/test/cache_test.py
1
2756
# encoding: utf-8 """ cache.py Created by David Farrar on 2012-12-27. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ import unittest import time from exabgp.util.cache import Cache class TestCache (unittest.TestCase): def test_speed (self): class klass1: def __init__ (self, data): pass ...
bsd-3-clause
-2,646,048,862,062,867,000
21.217742
102
0.590563
false
2.656702
false
false
false
jcfr/girder
clients/python/girder_client/__init__.py
1
34771
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
apache-2.0
203,694,680,312,244,260
37.72049
80
0.5699
false
4.573326
false
false
false
PetukhovVictor/compiler
src/Parser/Parsers/expressions/logical.py
1
2844
from ...combinators import Lazy from ...AST.expressions.logical import RelopBexp, NotBexp, AndBexp, OrBexp from ...AST.expressions.arithmetic import IntAexp """ Precedence levels for binary operations. """ bexp_precedence_levels = [ ['&&'], ['||', '!!'], ] def process_relop(parsed): """ Convert bool...
mit
-459,565,102,128,234,700
28.020408
104
0.636779
false
3.674419
false
false
false
gasevi/pyreclab
examples/testIFAls.py
1
2359
import time import pyreclab if __name__ == '__main__': model = pyreclab.IFAls( factors = 50, dataset = 'dataset/u1.base', dlmchar = b'\t', header = False, usercol = 0, itemcol = 1,...
gpl-3.0
-6,489,980,300,376,403,000
44.365385
114
0.465451
false
3.798712
false
false
false
basmot/futsal_management
base/migrations/0001_initial.py
1
9984
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-03-30 10:50 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depen...
apache-2.0
1,104,310,390,336,054,400
51.272251
313
0.569411
false
4.115416
false
false
false
parasgithub/PrairieLearn
elements/pl-matrix-component-input/pl-matrix-component-input.py
1
23895
import prairielearn as pl import lxml.html from html import escape import numpy as np import math import chevron import random def prepare(element_html, data): element = lxml.html.fragment_fromstring(element_html) required_attribs = ['answers-name'] optional_attribs = ['weight', 'label', 'comparison', 'rt...
agpl-3.0
-7,789,220,955,654,060,000
45.040462
166
0.550659
false
3.8281
false
false
false
tastyproject/tasty
tasty/crypt/garbled_circuit/abstract_garbled_circuit.py
1
4872
# -*- coding: utf-8 -*- """This module provides features to create and evaluate garbled circuits""" __all__ = ["AbstractCreatorGarbledCircuit", "AbstractEvaluatorGarbledCircuit"] ### CreatorGarbledCircuit class AbstractCreatorGarbledCircuit(object): """ Creator Garbled Circuit Abstract Class DOCUMENT ME!...
gpl-3.0
-9,158,368,140,754,448,000
32.6
111
0.602217
false
3.733333
false
false
false
eucalyptus/silvereye
anaconda-updates/6/gui.py
1
55810
# # gui.py - Graphical front end for anaconda # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Red Hat, Inc. All rights reserved. # # 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 F...
bsd-2-clause
3,909,030,833,548,092,400
32.299523
176
0.554256
false
4.099456
false
false
false
davidbgk/sirene
ulysse/__main__.py
1
2715
from argparse import ArgumentParser from .constants import ( DEFAULT_COLUMNS, DEFAULT_EXCLUDED_COLUMNS, DEFAULT_UPDATE_COLUMNS, ALL_COLUMNS, ALL_UPDATE_COLUMNS ) from .loaders import load_stock, load_updates from .server import app if __name__ == '__main__': parser = ArgumentParser(prog='ulysse') pars...
mit
-5,828,752,204,213,753,000
42.079365
76
0.622329
false
4.093514
false
false
false
giannitedesco/gordon
gordon/test_ui.py
1
1980
from gi.repository import Gtk import random from verb import Verb from noun import Noun class TestUI(Gtk.Box): def set_q(self, s): self.q.set_markup('<span size="50000"><b>%s</b></span>'%s) def __press(self, b): if b.is_correct: self.new_word() else: # TODO: something pass def get_answers(self, w...
gpl-3.0
6,007,333,962,673,486,000
21.247191
60
0.599495
false
2.44143
false
false
false
SVladkov/Numismatic
gui/focus.py
1
1775
import sys from PyQt4 import QtGui, QtCore class LoginDialog(QtGui.QDialog): def __init__(self, parent=None): super(LoginDialog, self).__init__(parent) self.username = QtGui.QLineEdit() self.password = QtGui.QLineEdit() loginLayout = QtGui.QFormLayout() loginLayou...
gpl-3.0
-3,280,381,114,533,140,000
30.309091
104
0.620282
false
4.127907
false
false
false
GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/providers/cloudstack/util.py
1
11308
# Copyright 2015 PerfKitBenchmarker 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 appli...
apache-2.0
-1,231,717,934,742,024,200
20.498099
78
0.576406
false
3.577349
false
false
false
adereis/avocado
avocado/plugins/yaml_to_mux.py
1
10470
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-2.0
3,461,615,774,232,537,600
36.526882
81
0.547469
false
4.107493
false
false
false
talonchandler/dipsim
notes/2017-08-31-polarized-detection/figures/det-polarization.py
1
6465
from dipsim import multiframe, util import numpy as np import matplotlib.pyplot as plt import matplotlib import matplotlib.patches as patches import os; import time; start = time.time(); print('Running...') import matplotlib.gridspec as gridspec # Main input parameters col_labels = ['Geometry (NA${}_{\\textrm{ill}}$ =...
mit
-5,659,750,630,685,617,000
39.15528
233
0.613921
false
2.798701
false
false
false
janezhango/BigDataMachineLearning
py/testdir_single_jvm_fvec/test_exec2_env_fail.py
1
1333
import unittest, random, sys, time sys.path.extend(['.','..','py']) import h2o, h2o_browse as h2b, h2o_exec as h2e, h2o_hosts, h2o_import as h2i DO_UNIMPLEMENTED = False class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): glo...
apache-2.0
-3,055,826,036,300,428,000
30.738095
101
0.603151
false
3.043379
false
false
false
MungoRae/home-assistant
homeassistant/components/sensor/netdata.py
2
5001
""" Support gathering system information of hosts which are running netdata. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.netdata/ """ import logging from datetime import timedelta from urllib.parse import urlsplit import requests import volupt...
apache-2.0
3,435,830,374,582,873,000
33.729167
79
0.616477
false
3.647702
true
false
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/importlib/test/import_/test_path.py
1
5117
from importlib import _bootstrap from importlib import machinery from .. import util from . import util as import_util from contextlib import nested import imp import os import sys from test import support from types import MethodType import unittest class FinderTests(unittest.TestCase): """Tests for PathFinder....
mit
-3,932,010,448,551,291,000
39.611111
80
0.59742
false
4.267723
true
false
false
jinlongwang/app_qr_analysis
settings.py
1
1346
import logging import tornado import tornado.template import os from tornado.options import define, options # Make filepaths relative to settings. path = lambda root,*a: os.path.join(root, *a) ROOT = os.path.dirname(os.path.abspath(__file__)) define("port", default=8888, help="run on the given port", type=int) define...
apache-2.0
-5,111,150,648,158,233,000
23.925926
76
0.690936
false
3.204762
false
false
false
RJVB/Py_RJVB
CritSectEx/setup.py
1
1385
import os,sys from distutils.core import setup, Extension from numpy import get_include as numpy_get_include try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: from distutils.command.build_py import build_py def doall(): if sys.platform.find('linux') >= 0: extra_...
gpl-2.0
7,867,008,779,467,610,000
32.625
79
0.633935
false
3.043956
false
false
false
i-rabot/tractogithub
tracformatter/trac/ticket/notification.py
1
21057
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2005 Daniel Lundin <daniel@edgewall.com> # Copyright (C) 2005-2006 Emmanuel Blot <emmanuel.blot@free.fr> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have recei...
bsd-3-clause
2,796,581,015,809,558,500
40.973469
80
0.478796
false
4.220686
true
false
false
researchcompendia/researchcompendia
companionpages/compendia/migrations/0010_auto__add_verification.py
1
13315
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Verification' db.create_table(u'compendia_verification', ...
mit
1,597,549,120,047,691,500
83.278481
249
0.567405
false
3.61919
false
false
false
wangkang0627/WordPress-Android
tools/fetch_buck_dependencies.py
1
6146
#!/usr/bin/env python from pprint import pprint import os import urllib import sys import zipfile import tempfile def get_local_properties_location(): curdir = os.getcwd() localprops_name= 'local.properties' location = '' while curdir and curdir != '/': location = os.path.join(curdir, localpro...
gpl-2.0
-5,527,322,454,982,489,000
52.443478
172
0.69053
false
2.661758
false
false
false
awblocker/quantitation
lib/quantitation/emulate.py
1
14952
import numpy as np from scipy import linalg from scipy import spatial # Covariance functions def approx_quantile(coverage_prob, d, n, exp=1): ''' Compute approximate coverage_prob quantile of maximal distance between n spherically-distributed points with identity covariance and the origin. Arguments...
bsd-3-clause
6,221,804,945,133,005,000
32.006623
82
0.631487
false
3.916186
false
false
false
JasonRuonanWang/shore
shoreInfra/retouchPlugins/retouch.py
1
1750
# (c) University of Western Australia # International Centre of Radio Astronomy Research # M468/35 Stirling Hwy # Perth WA 6009 # Australia # # Copyright by UWA, # All rights reserved # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Less...
lgpl-3.0
3,034,307,163,538,248,000
31.407407
92
0.624
false
3.854626
false
false
false
lzambella/Qyoutube-dl
youtube_dl/extractor/nrk.py
1
10885
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( determine_ext, ExtractorError, float_or_none, parse_duration, unified_strdate, ) class NRKIE(InfoExtractor): _VALID_URL = r'(?:nrk:...
gpl-3.0
2,743,919,803,994,007,600
35.003311
171
0.484779
false
3.449556
false
false
false
akrherz/iem
htdocs/plotting/auto/scripts/p55.py
1
5485
"""Climatologies comparison""" import datetime import calendar from pandas.io.sql import read_sql from pyiem.plot.use_agg import plt from pyiem.util import get_autoplot_context, get_dbconn from pyiem.exceptions import NoDataFound def get_description(): """Return a dict describing how to call this plotter""" ...
mit
-7,559,576,694,796,283,000
26.70202
79
0.506472
false
3.201985
false
false
false
xinghalo/DMInAction
src/basic/02datatype.py
1
2512
# 类型自动推断 counter = 100 miles = 1000.0 name = 'runjob' print(counter) print(miles) print(name) # 多个变量同时赋值 a = b = c = 1 print(a,b,c) a,b,c = 1,2,'hello' print(a,b,c) ''' 标准的数据类型: Number,String,List,Tuple,Sets,Dictionary Number: int,float,bool,complex ''' a,b,c,d=20,5.5,True,4+3j print(type(a),type(b),type(c),type(...
apache-2.0
-3,625,339,085,561,949,000
14.486667
64
0.624462
false
1.868061
false
false
false
fashiontec/knitlib
src/knitlib/plugins/ayab_plugin/ayab_communication.py
1
4268
# -*- coding: utf-8 -*- # This file is part of AYAB. # # AYAB 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. # # AYAB i...
lgpl-3.0
1,868,771,194,877,282,000
31.572519
83
0.636044
false
3.929098
false
false
false
fxb22/BioGUI
plugins/Views/NAView.py
1
7384
import wx import getPlugins as gpi import os import math from Bio import SeqIO from time import strftime import re class Plugin(): def OnSize(self): self.bPSize = self.bigPanel.GetSize() for i in self.seqText: i.Show(False) i.SetSize((self.bPSize[0]-315,self.bPSize[1]-16)) ...
gpl-2.0
-7,664,908,867,844,896,000
35.554455
79
0.513001
false
3.548294
false
false
false
rodneyrd/py-ispconfig
SOAPpy/Types.py
1
51780
""" ################################################################################ # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
bsd-3-clause
-4,927,756,226,796,900,000
28.827189
80
0.505852
false
3.988907
false
false
false
nudles/incubator-singa
examples/mlp/native.py
1
2988
# # 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...
apache-2.0
7,721,871,882,071,027,000
32.2
71
0.636546
false
3.414857
false
false
false
jose-lpa/elastic-django
elastic_django/management/commands/index_models.py
1
1216
from __future__ import unicode_literals from django.apps import apps from django.core.management.base import BaseCommand, CommandError from ...models import ElasticModel class Command(BaseCommand): help = 'Triggers indexing in Elasticsearch for all models in the project' \ ' intended to be indexed.' ...
bsd-3-clause
-5,292,185,298,304,705,000
31.864865
79
0.584704
false
4.487085
false
false
false
matachi/subdownloader
gui/imdbSearch.py
1
4526
#!/usr/bin/env python # Copyright (c) 2010 SubDownloader Developers - See COPYING - GPLv3 from PyQt4 import QtCore, QtGui from PyQt4.QtCore import Qt, SIGNAL, QObject, QCoreApplication, \ QSettings, QVariant, QSize, QEventLoop, QString, \ QBuffer, QIODevice, QModelInde...
gpl-3.0
-7,960,210,667,013,671,000
48.195652
136
0.654441
false
4.019538
false
false
false
stvstnfrd/edx-platform
lms/djangoapps/courseware/tests/test_view_authentication.py
1
18196
""" Check that view authentication works properly. """ import datetime import pytz from django.urls import reverse from mock import patch from six import text_type from six.moves import range from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.tests.factories import ( BetaTest...
agpl-3.0
5,610,331,733,954,002,000
39.256637
146
0.638767
false
4.055271
true
false
false
osh/gnuradio
grc/gui/Port.py
1
9542
""" Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option...
gpl-3.0
1,040,212,409,660,799,900
34.604478
121
0.596416
false
3.794036
false
false
false
mordred-descriptor/mordred
mordred/ABCIndex.py
1
1988
r"""ABC Index descriptor. References * http://match.pmf.kg.ac.rs/electronic_versions/Match75/n1/match75n1_233-242.pdf """ import numpy as np from ._base import Descriptor from ._graph_matrix import DistanceMatrix __all__ = ("ABCIndex", "ABCGGIndex") class ABCIndexBase(Descriptor): __slots__ = () @cl...
bsd-3-clause
-2,512,279,902,618,057,700
21.337079
135
0.597082
false
3.291391
false
false
false
wavexx/screenkey
setup.py
1
1543
#!/usr/bin/env python from setuptools import setup setup(name='screenkey', version='0.9', description='A screencast tool to display keys', author='Pablo Seminario', author_email='pabluk@gmail.com', maintainer='Yuri D\'Elia', maintainer_email='wavexx@thregr.org', license='GPLv3+', ...
gpl-3.0
-8,501,449,077,866,312,000
40.702703
96
0.585872
false
4.322129
false
false
false
csaldias/python-usm
Ejercicios progra.usm.cl/Parte 2/7- Procesamiento de Texto/analisis_correos.py
1
1502
c = ['fulano@usm.cl', 'erika@lala.de', 'li@zi.cn', 'a@a.net', 'gudrun@lala.de', 'otto.von.d@lorem.ipsum.de', 'org@cn.de.cl', 'yayita@abc.cl', 'jozin@baz.cz', 'jp@foo.cl', 'dawei@hao.cn', 'pepe@gmail.com', 'ana@usm.cl', 'polo@hotmail.com', 'fer@x.com', 'ada@alumnos.usm.cl', 'dj@foo.cl', 'jan@baz....
mit
4,815,184,088,515,531,000
30.978723
70
0.635819
false
2.450245
false
false
false
nicobustillos/odoo
addons/account/account_move_line.py
1
78174
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
6,786,834,621,054,952,000
54.168666
280
0.5657
false
3.898369
false
false
false
SimonBiggs/electronfactors
electronfactors/ellipse/utilities.py
1
5230
# Copyright (C) 2015 Simon Biggs # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public # License as published by the Free Software Foundation, either # version 3 of the License, or (at your option) any later version. # This program is distributed in...
agpl-3.0
3,469,989,800,611,542,500
28.382022
74
0.626195
false
3.717129
false
false
false
nkubala/runtimes-common
ftl/php/layer_builder.py
1
6039
# Copyright 2017 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 ag...
apache-2.0
3,772,436,987,059,569,700
37.464968
78
0.590164
false
3.911269
false
false
false
paulovn/sparql-kernel
sparqlkernel/drawgraph.py
1
12043
""" Convert an RDF graph into an image for displaying in the notebook, via GraphViz It has two parts: - conversion from rdf into dot language. Code based in rdflib.utils.rdf2dot - rendering of the dot graph into an image. Code based on ipython-hierarchymagic, which in turn bases it from Sphinx See https://...
bsd-3-clause
-2,023,763,401,971,157,200
37.110759
167
0.659636
false
3.943353
false
false
false
emk/pyjamas
library/pyjamas/ui/splitpanel.py
1
9554
""" /* * Copyright 2008 Google Inc. * Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.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/license...
apache-2.0
-5,651,570,363,202,110,000
32.522807
84
0.603726
false
4.206957
false
false
false
JohnDMcMaster/uvscada
nuc/ber225_chk.py
1
3045
from uvscada import k2750 from uvscada import ber225 import time import json def run(dmm, ps, f=None, tsleep=1.0): print print 'Init DMM' dmm.volt_dc() print print 'Init PS' # Turn down HV ps.off() ps.set_volt(0.0) ps.apply() print 'Stabalizing...' time.sleep(3.0) ...
bsd-2-clause
623,074,620,179,487,900
28
149
0.533333
false
2.706667
false
false
false
emptymalei/statisticalphysics
conf.py
1
18471
# -*- coding: utf-8 -*- # # statistical physics documentation build configuration file, created by # sphinx-quickstart on Tue May 27 11:24:59 2014. # # 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...
mit
1,441,046,469,493,253,600
27.286371
138
0.680201
false
3.031512
true
false
false
JamesQFreeman/Pod
anytree/render.py
1
9029
# -*- coding: utf-8 -*- """ Tree Rendering. * :any:`RenderTree` using the following styles: * :any:`AsciiStyle` * :any:`ContStyle` * :any:`ContRoundStyle` * :any:`DoubleStyle` """ import six class AbstractStyle(object): def __init__(self, vertical, cont, end): """ Tree Render St...
mit
2,727,806,280,004,784,600
28.093023
85
0.465342
false
3.525362
false
false
false
rhiever/sklearn-benchmarks
model_code/random_search_preprocessing/ExtraTreesClassifier.py
1
2607
import sys import pandas as pd import numpy as np from sklearn.preprocessing import Binarizer, MaxAbsScaler, MinMaxScaler from sklearn.preprocessing import Normalizer, PolynomialFeatures, RobustScaler, StandardScaler from sklearn.decomposition import FastICA, PCA from sklearn.kernel_approximation import RBFSampler, Ny...
mit
4,736,441,870,180,769,000
51.14
184
0.769467
false
3.537313
false
false
false
ploggingdev/ploghub
ploghub/celery.py
1
1364
from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ploghub.settings') app = Celery('ploghub', broker='redis://localhost:6379/0') # Using a string here means th...
mit
2,478,403,788,260,852,700
35.891892
93
0.744135
false
3.706522
false
false
false
TomasTriska/Robbie
robbie/src/programy/clients/sounds.py
1
1098
import os from pydub import AudioSegment from pydub.playback import play class SoundSystem(object): "Systém pro pouštění zvuků a přehrávání textu." def __init__(self): self.samples = { 'Beep': AudioSegment.from_wav("robbie/sounds/Beep.wav"), 'Action': AudioSegment.from_wav("robbie/sounds/Action.wav"), '...
lgpl-3.0
-325,510,475,584,005,400
22.434783
67
0.693878
false
2.603865
false
false
false
BigPeet/pr0tagger
src/data_collection/data_collector.py
1
6376
from datetime import timedelta import json from os import listdir from os.path import isfile, join import pr0gramm import logging __author__ = "Peter Wolf" __mail__ = "pwolf2310@gmail.com" __date__ = "2016-12-26" LOG = logging.getLogger(__name__) class DataSources: IMAGE, THUMBNAIL, FULL_SIZE = range(3) class...
mit
7,316,717,142,867,548,000
32.382199
90
0.579831
false
3.902081
false
false
false
mir-group/flare
flare/kernels/two_body_mc_simple.py
1
24523
import numpy as np from flare.kernels.kernels import force_helper, force_energy_helper, grad_helper from numba import njit from flare.env import AtomicEnvironment from typing import Callable import flare.kernels.cutoffs as cf from math import exp class TwoBodyKernel: def __init__( self, hyperparam...
mit
2,304,123,128,180,203,300
32.68544
88
0.490071
false
3.559733
false
false
false
susingha/0x_tools
programs/pycharm/stock.py
1
1178
""" Stock buy sell multiple times with transaction charge fn(i, have) if i is last: if bought: have to sell else: pass else: if bought: choices: sell or pass else: choices: pass or buy """ arr = [1, 3, 2, 8, 4, 10] arr = [1, 3, 2, 8, 4, 10, 2, 4, 6, 2, 4, 6, 1, 9, 5,...
gpl-2.0
-6,493,709,304,123,017,000
16.863636
56
0.457555
false
2.901478
false
false
false
linvictor88/vse-lbaas-driver
quantum/db/loadbalancer/loadbalancer_db.py
1
28965
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 OpenStack Foundation. 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.apach...
apache-2.0
-4,694,446,517,084,054,000
40.556671
79
0.544726
false
4.22785
false
false
false
roidy/service.skin.refresh
kodiutils.py
1
1512
# -*- coding: utf-8 -*- import xbmc import xbmcaddon import re import sys import logging import json as json # read settings ADDON = xbmcaddon.Addon() logger = logging.getLogger(__name__) def notification(header, message, time=5000, icon=ADDON.getAddonInfo('icon'), sound=True): xbmcgui.Dialog().notification(h...
mit
281,583,730,156,944,100
20.295775
90
0.652778
false
3.678832
false
false
false
Majavapaja/Mursushakki
deployment/cosmosdb.py
1
1775
import logging from azure.cosmos.cosmos_client import CosmosClient from azure.cosmos.errors import HTTPFailure from config import Mongo log = logging.getLogger(__name__) def configure_collections(db_name, collection_names, master_key, url_connection): client = CosmosClient(url_connection=url_connection, auth={"ma...
mit
-3,650,193,461,902,745,000
38.444444
118
0.729014
false
3.728992
true
false
false
MMaus/mutils
mmnotebooks/runme.py
1
18352
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # # Bipedal SLIP # # # ## LE: # May 5th, 2013 MM - forked from "Walking SLIP" notebook # May 16th, 2013 MM - bughunting: comparison between "wrapped" (circular-invariant) and "original" model gives slightly different results - this must not be ...
gpl-2.0
4,577,694,541,549,133,000
33.302804
333
0.586367
false
2.797987
false
false
false
fxjung/phyprak
14_Wechselstromwiderstände/data/auswertung14.py
1
12929
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import scipy.optimize as optimize from scipy import special #import sympy.latex import uncertainties from uncertainties import ufloat from uncertainties import ufloat_fromstr from uncertainties im...
gpl-2.0
4,213,757,682,008,123,000
33.572193
141
0.5746
false
2.466425
false
false
false
koverholt/ibis
ibis/impala/tests/test_partition.py
1
8670
# Copyright 2014 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
-7,627,139,490,318,515,000
33.268775
79
0.534602
false
3.984375
true
false
false
flyballlabs/threatdetectionservice
api/facial/MSFTFacialEngine.py
1
8588
from .FacialEngine import FacialEngine import http.client, urllib.request, urllib.parse, urllib.error, base64 import json, requests import os,sys sys.path.append('/home/mack/threatdetectionservice/') from api import * from api.sql.models import * class MSFTFacialEngine(FacialEngine): name = "MSFT Facial Engine" ...
apache-2.0
-627,877,207,073,186,600
42.155779
199
0.523638
false
3.985151
false
false
false
googleapis/googleapis-gen
google/cloud/retail/v2/retail-v2-py/google/cloud/retail_v2/types/common.py
1
7848
# -*- 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
-9,220,255,277,189,631,000
32.682403
106
0.610601
false
4.199037
false
false
false
MiyamotoAkira/python-katas-and-praxis
katatennis.py
1
3126
class KataTennis(object): def __init__(self, player1Name, player2Name): self.firstPlayer = Player(player1Name) self.secondPlayer = Player(player2Name) def isGameFinished(self): return self.pointsOnWinningRange() and abs(self.firstPlayer.getPoints() - self.secondPlayer.getPoints...
bsd-2-clause
2,218,160,853,841,632,800
27.418182
117
0.618362
false
4.288066
false
false
false
yongshengwang/hue
build/env/lib/python2.7/site-packages/Werkzeug-0.6-py2.7.egg/werkzeug/formparser.py
1
13756
# -*- coding: utf-8 -*- """ werkzeug.formparser ~~~~~~~~~~~~~~~~~~~ This module implements the form parsing. It supports url-encoded forms as well as non-nested multipart uploads. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more deta...
apache-2.0
-854,380,677,843,528,000
38.528736
84
0.573204
false
4.764808
false
false
false
bslatkin/8-bits
appengine-ndb/race.py
1
3650
"""Race condition tests for ndb.""" import logging logging.basicConfig( level=logging.INFO, format='%(threadName)s:%(levelname)s:%(name)s:%(message)s') import threading import time from google.appengine.api import memcache from google.appengine.ext import testbed from ndb import context from ndb import eventlo...
apache-2.0
-7,360,879,785,467,473,000
24.172414
75
0.673699
false
3.198948
true
false
false
shlomozippel/ansible
lib/ansible/runner/connection_plugins/fireball.py
1
4451
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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 lat...
gpl-3.0
1,489,187,020,017,165,000
30.125874
146
0.612896
false
3.925044
false
false
false
romulocollopy/rows
examples/library/usa_legislators.py
1
1179
# coding: utf-8 # This example was based on: # https://github.com/compjour/search-script-scrape/blob/master/scripts/101.py from __future__ import print_function from io import BytesIO import requests import rows # Capture url = 'http://unitedstates.sunlightfoundation.com/legislators/legislators.csv' csv = BytesIO(...
gpl-3.0
-106,855,633,505,392,380
33.676471
84
0.652248
false
2.847826
false
false
false
milas/rfdevices
rfdevices/transmitter.py
1
3809
""" Sending RF signals with low-cost GPIO RF Modules on a Raspberry Pi. """ import logging import threading import time from Adafruit_GPIO import GPIO from rfdevices.protocol import BasebandValue, Protocol, PulseOrder log = logging.getLogger(__name__) class Transmitter: """Representation of a GPIO RF chip."""...
bsd-3-clause
7,549,339,326,112,572,000
31.008403
104
0.56104
false
3.767557
false
false
false
sserrot/champion_relationships
venv/Lib/site-packages/networkx/algorithms/centrality/voterank_alg.py
1
2843
# Copyright (C) 2017 by # Fredrik Erlandsson <fredrik.e@gmail.com> # All rights reserved. # BSD license. # """Algorithm to compute influential seeds in a graph using voterank.""" from networkx.utils.decorators import not_implemented_for __all__ = ['voterank'] __author__ = """\n""".join(['Fredrik Erlandsson <fr...
mit
1,534,861,650,688,796,400
33.253012
82
0.586352
false
3.36052
false
false
false
ooici/marine-integrations
mi/dataset/parser/wfp_c_file_common.py
1
10369
#!/usr/bin/env python """ @package mi.dataset.parser.wfp_c_file_common @file marine-integrations/mi/dataset/parser/wfp_c_file_common.py @author Emily Hahn @brief Parser for the c file type for the wfp Release notes: initial release """ __author__ = 'Emily Hahn' __license__ = 'Apache 2.0' import copy import re impor...
bsd-2-clause
5,166,536,417,098,350,000
42.389121
122
0.605459
false
4.30249
false
false
false
uber/pyro
examples/cvae/cvae.py
1
6805
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import numpy as np from pathlib import Path import pyro import pyro.distributions as dist from pyro.infer import SVI, Trace_ELBO import torch import torch.nn as nn from tqdm import tqdm class Encoder(nn.Module): def __init__(self...
apache-2.0
5,330,185,671,707,520,000
37.642045
83
0.556536
false
3.646649
false
false
false
jrg365/gpytorch
gpytorch/likelihoods/laplace_likelihood.py
1
1458
#!/usr/bin/env python3 import torch from ..constraints import Positive from ..distributions import base_distributions from .likelihood import _OneDimensionalLikelihood class LaplaceLikelihood(_OneDimensionalLikelihood): r""" A Laplace likelihood/noise model for GP regression. It has one learnable parame...
mit
-6,121,895,318,107,013,000
31.4
109
0.673525
false
3.767442
false
false
false
AverageNormalSchoolBoy/Picture
picture.py
1
1917
""" picture.py Author: Brendan Credit: Ethan Adner Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. One (or more) CircleAsset ...
mit
-7,959,056,388,930,373,000
26
104
0.714658
false
2.692416
false
false
false
NaveenKarippai/facebook-bot
facebook.py
1
1530
#!/usr/bin/env python from selenium import webdriver from selenium.webdriver.common.keys import Keys class FacebookStatus(): def __init__(self): self.driver = webdriver.PhantomJS() self.username = 'myFbName' # user credentials self.passwd = passwd = 'myFbPassword' self.statusMessage = 'https:/...
mit
-6,305,951,631,648,073,000
30.875
131
0.735294
false
2.965116
false
false
false