repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
edx/edx-oauth2-provider
edx_oauth2_provider/tests/test_credentials.py
1
2833
""" Test email as username authentication """ from __future__ import absolute_import, division, print_function, unicode_literals import json import ddt from django.core.urlresolvers import reverse from provider.constants import CONFIDENTIAL, PUBLIC from .base import OAuth2TestCase from .factories import ClientFactor...
agpl-3.0
-2,953,483,770,073,217,000
25.476636
87
0.591246
false
timmartin/ScanManager
setup.py
1
1198
from setuptools import setup from codecs import open from os import path import glob here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name="scan_manager", version...
mit
-2,133,402,301,166,609,200
21.603774
78
0.606845
false
pculture/unisubs
apps/teams/workflows/teamworkflows.py
1
14051
# Amara, universalsubtitles.org # # Copyright (C) 2014 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your op...
agpl-3.0
7,985,709,267,886,165,000
34.1275
90
0.632197
false
commonsense/divisi
csc/divisi/recycling_set.py
1
3241
from ordered_set import OrderedSet from priodict import priorityDictionary class RecyclingSet(OrderedSet): __slots__ = ['items', 'indices', 'index', 'indexFor', '__contains__', '__getitem__', '__len__', 'count', 'maxsize', 'drop_listeners', 'priority'] def __init__(self, maxsi...
gpl-3.0
-7,574,904,923,457,729,000
29.28972
78
0.558161
false
epuzanov/ZenPacks.community.HPMon
ZenPacks/community/HPMon/modeler/plugins/community/snmp/HPFanMap.py
1
3236
################################################################################ # # This program is part of the HPMon Zenpack for Zenoss. # Copyright (C) 2008, 2009, 2010, 2011 Egor Puzanov. # # This program can be used under the GNU General Public License version 2 # You can find full information here: http://www.zen...
gpl-2.0
-2,512,895,411,321,758,700
33.425532
82
0.439122
false
hmcl/storm-apache
storm-client/src/py/storm/DistributedRPC.py
1
10668
#!/usr/bin/env python # # 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 # "...
apache-2.0
-3,341,553,864,955,557,000
33.412903
134
0.591207
false
juvvadi/keystone
keystone/logic/types/auth.py
1
5621
# Copyright (c) 2010-2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
4,376,412,600,012,934,700
32.064706
76
0.569294
false
nickmarton/Paxos-Distributed-Calendar
Classes/Node.py
1
24814
"""Node (User) Class for Paxos Calendar.""" import os import sys import time import thread import pickle import socket import logging from Bully import bully_algorithm from Appointment import Appointment from Calendar import Calendar from Proposer import Proposer from Acceptor import Acceptor class Node(object): ...
mit
-1,191,132,476,585,437,400
37.472868
97
0.503264
false
mizhi/mimecat
docs/conf.py
1
7984
# -*- coding: utf-8 -*- # # mimecat documentation build configuration file, created by # sphinx-quickstart on Wed Sep 11 12:01:01 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
mit
-8,834,379,199,522,356,000
31.193548
80
0.70516
false
uw-it-aca/course-dashboards
coursedashboards/migrations/0014_auto_20200911_2040.py
1
1189
# Generated by Django 2.1.15 on 2020-09-11 20:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coursedashboards', '0013_auto_20190108_2238'), ] operations = [ migrations.CreateModel( name='CourseGradeAverage', ...
apache-2.0
5,090,606,726,105,432,000
32.971429
147
0.544996
false
kdar/rconsoft
setup.py
1
2919
#!/usr/bin/env python # Read LICENSE for licensing details. import sys import textwrap import glob import shutil import os app_name = 'rconsoft' #----------------------------- # Do some checks if sys.version_info < (2, 4, 0): sys.stderr.write(app_name+' requires Python 2.4 or newer.\n') sys.exit(-1) try: f...
mit
1,058,570,883,171,243,500
28.484848
121
0.564919
false
vim-python/python-syntax
tests/test.py
1
4201
#! /usr/bin/env python # -*- coding: utf-8 -*- # Above the run-comment and file encoding comment. # Comments. # TODO FIXME XXX # Keywords. with break continue del return pass raise global assert lambda yield for while if elif else import as try except finally self cls mcs from test import var as name raise Excep...
mit
-3,624,663,839,608,986,000
13.02027
87
0.63253
false
jbenden/ansible
lib/ansible/modules/cloud/misc/serverless.py
1
6837
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ryan Scott Brown <ryansb@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.0',...
gpl-3.0
280,174,094,090,039,230
31.402844
152
0.655404
false
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py
1
2121
# 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 ...
mit
-2,492,063,701,815,970,000
46.133333
102
0.654408
false
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
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
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
stlcoin/stl
contrib/spendfrom/spendfrom.py
1
10053
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a stlcoind or Stl...
mit
7,158,991,375,966,233,000
36.651685
111
0.619815
false
aarpon/obit_microscopy_core_technology
core-plugins/microscopy/1/dss/drop-boxes/MicroscopyDropbox/LeicaTIFFSeriesCompositeDatasetConfig.py
1
12298
# -*- coding: utf-8 -*- """ Created on Feb 20, 2014 @author: Aaron Ponti """ import re from MicroscopyCompositeDatasetConfig import MicroscopyCompositeDatasetConfig from LeicaTIFFSeriesMaximumIntensityProjectionGenerationAlgorithm import LeicaTIFFSeriesMaximumIntensityProjectionGenerationAlgorithm from ch.systemsx.c...
apache-2.0
-3,528,645,985,797,396,500
35.930931
133
0.594406
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
catapult-project/catapult
dashboard/dashboard/file_bug_test.py
3
43198
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=too-many-lines from __future__ import print_function from __future__ import division from __future__ import absolute_import import datetim...
bsd-3-clause
6,918,287,774,553,883,000
41.3095
80
0.616209
false
vi4m/django-dedal
runtests.py
1
1164
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="dedal.urls", INSTALLED_APPS=[ "d...
bsd-3-clause
4,278,701,809,169,851,000
20.163636
85
0.552405
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
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
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
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
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
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
Times-0/Timeline
Timeline/PacketHandler/UserHandler.py
1
3401
from Timeline.Server.Constants import TIMELINE_LOGGER, PACKET_TYPE, PACKET_DELIMITER, LOGIN_SERVER, WORLD_SERVER, LOGIN_SERVER_ALLOWED from Timeline.Utils.Events import PacketEventHandler from twisted.internet import threads from twisted.internet.defer import Deferred from collections import deque import loggi...
gpl-3.0
2,546,374,903,917,814,300
41.628205
134
0.723023
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
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
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
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
jimporter/bfg9000
test/unit/shell/test_shell.py
1
5850
import sys from unittest import mock from .. import * from bfg9000.path import Root from bfg9000.safe_str import jbos from bfg9000.shell import (CalledProcessError, convert_args, execute, Mode, split_paths, which) base_dirs = { Root.srcdir: '$(srcdir)', Root.builddir: None, } cla...
bsd-3-clause
-537,182,260,989,453,700
38
79
0.547521
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
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
zhangg/trove
integration/tests/integration/tests/volumes/driver.py
1
21014
# Copyright (c) 2012 OpenStack, LLC. # 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 requi...
apache-2.0
7,793,867,989,542,511,000
37.416819
79
0.607452
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
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
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
nwjs/chromium.src
third_party/blink/tools/blinkpy/web_tests/layout_package/bot_test_expectations.py
1
13338
# Copyright (C) 2013 Google 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 conditions and the ...
bsd-3-clause
5,242,296,614,790,762,000
41.88746
103
0.64185
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
mpdavis/python-jose
tests/test_jwk.py
1
5083
import pytest from jose import jwk from jose.backends import AESKey, ECKey, HMACKey, RSAKey from jose.backends.base import Key from jose.exceptions import JWKError hmac_key = { "kty": "oct", "kid": "018c0ae5-4d9b-471b-bfd6-eef314bc7037", "use": "sig", "alg": "HS256", "k": "hJtXIZ2uSN5kbQfbtTNWbpdm...
mit
-2,887,430,949,809,869,000
34.298611
362
0.645485
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
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
Exirel/python-xmlunittest
test.py
1
55350
# -*- coding: utf-8 -*- from __future__ import unicode_literals import io import os import unittest from lxml import etree from xmlunittest import XmlTestCase DEFAULT_NS = 'https://www.w3.org/XML' TEST_NS = 'https://docs.python.org/3.4/library/unittest.html' class TestXmlTestCase(unittest.TestCase): """Test ...
mit
-2,761,722,860,377,451,500
38.135078
100
0.555379
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
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
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
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
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
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
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
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
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
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
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
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
nexdatas/configtool
test/__main__.py
1
4436
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
gpl-3.0
-8,829,642,283,114,767,000
26.725
79
0.732867
false
chrisxue815/leetcode_python
problems/test_0093_iterative_post_validate.py
1
1973
import unittest class Solution: def restoreIpAddresses(self, s): """ :type s: str :rtype: List[str] """ result = [] slen = len(s) # [0,p1) [p1,p2) [p2,p3) [p3,slen) for p1 in range(1, 4): for p2 in range(p1 + 1, p1 + 4): f...
unlicense
2,302,830,249,286,819,600
27.594203
70
0.331475
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
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
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
ENCODE-DCC/encoded
src/encoded/tests/test_upgrade_file.py
1
8535
import pytest def test_file_upgrade(upgrader, file_1): value = upgrader.upgrade('file', file_1, target_version='2') assert value['schema_version'] == '2' assert value['status'] == 'current' def test_file_upgrade2(root, upgrader, file_2, file, threadlocals, dummy_request): context = root.get_by_uuid(...
mit
7,095,645,240,905,272,000
40.033654
121
0.667018
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
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
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
myfavouritekk/TPN
src/tpn/recurrent_extract_features.py
1
5385
#!/usr/bin/env python import os import os.path as osp import numpy as np import tensorflow as tf from model import TPNModel import argparse import glog as log import glob from data_io import tpn_test_iterator import cPickle def bbox_transform_inv(boxes, deltas): if boxes.shape[0] == 0: return np.zeros((0,...
mit
8,704,772,570,818,406,000
31.053571
102
0.622284
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
jwinzer/OpenSlides
server/openslides/agenda/models.py
1
20000
from collections import defaultdict from typing import Dict, List, Set from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models, transact...
mit
8,516,494,536,356,955,000
32.898305
96
0.58865
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
mattrobenolt/python-sourcemap
tests/test_objects.py
1
1747
try: import unittest2 as unittest except ImportError: import unittest from sourcemap.objects import Token, SourceMapIndex class TokenTestCase(unittest.TestCase): def test_eq(self): assert Token(1, 1, 'lol.js', 1, 1, 'lol') == Token(1, 1, 'lol.js', 1, 1, 'lol') assert Token(99, 1, 'lol.js',...
bsd-2-clause
6,267,878,097,871,203,000
25.074627
88
0.516314
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
frewsxcv/python-geojson
tests/test_strict_json.py
1
1529
""" GeoJSON produces and consumes only strict JSON. NAN and Infinity are not permissible values according to the JSON specification. """ import unittest import geojson class StrictJsonTest(unittest.TestCase): def test_encode_nan(self): """ Ensure Error is raised when encoding nan """ ...
bsd-3-clause
4,059,820,129,994,343,400
26.303571
76
0.543492
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
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
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
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
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
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
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
accraze/bitcoin
qa/pull-tester/rpc-tests.py
1
8302
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Run Regression Test Suite This module calls down into individual test cases via subprocess. It will ...
mit
6,671,498,825,894,520,000
29.522059
91
0.607564
false
isyippee/nova
nova/tests/unit/objects/test_compute_node.py
1
25221
# Copyright 2013 IBM Corp. # # 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 agree...
apache-2.0
-4,816,332,282,331,989,000
43.718085
79
0.612545
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
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
EasyPost/easypost-python
tests/test_pickup.py
1
4491
# Unit tests related to 'Pickups' (https://www.easypost.com/docs/api#pickups). import time import datetime import easypost import pytest import pytz ONE_DAY = datetime.timedelta(days=1) @pytest.fixture def noon_on_next_monday(): today = datetime.date.today() next_monday = today + datetime.timedelta(days=(7 ...
mit
-7,046,206,442,330,147,000
27.605096
108
0.529281
false
Data-Mechanics/dml
dml/dml.py
1
7488
############################################################################### ## ## dml.py ## ## Python library providing common functionalities for building Data ## Mechanics platform components. ## ## Web: datamechanics.org ## Version: 0.0.16.0 ## ## import sys # To parse command line arguments. i...
mit
-5,271,523,373,676,222,000
37.803109
131
0.667468
false
DirectlineDev/django-robokassa-merchant
robokassa_merchant/conf.py
1
1761
# -*- coding: utf-8 -*- from django.conf import settings class Conf: """ Класс конфигурации для робокассы, берёт настройки из settings.ROBOKASSA_CONF """ # todo: в большинстве случаев 1 магазин на 1 сайт - сделать необязательным параметр token # обязательные параметры - реквизиты магазина LOGIN ...
mit
460,906,213,722,533,950
35.05
93
0.670596
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
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
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
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
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
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
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
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
peterlei/fboss
fboss/system_tests/system_tests.py
1
6328
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import importlib import logging import os import sys import unittest user_requested_tags = [] Defaults = { "test_dirs": ['tests'], "config": 'te...
bsd-3-clause
2,836,203,080,817,214,000
34.155556
82
0.642225
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
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
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