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
mjsauvinen/P4UL
pyRaster/tif2NumpyTile.py
1
1956
#!/usr/bin/env python3 import sys import argparse import numpy as np from mapTools import * from utilities import filesFromList, writeLog from plotTools import addImagePlot import matplotlib.pyplot as plt ''' Author: Mikko Auvinen mikko.auvinen@helsinki.fi University of Helsinki & Finnish Meteor...
mit
4,073,113,538,880,150,500
34.563636
95
0.641616
false
3.165049
false
false
false
Kronopt/pipUpdateAll
pipUpdateAll.py
1
3682
#!python2 # coding: utf-8 """ PIP UPDATE ALL Updates outdated python modules using pip Checks outdated modules using "pip list --outdated --format columns", parses that column to only show relevant information (name, current version, new version) and then updates all detected modules using "pip install -U" followed by...
mit
5,579,989,667,137,161,000
33.735849
118
0.625204
false
3.942184
false
false
false
leebird/legonlp
utils/runner.py
1
1644
import sys import os import codecs class Runner(object): runnerName = None def __init__(self): ''' read input files and process run directly on input files run directly on input dir process output ''' pass def run(self, args): ''' i...
gpl-2.0
7,072,275,004,045,526,000
23.909091
68
0.544404
false
3.98063
false
false
false
crossbario/crossbar-fabric-cli
cbsh/idl/loader.py
1
16965
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
mit
3,829,342,878,639,213,000
31.009434
97
0.519776
false
4.0625
false
false
false
omargammoh/rpislave
website/processing.py
1
6269
from bson import json_util import multiprocessing from website.models import Conf from time import time, sleep import inspect import subprocess import json try: import signal except: print "signal cannot be imported" def execute(cmd, daemon=False): if daemon: _ = subprocess.Popen(cmd, shell=True,...
gpl-2.0
3,806,615,012,987,262,500
31.148718
189
0.584304
false
3.751646
false
false
false
ilastikdev/ilastik
ilastik/applets/thresholdTwoLevels/_OpObjectsSegment.py
1
10889
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
gpl-3.0
-4,906,129,953,672,029,000
38.740876
81
0.619616
false
3.953885
false
false
false
asweigart/pygcurse
examples/shadowtest.py
1
1621
# Simplified BSD License, Copyright 2011 Al Sweigart import sys import os sys.path.append(os.path.abspath('..')) import pygcurse, pygame from pygame.locals import * win = pygcurse.PygcurseWindow(40, 25) win.autoblit = False xoffset = 1 yoffset = 1 mousex = mousey = 0 while True: for event in pygame.event.get(): #...
bsd-3-clause
-364,671,775,039,068,860
33.489362
94
0.584207
false
3.349174
false
false
false
koreiklein/fantasia
ui/render/text/colors.py
1
1104
# Copyright (C) 2013 Korei Klein <korei.klein1@gmail.com> genericColor = None variableColor = None symbolColor = None andColor = None orColor = None callColor = None quantifierDividerColor = None notColor = None alwaysBackgroundColor = None maybeBackgroundColor = None relationColor = None iffColor = None applyC...
gpl-2.0
6,253,670,935,183,310,000
16.806452
57
0.724638
false
3.820069
false
false
false
hiviah/perspectives-observatory
utilities/cert_client.py
1
3009
# This file is part of the Perspectives Notary Server # # Copyright (C) 2011 Dan Wendlandt # Copyright (C) 2011 Ondrej Mikle, CZ.NIC Labs # # 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 Founda...
gpl-3.0
7,373,507,836,183,155,000
30.020619
91
0.713526
false
2.979208
false
false
false
frostyfrog/mark2
mk2/events/server.py
1
2945
import re from . import Event, get_timestamp # input/output output_exp = re.compile( r'(\d{4}-\d{2}-\d{2} |)(\d{2}:\d{2}:\d{2}) \[([A-Z]+)\] (?:%s)?(.*)' % '|'.join((re.escape(x) for x in ( '[Minecraft] ', '[Minecraft-Server] ' )))) class ServerInput(Event): """Send data to the server's s...
mit
5,955,427,389,456,440,000
23.541667
108
0.591171
false
3.742058
false
false
false
amitjamadagni/sympy
sympy/functions/special/error_functions.py
2
32620
""" This module contains various functions that are special cases of incomplete gamma functions. It should probably be renamed. """ from sympy.core import Add, S, C, sympify, cacheit, pi, I from sympy.core.function import Function, ArgumentIndexError from sympy.functions.elementary.miscellaneous import sqrt, root ...
bsd-3-clause
4,165,216,953,519,735,300
26.644068
110
0.549203
false
3.245771
false
false
false
pshchelo/heat
heat/tests/openstack/test_volume.py
1
42764
# # 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 # ...
apache-2.0
-4,979,401,692,813,748,000
39.883365
79
0.607637
false
3.770411
true
false
false
arruda/rmr
rmr/apps/books/migrations/0006_books_to_userbooks.py
1
8533
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "from appname.mo...
mit
-4,910,646,489,504,296,000
70.108333
182
0.545881
false
3.759031
false
false
false
az0/entity-metadata
code/etl_openlibrary.py
1
2492
#!/usr/bin/python3 # # Copyright (C) 2019 by Compassion International. All rights reserved. # License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. # This is free software: you are free to change and redistribute it. # There is NO WARRANTY, to the extent permitted by law. """ This program E...
gpl-3.0
-2,435,090,541,281,703,000
30.15
110
0.630016
false
3.529745
false
false
false
18F/github-issue-lifecycle
app/models.py
1
15856
import itertools import os from collections import OrderedDict from datetime import date, datetime, timedelta import requests from requests.auth import HTTPBasicAuth from . import db from .app import app from .utils import to_py_datetime GH_DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' BEGINNING_OF_TIME = '1970-01-01T00:00:00Z...
cc0-1.0
6,412,924,456,398,388,000
38.739348
94
0.521443
false
4.206951
false
false
false
cscutcher/naruto-aufs-layers
naruto/cli.py
1
8374
# -*- coding: utf-8 -*- """ Main group for naruto cli """ import io import logging import os import pathlib import shutil import click from naruto import NarutoLayer, LayerNotFound DEV_LOGGER = logging.getLogger(__name__) DEFAULT_NARUTO_HOME = pathlib.Path(os.path.expanduser('~/.naruto')) DEFAULT_LOG_LEVEL = logging...
gpl-3.0
-2,532,855,138,760,252,400
26.455738
99
0.597683
false
3.790856
false
false
false
pas256/troposphere
troposphere/servicecatalog.py
1
4652
# Copyright (c) 2012-2018, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .validators import boolean class AcceptedPortfolioShare(AWSObject): resource_type = "AWS::ServiceCatalog::AcceptedPortfolioShare" props = { ...
bsd-2-clause
-6,446,356,054,065,016,000
27.193939
75
0.634136
false
4.161002
false
false
false
robertmattmueller/sdac-compiler
tests/test_normalization.py
1
1628
try: # Python 2 from StringIO import StringIO except ImportError: # Python 3 from io import StringIO import pddl from pddl_to_prolog import Rule, PrologProgram def test_normalization(): prog = PrologProgram() prog.add_fact(pddl.Atom("at", ["foo", "bar"])) prog.add_fact(pddl.Atom("truck", [...
gpl-3.0
-3,731,900,976,421,474,300
37.761905
105
0.556511
false
2.754653
false
false
false
jacobajit/ion
intranet/middleware/ldap_db.py
1
1702
# -*- coding: utf-8 -*- import logging from django.contrib import messages from ..db.ldap_db import LDAPConnection logger = logging.getLogger(__name__) class CheckLDAPBindMiddleware: def process_response(self, request, response): if not hasattr(request, "user") or "_auth_user_backend" not in request....
gpl-2.0
-8,821,804,357,833,348,000
38.581395
127
0.619271
false
4.478947
false
false
false
amarfurt/arr
remote.py
1
1112
""" Starts the remote control worker. """ import os import logging import argparse from workers.controller import Controller def parse_args(): parser = argparse.ArgumentParser(description='Starts the remote control worker.') parser.add_argument('--logpath', default=os.path.expanduser('~/logs/arr.log'), ...
mit
-6,781,648,225,161,846,000
28.263158
85
0.66277
false
3.915493
false
false
false
migasfree/migasfree
migasfree/catalog/migrations/0003_4_14_packages_by_project.py
1
2349
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import migasfree.server.models.common class Migration(migrations.Migration): dependencies = [ ('server', '0022_4_14_computers'), ('catalog', '0002_4_14_versi...
gpl-3.0
-6,319,951,951,391,928,000
33.043478
114
0.553427
false
4.651485
false
false
false
robertostling/bnas
bnas/model.py
1
50808
"""Network models and submodels. The :class:`Model` class is used to encapsulate a set of Theano shared variables (model parameters), and can create symbolic expressions for model outputs and loss functions. This module also contains subclasses, such as :class:`Linear`, that function as building blocks for more compl...
gpl-3.0
-8,664,384,897,296,081,000
40.040388
85
0.531078
false
3.942578
false
false
false
cyliustack/sofa
bin/sofa_analyze.py
1
50661
import argparse import matplotlib matplotlib.use('agg') import csv import json import multiprocessing as mp import os import random import re import sys from functools import partial from operator import attrgetter, itemgetter import networkx as nx import numpy as np import pandas as pd import time from sofa_aisi impor...
apache-2.0
536,236,055,129,862,100
43.556728
259
0.541718
false
3.342857
false
false
false
kenmcc/mypywws
src/pywws/Process.py
1
29489
#!/usr/bin/env python # -*- coding: utf-8 -*- # pywws - Python software for USB Wireless Weather Stations # http://github.com/jim-easterbrook/pywws # Copyright (C) 2008-14 Jim Easterbrook jim@jim-easterbrook.me.uk # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU...
gpl-2.0
-5,708,486,361,000,318,000
35.953634
101
0.555733
false
3.624954
false
false
false
xolox/python-linux-utils
linux_utils/tabfile.py
1
2307
# linux-utils: Linux system administration tools for Python. # # Author: Peter Odding <peter@peterodding.com> # Last Change: February 9, 2020 # URL: https://linux-utils.readthedocs.io """Generic parsing of Linux configuration files like ``/etc/fstab`` and ``/etc/crypttab``.""" # Standard library modules. import re #...
mit
3,480,510,046,944,304,600
31.492958
93
0.662765
false
4.202186
true
false
false
sassoftware/rmake3
rmake/worker/resolvesource.py
1
30654
# # Copyright (c) SAS Institute 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 w...
apache-2.0
-3,809,415,997,018,213,000
41.872727
119
0.560057
false
4.353025
false
false
false
songyi199111/sentry
src/sentry/event_manager.py
2
19299
""" sentry.event_manager ~~~~~~~~~~~~~~~~~~~~ :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, print_function import logging import math import six from datetime import datetime, timedelta from django....
bsd-3-clause
-1,338,582,620,076,449,300
31.654822
97
0.56604
false
4.204575
false
false
false
theodoregoetz/wernher
sandbox/KRPC Testing.py
1
3144
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> %run -i 'KRPC.ipynb' # <codecell> conn = krpc.connect(name='laptop', address='192.168.1.9') ksc = conn.space_center vessel = ksc.active_vessel obt = vessel.orbit ap = vessel.auto_pilot con = vessel.control vrf = vessel.reference_frame srfrf = vessel....
gpl-3.0
4,061,962,225,214,920,700
17.690476
67
0.660828
false
2.470496
false
false
false
saltzm/yadi
yadi/datalog2sql/parse2tokens/parser_tests.py
1
6246
from .Parser import Parser p = Parser() #Tests to check syntax print(p.parsesentence("q.")) # Atom, zero arity print(p.parsesentence("q(x).")) # Atom, one var print(p.parsesentence("q('3').")) # Atom, string print(p.parse...
bsd-3-clause
-3,213,480,592,657,898,000
72.482353
127
0.553154
false
2.666951
false
true
false
blaisb/cfdemUtilities
cylinderPorosity/pythons/getParticlePositionsFOAM.py
1
2828
# This program converts OpenFOAM raw data to a text file containing information on the particles # in the format that can be read by the porosity code # # position (x y z) and radius # THIS PROGRAM REQUIRES A DIRECTORY particles in the main folder #In the current form of the software the radius must be fixed byu the...
lgpl-3.0
-5,991,427,169,702,565,000
22.966102
96
0.594413
false
3.050701
false
false
false
travistang/late_fyt
model.py
1
10888
from keras.models import * from keras.layers import * from keras.layers.advanced_activations import * from keras.callbacks import * from keras.optimizers import Adam from keras.initializers import * import tensorflow as tf from utils import huber_loss def guide_v1(): S = Input(shape = (64,64,12)) x = C...
mit
4,400,644,651,622,553,000
40.090566
116
0.591293
false
2.791795
false
false
false
wummel/linkchecker-gui
linkcheck_gui/syntax.py
1
3578
# -*- coding: iso-8859-1 -*- # Copyright (C) 2011-2016 Bastian Kleineidam # # 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 versi...
gpl-3.0
4,945,731,341,848,713,000
35.510204
73
0.604807
false
3.893362
false
false
false
boisde/Greed_Island
business_logic/order_collector/transwarp/validate.py
1
2044
#!/usr/bin/env python # coding:utf-8 import logging RECORD_NORMAL = 0 RECORD_DELETED = 1 RECORD_CHOICE = ( (RECORD_NORMAL, u'正常'), (RECORD_DELETED, u'已删除'), ) def is_valid_kw(obj, is_update=False, **kw): mappings = obj.__mappings__ if is_update and kw.get('deleted', None) == RECORD_DELETED: ...
mit
302,318,775,476,008,200
43.568182
137
0.555612
false
3.294118
false
false
false
Rbeuque74/brie-aurore
Brie/brie/websetup.py
1
1479
# -*- coding: utf-8 -*- """Setup the Brie application""" import logging import transaction from tg import config from brie.config.environment import load_environment __all__ = ['setup_app'] log = logging.getLogger(__name__) def setup_app(command, conf, vars): """Place any commands to setup brie here""" l...
bsd-2-clause
-5,205,969,752,594,157,000
24.947368
90
0.698445
false
3.616137
false
false
false
papallas/baxter_cashier
scripts/baxter_cashier_manipulation/src/environment_factory.py
1
6798
#!/usr/bin/env python """ Factory for Environments. This file contains some static classes that represents environments in real life. If Baxter for example is placed somewhere in a real environment let's name it "Robotics Lab" then we wish to define obstacles around Baxter in this specific environment. In...
gpl-3.0
8,566,268,127,867,704,000
34.968254
79
0.604884
false
4.117505
false
false
false
fynjah/django-pimp-my-filter
filter_manager/views.py
1
7132
import datetime try: import simplejson as json except ImportError: from django.utils import simplejson as json from django.conf import settings from django.contrib import auth from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound, HttpResponseForb...
bsd-3-clause
-1,585,255,892,386,726,400
32.483568
103
0.651711
false
3.221319
false
false
false
LaurentClaessens/phystricks
src/MathStructures.py
1
3272
# -*- coding: utf8 -*- ########################################################################### # This is part of the module phystricks # # phystricks 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...
gpl-3.0
3,012,877,965,020,561,000
40.417722
202
0.623472
false
3.778291
false
false
false
stefanwebb/tensorflow-models
tensorflow_models/models/vae_normal_obs.py
1
5404
# MIT License # # Copyright (c) 2017, Stefan Webb. All Rights Reserved. # # 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 us...
mit
4,858,192,034,011,259,000
45.586207
125
0.744078
false
3.180695
false
false
false
lamestation/packthing
packthing/util.py
1
7019
import errno import os import platform import shutil import string import subprocess import sys import tarfile import zipfile from contextlib import contextmanager def get_platform(): _platform = dict() _platform["system"] = platform.system().lower() machine = platform.machine().lower() if machine =...
gpl-3.0
2,858,408,366,746,371,000
23.371528
88
0.579855
false
3.719661
false
false
false
tklengyel/patchwork
apps/patchwork/views/xmlrpc.py
1
13846
# Patchwork - automated patch tracking system # Copyright (C) 2008 Jeremy Kerr <jk@ozlabs.org> # # This file is part of the Patchwork package. # # Patchwork 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; eith...
gpl-2.0
-7,321,025,644,502,314,000
30.114607
79
0.560162
false
4.12206
false
false
false
razisayyed/django-ads
ads/conf.py
1
1926
from django.conf import settings from appconf import AppConf from django.utils.translation import ugettext_lazy as _ gettext = lambda s: s class AdsConf(AppConf): class Meta: prefix = 'ads' GOOGLE_ADSENSE_CLIENT = None # 'ca-pub-xxxxxxxxxxxxxxxx' ZONES = { 'header': { 'na...
apache-2.0
5,576,397,388,752,822,000
26.913043
61
0.419522
false
3.546961
false
false
false
lukasmonk/lucaschess
Code/GestorTurnOnLights.py
1
12214
import time from Code import ControlPosicion from Code import Gestor from Code import Jugada from Code import TurnOnLights from Code.QT import QTUtil from Code.QT import QTUtil2 from Code.Constantes import * class GestorTurnOnLights(Gestor.Gestor): def inicio(self, num_theme, num_block, tol): if hasattr...
gpl-2.0
7,487,070,209,496,803,000
34.923529
187
0.55682
false
3.16261
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/r-mzid/package.py
1
2260
############################################################################## # 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
-8,712,464,723,545,602,000
48.130435
122
0.670796
false
3.779264
false
false
false
sg-/project_generator
project_generator/builders/gccarm.py
1
1789
# Copyright 2014 0xc0170 # # 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, soft...
apache-2.0
6,599,894,252,396,413,000
34.078431
75
0.628284
false
4.075171
false
false
false
pu239ppy/authentic2
authentic2/migrations/0011_auto__add_authenticationevent.py
1
4418
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration from authentic2.compat import user_model_label class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'AuthenticationEvent' db.create_table(u'authentic2_authenticationevent', ( (u'i...
agpl-3.0
-636,708,911,938,553,300
57.906667
187
0.559982
false
3.642209
false
false
false
bgris/ODL_bgris
odl/trafos/util/ft_utils.py
1
23184
# Copyright 2014, 2015 The ODL development group # # This file is part of ODL. # # ODL 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. ...
gpl-3.0
-1,737,695,355,543,527,700
34.180577
79
0.598516
false
3.773438
false
false
false
allenai/document-qa
docqa/text_preprocessor.py
1
7061
from collections import Counter from typing import List, Optional, Tuple import numpy as np from tqdm import tqdm from docqa.utils import flatten_iterable from docqa.data_processing.document_splitter import ExtractedParagraphWithAnswers, MergeParagraphs, ExtractedParagraph from docqa.data_processing.multi_paragraph_q...
apache-2.0
8,086,274,971,685,163,000
37.172973
129
0.584195
false
3.712408
false
false
false
hylje/tekis
tekis/flatpages/migrations/0003_auto_20160221_0250.py
1
1533
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-02-21 00:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('flatpages', '0002_auto_20160221_0006'), ] operations = [ migrations.CreateMo...
bsd-3-clause
-2,971,475,573,143,553,500
38.307692
262
0.580561
false
4.430636
false
false
false
kowey/attelo
attelo/harness/parse.py
1
5021
''' Control over attelo parsers as might be needed for a test harness ''' from __future__ import print_function from os import path as fp import os import sys from joblib import (delayed) from ..io import (write_predictions_output) from attelo.decoding.util import (prediction_to_triples) from attelo.fold import (sel...
gpl-3.0
2,330,291,924,736,310,300
28.710059
73
0.626967
false
3.651636
false
false
false
DailyActie/Surrogate-Model
surrogate/selection/selRoulette.py
1
2509
# MIT License # # Copyright (c) 2016 Daily Actie # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
mit
1,467,734,263,457,390,600
38.203125
80
0.707852
false
4.099673
false
false
false
aroth-arsoft/arsoft-web-crashupload
app/crashdump/utils.py
1
24246
#!/usr/bin/python # -*- coding: utf-8 -*- # kate: space-indent on; indent-width 4; mixedindent off; indent-mode python; crashdump_use_jinja2 = False def _(msg): return msg def tag_a(name, title=None, href=None, alt=None): from xml.etree.ElementTree import Element, tostring a = Element('a') a.text = n...
gpl-3.0
-138,188,937,514,413,520
34.39562
137
0.558443
false
3.501733
false
false
false
libicocco/poser-hand-generator
createGraspICRA09.py
1
3429
# creatGraspICRA09.py - script for creating a hand poses database # # Copyright (c) 2009 Javier Romero # # Author: Javier Romero <jrgn@kth.se> # # 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 Found...
gpl-2.0
4,005,655,278,173,334,000
39.313253
79
0.656168
false
3.384995
false
false
false
jeffmacinnes/pyneal
pyneal_scanner/utils/Siemens_utils.py
1
30222
""" Set of classes and methods specific to Siemens scanning environments """ from __future__ import print_function from __future__ import division import os from os.path import join import sys import time import re import json import glob import logging from threading import Thread from queue import Queue import num...
mit
7,839,139,264,983,837,000
38.713535
128
0.623552
false
4.091795
false
false
false
rnelson/adventofcode
advent2015/day08.py
1
2659
#!/usr/bin/env python """ http://adventofcode.com/day/8 Part 1 ------ Space on the sleigh is limited this year, and so Santa will be bringing his list as a digital copy. He needs to know how much space it will take up when stored. It is common in many programming languages to provide a way to escape special character...
mit
7,221,743,905,681,149,000
29.918605
69
0.703272
false
3.921829
false
false
false
bfollinprm/Nquintessence
cosmoslik/cosmoslik_plugins/likelihoods/wmap/wmap.py
1
2594
from numpy import zeros from cosmoslik import Likelihood, SubprocessExtension import os class wmap(Likelihood): """ =============== WMAP Likelihood =============== - Written by WMAP team (see `<http://lambda.gsfc.nasa.gov/>`_) - CosmoSlik module by Marius Millea - Updated July 1, 2012 ...
mit
-6,767,131,946,119,144,000
24.683168
125
0.515806
false
3.786861
false
false
false
yaricom/brainhash
src/experiment_cA7_dt_th_al_ah_bl_bh_gl.py
1
2069
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ The experiment with 10 Hz/5Hz, wisp, attention, 70, cA 7, delta, theta, alpha low, alpha high, beta low, beta high, gamm low, batch size = 5 and balanced data set @author: yaric """ import experiment as ex import config from time import time n_hidden = 7 batch_size...
gpl-3.0
5,035,609,485,294,253,000
31.328125
145
0.640889
false
3.134848
true
false
false
pbanaszkiewicz/amy
amy/extrequests/filters.py
1
7324
import re from django.db.models import Q from django.forms import widgets import django_filters from extrequests.models import SelfOrganisedSubmission, WorkshopInquiryRequest from workshops.fields import Select2Widget from workshops.filters import ( AllCountriesFilter, AMYFilterSet, ContinentFilter, F...
mit
-316,208,959,969,467,600
31.264317
83
0.560213
false
4.5775
false
false
false
jmcanterafonseca/fiware-cygnus
test/acceptance/tools/ckan_utils.py
1
14123
# -*- coding: utf-8 -*- # # Copyright 2015 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of fiware-cygnus (FI-WARE project). # # fiware-cygnus 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 Foun...
agpl-3.0
-1,284,196,080,977,096,200
46.864407
174
0.610552
false
3.881253
false
false
false
alphagov/notifications-delivery
tests/clients/test_aws_ses.py
1
1062
from moto import mock_ses from notifications_delivery.clients.email.aws_ses import (AwsSesClient, AwsSesClientException) @mock_ses def test_send_email(ses_client): aws_ses_client = AwsSesClient(region='eu-west-1') source = "source@notify.gov.uk" to_address = "random@random.com" subject = "Email subjec...
mit
3,366,847,243,641,234,400
35.62069
94
0.704331
false
3.267692
false
false
false
cocrawler/cocrawler
cocrawler/fetcher.py
1
10249
''' async fetching of urls. Assumes robots checks have already been done. Success returns response object and response bytes (which were already read in order to shake out all potential network-related exceptions.) Failure returns enough details for the caller to do something smart: 503, other 5xx, DNS fail, connect...
apache-2.0
-2,570,987,281,301,282,000
40.662602
141
0.630891
false
4.181559
false
false
false
lukaszkoczwara/presence-analyzer-lkoczwara
src/presence_analyzer/helpers.py
1
1777
# -*- coding: utf-8 -*- """ Helper functions used in views. """ from json import dumps from functools import wraps from flask import Response def jsonify(function): """ Creates a response with the JSON representation of wrapped function result. """ @wraps(function) def inner(*args,...
mit
-492,233,173,606,348,740
24.924242
79
0.601013
false
3.993258
false
false
false
CompSci17/Survey-System
survey_system_files/results.py
1
11810
from .models import Answers, RadioResults, SelectResults, ImportanceOrderResults, CheckboxResults from chartit import DataPool, Chart class Results( ): def render_results( self, questions, survey ): """ Sorts out logic behind how we present our answers. @param questions QuerySet Questions we're working with...
mit
-1,745,348,226,818,002,700
27.807317
97
0.590686
false
3.710336
false
false
false
luckielordie/conan
conans/model/info.py
1
13408
import os from conans.client.build.cppstd_flags import cppstd_default from conans.errors import ConanException from conans.model.env_info import EnvValues from conans.model.options import OptionsValues from conans.model.ref import PackageReference from conans.model.values import Values from conans.paths import CONANIN...
mit
-8,335,431,246,790,530,000
32.7733
95
0.598747
false
4.008371
false
false
false
HewlettPackard/oneview-ansible
library/oneview_network_set_facts.py
1
4474
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2020) Hewlett Packard Enterprise Development LP # # 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/licen...
apache-2.0
-7,717,356,519,994,723,000
25.790419
104
0.673894
false
3.753356
false
false
false
anntzer/scikit-learn
sklearn/utils/_estimator_html_repr.py
1
9497
from contextlib import closing from contextlib import suppress from io import StringIO from string import Template import uuid import html from sklearn import config_context class _VisualBlock: """HTML Representation of Estimator Parameters ---------- kind : {'serial', 'parallel', 'single'} ...
bsd-3-clause
-6,215,935,959,145,116,000
28.77116
87
0.605349
false
3.611027
false
false
false
henry0312/LightGBM
python-package/lightgbm/basic.py
1
150238
# coding: utf-8 """Wrapper for C API of LightGBM.""" import ctypes import json import os import warnings from collections import OrderedDict from copy import deepcopy from functools import wraps from logging import Logger from tempfile import NamedTemporaryFile from typing import Any, Dict, List, Set, Union import num...
mit
6,481,589,992,037,159,000
41.512168
161
0.553914
false
4.200816
false
false
false
llvm/llvm-zorg
zorg/buildbot/builders/AnnotatedBuilder.py
1
3401
from buildbot.process.properties import WithProperties from buildbot.steps.shell import SetProperty from zorg.buildbot.commands.AnnotatedCommand import AnnotatedCommand from zorg.buildbot.process.factory import LLVMBuildFactory def getAnnotatedBuildFactory( script, clean=False, depends_on_projects=None, ...
apache-2.0
84,255,668,484,032,700
34.427083
81
0.628051
false
4.077938
false
false
false
cbitterfield/JobCard
archive/bulkvideosize.py
1
3578
#!/opt/local/bin/python # encoding: utf-8 ''' bulkvideosize -- shortdesc bulkvideosize is a description It defines classes_and_methods @author: user_name @copyright: 2017 organization_name. All rights reserved. @license: license @contact: user_email @deffield updated: Updated ''' import sys import ...
gpl-3.0
-261,463,053,978,957,760
28.089431
149
0.58161
false
3.68866
false
false
false
Dapid/pywt
demo/dwt_signal_decomposition.py
1
1789
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import numpy as np import matplotlib.pyplot as plt import pywt ecg = np.load(os.path.join('data', 'ecg.npy')) data1 = np.concatenate((np.arange(1, 400), np.arange(398, 600), np.arange(601, 1024))) x = np.linspa...
mit
5,571,234,884,135,789,000
23.847222
80
0.536613
false
2.596517
false
false
false
danrg/RGT-tool
src/RGT/XML/SVG/Attribs/xlinkAttributes.py
1
4217
from RGT.XML.SVG.Attribs.basicSvgAttribute import BasicSvgAttribute from types import StringType class XlinkAttributes(BasicSvgAttribute): ATTRIBUTE_XLINK_HREF = 'xlink:href' ATTRIBUTE_XLINK_SHOW = 'xlink:show' ATTRIBUTE_XLINK_ACTUATE = 'xlink:actuate' ATTRIBUTE_XLINK_TYPE = 'xlink:type' ...
mit
2,037,298,200,612,529,700
32.867769
85
0.564857
false
4.183532
false
false
false
hsnr-gamera/gamera
gamera/gui/gaoptimizer/StopCriteriaPanel.py
1
4654
# # Copyright (C) 2012 Tobias Bolten # # 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 i...
gpl-2.0
-2,199,924,503,062,840,000
46.489796
94
0.613666
false
3.714286
false
false
false
BenKaehler/q2-feature-classifier
q2_feature_classifier/tests/__init__.py
1
1162
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2019, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
-7,658,275,673,037,822,000
32.2
78
0.598107
false
4.723577
false
false
false
kalyan02/dayone
do/lib.py
1
2300
from BeautifulSoup import BeautifulSoup as Soupify import urllib, re import settings import oauth2, urlparse, json from do import settings class DropboxAPI(object): def __init__(self, user): self.user = user dinfo = self.user.social_auth.get(provider='dropbox') access_token = urlparse.parse_qs( dinfo.extra_da...
gpl-2.0
-606,869,924,962,227,300
33.863636
126
0.677391
false
2.90404
false
false
false
cfobel/sconspiracy
Python/racy/plugins/qt/sconstools/qt4.py
1
21143
# ***** BEGIN LICENSE BLOCK ***** # Sconspiracy - Copyright (C) IRCAD, 2004-2010. # Distributed under the terms of the BSD Licence as # published by the Open Source Initiative. # ****** END LICENSE BLOCK ****** """SCons.Tool.qt Tool-specific initialization for Qt. There normally shouldn't be any need to import th...
bsd-3-clause
6,324,493,422,340,307,000
38.593633
130
0.593577
false
3.625965
false
false
false
jpopelka/fabric8-analytics-worker
f8a_worker/solver.py
1
37059
"""Classes for resolving dependencies as specified in each ecosystem.""" import anymarkup from bs4 import BeautifulSoup from collections import defaultdict from functools import cmp_to_key import logging from lxml import etree from operator import itemgetter from pip._internal.req.req_file import parse_requirements fr...
gpl-3.0
-6,675,852,524,338,168,000
35.320588
100
0.562799
false
4.107206
false
false
false
JohnLunzer/flexx
flexx/ui/widgets/_html.py
1
3211
""" Simple example: .. UIExample:: 75 from flexx import app, ui class Example(ui.Widget): def init(self): with ui.html.UL(): ui.html.LI(text='foo') ui.html.LI(text='bar') .. UIExample:: 150 from flexx import app, ui, ev...
bsd-2-clause
-7,527,310,105,070,645,000
27.415929
82
0.540953
false
4.111396
false
false
false
oskyar/test-TFG
TFG/urls.py
1
2144
from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.auth.views import login, logout_then_login from django.views.static import serve import logging from importlib import import_module from django.conf import settings from TFG.apps.ha...
gpl-2.0
830,453,397,419,805,600
34.7
90
0.668534
false
3.346875
false
false
false
dingzg/onepanel
lib/module/user.py
1
10650
#!/usr/bin/env python2.6 #-*- coding: utf-8 -*- # Copyright [OnePanel] # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-5,547,206,471,437,395,000
33.801347
100
0.543731
false
3.362394
false
false
false
Fat-Zer/FreeCAD_sf_master
src/Tools/updatefromcrowdin.py
11
12203
#!/usr/bin/python #*************************************************************************** #* * #* Copyright (c) 2009 Yorik van Havre <yorik@uncreated.net> * #* ...
lgpl-2.1
-2,449,099,759,645,174,300
44.87594
156
0.588462
false
3.916239
true
false
false
tlksio/tlksio
env/lib/python3.4/site-packages/logilab/astng/mixins.py
1
4348
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as publis...
mit
-2,813,748,875,574,029,000
34.639344
81
0.635005
false
4.082629
false
false
false
naturali/tensorflow
tensorflow/python/kernel_tests/variable_scope_test.py
1
35348
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-7,995,408,519,929,527,000
40.931198
80
0.606286
false
3.542239
true
false
false
madedotcom/photon-pump
test/conversations/test_read_all_events_stream_conversation.py
1
4703
from asyncio import Queue from uuid import uuid4 import pytest from photonpump import messages as msg, exceptions from photonpump import messages_pb2 as proto from photonpump.conversations import ReadAllEvents @pytest.mark.asyncio async def test_read_all_request(): output = Queue() convo = ReadAllEvents(m...
mit
23,669,084,093,015,520
26.828402
86
0.672549
false
3.651398
true
false
false
unixunion/python-libsolace
bin/solace-list-clients.py
1
4986
#!/usr/bin/env python """ Show solace clients and counts, optionally pump all stats into influxdb """ import logging import sys logging.basicConfig(format='[%(module)s] %(filename)s:%(lineno)s %(asctime)s %(levelname)s %(message)s', stream=sys.stderr) import libsolace.settingsloader as settings...
mit
-2,089,378,427,571,660,000
37.953125
140
0.609306
false
3.783005
false
false
false
espensirnes/paneltime
paneltime/system/system_arguments.py
1
8361
#!/usr/bin/env python # -*- coding: utf-8 -*- #This module contains the arguments class used to handle regression arguments import numpy as np import functions as fu import stat_functions as stat class arguments: """Sets initial arguments and stores static properties of the arguments""" def __init__(self,panel, a...
gpl-3.0
7,984,326,016,556,555,000
28.234266
139
0.668222
false
2.527509
false
false
false
praekelt/panya-event
event/models.py
1
1514
from django.db import models from django.core.urlresolvers import reverse from ckeditor.fields import RichTextField from panya.models import ModelBase PROVINCES = ( ('Eastern Cape', 'Eastern Cape'), ('Free State', 'Free State'), ('Gauteng', 'Gauteng'), ('KwaZulu-Natal', 'KwaZulu-Natal'), ('Limpopo...
bsd-3-clause
7,660,587,681,568,411,000
28.115385
83
0.637384
false
3.356984
false
false
false
xindiguo/pythonSynapseUtils
pythonSynapseUtils/synutils.py
1
4081
#!/usr/bin/env python import argparse import os import sys import synapseclient import hashlib import string script_path = os.path.dirname(__file__) local_module_path = os.path.abspath(os.path.join(script_path,'lib')) sys.path.append(local_module_path) import s3 STATIC_BUCKET = "static.synapse.org" def create_html...
apache-2.0
-1,364,867,809,172,800,000
33.008333
144
0.645675
false
3.435185
false
false
false
dddomodossola/remi
examples/onclose_window_app.py
1
1513
""" 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 ...
apache-2.0
-3,865,904,934,796,648,400
34.186047
121
0.662921
false
3.992084
false
false
false
opentripplanner/OTPQA
hreport.py
1
2481
import simplejson as json import numpy as np def parsetime(aa): if aa is None: return None return float( aa.split()[0] ) def main(filenames): if len(filenames)==0: return yield "<html>" yield """<head><style>table, th, td { border: 1px solid black; border-collapse: collapse; } th, td { text-ali...
gpl-3.0
-7,302,979,014,916,302,000
24.854167
204
0.614672
false
2.868208
false
false
false
pdamodaran/yellowbrick
yellowbrick/text/dispersion.py
1
10916
# yellowbrick.text.dispersion # Implementations of lexical dispersions for text visualization. # # Author: Larry Gray # Created: 2018-06-21 10:06 # # Copyright (C) 2018 District Data Labs # For license information, see LICENSE.txt # # ID: dispersion.py [] lwgray@gmail.com $ """ Implementation of lexical dispersion ...
apache-2.0
-2,299,755,290,369,907,200
33.764331
84
0.588402
false
4.501443
false
false
false
lucasberti/telegrao-py
plugins/apex.py
1
2106
import requests import json from api import send_message ENDPOINT = "https://public-api.tracker.gg/apex/v1/standard/profile/5/" PLAYERS = { 14160874: "bertoncio", 16631085: "beartz", 85867003: "R3TCH4", 52451934: "xisteaga", 10549434: "Axasdas123", 123123862: "MeroFabio", 569341...
mit
2,123,689,757,657,363,200
25
93
0.561254
false
3.337559
false
false
false
vik001ind/RSAExploits
RSAExploits/exploits/hastad.py
1
3524
""" Class defintion for simple hastad broadcast exploit """ from RSAExploits import util from RSAExploits.exploits.exploit import Exploit class Hastad(Exploit): """ Class providing a run interface to hastad broadcast exploit""" def run(self, rsadata_list, info_dict = None): """ Attempts to recove...
mit
-132,503,831,933,218,540
33.891089
80
0.542849
false
4.308068
false
false
false
aschleg/mathpy
mathpy/special/gamma.py
1
1555
# encoding=utf8 import numpy as np def k_function(n): r""" Returns the K-function up to a given integer n. Parameters ---------- n : int The length of the returned K-function as in :math:`K(n)`. Returns ------- array-like numpy array of the computed integers returne...
mit
-6,329,161,334,717,358,000
21.867647
114
0.573633
false
3.246347
false
false
false
maarteninja/ml2014
three/minimize.py
1
8935
#This program is distributed WITHOUT ANY WARRANTY; without even the implied #warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # #This file contains a Python version of Carl Rasmussen's Matlab-function #minimize.m # #minimize.m is copyright (C) 1999 - 2006, Carl Edward Rasmussen. #Python adaptation ...
gpl-2.0
-1,338,693,259,614,311,000
49.196629
97
0.484835
false
3.643964
false
false
false
GiulioRossetti/ndlib
ndlib/models/epidemics/IndependentCascadesModel.py
1
3628
from ..DiffusionModel import DiffusionModel import numpy as np import future.utils __author__ = 'Giulio Rossetti' __license__ = "BSD-2-Clause" __email__ = "giulio.rossetti@gmail.com" class IndependentCascadesModel(DiffusionModel): """ Edge Parameters to be specified via ModelConfig :param thresh...
bsd-2-clause
-6,692,687,738,186,138,000
35.28
118
0.507993
false
4.435208
false
false
false
Northeaster/TargetSentimentAnalysis
lib/rnn_cells/gru_cell.py
1
1575
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from lib.rnn_cells.base_cell import BaseCell from lib import linalg #*************************************************************** clas...
apache-2.0
-7,597,540,596,920,359,000
34.795455
68
0.486984
false
4.578488
false
false
false
cbenhagen/kivy
kivy/uix/textinput.py
1
108858
# -*- encoding: utf-8 -*- ''' Text Input ========== .. versionadded:: 1.0.4 .. image:: images/textinput-mono.jpg .. image:: images/textinput-multi.jpg The :class:`TextInput` widget provides a box for editable plain text. Unicode, multiline, cursor navigation, selection and clipboard features are supported. The :cl...
mit
6,712,873,367,837,512,000
34.263362
80
0.549193
false
3.997723
false
false
false
robcarver17/systematictradingexamples
plots_for_perhaps/compareoptmethods.py
1
22426
import numpy as np import matplotlib.pyplot as plt from matplotlib.pyplot import plot, show, xticks, xlabel, ylabel, legend, yscale, title, savefig, rcParams, figure, hist, text, bar, subplots import Image def file_process(filename): fig = plt.gcf() fig.set_size_inches(18.5,10.5) fig.savefig("/home/rob/%s....
gpl-2.0
4,701,163,412,939,915,000
30.408964
147
0.66463
false
3.352669
false
false
false
bqbn/addons-server
src/olympia/users/tests/test_user_utils.py
1
1451
# -*- coding: utf-8 -*- import pytest from olympia.amo.tests import user_factory from olympia.users.utils import ( UnsubscribeCode, system_addon_submission_allowed) def test_email_unsubscribe_code_parse(): email = u'nobody@mozîlla.org' token, hash_ = UnsubscribeCode.create(email) r_email = Unsubscri...
bsd-3-clause
2,683,786,618,169,446,000
31.133333
76
0.707469
false
3.031447
true
false
false
vst/normalazy
normalazy.py
1
27657
import copy import datetime from collections import OrderedDict from decimal import Decimal from functools import wraps from six import add_metaclass #: Defines the version of the `normalazy` library. __version__ = "0.0.3" def iffnotnull(func): """ Wraps a function, returns None if the first argument is Non...
bsd-2-clause
2,155,762,320,283,130,600
28.674893
120
0.576599
false
4.025764
false
false
false
CIECODE-Madrid/tipi-engine
stats/process_stats.py
1
6001
from tipi_data.models.stats import Stats from tipi_data.models.topic import Topic from tipi_data.models.initiative import Initiative class GenerateStats(object): def __init__(self): self.topics = Topic.objects() self.subtopics = self.topics.distinct('tags.subtopic') self.stats = Stats() ...
gpl-3.0
3,043,947,720,192,462,300
41.864286
130
0.481753
false
4.193571
false
false
false