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
tensorflow/runtime
third_party/llvm/expand_cmake_vars.py
1
2647
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-6,928,396,880,634,280,000
28.741573
80
0.649037
false
3.567385
false
false
false
ericholscher/django
django/contrib/admindocs/views.py
1
15158
from importlib import import_module import inspect import os import re from django import template from django.template import RequestContext from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.db import models from django.shortcuts import render_to_resp...
bsd-3-clause
-5,536,292,160,864,529,000
37.866667
143
0.591701
false
3.981613
false
false
false
mlcommons/training
translation/tensorflow/process_data.py
1
15302
# Copyright 2018 MLBenchmark Group. 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
2,412,527,883,679,697,400
34.09633
80
0.668213
false
3.640733
false
false
false
imankulov/sentry
src/sentry/plugins/sentry_mail/models.py
1
5759
""" sentry.plugins.sentry_mail.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sentry from django.conf import settings from django.core.urlresolvers impo...
bsd-3-clause
8,034,038,789,124,717,000
29.796791
102
0.592464
false
4.104775
false
false
false
psychopy/psychopy
psychopy/gui/wxgui.py
1
15627
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """To build simple dialogues etc. (requires wxPython) """ from __future__ import absolute...
gpl-3.0
6,954,707,252,832,250,000
35.769412
83
0.580278
false
4.180578
false
false
false
OpenDaisy/daisy-api
daisy/gateway.py
1
12287
# Copyright 2012 OpenStack Foundation # Copyright 2013 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/LIC...
apache-2.0
8,565,885,868,649,443,000
45.896947
79
0.674697
false
4.130084
false
false
false
fabioz/mu-repo
mu_repo/repos_with_changes.py
1
2688
from mu_repo.action_diff import ParsePorcelain from mu_repo.execute_parallel_command import ParallelCmd, ExecuteInParallel #=================================================================================================== # ComputeReposWithChanges #====================================================================...
gpl-3.0
3,322,202,696,225,994,000
39.119403
104
0.56436
false
4.563667
false
false
false
biswajit-mandal/contrail-webui-third-party
fetch_packages.py
1
11100
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os import errno import re import shutil import subprocess import sys, getopt import platform from time import sleep _RETRIES = 5 _OPT_VERBOSE = None _OPT_DRY_RUN = None _PACKAGE_CACHE='/tmp/cache/' + os.environ['USER'] + '/we...
apache-2.0
-6,112,047,089,367,081,000
30.355932
97
0.53036
false
3.835522
false
false
false
jbloomlab/phydms
phydmslib/simulate.py
1
6135
"""Functions for performing simulations, mostly using ``pyvolve``. Written by Jesse Bloom and Sarah Hilton. """ import os import sys import math import phydmslib.models from phydmslib.constants import (NT_TO_INDEX, AA_TO_INDEX, ALMOST_ZERO) import pyvolve import numpy from tempfile import mkstemp import random import...
gpl-3.0
3,644,956,278,045,778,400
37.829114
78
0.558924
false
3.796411
false
false
false
IBT-FMI/SAMRI
samri/utilities.py
1
13239
import multiprocessing as mp import nibabel as nib import nipype.interfaces.io as nio import numpy as np import os import pandas as pd from itertools import product from joblib import Parallel, delayed from os import path # PyBIDS 0.6.5 and 0.10.2 compatibility try: from bids.grabbids import BIDSLayout except ModuleNo...
gpl-3.0
6,278,964,047,147,906,000
36.610795
248
0.720296
false
3.276169
false
false
false
Azure/azure-sdk-for-python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/operations/_operations.py
1
4729
# 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
-814,979,723,569,684,100
42.385321
133
0.639459
false
4.604674
false
false
false
artisanofcode/flask-generic-views
docs/conf.py
1
10315
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Flask-Generic-Views documentation build configuration file, created by # sphinx-quickstart on Wed Dec 30 04:16:44 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present ...
mit
8,997,364,476,504,771,000
32.49026
90
0.693747
false
3.709097
true
false
false
padraic-padraic/StabilizerSearch
stabilizer_search/search/brute_force.py
1
3184
from itertools import combinations from math import factorial from six import PY2 from random import shuffle from ._search import _Search from ._result import _Result from ..core.linalg import get_projector, projection_distance, subspace_distance from ..stabilizers import get_stabilizer_states from numba import njit ...
gpl-3.0
-47,993,443,974,661,890
34.775281
87
0.643216
false
3.794994
false
false
false
CLVsol/odoo_clvhealth_jcafb
project/install.py
1
6159
#!/usr/bin/env python # -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
agpl-3.0
411,191,009,144,921,200
34.194286
82
0.585972
false
3.813622
false
false
false
mattstibbs/blockbuster-server
blockbuster/messaging/bb_pushover_handler.py
1
1566
import http.client import urllib import logging import redis from rq import Queue import blockbuster.config as config import blockbuster.bb_auditlogger as bb_auditlogger # Set up RQ queue conn = redis.from_url(config.REDIS_URL) q = Queue(connection=conn) log = logging.getLogger(__name__) def send_push_notification...
mit
-340,374,393,596,961,600
30.32
108
0.619413
false
3.65035
false
false
false
richardkiss/pycoinnet
pycoinnet/examples/address_keeper.py
1
5205
#!/usr/bin/env python """ This bitcoin client does little more than try to keep an up-to-date list of available clients in a text file "addresses". """ import asyncio import binascii import logging import random import time from pycoinnet.helpers.standards import initial_handshake, version_data_for_peer from pycoinn...
mit
-1,233,479,060,370,532,000
34.408163
104
0.603266
false
3.841328
false
false
false
dzolnierz/mysql-utilities
mysql/utilities/common/sql_transform.py
1
61521
# # Copyright (c) 2011, 2015, Oracle and/or its affiliates. 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 Foundation; version 2 of the License. # # This program is distributed in th...
gpl-2.0
-7,321,135,944,833,890,000
39.288802
79
0.560101
false
4.275855
false
false
false
lgarren/spack
var/spack/repos/builtin/packages/r-annotationfilter/package.py
1
1981
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-4,270,355,889,196,540,000
46.166667
133
0.683998
false
3.962
false
false
false
fugitifduck/exabgp
lib/exabgp/bgp/message/update/nlri/evpn/nlri.py
1
2044
""" evpn.py Created by Thomas Morin on 2014-06-23. Copyright (c) 2014-2015 Orange. All rights reserved. """ from struct import pack from exabgp.protocol.family import AFI from exabgp.protocol.family import SAFI # ========================================================================= EVPN # +-------------------...
bsd-3-clause
-7,025,846,381,177,260,000
23.926829
138
0.576321
false
3.073684
false
false
false
vherman3/AxonSegmentation
AxonDeepSeg/learn_model.py
1
12287
import tensorflow as tf import math import numpy as np import os import pickle import time from learning.input_data import input_data import sys def learn_model(trainingset_path, model_path, model_restored_path = None, learning_rate = None, verbose = 1): if not learning_rate : learning_rate = 0.0005 ...
mit
6,847,251,026,175,072,000
39.96
172
0.567348
false
3.373696
true
false
false
openconfig/oc-pyang
openconfig_pyang/plugins/util/html_helper_test.py
1
2086
""" Copyright 2015 Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
apache-2.0
2,804,690,863,647,126,000
21.923077
72
0.678811
false
2.889197
false
false
false
blackjade/aci2xml
aci2xml.py
1
4226
# # Copyright (c) 2015 Fluke Networks. # All rights reserved. # No part of this source code may be copied, used, or modified # without the express written consent of Fluke Networks. # # aci2xml.py: Convert the policy manager related section in a *.aci # file to xml. For example, these lines: # [\Polic...
apache-2.0
7,077,029,358,062,470,000
30.015152
123
0.559158
false
3.710272
false
false
false
freundTech/deepl-cli
deepl/__main__.py
1
2176
import argparse import locale import sys from deepl import translator def print_results(result, extra_data, verbose=False): if verbose: print("Translated from {} to {}".format(extra_data["source"], extra_data["target"])) print(result) def main(): parser = argparse.ArgumentParser(description="Tr...
mit
-357,198,274,125,609,200
35.283333
101
0.617188
false
4.129032
false
false
false
AvengerMoJo/DeepSea
srv/modules/runners/upgrade.py
1
3678
# -*- coding: utf-8 -*- # pylint: disable=modernize-parse-error """ Verify that an automated upgrade is possible """ from __future__ import absolute_import from __future__ import print_function # pylint: disable=import-error,3rd-party-module-not-gated,redefined-builtin import salt.client import salt.utils.error class...
gpl-3.0
-6,941,238,278,801,299,000
31.263158
80
0.507069
false
4.603254
false
false
false
clones/wtforms
wtforms/ext/appengine/fields.py
1
3025
import decimal from wtforms import fields, widgets class ReferencePropertyField(fields.SelectFieldBase): """ A field for ``db.ReferenceProperty``. The list items are rendered in a select. """ widget = widgets.Select() def __init__(self, label=u'', validators=None, reference_class=None, ...
bsd-3-clause
-4,359,445,590,405,354,500
30.842105
100
0.549752
false
4.278642
false
false
false
pyrocko/pyrocko
src/apps/colosseo.py
1
7525
from __future__ import print_function # http://pyrocko.org - GPLv3 # # The Pyrocko Developers, 21st Century # ---|P------/S----------~Lg---------- import sys import logging import os.path as op from optparse import OptionParser from pyrocko import util, scenario, guts, gf from pyrocko import __version__ logger = lo...
gpl-3.0
5,485,994,843,530,995,000
22.964968
79
0.592292
false
3.429809
false
false
false
Darktel/Homework
Translit.py
1
1089
__author__ = 'Darktel' def translit(Mystring): """ String (Rus) -> String (Eng) """ RusString = 'а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ы,ь,ъ,э,ю,я,*, ,' EngString = "a,b,v,g,d,e,yo,zh,z,i,j,k,l,m,n,o,p,r,s,t,u,f,h,c,ch,sh,xh,y,',`,q,ju,ya,*,-," RusChar = RusString.split(','...
gpl-2.0
5,363,980,151,163,219,000
22.390244
95
0.555787
false
2.27791
false
false
false
hornedbull/gmailPy
gmailPy.py
1
13792
# Vatsal Shah # ECE-C433 Mini-Project 2 # gmailPy - A terminal gmail client # Tested on Python 2.7.3 # imapclient is not a part of the standard python library # install using sudo pip install imapclient import getpass from imapclient import IMAPClient import operator import email import optparse import sys class gma...
gpl-2.0
-6,506,492,856,560,792,000
47.055749
226
0.583019
false
4.14797
true
false
false
xlorepdarkhelm/colors
colors/html.py
1
1085
"""Contains the implementation of the HTML color group.""" __all__ = ( 'HTML', ) import enum from colors import base class HTML(base.ColorGroup): """ The color group for HTML 4.01 approved colors. These are the colors as defined in the HTML 4.01 specification from 1999. See Also: `Wiki...
mit
1,404,955,823,179,742,200
28.324324
79
0.584332
false
2.855263
false
false
false
Sumith1896/sympy
sympy/matrices/expressions/matadd.py
1
3161
from __future__ import print_function, division from sympy.core.compatibility import reduce from operator import add from sympy.core import Add, Basic, sympify from sympy.functions import adjoint from sympy.matrices.matrices import MatrixBase from sympy.matrices.expressions.transpose import transpose from sympy.strat...
bsd-3-clause
-7,329,370,434,409,728,000
27.736364
81
0.595698
false
3.508324
false
false
false
robwebset/script.pinsentry
resources/lib/database.py
1
18767
# -*- coding: utf-8 -*- import xbmc import xbmcaddon import xbmcvfs import sqlite3 import xbmcgui # Import the common settings from settings import log from settings import os_path_join ADDON = xbmcaddon.Addon(id='script.pinsentry') ################################# # Class to handle database access ###############...
gpl-2.0
6,275,682,289,483,418,000
40.519912
132
0.6326
false
4.349247
false
false
false
josephsuh/extra-specs
nova/tests/api/openstack/compute/contrib/test_keypairs.py
1
11623
# Copyright 2011 Eldar Nugaev # 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 ...
apache-2.0
210,862,576,793,496,740
35.550314
78
0.580573
false
3.445894
true
false
false
eevee/flax
flax/ui/console/util.py
1
3170
"""Utility widgets, not really specific to the game.""" import sys import urwid class LogWidget(urwid.ListBox): # Can't receive focus on its own; assumed that some parent widget will # worry about scrolling us _selectable = False def __init__(self): super().__init__(urwid.SimpleListWalker([]...
mit
-6,422,756,433,398,865,000
27.558559
81
0.543218
false
4.324693
false
false
false
Kismuz/btgym
btgym/research/strategy_gen_5/base.py
1
37905
############################################################################### # # Copyright (C) 2017-2018 Andrew Muzikin # # 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 t...
lgpl-3.0
1,417,447,790,621,117,000
39.889968
120
0.573407
false
4.227166
false
false
false
rbuffat/pyidf
tests/test_airflownetworkintrazonelinkage.py
1
1949
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.natural_ventilation_and_duct_leakage import AirflowNetworkIntraZoneLinkage log = logging.getLogger(__name__) class TestAirflowNetworkIntraZoneLinkage(unittest.TestCase): de...
apache-2.0
4,970,112,966,095,272,000
35.111111
142
0.691637
false
3.524412
false
false
false
adobe-research/spark-cluster-deployment
initial-deployment-puppet/modules/spark/files/spark/examples/src/main/python/wordcount.py
1
1306
# # 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 us...
apache-2.0
8,318,567,125,479,649,000
36.314286
74
0.687596
false
3.933735
false
false
false
vlfedotov/django-business-logic
business_logic/rest/serializers.py
1
9163
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.utils import six from rest_framework import serializers from ..models import (ExceptionLog, Execution, ExecutionArgument, Ex...
mit
-2,308,939,436,610,275,000
29.543333
119
0.68973
false
4.469756
false
false
false
joelarmstrong/analysis-purgatory
splitting-top-down/plot.py
1
2309
#!/usr/bin/env python import pandas as pd import seaborn as sns import matplotlib.pyplot as plt def main(): sns.set_style('ticks') df = pd.read_csv('results.csv') df['fraction_good_splits'] = (df['perfect_splits']/df['fraction_perfect_splits'] - df['mismatching_leaf_sets'] - df['flipped_splits']) / (df['p...
mit
1,598,443,924,317,746,700
73.483871
372
0.658294
false
3.400589
false
false
false
vinodpanicker/scancode-toolkit
src/scancode/format.py
1
5795
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
apache-2.0
590,873,037,973,926,900
33.088235
82
0.663158
false
4.083862
false
false
false
daeilkim/refinery
refinery/bnpy/bnpy-dev/bnpy/init/FromTruth.py
1
2192
''' FromTruth.py Initialize params of a bnpy model using "ground truth" information, such as human annotations These are provided within a Data object, as a "TrueLabels" field ''' import numpy as np import FromScratchMult def init_global_params(hmodel, Data, initname=None, seed=0, nRepeatTrue=2, **kwargs): ''' In...
mit
-7,890,607,368,942,962,000
30.328571
85
0.671989
false
3.41433
false
false
false
pszemus/grpc
examples/python/debug/get_stats.py
1
1475
# Copyright 2019 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-7,507,955,330,443,291,000
28.5
74
0.697627
false
3.841146
false
false
false
amjames/psi4
psi4/driver/driver.py
1
119607
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2018 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
lgpl-3.0
-2,847,176,584,611,929,000
56.55871
166
0.476895
false
4.430053
false
false
false
icgc-dcc/egasub
tests/test_dataset.py
1
1522
from egasub.ega.entities.dataset import Dataset from egasub.ega.entities.dataset_link import DatasetLink from egasub.ega.entities.attribute import Attribute links = [DatasetLink('label 1','url1'),DatasetLink('label 2','url2')] attributes = [Attribute('The tag 1','The value 1','an unit'),Attribute('The tag 2','The valu...
gpl-3.0
-2,194,082,586,187,153,400
32.844444
129
0.634691
false
3.412556
true
false
false
nisavid/spruce-collections
spruce/collections/_exc.py
1
1237
"""Exceptions""" __copyright__ = "Copyright (C) 2014 Ivan D Vasin" __docformat__ = "restructuredtext" import exceptions as _py_exc class Exception(_py_exc.Exception): pass class Error(RuntimeError, Exception): pass class UnsupportedUniversalSetOperation(Error): """ A finite set operation was at...
lgpl-3.0
4,857,376,909,560,219,000
21.089286
64
0.607114
false
4.295139
false
false
false
ScottWales/threddsclient
threddsclient/nodes.py
1
6231
""" Python objects for modelling a Thredds server """ from bs4 import BeautifulSoup as BSoup import urlparse from .utils import size_in_bytes import logging logger = logging.getLogger(__name__) FILE_SERVICE = "HTTPServer" OPENDAP_SERVICE = "OPENDAP" WMS_SERVICE = "WMS" WCS_SERVICE = "WCS" class Node(object): "...
apache-2.0
-6,310,311,489,160,708,000
29.694581
118
0.606965
false
3.958704
false
false
false
Eric89GXL/sphinx-gallery
sphinx_gallery/backreferences.py
1
10042
# -*- coding: utf-8 -*- # Author: Óscar Nájera # License: 3-clause BSD """ Backreferences Generator ======================== Parses example file code in order to keep track of used functions """ from __future__ import print_function, unicode_literals import ast import codecs import collections from html import escape...
bsd-3-clause
6,789,566,557,589,119,000
34.985663
79
0.555777
false
4.025662
false
false
false
snark/ignorance
tests/test_git_walk.py
1
6883
import ignorance import os try: # pathlib is in python stdlib in python 3.5+ from pathlib import Path except ImportError: from pathlib2 import Path import pytest def test_basic_walk(tmpdir_builder): path = tmpdir_builder.setup('git/basic_match') files = [] for r, d, f in ignorance.git.walk(pat...
isc
1,623,514,140,519,473,200
34.663212
78
0.634171
false
3.208858
true
false
false
renmengye/resnet
resnet/utils/lr_schedule.py
1
3191
"""Learning rate scheduler utilities.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from resnet.utils import logger log = logger.get() class FixedLearnRateScheduler(object): """Adjusts learning rate according to a fixed schedule...
mit
-5,248,840,209,165,210,000
32.239583
79
0.606393
false
3.589426
false
false
false
sunjinopensource/threadactive
examples/example1/main.py
1
1330
import time import threading import threadactive class BackWorker(threadactive.Agent): def tick(self): threadactive.Agent.tick(self) print("[%s][%d] front" % (threading.current_thread().getName(), time.clock()) ) self.print_in_front2() self.print_in_back() time.sleep(1) ...
mit
4,238,513,690,836,113,000
26.729167
95
0.56391
false
3.463542
false
false
false
kret0s/gnuhealth-live
tryton/server/trytond-3.8.3/trytond/tools/datetime_strftime.py
1
1478
# This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. # Copyright (c) 2002-2007 John D. Hunter; All Rights Reserved import time def datetime_strftime(date, fmt): ''' Allow datetime strftime formatting for years before 19...
gpl-3.0
-6,176,057,413,424,030,000
28.56
72
0.583221
false
3.676617
false
false
false
chovanecm/sacredboard
sacredboard/app/data/pymongo/metricsdao.py
1
3216
""" Module responsible for accessing the Metrics data in MongoDB. Issue: https://github.com/chovanecm/sacredboard/issues/60 """ from bson import ObjectId from bson.errors import InvalidId from sacredboard.app.data import NotFoundError from .genericdao import GenericDAO from ..metricsdao import MetricsDAO class Mon...
mit
2,635,387,023,477,506,000
31.16
77
0.560634
false
3.95086
false
false
false
jecki/MetaInductionSim
PyPlotter/qtGfx.py
3
10165
#!/usr/bin/python # qtGfx - Implementation of the Gfx.Driver Interface in a # qt evnironment """Implementes Gfx.Driver using the qt GUI toolkit. """ import sys, math try: from PyQt5.Qt import Qt from PyQt5.QtCore import pyqtSignal as SIGNAL from PyQt5.QtCore import QPoint, QObject from ...
mit
7,680,707,670,072,934,000
32.883333
82
0.546188
false
3.538113
false
false
false
AlanProject/day08
MyFTP_Client/modules/main.py
1
5250
#-*- coding:utf-8 -*- #/usr/bin/env python import sys,os import pickle import socket class ClientArgv(object): def __init__(self,argvs): self.argvs = argvs self.argvs_parser() self.handle() def handle(self): self.connect() #接收打印欢迎信息 server_data = self.client_socke...
apache-2.0
6,361,247,776,647,331,000
33
82
0.516471
false
3.59408
false
false
false
ctu-yfsg/2015-a-grass-reclass
reclassify/Layout/PreviewPanel.py
1
2207
#!/usr/bin/env python # -*- coding: utf-8 -*- """Subclass of wx.Panel""" #----------------------------------------------------------------------------------------- #Import try: #wxPython import wx #python std library import sys #GRASS modules and packages from modules.colorrules import Buffere...
gpl-2.0
7,031,197,689,677,351,000
27.675325
94
0.434073
false
4.89357
false
false
false
fabricematrat/py-macaroon-bakery
macaroonbakery/identity.py
1
4152
# Copyright 2017 Canonical Ltd. # Licensed under the LGPLv3, see LICENCE file for details. import abc import macaroonbakery as bakery class Identity(object): ''' Holds identity information declared in a first party caveat added when discharging a third party caveat. ''' __metaclass__ = abc.ABCMeta ...
lgpl-3.0
-1,514,180,123,860,796,000
31.952381
78
0.646435
false
4.788927
false
false
false
saaros/pghoard
pghoard/receivexlog.py
1
2656
""" pghoard - pg_receivexlog handler Copyright (c) 2016 Ohmu Ltd See LICENSE for details """ import datetime import logging import select import subprocess import time from .common import set_subprocess_stdout_and_stderr_nonblocking, terminate_subprocess from .pgutil import get_connection_info from threading import ...
apache-2.0
-5,884,344,457,204,641,000
34.891892
90
0.583961
false
3.952381
false
false
false
tinloaf/home-assistant
tests/helpers/test_template.py
1
38585
"""Test Home Assistant template helper methods.""" import asyncio from datetime import datetime import unittest import random import math from unittest.mock import patch from homeassistant.components import group from homeassistant.exceptions import TemplateError from homeassistant.helpers import template from homeass...
apache-2.0
7,943,343,220,525,600,000
35.530303
79
0.517628
false
3.952459
true
false
false
nsoranzo/tools-iuc
tools/metaphlan/formatoutput.py
1
5572
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import re from pathlib import Path taxo_level = { 'k': 'kingdom', 'p': 'phylum', 'c': 'class', 'o': 'order', 'f': 'family', 'g': 'genus', 's': 'species', 't': 'strains'} def split_levels(metaphlan_output_fp, out_dp, legacy...
mit
-7,910,039,779,148,934,000
37.694444
142
0.542355
false
3.316667
false
false
false
jjcf89/vt_legislation_bot
vt_legislation_bot.py
1
1798
#!/usr/bin/python2.7 import argparse import urllib from bs4 import BeautifulSoup #TODO Parse arguments URL="http://legislature.vermont.gov/bill/status/2016/H.159" def fetch_url(url): opener = urllib.FancyURLopener({}) f = opener.open(url) return f.read() def fetch_example(): fd = open("Example.html") return f...
gpl-2.0
4,761,416,767,378,805,000
25.850746
77
0.75139
false
3.210714
false
false
false
jrichte43/ProjectEuler
Problem-0200/solutions.py
1
1266
__problem_title__ = "Find the 200th prime-proof sqube containing the contiguous sub-string "200"" __problem_url___ = "https://projecteuler.net/problem=200" __problem_description__ = "We shall define a sqube to be a number of the form, , where and are " \ "distinct primes. For example, 200 = 5...
gpl-3.0
-4,679,411,115,905,603,000
38.5625
100
0.575039
false
4.057692
false
false
false
DArtagan/teetimer
tracker/migrations/0003_auto__del_field_teetime_people.py
1
5085
# -*- 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): # Deleting field 'TeeTime.people' db.delete_column('tracker_teetime', 'pe...
mit
-6,011,046,772,855,287,000
60.277108
192
0.574041
false
3.77786
false
false
false
Moonshile/fast12306
src/core/token.py
1
5021
#coding=utf-8 import re from fetch import FetchSlice class Token(object): def __init__(self, session, base_url): self.session = session self.base_url = base_url self.init_url_pattern = re.compile(r'<script\s+src="/(otn/dynamicJs/.+)"\s+type="text/javascript"\s+xml:space="preserve">\s*</s...
apache-2.0
-8,190,554,962,425,597,000
29.065868
153
0.430592
false
3.340652
false
false
false
jonathansick/synthsb
scripts/segmap_wircamsb.py
1
5931
#!/usr/bin/env python # encoding: utf-8 """ Compute WIRCam synthetic surface brightnesses within regions of a segmentation map. Accepts segmentation maps and pixel tables made by, e.g. andromass. 2014-11-18 - Created by Jonathan Sick """ import argparse # from collections import defaultdict # import math import num...
bsd-3-clause
7,598,660,081,612,174,000
32.320225
79
0.581521
false
3.08264
false
false
false
hjanime/VisTrails
vistrails/db/versions/v0_9_3/translate/v0_9_2.py
1
7218
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
-7,308,370,435,144,763,000
44.683544
88
0.518426
false
4.474892
false
false
false
MuckRock/muckrock
muckrock/message/tasks.py
1
11469
""" Tasks for the messages application. """ # Django from celery.exceptions import SoftTimeLimitExceeded from celery.schedules import crontab from celery.task import periodic_task, task from django.contrib.auth.models import User from django.utils import timezone # Standard Library import logging from random import r...
agpl-3.0
-8,486,624,507,151,663,000
33.966463
91
0.671026
false
3.852536
false
false
false
Connectomics-Classes/hackwicket-silverbacks
postProcessScript/src/postPocess.py
1
1940
#!/usr/bin/python #imports import numpy as np import cv import cv2 import sys import glob from mayavi import mlab from mayavi.mlab import * def morphOps(probMap): workableMap = probMap.copy() #apply erosion & dilation filtering, rids photo of stray vescicle detections workableMap = eroDilFilter(workableMap, 5, 3) ...
apache-2.0
-1,765,742,468,419,555,000
27.115942
81
0.744845
false
3.055118
false
false
false
ethanrublee/ecto-release
python/ecto/__init__.py
1
7057
# # Copyright (c) 2011, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of cond...
bsd-3-clause
-9,032,442,430,647,433,000
32.604762
110
0.586652
false
3.858393
false
false
false
excid3/keryx
keryx/unwrapt/Download.py
1
5779
# Unwrapt - cross-platform package system emulator # Copyright (C) 2010 Chris Oliver <chris@excid3.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the L...
gpl-3.0
-3,711,110,002,626,798,000
30.407609
113
0.622599
false
4.127857
false
false
false
trevisanj/f311
f311/collaboration.py
1
8609
""" Collaboration-related routines 1) Class Catalog -- resources to retrieve File* classes by different criteria 2) Script utilities: collect scripts (standalone applications) across collaborator packages """ from collections import OrderedDict import importlib import a99 import os import glob import copy __all__...
gpl-3.0
7,911,966,800,209,908,000
30.534799
112
0.588454
false
3.790841
false
false
false
Onirik79/aaritmud
src/enums/MONTH.py
1
1699
# -*- coding: utf-8 -*- """ Enumerazione dei mesi di un anno rpg. """ from src.element import EnumElement, finalize_enumeration #------------------------------------------------------------------------------- name = __name__[__name__.rfind(".")+1 : ] elements = [] cycle_on_last = True #-------------------------...
gpl-2.0
2,097,785,702,521,239,300
40.341463
96
0.533923
false
3.516598
false
false
false
priseborough/ardupilot
Tools/ardupilotwaf/boards.py
1
22752
#!/usr/bin/env python # encoding: utf-8 from collections import OrderedDict import sys, os import waflib from waflib import Utils from waflib.Configure import conf _board_classes = {} _board = None class BoardMeta(type): def __init__(cls, name, bases, dct): super(BoardMeta, cls).__init__(name, bases, dc...
gpl-3.0
-5,554,313,772,015,345,000
28.936842
203
0.533887
false
3.517081
true
false
false
cemagg/sucem-fem
examples/2D_waveguide/eigenmode/TM_driver.py
1
3597
## Copyright (C) 2011 Stellenbosch University ## ## This file is part of SUCEM. ## ## SUCEM 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 v...
gpl-3.0
1,550,712,025,160,284,200
28.491803
108
0.66055
false
3.136007
false
false
false
datagrok/python-misc
datagrok/misc/cli.py
1
2465
"""Framework for creating tools that employ a robust command-line interface.""" from __future__ import absolute_import import os import shutil # TODO: interface to datagrok.ansicolor ? class CLIManager(object): """Captures the boilerplate involved in making a decent command-line interface for a multi-functio...
agpl-3.0
-7,054,265,450,523,929,000
33.236111
118
0.533469
false
3.975806
false
false
false
andrewyang96/RacetrackGenerator
catmullrom.py
1
1950
# Source: http://en.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline # http://people.wku.edu/qi.li/teaching/446/cg14_curve_surface.pdf import numpy as np from utils import distance def CatmullRomSpline(P0, P1, P2, P3, nPoints=100): """ P0, P1, P2, and P3 should be (x,y) point pairs that define the Cat...
mit
1,019,315,799,465,238,700
33.210526
97
0.587692
false
2.443609
false
false
false
VaclavDedik/infinispan-py
tests/unit/test_utils.py
1
1300
# -*- coding: utf-8 -*- import pytest from infinispan import utils from infinispan.hotrod import TimeUnits class TestUtils(object): def test_from_pretty_time(self): assert utils.from_pretty_time('10s') == (10, TimeUnits.SECONDS) assert utils.from_pretty_time('10ms') == (10, TimeUnits.MILISECONDS...
mit
-5,564,530,746,362,472,000
39.625
77
0.641538
false
3.457447
true
false
false
stormi/tsunami
src/secondaires/magie/types/parchemin.py
1
4405
# -*-coding:Utf-8 -* # Copyright (c) 2010 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 # lis...
bsd-3-clause
-7,939,619,277,976,388,000
39.666667
80
0.636612
false
3.536232
false
false
false
ericdill/bluesky
bluesky/simple_scans.py
1
14733
""" These "scans" bundle a Message generator with an instance of the RunEngine, combining two separate concepts -- instructions and execution -- into one object. This makes the interface less flexible and somewhat less "Pythonic" but more condensed. This module is meant to be run in a namespace where several global va...
bsd-3-clause
1,619,961,103,741,633,800
30.280255
78
0.614539
false
3.628818
false
false
false
walterbender/turtleconfusion
TurtleArt/tatype.py
1
15982
# Copyright (c) 2013 Marion Zepf # Copyright (c) 2014 Walter Bender # 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, cop...
mit
6,725,969,836,886,066,000
33.743478
79
0.589163
false
3.941307
false
false
false
infrae/mobi.devices
src/mobi/devices/tests/test_doctest_wurfl_parsing.py
1
1866
# Copyright (c) 2010 Infrae. All rights reserved. # See also LICENSE.txt. """ We will start by initializing the database from wurfl stream. It should return a tuple (db, index) >>> from mobi.devices.index.radixtree import NOTSET >>> from mobi.devices.wurfl.db import initialize_db >>> db, index = initialize...
bsd-3-clause
7,810,178,486,091,748,000
23.88
74
0.635048
false
3.417582
true
false
false
cedriclaunay/gaffer
python/GafferUI/PlugWidget.py
1
5374
########################################################################## # # Copyright (c) 2011, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
bsd-3-clause
1,593,743,067,569,437,400
38.514706
118
0.716971
false
4.022455
false
false
false
iamdober/training
final/task3/task3.py
1
2189
# # In lecture, we took the bipartite Marvel graph, # where edges went between characters and the comics # books they appeared in, and created a weighted graph # with edges between characters where the weight was the # number of comic books in which they both appeared. # # In this assignment, determine the weights betw...
gpl-3.0
2,350,563,976,907,062,000
29.416667
70
0.604842
false
3.480127
false
false
false
evanbrumley/psmove-restful
utils.py
1
8083
import sys, os, time from threading import Thread import requests PSMOVEAPI_BUILD_DIR = os.environ.get('PSMOVEAPI_BUILD_DIR') if PSMOVEAPI_BUILD_DIR: sys.path.insert(0, os.environ['PSMOVEAPI_BUILD_DIR']) import psmove class Controller(object): _active = False _loop_thread = None controller = No...
mit
-3,089,800,069,205,572,600
26.776632
108
0.550662
false
3.766542
false
false
false
thorwhalen/ut
parse/venere.py
1
4355
__author__ = 'thorwhalen' import ut.parse.util as parse_util import re import ut.pstr.trans as pstr_trans import ut.parse.bsoup as parse_bsoup pois_near_hotel_exp_0 = re.compile("(?<=\. )[\w ]+(?=- 0\.\d km / 0\.\d mi)") pois_near_hotel_exp = re.compile("(.+)- (\d+[\.\d]*) km / (\d+[\.\d]*) mi") def get_pois_near_...
mit
-6,565,722,863,570,062,000
39.700935
140
0.586912
false
3.04972
false
false
false
auto-mat/django-webmap-corpus
webmap/models.py
1
18853
# -*- coding: utf-8 -*- from author.decorators import with_author from colorful.fields import RGBColorField from constance.admin import config import django from django import forms from django.contrib.gis.db import models from django.contrib.gis.geos import GeometryCollection from django.core.cache import cache fr...
mit
-2,574,332,993,582,529,000
39.631466
261
0.657667
false
3.734007
false
false
false
pitunti/alfaPitunti
plugin.video.alfa/channels/hentaienespanol.py
1
1882
# -*- coding: utf-8 -*- import re from core import httptools from core import scrapertools from core import servertools from core.item import Item from platformcode import logger host = 'http://www.xn--hentaienespaol-1nb.net/' headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Fi...
gpl-3.0
-2,298,668,226,065,378,000
28.873016
119
0.623804
false
3.498141
false
false
false
EIREXE/SpaceDock
SpaceDock/ckan.py
2
2394
from SpaceDock.config import _cfg from github import Github from flask import url_for import subprocess import json import os import re # TODO(Thomas): Make this modular def send_to_ckan(mod): if not _cfg("netkan_repo_path"): return if not mod.ckan: return json_blob = { ...
mit
-2,606,136,009,649,760,000
40
169
0.587719
false
3.121252
false
false
false
clchiou/garage
py/garage/garage/multiprocessing/backport.py
1
1205
__all__ = [ 'BoundedSemaphore', 'UnlimitedSemaphore', 'Timeout', ] import threading import time # NOTE: This module is Python 2 compatible. class Timeout(Exception): pass # Because Python 2 semaphore does not support timeout... class BoundedSemaphore(object): def __init__(self, value): ...
mit
3,029,463,247,928,132,600
22.173077
72
0.561826
false
4.479554
false
false
false
garvenshen/swquota
tests/test_swquota.py
1
6671
# 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...
apache-2.0
6,304,735,773,008,333,000
37.33908
78
0.510418
false
4.013839
true
false
false
pablocarderam/genetargeter
gRNAScores/azimuth/metrics.py
1
20467
""" from https://gist.github.com/bwhite/3726239 Information Retrieval metrics Useful Resources: http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt http://www.nii.ac.jp/TechReports/05-014E.pdf http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf http://hal.archives-ouvertes.fr/doc...
mit
6,929,932,319,144,185,000
30.010606
101
0.591391
false
3.211013
false
false
false
TheVirtualLtd/bda.plone.orders
src/bda/plone/orders/upgrades.py
1
14529
# -*- coding: utf-8 -*- from bda.plone.cart import get_object_by_uid from bda.plone.orders import message_factory as _ from bda.plone.orders.common import acquire_vendor_or_shop_root from bda.plone.orders.common import calculate_order_salaried from bda.plone.orders.common import calculate_order_state from bda.plone.ord...
bsd-3-clause
-2,279,739,217,219,872,300
31.286667
78
0.542157
false
4.092676
false
false
false
pydoit/doit
doit/runner.py
1
20369
"""Task runner""" from multiprocessing import Process, Queue as MQueue from threading import Thread import pickle import queue import cloudpickle from .exceptions import InvalidTask, CatchedException from .exceptions import TaskFailed, SetupError, DependencyError, UnmetDependency from .task import Stream, DelayedLoa...
mit
7,347,571,069,337,955,000
34.797891
80
0.56316
false
4.513406
false
false
false
BozoDev/CoCerBot
contrib/HangoutsBot/hangoutsbot/hangupsbot/plugins/CoCerBot/__init__.py
1
5738
import asyncio, io, logging, os, subprocess, re, time import plugins logger = logging.getLogger(__name__) _cocext = { "running": False } def _initialise(bot): plugins.register_user_command(["screen", "coc"]) plugins.register_admin_command(["setlog", "clearlog"]) @asyncio.coroutine def _open_file(name): ...
gpl-2.0
775,744,570,202,703,900
33.566265
134
0.615371
false
3.595238
false
false
false
rohanpm/qingfanyi
tests/test_navigator.py
1
5716
# coding=utf-8 # qingfanyi - Chinese to English translation tool # Copyright (C) 2016 Rohan McGovern <rohan@mcgovern.id.au> # # 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 ...
gpl-3.0
-6,003,047,400,805,221,000
29.731183
84
0.644682
false
3.493888
false
false
false
stormi/tsunami
src/primaires/objet/commandes/donner/__init__.py
1
5296
# -*-coding:Utf-8 -* # Copyright (c) 2010 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 # lis...
bsd-3-clause
-7,827,209,799,237,892,000
42.254098
79
0.617017
false
3.513316
false
false
false
peckhams/topoflow
topoflow/components/diversions_fraction_method.py
1
34322
# (2/3/13) Get "dt" from source_file or sink_file vs. # channels comp, but what about canals ? ######################################################## # # Copyright (c) 2010-2017, Scott D. Peckham # # Feb. 2017. Changes to internal variable names. # Cleanup & testing with Test_Plane_Can...
mit
4,706,929,756,352,890,000
45.318489
110
0.403619
false
4.401949
false
false
false
psyfako/psyfako_member_management
timetable/migrations/0001_initial.py
1
1210
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-22 22:06 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
gpl-3.0
4,596,746,112,430,652,400
33.571429
114
0.575207
false
4.260563
false
false
false
plantbiogeography/BaitsFinder
combined-ini.py
1
34661
#-*- encoding: utf-8 -*- import commands import platform import sys import os,os.path import ctypes import csv import glob import math import numpy as np import scipy as sp import shutil import traceback #import globalvar from functools import partial from multiprocessing import cpu_count CPU_n1=cpu...
gpl-2.0
7,990,784,050,546,604,000
29.424297
231
0.510603
false
2.986473
false
false
false
drvinceknight/Axelrod
axelrod/strategies/meta.py
1
4202
import random from axelrod import Player class MetaPlayer(Player): """A generic player that has its own team of players.""" team = [] def __init__(self): Player.__init__(self) # Make sure we don't use any meta players to avoid infinite recursion. self.team = [t for t in self.t...
mit
-4,386,408,245,011,585,500
31.330769
105
0.618039
false
4.06383
false
false
false
hpleva/pyemto
pyemto/examples/alloy_discovery/collect_alloy_final.py
1
6838
import pyemto import pyemto.utilities as utils import numpy as np import os latpath = "../../../" # Path do bmdl, kstr and shape directories # each system need to have same number of alloy elements #systems = [['Fe','Al'],['Fe','Cr']] systems = [['Fe'],['Al']] systems = [['Al']] #concentrations = [[0.5,0.5]] concent...
mit
5,948,215,581,552,546,000
31.407583
98
0.535244
false
3.122374
false
false
false
cligs/pyzeta
scripts/correlation.py
1
1579
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # file: experimental.py # version: 0.1.0 # source: https://github.com/maslinych/linis-scripts/blob/master/rbo_calc.py # ported to Python 3 and slightly modified by Albin Zehe def calc_rbo(l1, l2, p=0.98): """ Returns RBO indefinite rank similarity metric, as desc...
gpl-3.0
6,396,309,194,905,206,000
25.762712
76
0.484484
false
2.490536
false
false
false