repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
EmanueleCannizzaro/scons
bench/lvars-gvars.py
1
1873
# Copyright (c) 2001 - 2016 The SCons Foundation # # Functions and data for timing different idioms for fetching a keyword # value from a pair of dictionaries for localand global values. This was # used to select how to most efficiently expand single $KEYWORD strings # in src/engine/SCons/Subst.py. def Func1(var, gva...
mit
-3,151,724,184,033,550,000
22.708861
73
0.504538
false
tmerrick1/spack
var/spack/repos/builtin/packages/json-cwx/package.py
5
1884
############################################################################## # Copyright (c) 2013-2018, 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
300,489,413,882,208,700
38.25
78
0.654989
false
barryrobison/anim-studio-tools
miki/tests/unit/fixtures/test_project/sources/python/hello_world/greeter.py
10
1178
# # Dr. D Studios # --------------------------------------------------- class Greeter(object): """ A greeter """ def __init__(self): pass def greet(self, who="World"): """ Greet the entity identified by who. :param who: the entity to greet ...
gpl-3.0
1,556,568,553,773,310,200
28.45
80
0.626486
false
saguas/frappe
frappe/tasks.py
4
7009
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import enqueue_events from frappe.celery_app import get_celery, celery_task, task_logger, LONGJOBS_PREFIX, ASYNC_TASKS_PREFIX from frappe...
mit
1,875,879,779,954,429,200
26.061776
116
0.716793
false
byt3smith/CIRTKit
modules/reversing/viper/misp.py
1
27117
# -*- coding: utf-8 -*- # This file is part of Viper - https://github.com/cirtkit-framework/cirtkit # See the file 'LICENSE' for copying permission. import argparse import copy import textwrap import os import tempfile import time try: from pymisp import PyMISP HAVE_PYMISP = True except: HAVE_PYMISP = Fal...
mit
8,294,253,687,799,304,000
44.804054
164
0.534887
false
MengGuo/P_MAS_TG
P_MAS_TG/product.py
2
6557
# -*- coding: utf-8 -*- from buchi import check_label_for_buchi_edge from networkx.classes.digraph import DiGraph class ProdAut(DiGraph): def __init__(self, ts, buchi, alpha=100): DiGraph.__init__(self, ts=ts, buchi=buchi, alpha=alpha, initial=set(), accept=set(), type='ProdAut') def build_full(self): for f_...
gpl-2.0
7,716,219,575,715,468,000
41.303226
187
0.61278
false
nsmoooose/csp
csp/tools/hid/compiler.py
1
14066
#!/usr/bin/env python # Combat Simulator Project # Copyright (C) 2002, 2004 The Combat Simulator Project # http://csp.sourceforge.net # # 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 ve...
gpl-2.0
-4,111,307,504,175,949,000
25.539623
127
0.619366
false
Daksh/Labyrinth
src/utils.py
3
7524
# functions.py # This file is part of labyrinth # # Copyright (C) 2006 - Don Scorgie # - Andreas Sliwka # # labyrinth 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 ...
gpl-2.0
-3,324,882,422,411,084,000
28.162791
132
0.655237
false
accesso/beets
beets/util/pipeline.py
16
15774
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
mit
4,659,655,459,678,847,000
29.510638
78
0.554774
false
bartvm/pylearn2
pylearn2/tests/test_monitor.py
10
19866
from __future__ import print_function import numpy as np import warnings from nose.tools import assert_raises from theano.compat.six.moves import xrange from theano.compat import exc_message from theano import shared from theano import tensor as T from pylearn2.compat import OrderedDict from pylearn2.costs.cost impo...
bsd-3-clause
-7,102,661,790,164,431,000
31.674342
109
0.607571
false
Charlotte-Morgan/inasafe
safe/gis/vector/summary_tools.py
3
4197
# coding=utf-8 """Some helpers about the summary calculation.""" from safe.common.exceptions import InvalidKeywordsForProcessingAlgorithm from safe.definitions.fields import count_fields from safe.definitions.utilities import definition from safe.gis.vector.tools import create_field_from_definition from safe.utilitie...
gpl-3.0
-413,518,663,253,189,060
36.141593
77
0.669049
false
roshantha9/AbstractManycoreSim
src/libMappingAndScheduling/FullyDynamic/TaskMappingSchemesFullyDynImpl.py
1
9856
import pprint import sys import itertools import simpy import random import numpy as np import copy from operator import itemgetter from SimParams import SimParams from TaskMappingSchemesFullyDyn import TaskMappingSchemesFullyDyn from libApplicationModel.MPEG2FrameTask import MPEG2FrameTask # once a stream has entere...
gpl-3.0
3,292,631,927,698,145,300
44.215596
146
0.52293
false
ryanvolz/echolect
echolect/jicamarca/read_raw.py
1
8787
#----------------------------------------------------------------------------- # Copyright (c) 2014, Ryan Volz # All rights reserved. # # Distributed under the terms of the BSD 3-Clause ("BSD New") license. # # The full license is in the LICENSE file, distributed with this software. #-----------------------------------...
bsd-3-clause
6,069,952,704,976,291,000
36.875
96
0.563218
false
trevorlinton/skia
tools/test_pictures.py
1
3730
''' Copyright 2012 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Compares the rendererings of serialized SkPictures to expected images. Launch with --help to see more information. TODO(epoger): We believe this tool is no longer used, so we have disable...
bsd-3-clause
-6,362,725,651,724,217,000
34.52381
80
0.615282
false
Architektor/PySnip
venv/lib/python2.7/site-packages/twisted/conch/manhole_tap.py
2
5368
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ TAP plugin for creating telnet- and ssh-accessible manhole servers. @author: Jp Calderone """ from zope.interface import implementer from twisted.internet import protocol from twisted.application import service, strports from twisted.cred i...
gpl-3.0
6,628,137,803,690,558,000
31.533333
79
0.623137
false
anttisalonen/freekick
haskell/freekick_client/client/client.py
1
4280
#!/usr/bin/env python #Import Modules import os, pygame from pygame.locals import * import socket import time if not pygame.font: print 'Warning, fonts disabled' if not pygame.mixer: print 'Warning, sound disabled' HOST = '127.0.0.1' PORT = 32105 #functions to create our resources def load_image(name, colorkey=Non...
agpl-3.0
-8,137,787,234,100,647,000
21.765957
70
0.686916
false
smajda/django-nopassword
nopassword/models.py
1
2559
# -*- coding: utf-8 -*- import os import hashlib from datetime import datetime from django.conf import settings from django.core.urlresolvers import reverse_lazy from django.contrib.auth import get_backends from django.utils.translation import ugettext_lazy as _ from django.db import models from .utils import get_use...
mit
-5,259,420,100,959,596,000
34.541667
88
0.612739
false
flexiant/qemu-kvm-1.0-noroms
scripts/qapi-visit.py
47
6227
# # QAPI visitor generator # # Copyright IBM, Corp. 2011 # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # Michael Roth <mdroth@linux.vnet.ibm.com> # # This work is licensed under the terms of the GNU GPLv2. # See the COPYING.LIB file in the top-level directory. from ordereddict import OrderedDict from qapi ...
gpl-2.0
7,340,959,605,214,568,000
24.313008
102
0.57877
false
TheWardoctor/Wardoctors-repo
plugin.video.saltsrd.lite/scrapers/rlsbb_scraper.py
5
6952
""" SALTS XBMC Addon Copyright (C) 2014 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. T...
apache-2.0
8,934,660,911,376,518,000
44.437908
191
0.595368
false
avlec/tdo
CommonUtil.py
1
3010
import random import socket import string import re # ---------------------------------------------------------------------------------------------------------------------------------- # utility classes, Message, Queue, connection error # -----------------------------------------------------------------------...
mit
-5,033,775,846,012,898,000
33.833333
132
0.391694
false
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Tools/ssl/get-remote-certificate.py
43
2512
#!/usr/bin/env python # # fetch the certificate that the server(s) are providing in PEM form # # args are HOST:PORT [, HOST:PORT...] # # By Bill Janssen. import sys def fetch_server_certificate (host, port): import re, tempfile, os, ssl def subproc(cmd): from subprocess import Popen, PIPE, STDOUT ...
mit
-1,442,948,094,100,893,200
30.797468
77
0.495223
false
jiriprochazka/lnst
recipes/switchdev/l2-018-bridge_fdb_team.py
1
4141
""" Copyright 2016 Mellanox Technologies. All rights reserved. Licensed under the GNU General Public License, version 2 as published by the Free Software Foundation; see COPYING for details. """ __author__ = """ jiri@mellanox.com (Jiri Pirko) idosch@mellanox.com (Ido Schimmel) """ from lnst.Controller.Task import ctl...
gpl-2.0
1,597,296,288,476,793,300
37.700935
83
0.645255
false
DropD/flask-mongorest
flask_mongorest/__init__.py
1
2434
from flask import Blueprint from flask_mongorest.methods import Create, BulkUpdate, List class MongoRest(object): def __init__(self, app=None, **kwargs): self.app = app self.url_prefix = kwargs.pop('url_prefix', '') if app: app.register_blueprint(Blueprint(self.url_prefix, __na...
bsd-3-clause
1,843,341,594,983,885,000
40.254237
126
0.540263
false
ppries/tensorflow
tensorflow/contrib/factorization/python/ops/gmm.py
3
7497
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-4,469,831,423,142,064,600
32.923077
86
0.64279
false
w1ll1am23/home-assistant
tests/components/jewish_calendar/__init__.py
6
2054
"""Tests for the jewish_calendar component.""" from collections import namedtuple from contextlib import contextmanager from datetime import datetime from unittest.mock import patch from homeassistant.components import jewish_calendar import homeassistant.util.dt as dt_util _LatLng = namedtuple("_LatLng", ["lat", "ln...
apache-2.0
-7,466,015,203,364,761,000
27.527778
84
0.64557
false
Radu-Raicea/Stock-Analyzer
flask/tests/test_stocks_database.py
1
2660
import unittest from tests.base_database_test import BaseTestCase from project.services.stocks import add_stock, get_stocks_from_google, get_stocks_from_db, object_to_dict, remove_stock from project.models.db_models import StockListEntry class TestStocksDatabase(BaseTestCase): def test_add_stock_successful(self...
bsd-3-clause
-377,951,880,165,579,900
38.117647
119
0.599624
false
Ambuj-UF/ConCat-1.0
src/Utils/Bio/GA/Mutation/Simple.py
1
3369
# This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # import sys # Add path to Bio sys.path.append('../../..') """Perform Simple mutations on an organism's genome. """ # standard modules import random ...
gpl-2.0
9,146,430,223,427,646,000
33.377551
84
0.64114
false
simone-campagna/zirkon
tests/unit/test_macro_str.py
2
2582
# -*- coding: utf-8 -*- import collections import pytest from zirkon.toolbox.macro import \ Macro, \ MRepr, MStr, MAnd, MOr, MNot, \ MConst, MLen ## unary _unary_str_operands = ["alpha", "", " a BC d "] @pytest.fixture(params=_unary_str_operands, ids=[str(o) for o in _unary_str_operands]) def sval1(re...
apache-2.0
-902,582,717,968,544,600
25.346939
100
0.606894
false
tuomur/python-odata
odata/query.py
1
10013
# -*- coding: utf-8 -*- """ Querying ======== Entities can be queried from a service with a Query object: .. code-block:: python query = Service.query(Order) Adding filters and other options always creates a new Query object with the given directives: .. code-block:: python >>> query.filter(Order.Name ==...
mit
7,064,138,357,231,815,000
28.023188
109
0.550784
false
JS-Wang/ONL
components/all/platform-config/powerpc-as5600-52x/src/python/onlpc.py
9
1491
#!/usr/bin/python ############################################################ # <bsn.cl fy=2013 v=onl> # # Copyright 2013, 2014 Big Switch Networks, Inc. # # Licensed under the Eclipse Public License, Version 1.0 (the # "License"); you may not use this file except in compliance # with the License. You ...
epl-1.0
4,628,076,359,511,251,000
27.132075
67
0.60161
false
Si-elegans/Web-based_GUI_Tools
wiki/models/__init__.py
2
3237
# -*- coding: utf-8 -*- from django import VERSION from django.conf import settings as django_settings from django.core.exceptions import ImproperlyConfigured import warnings from six import string_types # TODO: Don't use wildcards from .article import * from .urlpath import * # TODO: Should the below stuff be execu...
apache-2.0
-8,923,979,696,896,436,000
38
127
0.706827
false
danathughes/AtariRL
models/networks.py
1
3094
from models.parts import * import models.DeepQNetwork as DQN import models.DuelingDeepQNetwork as DDQN #import models.BootstrappedDeepQNetwork as BDQN # Network used in NIPS workshop paper NIPS = [Convolutional((8,8), 16, name='conv1', stride=4), Convolutional((4,4), 32, name='conv2', stride=2), ...
mit
1,635,867,582,961,085,700
36.289157
145
0.687783
false
chokribr/invenioold
modules/weblinkback/lib/weblinkback_dblayer.py
19
13394
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012 CERN. ## ## Invenio 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 opt...
gpl-2.0
-2,502,970,705,289,458,700
30.966587
128
0.517247
false
yhe39/crosswalk-test-suite
cordova/cordova-sampleapp-android-tests/sampleapp/spacedodge_launch.py
15
2005
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
-4,486,198,183,450,904,600
40.770833
80
0.74414
false
PcBoy111/PC-BOT-V2
plugins/pasta.py
3
3816
""" Plugin for copypastas Commands: pasta """ from copy import copy from difflib import get_close_matches from random import choice import discord import asyncio from pcbot import Config, Annotate, convert_to_embed import plugins client = plugins.client # type: discord.Client pastas = Config("pastas", data={...
mit
-1,040,539,061,657,005,200
35
106
0.665881
false
guru-digital/CouchPotatoServer
couchpotato/core/media/_base/providers/torrent/iptorrents.py
24
6666
import traceback from bs4 import BeautifulSoup from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.media._base.providers.torrent.base import TorrentProvider import six log = CPLog(__name__) c...
gpl-3.0
-4,985,774,881,613,976,000
37.755814
535
0.492799
false
akarol/cfme_tests
scripts/providers.py
8
2903
#!/usr/bin/env python2 """ Given the name of a provider from cfme_data and using credentials from the credentials stash, call the corresponding action on that provider, along with any additional action arguments. See wrapanapi for documentation on the callable methods themselves. Example usage: scripts/providers...
gpl-2.0
3,536,389,268,747,528,000
30.554348
95
0.657596
false
163gal/Time-Line
timelinelib/repositories/interface.py
2
1079
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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 th...
gpl-3.0
279,162,083,522,696,200
30.735294
90
0.728452
false
rainforestapp/rainforest-python
rainforest/apibits/requester.py
3
2533
from .errors import ConnectionError try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse try: from urllib import quote except ImportError: from urllib.parse import quote import json import requests requests.packages.urllib3.disable_warnings() class Requester(...
mit
-720,790,824,789,177,900
28.114943
117
0.577971
false
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/desktop/core/ext-py/guppy-0.1.10/specs/genguppydoc.py
35
1614
#._cv_part genguppydoc.py import guppy,os from os.path import join class GenGuppyDoc: extemplate = """\ .document: gslexample ..output: html ..h1: GSL Document and Test Example ..ul ...li ....a: Source Code .....href= #source ...li ....a: Generated Test Class .....href= #test ...li ....a: Generated Document ........
gpl-2.0
-5,570,589,833,901,071,000
19.961039
87
0.584882
false
sciyoshi/django-dbsettings
dbsettings/management.py
2
1579
from django import VERSION from django.db.models.signals import post_migrate def mk_permissions(permissions, appname, verbosity): """ Make permission at app level - hack with empty ContentType. Adapted code from http://djangosnippets.org/snippets/334/ """ from django.contrib.auth.models import Pe...
bsd-3-clause
6,876,226,081,068,077,000
38.475
98
0.60608
false
tuenti/Diamond
src/collectors/kvm/test/testkvm.py
29
3122
#!/usr/bin/python # coding=utf-8 ################################################################################ import os from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch try: from cStringIO import StringIO except Im...
mit
2,995,314,098,386,754,600
32.212766
80
0.528828
false
bbc/kamaelia
Sketches/MH/exceptions/Axon/util.py
3
3208
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
apache-2.0
-3,985,242,535,414,845,400
34.644444
208
0.673628
false
google/magic-github-proxy
src/magicproxy/proxy.py
1
3084
# Copyright 2018 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
1,708,118,067,547,426,600
27.036364
119
0.666991
false
mtbc/openmicroscopy
components/tools/OmeroPy/src/omero/processor.py
1
35039
#!/usr/bin/env python # -*- coding: utf-8 -*- # # OMERO Grid Processor # Copyright 2008 Glencoe Software, Inc. All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # import os import time import signal import logging import traceback import killableprocess as subprocess from path import pat...
gpl-2.0
-4,347,256,841,201,127,400
32.658982
133
0.568281
false
bnusss/flow_network_embedding
train.py
1
5686
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Read wiki data, generate word distance matrix and word counts matrix. """ from __future__ import print_function import re import os import glob import time import datetime import numpy as np from stop_words import get_stop_words from multiprocessing import Pool WIND...
mit
1,177,619,243,582,266,400
33.883436
564
0.533767
false
mxOBS/deb-pkg_trusty_chromium-browser
tools/perf/page_sets/startup_pages.py
9
1507
# Copyright 2014 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. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class StartedPage(page_module.Page): def __init__(s...
bsd-3-clause
-9,103,590,071,173,674,000
35.756098
80
0.712011
false
bird-house/pyramid-phoenix
phoenix/grid.py
1
8937
import os.path from webhelpers2.html.builder import HTML from webhelpers2.html.tags import checkbox from webhelpers2_grid import Grid import string # TODO replace by mako template from mako.lookup import TemplateLookup import logging logger = logging.getLogger(__name__) def get_value(record, attribute, default=No...
apache-2.0
6,346,959,205,103,435,000
40.957746
107
0.586327
false
the-nick-of-time/DnD
DnD/modules/conditions.py
1
6215
#! /usr/bin/env python3 import os import tkinter as tk import lib.classes as c import lib.components as gui import lib.helpers as h import lib.interface as iface class ConditionsDisplay(gui.Section): def __init__(self, container, character): gui.Section.__init__(self, container) self.character =...
gpl-2.0
-3,205,951,195,622,358,500
38.08805
119
0.602414
false
sankhesh/VTK
Examples/Infovis/Python/views.py
13
2777
#!/usr/bin/env python from __future__ import print_function from vtk import * import os.path from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() xmlRootDir = VTK_DATA_ROOT + "/Data/Infovis/XML/" if not os.path.exists(xmlRootDir): xmlRootDir = VTK_DATA_ROOT + "/Data/Infovis/XML/" treeReader = v...
bsd-3-clause
2,049,655,475,505,245,200
28.542553
70
0.826071
false
ringcentral/ringcentral-python
ringcentral/platform/auth.py
3
3491
#!/usr/bin/env python # encoding: utf-8 from time import time RELEASE_TIMEOUT = 10 class Auth: def __init__(self): self.__remember = False self.__token_type = '' self.__access_token = '' self.__expires_in = 0 self.__expire_time = 0 self.__refresh_token = '' ...
mit
-3,697,958,908,952,903,000
27.382114
100
0.559725
false
baryon5/powerschool
frontend/views.py
1
10430
from django.shortcuts import render, redirect from django.contrib import auth, messages from django.core.urlresolvers import reverse from django.db import IntegrityError from django.http import HttpResponse from pschool.db.models import * from config import config from django.conf import settings from urllib.reque...
apache-2.0
-4,248,411,113,740,800,500
44.33913
216
0.550729
false
wchan/tensorflow
tensorflow/python/kernel_tests/seq2seq_test.py
9
27933
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-5,055,769,601,004,579,000
44.716858
80
0.600007
false
bastibl/gnuradio
gr-blocks/python/blocks/qa_vector_insert.py
7
4182
#!/usr/bin/env python # # Copyright 2012-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your optio...
gpl-3.0
-3,117,207,810,475,315,700
33.85
114
0.62219
false
dgreisen-cfpb/github-wiki-search
server/search/ghe.py
2
1516
from server import settings ghe_settings = settings.GITHUB.get('GHE', {}) from universalclient import Client import urllib3 from server import utils from gh_wiki import index as gh_wiki from gh_readme import index as gh_readme from gh_pages import index as gh_pages from gh_issues import index as gh_issues ghe_api_cli...
cc0-1.0
7,123,530,974,722,925,000
44.939394
139
0.634565
false
yandex/mastermind
src/cocaine-app/db/mongo/pool.py
1
6933
# -*- coding: utf-8 -*- import logging import sys import time import re import threading import traceback from copy import deepcopy import pymongo from pymongo.collection import Collection as OriginalCollection from pymongo.mongo_replica_set_client import MongoReplicaSetClient as MRSC logger = logging.getLogger('mm....
gpl-2.0
7,402,237,006,484,349,000
32.331731
137
0.605943
false
Karaage-Cluster/karaage-debian
karaage/legacy/software/south_migrations/0003_auto__add_field_softwareversion_last_used.py
3
13676
# encoding: utf-8 from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'SoftwareVersion.last_used' db.add_column('software_version', 'last_used', self.gf('django.db.models.fields.DateField')(null=True, blank=True), ...
gpl-3.0
8,437,145,721,327,652,000
80.892216
246
0.550307
false
alexvmarch/atomic
exatomic/algorithms/tests/test_numerical.py
3
2021
# -*- coding: utf-8 -*- # Copyright (c) 2015-2018, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 # from ..numerical import fac, fac2, dfac21, _CFunction, _SFunction # # # class TestNumerical(TestCase): # def setUp(self): # self.ns = range(-2, 10) # # def test_fa...
apache-2.0
3,064,377,418,266,592,000
29.164179
67
0.518555
false
daspecster/google-cloud-python
core/google/cloud/streaming/transfer.py
10
46304
# Copyright 2016 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, ...
apache-2.0
-630,752,553,302,735,000
36.860998
88
0.596795
false
gnudeep/app-cloud
modules/deployments/file-server/SimpleAuthServer.py
4
1534
import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler import sys import base64 key = "" class AuthHandler(SimpleHTTPRequestHandler): ''' Main class to present webpages and authentication. ''' def do_HEAD(self): print "send header" self.send_response(200) self.send...
apache-2.0
5,201,492,375,300,044,000
30.326531
69
0.623859
false
wang1986one/pyo
pyolib/controls.py
6
24489
""" Objects designed to create parameter's control at audio rate. These objects can be used to create envelopes, line segments and conversion from python number to audio signal. The audio streams of these objects can't be sent to the output soundcard. """ """ Copyright 2009-2015 Olivier Belanger This file is part ...
gpl-3.0
9,073,059,060,016,512,000
30.397436
172
0.566173
false
gisce/sippers
sippers/parsers/parser.py
1
1974
# -*- coding: utf-8 -*- from __future__ import absolute_import from datetime import datetime import os import re from sippers import logger from sippers.exceptions import ParserNotFoundException def parse_datetime(value, dataformat): # Funcio per l'add_formatter converteixi de string a datetime try: ...
gpl-3.0
2,402,199,218,997,416,000
20.445652
76
0.601115
false
jelugbo/hebs_master
common/djangoapps/student/migrations/0041_add_dashboard_config.py
6
13751
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'DashboardConfiguration' db.create_table('student_dashboardconfiguration', ( ('id...
agpl-3.0
-2,397,422,053,915,508,700
75.826816
182
0.551887
false
bdarnell/tornado
demos/webspider/webspider.py
6
2739
#!/usr/bin/env python3 import time from datetime import timedelta from html.parser import HTMLParser from urllib.parse import urljoin, urldefrag from tornado import gen, httpclient, ioloop, queues base_url = "http://www.tornadoweb.org/en/stable/" concurrency = 10 async def get_links_from_url(url): """Download...
apache-2.0
-7,385,312,969,050,922,000
26.94898
87
0.599489
false
DevinDewitt/pyqt5
examples/multimedia/audiodevices/audiodevices.py
3
10856
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENSE:BSD$ #...
gpl-3.0
1,947,262,135,083,250,200
37.910394
81
0.620855
false
kpegion/SubX
Python/create_climatology/createclim_full_template.py
1
3076
""" Create SubX daily climatology. The file is filled in by generate_full_clim.ksh. """ import os import xarray as xr import numpy as np import pandas as pd # Inputs outPath = 'outdir' ft = 'ftype' mo = 'mod' ins = 'inst' va = 'var' pl = plev subsampletime = subsampleS starttime = 'startS' endtime = 'endS' url = 'h...
mit
-2,632,775,453,932,674,000
31.041667
79
0.624512
false
jingfengli/scipy_2015_sklearn_tutorial
notebooks/helpers.py
19
5046
import numpy as np from collections import defaultdict import os from sklearn.cross_validation import StratifiedShuffleSplit from sklearn.feature_extraction import DictVectorizer # Can also use pandas! def process_titanic_line(line): # Split line on "," to get fields without comma confusion vals = line.strip()...
cc0-1.0
6,752,075,410,095,598,000
36.377778
110
0.585414
false
ssbarnea/ansible
lib/ansible/plugins/cache/memory.py
29
1271
# (c) 2014, Brian Coca, Josh Drake, et al # (c) 2017 Ansible Project # 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 DOCUMENTATION = ''' name: memory short_description: RAM bac...
gpl-3.0
1,549,937,451,022,861,600
22.981132
92
0.620771
false
jbaiter/spreads
spreads/config.py
2
6290
# -*- coding: utf-8 -*- # Copyright (C) 2014 Johannes Baiter <johannes.baiter@gmail.com> # # 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 ...
agpl-3.0
-2,495,587,162,767,555,600
34.942857
79
0.580286
false
Sarah-Alsinan/muypicky
lib/python3.6/site-packages/django/db/backends/base/schema.py
23
47367
import hashlib import logging from datetime import datetime from django.db.backends.utils import strip_quotes from django.db.models import Index from django.db.transaction import TransactionManagementError, atomic from django.utils import six, timezone from django.utils.encoding import force_bytes logger = logging.ge...
mit
4,974,768,056,845,177,000
46.084493
118
0.574915
false
luc-demeyer/account-financial-tools
account_reversal/__openerp__.py
18
1555
# -*- coding: utf-8 -*- ############################################################################## # # Account reversal module for OpenERP # Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved # @author Alexis de Lattre <alexis.delattre@akretion.com> # Copyright 2012-2013 Camptoca...
agpl-3.0
-126,631,462,942,495,400
37.875
79
0.607074
false
google/certificate-transparency
python/ct/client/db/sqlite_cert_db.py
3
9494
import sqlite3 from absl import flags as gflags from ct.client.db import cert_db from ct.client.db import cert_desc FLAGS = gflags.FLAGS gflags.DEFINE_bool("cert_db_sqlite_synchronous_write", True, "If set to true, " "sqlite will use synchronous write.") class SQLiteCertDB(cert_db.CertDB): de...
apache-2.0
-2,635,561,754,445,768,000
45.768473
80
0.515589
false
wunderlins/learning
python/zodb/lib/linux64/ZODB/tests/warnhook.py
5
2114
############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
gpl-2.0
1,531,007,504,942,382,600
36.087719
78
0.66036
false
shaded-enmity/dnf
dnf/yum/misc.py
11
17290
# misc.py # Copyright (C) 2012-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope th...
gpl-2.0
3,756,558,926,690,285,600
31.746212
81
0.59063
false
ghedsouza/django
django/template/backends/jinja2.py
91
3504
import jinja2 from django.conf import settings from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.utils.functional import cached_property from django.utils.module_loading import import_string from .base import BaseEngine class Jinja2(BaseEngine): app_dirname = 'jinja2' def _...
bsd-3-clause
-8,131,693,405,844,212,000
31.444444
89
0.636701
false
moreati/revelation
epiphany/machine.py
1
1578
#======================================================================= # machine.py #======================================================================= from pydgin.machine import Machine from pydgin.storage import RegisterFile RESET_ADDR = 0 #-------------------------------------------------------------------...
bsd-3-clause
615,284,066,924,184,600
32.574468
93
0.408112
false
dpnova/cyclone
demos/sse/ssedemo.py
4
2769
#!/usr/bin/env python # coding: utf-8 # # Copyright 2010 Alexandre Fiori # based on the original Tornado by Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache....
apache-2.0
-5,827,743,071,501,995,000
27.255102
79
0.629108
false
osde8info/denyhosts
DenyHosts/daemon.py
6
4275
"""Disk And Execution MONitor (Daemon) Default daemon behaviors (they can be modified): 1.) Ignore SIGHUP signals. 2.) Default current working directory to the "/" directory. 3.) Set the current file creation mode mask to 0. 4.) Close all open files (0 to [SC_OPEN_MAX or 256]). 5.) Redirect standard I/O...
gpl-2.0
-8,272,513,412,161,754,000
38.953271
79
0.646316
false
vmendez/DIRAC
AccountingSystem/private/Plotters/DataOperationPlotter.py
7
11392
from DIRAC import S_OK, S_ERROR from DIRAC.AccountingSystem.Client.Types.DataOperation import DataOperation from DIRAC.AccountingSystem.private.Plotters.BaseReporter import BaseReporter class DataOperationPlotter( BaseReporter ): _typeName = "DataOperation" _typeKeyFields = [ dF[0] for dF in DataOperation().defi...
gpl-3.0
7,546,467,433,968,439,000
53.769231
130
0.533883
false
eguven/nanomongo
test/test_zexamples.py
1
3268
from __future__ import unicode_literals import unittest import pymongo import six from examples.example import User, Entry from . import PYMONGO_CLIENT, TEST_DBNAME class HelperFuncionsTestCase(unittest.TestCase): def setUp(self): User.register(client=PYMONGO_CLIENT, db=TEST_DBNAME) Entry.regis...
apache-2.0
-1,246,619,908,933,809,000
43.767123
102
0.604957
false
sloanyang/depends
scm.py
1
39820
# Copyright (c) 2012 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. """SCM-specific utility classes.""" import cStringIO import glob import logging import os import re import sys import tempfile import time from xml.etre...
gpl-2.0
8,742,052,018,326,370,000
34.681004
80
0.598117
false
Southpaw-TACTIC/TACTIC
src/pyasm/prod/web/asset_detail_wdg.py
1
28617
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-2,004,969,847,683,251,700
30.867483
122
0.586714
false
pombredanne/DAWG
tests/test_payload_dawg.py
4
3423
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import pytest import dawg class TestBytesDAWG(object): DATA = ( ('foo', b'data3'), ('bar', b'data2'), ('foo', b'data1'), ('foobar', b'data4') ) DATA_KEYS = list(zip(*DATA))[0] def dawg(s...
mit
-1,705,704,585,936,714,800
24.931818
66
0.505697
false
rwl/muntjac
muntjac/demo/sampler/features/layouts/LayoutMargin.py
1
1824
from muntjac.api import VerticalLayout, HorizontalLayout, GridLayout from muntjac.demo.sampler.NamedExternalResource import NamedExternalResource from muntjac.demo.sampler.APIResource import APIResource from muntjac.demo.sampler.Feature import Feature, Version class LayoutMargin(Feature): def getSinceVersion(...
apache-2.0
-6,029,225,494,913,466,000
29.4
85
0.669408
false
kaplun/ops
modules/websubmit/lib/functions/Convert_RecXML_to_RecALEPH.py
35
4520
## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option...
gpl-2.0
6,672,095,139,178,327,000
42.047619
111
0.665487
false
CodeForPoznan/volontulo
backend/apps/volontulo/tests/models/test_offerstatus.py
3
3133
# -*- coding: utf-8 -*- """ .. module:: test_offerstatus """ from datetime import timedelta from django.test import TestCase from django.utils import timezone from apps.volontulo.factories import OfferFactory from apps.volontulo.models import Offer class TestOfferStatusModel(TestCase): """Tests for OfferStatu...
mit
-738,024,648,001,919,000
28.556604
67
0.589531
false
wesparish/GoDaddyUpdater
GoDaddyUpdater.py
1
1860
#!/usr/bin/env python3 # Full package imports import sys import pif from godaddypy import Client, Account import os key = os.environ['GODADDY_KEY'] secret_key = os.environ['GODADDY_SECRET'] domain_list = os.environ['GODADDY_DOMAIN_LIST'].split(',') a_record_list = os.environ['GODADDY_A_RECORD_LIST'].split(',') crea...
apache-2.0
735,443,384,480,819,500
33.444444
108
0.596774
false
ninegrid/dotfiles-vim
bundle/vim-orgmode/tests/test_plugin_tags_properties.py
1
7575
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import sys sys.path.append(u'../ftplugin') import vim from orgmode._vim import indent_orgmode, fold_orgmode, ORGMODE ORGMODE.debug = True START = True END = False counter = 0 class TagsPropertiesTestCase(unittest.TestCase): def setUp(self): global c...
unlicense
913,195,676,864,533,800
42.125714
132
0.66702
false
avicizhu/Load-balancer
bindings/python/ns3modulegen-modular.py
56
4516
import warnings import sys import os import pybindgen.settings from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers from pybindgen.module import MultiSectionFactory import ns3modulegen_core_customizations pybindgen.settings.wrapper_registry = pybindgen.settings.StdMapWrapperRegistry impor...
gpl-2.0
-8,072,868,955,202,653,000
34.559055
102
0.63574
false
grapesmoker/regulations-site
regulations/tests/partial_view_tests.py
7
3583
from unittest import TestCase from mock import Mock, patch from django.test import RequestFactory from django.test.client import Client from regulations.generator.layers.layers_applier import * from regulations.generator.node_types import EMPTYPART, INTERP, REGTEXT from regulations.views.partial import * class Part...
cc0-1.0
-4,768,088,104,672,972,000
40.662791
75
0.578565
false
laurent-george/weboob
modules/dlfp/test.py
7
1794
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of weboob. # # weboob 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 you...
agpl-3.0
-7,779,995,785,205,296,000
32.849057
78
0.684504
false
victorywang80/Maintenance
saltstack/src/salt/pillar/reclass_adapter.py
1
3968
# -*- coding: utf-8 -*- ''' .. |reclass| replace:: **reclass** This ``ext_pillar`` plugin provides access to the |reclass| database, such that Pillar data for a specific minion are fetched using |reclass|. You can find more information about |reclass| at http://reclass.pantsfullofunix.net. To use the plugin, add it ...
apache-2.0
-5,555,179,893,568,987,000
31.260163
79
0.640373
false
ptomasroos/vitess
py/net/gorpc.py
13
11418
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. # Handle transport and serialization callbacks for Go-style RPC servers. # # This is pretty simple. The client initiates an HTTP CONNECT and then # hijacks the socket...
bsd-3-clause
4,438,908,830,036,344,300
29.693548
80
0.65388
false
Intel-tensorflow/tensorflow
tensorflow/python/feature_column/serialization_test.py
14
4183
# Copyright 2019 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
3,601,203,196,243,969,500
35.373913
80
0.696868
false
mikemoorester/ESM
GamitAprioriFile.py
1
1291
#!/usr/bin/env python from __future__ import division, print_function, absolute_import import re import numpy as np def getStationPos(apr_file, site): site_RGX = re.compile('^ '+site.upper()+'_') with open(apr_file,'r') as FID: for line in FID: if site_RGX.search(line): X =...
mit
6,684,551,586,631,782,000
34.861111
107
0.532146
false
artisan-roaster-scope/artisan
src/artisanlib/colors.py
2
57675
#!/usr/bin/env python3 # ABOUT # Artisan Colors dialog # LICENSE # This program or module 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 # version 3 of the License, or (a...
gpl-3.0
-8,743,278,004,121,469,000
56.964824
217
0.677469
false
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/api/openstack/compute/schemas/v3/flavor_manage.py
14
3221
# Copyright 2014 NEC Corporation. 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 ...
gpl-2.0
7,930,691,939,006,034,000
40.831169
78
0.471593
false
ceholden/accuracy_sampler
script/sample_map.py
1
17855
#!/usr/bin/env python """ Generate random sample of a map Usage: sample_map.py [options] (simple | stratified | systematic) <map> Options: --allocation <allocation> Sample allocation --size <n> Sample size for allocation [default: 500] --mask <values> Values to be exclud...
gpl-2.0
-539,184,713,241,761,700
31.701465
79
0.588687
false
imk1/IMKTFBindingCode
makebedGraphToBigWigScript.py
1
2695
import sys import argparse def parseArgument(): # Parse the input parser=argparse.ArgumentParser(description=\ "Make a script that will convert bedgraph to bigwig files") parser.add_argument("--fileNamePrefixList", required=True,\ help='Name of file with a list of bedgraph file prefixes that will also be used...
mit
-1,959,202,720,496,363,300
69.921053
182
0.744712
false
nafitzgerald/allennlp
allennlp/common/tee_logger.py
1
1400
""" A logger that maintains logs of both stdout and stderr when models are run. """ from typing import TextIO import os class TeeLogger: """ This class is an attempt to maintain logs of both stdout and stderr for when models are run. To use this class, at the beginning of your script insert these lines::...
apache-2.0
4,507,933,210,870,371,000
36.837838
98
0.637857
false