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
antonio-fr/bitcoin
qa/rpc-tests/walletbackup.py
132
7263
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Exercise the wallet backup code. Ported from walletbackup.sh. Test case is: 4 nodes. 1 2 and 3 send tran...
mit
-4,505,999,220,823,032,300
35.315
91
0.643536
false
Qalthos/ansible
lib/ansible/modules/monitoring/bigpanda.py
92
5714
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-8,891,964,878,454,327,000
27.713568
157
0.620756
false
rdobson/python-hwinfo
hwinfo/host/cpuinfo.py
1
1269
"""Module for parsing the output of /proc/cpuinfo""" from hwinfo.util import CommandParser REGEX_TEMPLATE = r'%s([\ \t])+\:\ (?P<%s>.*)' class CPUInfoParser(CommandParser): ITEM_SEPERATOR = "\n\n" ITEM_REGEXS = [ REGEX_TEMPLATE % ('processor', 'processor'), REGEX_TEMPLATE % ('vendor_id', 'v...
lgpl-2.1
-6,347,857,293,540,302,000
39.935484
68
0.578408
false
bigmlcom/bigmler
bigmler/tests/test_03_unicode_command.py
1
3461
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2015-2021 BigML # # 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
8,908,279,184,302,599,000
39.151163
187
0.615986
false
shaistaansari/django
tests/gis_tests/layermap/models.py
67
2507
from django.utils.encoding import python_2_unicode_compatible from ..models import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=25) objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] ...
bsd-3-clause
-1,535,158,005,551,661,800
22.87619
95
0.623853
false
saifrahmed/bokeh
bokeh/models/axes.py
33
5946
""" Guide renderers for various kinds of axes that can be added to Bokeh plots """ from __future__ import absolute_import from ..properties import Int, Float, String, Enum, Bool, Datetime, Auto, Instance, Tuple, Either, Include from ..mixins import LineProps, TextProps from ..enums import Location from .renderers im...
bsd-3-clause
852,682,421,830,408,600
30.62766
105
0.654894
false
open-craft/xblock-dalite
dalite_xblock/utils.py
1
1894
# -*- coding: utf-8 -*- """Dalite XBlock utils.""" from lazy.lazy import lazy def _(text): # pylint: disable=invalid-name """ Make '_' a no-op so we can scrape strings. :return text """ return text # pylint: disable=protected-access class FieldValuesContextManager(object): """ Allow u...
agpl-3.0
-3,036,996,937,026,251,000
28.59375
111
0.6283
false
Eric89GXL/scipy
scipy/optimize/_trustregion_constr/equality_constrained_sqp.py
10
8676
"""Byrd-Omojokun Trust-Region SQP method.""" from __future__ import division, print_function, absolute_import from scipy.sparse import eye as speye from .projections import projections from .qp_subproblem import modified_dogleg, projected_cg, box_intersections import numpy as np from numpy.linalg import norm __all__ ...
bsd-3-clause
-6,692,879,072,068,970,000
38.798165
79
0.554518
false
falbassini/Samples
python/v2.2/create_floodlight_activity_group.py
3
2300
#!/usr/bin/python # # 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 b...
apache-2.0
3,428,834,621,493,327,400
31.394366
77
0.708261
false
jordiblasco/easybuild-easyblocks
easybuild/easyblocks/generic/__init__.py
24
1376
## # Copyright 2009-2015 Ghent University # Copyright 2009-2015 Stijn De Weirdt # Copyright 2010 Dries Verdegem # Copyright 2010-2015 Kenneth Hoste # Copyright 2011 Pieter De Baets # Copyright 2011-2015 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://u...
gpl-2.0
-1,536,690,918,764,860,000
40.69697
96
0.755087
false
Nitaco/ansible
lib/ansible/modules/network/f5/bigip_gtm_pool.py
6
37181
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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.1', ...
gpl-3.0
2,527,588,507,487,619,000
31.586328
123
0.582098
false
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/tools/anonymize.py
1
2444
''' Task Coach - Your friendly task manager Copyright (C) 2011 Task Coach developers <developers@taskcoach.org> Task Coach 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 y...
gpl-3.0
-6,260,656,114,008,346,000
37.793651
79
0.658347
false
twalthr/flink
flink-python/pyflink/common/typeinfo.py
6
36879
################################################################################ # 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...
apache-2.0
5,145,908,740,536,415,000
37.335759
100
0.621302
false
zverevalexei/trex-http-proxy
trex_client/external_libs/scapy-2.3.1/python2/scapy/layers/ipsec.py
9
35424
############################################################################# ## ipsec.py --- IPSec support for Scapy ## ## ## ## Copyright (C) 2014 6WIND ## ## ...
mit
4,106,549,918,139,271,700
35.110092
294
0.519224
false
b-jesch/service.fritzbox.callmonitor
resources/lib/PhoneBooks/pyicloud/vendorlibs/requests/packages/urllib3/util/ssl_.py
152
11624
from __future__ import absolute_import import errno import warnings import hmac from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning SSLContext = None HAS_SNI = False create_default_context = None IS_PYOPENSSL = F...
gpl-2.0
-8,028,164,455,658,428,000
35.325
93
0.639023
false
mraspaud/mpop
mpop/satin/fy3_virr.py
2
6378
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015, 2016 Adam.Dybbroe # Author(s): # Adam.Dybbroe <adam.dybbroe@smhi.se> # Katerina.Melnik <kmelnik@scanex.ru> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
gpl-3.0
6,958,182,298,206,641,000
33.852459
92
0.605049
false
bitmovin/bitmovin-python
bitmovin/resources/models/encodings/inputstreams/h264_picture_timing_trimming_input_stream.py
1
1556
from .abstract_trimming_input_stream import AbstractTrimmingInputStream class H264PictureTimingTrimmingInputStream(AbstractTrimmingInputStream): def __init__(self, input_stream_id, start_pic_timing=None, end_pic_timing=None, id_=None, custom_data=None, name=None, description=None): super...
unlicense
2,605,767,909,488,920,600
41.054054
111
0.669666
false
HewlettPackard/oneview-redfish-toolkit
oneview_redfish_toolkit/tests/api/test_ethernet_interface.py
1
2896
# -*- coding: utf-8 -*- # Copyright (2018) 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/licenses/LICENSE-2.0 # # Unless...
apache-2.0
-2,087,427,414,273,528,000
33.070588
79
0.65297
false
jernsthausen/datesplitter
lib/python2.7/site-packages/pip/_vendor/progress/bar.py
404
2707
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
mit
3,796,281,465,486,515,700
30.05814
78
0.625234
false
pilliq/mongo-web-shell
webapps/server/crontab.py
5
1707
# Copyright 2013 10gen 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...
apache-2.0
-8,402,160,123,611,913,000
36.108696
79
0.691857
false
pawelmhm/AutobahnPython
examples/twisted/websocket/echo_variants/client_with_params.py
18
1921
############################################################################### ## ## Copyright (C) 2011-2013 Tavendo GmbH ## ## 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 ## ## h...
apache-2.0
277,670,493,028,865,760
30.491803
84
0.616346
false
skbly7/serc
website/wiki/plugins/images/settings.py
16
1323
from __future__ import absolute_import from __future__ import unicode_literals from django import VERSION from django.conf import settings as django_settings from wiki.conf import settings as wiki_settings SLUG = 'images' # This is deprecated in django 1.7+ APP_LABEL = 'images' if VERSION < (1, 7) else None # Where ...
mit
-269,912,077,016,798,430
33.815789
87
0.748299
false
throwable-one/lettuce
tests/integration/lib/Django-1.2.5/django/core/cache/backends/locmem.py
46
4062
"Thread-safe in-memory cache backend." import time try: import cPickle as pickle except ImportError: import pickle from django.core.cache.backends.base import BaseCache from django.utils.synch import RWLock class CacheClass(BaseCache): def __init__(self, _, params): BaseCache.__init__(self, param...
gpl-3.0
6,544,271,452,747,512,000
27.405594
94
0.504431
false
raulanatol/awsebcli
botocore_eb/vendored/requests/models.py
14
23710
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import...
apache-2.0
5,590,498,171,948,665,000
31.346521
114
0.55989
false
r0balo/pelisalacarta
python/main-classic/channels/gaypornshare.py
5
5897
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para gaypornshare.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import os import re from core import config from core ...
gpl-3.0
-9,046,831,205,724,767,000
33.057803
210
0.626443
false
tlakshman26/cinder-new-branch
cinder/api/views/scheduler_stats.py
33
1719
# Copyright (C) 2014 eBay 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...
apache-2.0
-6,899,208,715,960,514,000
31.433962
78
0.602676
false
sshnaidm/ru
script.video.F4mProxy/lib/flvlib/scripts/index_flv.py
98
13650
import os import sys import shutil import logging import tempfile from optparse import OptionParser from flvlib import __versionstr__ from flvlib.constants import TAG_TYPE_AUDIO, TAG_TYPE_VIDEO, TAG_TYPE_SCRIPT from flvlib.constants import FRAME_TYPE_KEYFRAME from flvlib.astypes import MalformedFLV, FLVObject from fl...
gpl-2.0
2,411,145,284,609,691,600
33.125
79
0.604908
false
yarikoptic/pystatsmodels
statsmodels/datasets/randhie/data.py
3
2604
"""RAND Health Insurance Experiment Data""" __docformat__ = 'restructuredtext' COPYRIGHT = """This is in the public domain.""" TITLE = __doc__ SOURCE = """ The data was collected by the RAND corporation as part of the Health Insurance Experiment (HIE). http://www.rand.org/health/projects/hie/ This data...
bsd-3-clause
-6,754,634,333,752,832,000
28.931034
79
0.667435
false
mstriemer/app-validator
tests/js/test_features.py
1
3970
from functools import wraps from nose.tools import eq_ from js_helper import TestCase def uses_feature(name): def wrap(func): @wraps(func) def inner(self, *args, **kw): func(self, *args, **kw) self.assert_has_feature(name) return inner return wrap class Feat...
bsd-3-clause
-8,581,801,642,811,900,000
36.45283
82
0.577078
false
MCMic/Sick-Beard
lib/imdb/parser/http/characterParser.py
143
8139
""" parser.http.characterParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a character. E.g., for "Jesse James" the referred pages would be: main details: http://www.imdb.com/character/ch0000001/ biography: ...
gpl-3.0
5,284,948,682,267,377,000
39.093596
80
0.500676
false
mvaled/OpenUpgrade
addons/website_event_sale/controllers/main.py
233
3374
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
-2,539,938,882,576,505,300
42.818182
150
0.607587
false
flgiordano/netcash
+/google-cloud-sdk/lib/surface/components/list.py
1
3566
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
bsd-3-clause
-7,585,222,406,077,613,000
33.960784
79
0.668256
false
marcoserafini/h-store
third_party/cpp/protobuf/python/ez_setup.py
55
9816
#!python # This file was obtained from: # http://peak.telecommunity.com/dist/ez_setup.py # on 2009/4/17. """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup...
gpl-3.0
-6,672,021,299,899,119,000
33.932384
86
0.645884
false
isandlaTech/cohorte-3rdparty
sleekxmpp/src/main/python/sleekxmpp/plugins/xep_0071/stanza.py
11
2862
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2012 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.stanza import Message from sleekxmpp.util import unicode from sleekxmpp.thirdparty import OrderedDict from sleekxmpp.xmlstream im...
apache-2.0
-9,170,959,289,428,755,000
34.333333
86
0.536338
false
gnowledge/OTM2
opentreemap/treemap/migrations/0082_rename_species_fields.py
3
23085
# -*- 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): db.rename_column(u'treemap_species', 'other', 'other_part_of_name') db.rename_column(u'treemap_species', 'na...
gpl-3.0
-6,663,047,000,474,538,000
80.865248
208
0.556985
false
tomchristie/django
tests/postgres_tests/test_indexes.py
25
10150
from django.contrib.postgres.indexes import BrinIndex, GinIndex, GistIndex from django.db import connection from django.test import skipUnlessDBFeature from . import PostgreSQLTestCase from .models import CharFieldModel, DateTimeArrayModel, IntegerArrayModel @skipUnlessDBFeature('has_brin_index_support') class BrinI...
bsd-3-clause
3,686,365,286,935,428,000
44.3125
108
0.653596
false
cntnboys/410Lab6
v1/lib/python2.7/site-packages/django/template/defaulttags.py
49
50815
"""Default tags used by the template system, available to all templates.""" from __future__ import unicode_literals import os import sys import re from datetime import datetime from itertools import groupby, cycle as itertools_cycle import warnings from django.conf import settings from django.template.base import (No...
apache-2.0
-4,975,472,531,791,785,000
33.780972
171
0.578176
false
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/PyAMF-0.7.2/pyamf/tests/remoting/test_remoteobject.py
6
8543
# -*- coding: utf-8 -*- # # Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ RemoteObject Tests. @since: 0.1 """ import unittest import pyamf from pyamf import remoting from pyamf.remoting import amf3, gateway from pyamf.flex import messaging class RandomIdGeneratorTestCase(unittest.TestCase): ...
mit
7,760,883,831,871,772,000
31.460076
79
0.635703
false
aboutsajjad/Bridge
app_packages/youtube_dl/extractor/bleacherreport.py
39
4164
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from .amp import AMPIE from ..utils import ( ExtractorError, int_or_none, parse_iso8601, ) class BleacherReportIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?bleacherreport\.com/articles/(?P<id>\d+)' _...
mit
1,276,932,918,023,511,800
38.283019
139
0.553554
false
sheltowt/PIXLEE-computer-vision-clustering
PCV/tools/imregistration.py
21
3547
from PIL import Image from xml.dom import minidom from numpy import * from pylab import * from scipy import ndimage, linalg from scipy.misc import imsave import os def read_points_from_xml(xmlFileName): """ Reads control points for face alignment. """ xmldoc = minidom.parse(xmlFileName) facelist = xmldoc...
bsd-2-clause
8,264,364,943,534,963,000
31.842593
91
0.558782
false
shepdelacreme/ansible
lib/ansible/modules/network/f5/bigip_snmp.py
8
13167
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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.1', ...
gpl-3.0
2,084,572,243,239,185,400
29.692308
108
0.614946
false
OsirisSPS/osiris-sps
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/test/test_random.py
36
22281
#!/usr/bin/env python import unittest import random import time import pickle import warnings from math import log, exp, pi, fsum, sin from functools import reduce from test import test_support class TestBasicOps(unittest.TestCase): # Superclass with tests common to all generators. # Subclasses must arrange f...
gpl-3.0
2,091,098,425,434,853,000
37.952797
88
0.564831
false
MrSenko/Nitrate
tcms/core/contrib/auth/views.py
1
4087
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import auth from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import redirect, render_to_response from django.template import RequestContext from django.views.decorators.http import requir...
gpl-2.0
-5,272,719,543,430,341,000
34.232759
93
0.608759
false
IV-GII/Django_Traduccion
allauth/socialaccount/providers/angellist/views.py
80
1056
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from .provider import AngelListProvider class AngelListOAuth2Adapter(OAuth2...
gpl-3.0
200,468,654,345,276,130
41.24
77
0.604167
false
agdsn/sipa
sipa/utils/graph_utils.py
2
3274
# -*- coding: utf-8 -*- from typing import List import pygal from flask_babel import gettext from pygal import Graph from pygal.colors import hsl_to_rgb from pygal.style import Style from sipa.units import (format_as_traffic, max_divisions, reduce_by_base) from sipa.utils.babel_utils import ge...
mit
-2,574,836,704,073,132,000
32.408163
88
0.605681
false
hip-odoo/odoo
addons/mrp/tests/test_stock.py
26
5056
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import common from odoo.exceptions import except_orm class TestWarehouse(common.TestMrpCommon): def test_manufacturing_route(self): warehouse_1_stock_manager = self.warehouse_1.sudo(self.user_stock_...
agpl-3.0
7,505,693,613,700,814,000
49.059406
296
0.617682
false
nachandr/cfme_tests
cfme/scripting/conf.py
2
3831
#!/usr/bin/env python3 """Script to encrypt config files. Usage: scripts/encrypt_conf.py confname1 confname2 ... confnameN scripts/encrypt_conf.py credentials """ import io import click import yaycl_crypt from cfme.scripting import link_config from cfme.utils import conf @click.group(help='Functions affecti...
gpl-2.0
-5,751,740,225,149,618,000
34.803738
98
0.663795
false
nikhila05/django-seo
rollyourown/seo/backends.py
7
13498
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.db import models from django.contrib.sites.models import Site from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic fro...
bsd-3-clause
-3,790,412,997,426,526,700
38.467836
176
0.599348
false
baibaichen/eagle
eagle-external/eagle-ambari/lib/EAGLE/package/scripts/service_check.py
21
1521
#!/usr/bin/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 # "Licen...
apache-2.0
-1,042,594,479,665,856,300
43.735294
137
0.765943
false
andrewyoung1991/abjad
abjad/tools/sequencetools/remove_elements.py
2
2888
# -*- encoding: utf-8 -*- def remove_elements( sequence, indices=None, period=None, ): '''Removes `sequence` elements at `indices`. .. container:: example Removes all elements: :: >>> sequencetools.remove_elements(range(15)) [] .. container:: ...
gpl-3.0
6,216,065,411,103,665,000
20.4
62
0.41759
false
dkodnik/Ant
addons/mrp/wizard/mrp_workcenter_load.py
56
2244
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
5,595,727,027,783,011,000
39.071429
143
0.589572
false
Soya93/Extract-Refactoring
python/helpers/pydev/_pydevd_bundle/pydevd_comm.py
2
57034
''' pydevd - a debugging daemon This is the daemon you launch for python remote debugging. Protocol: each command has a format: id\tsequence-num\ttext id: protocol command number sequence-num: each request has a sequence number. Sequence numbers originating at the debugger are odd, sequence numbers ori...
apache-2.0
5,972,299,724,729,456,000
40.69152
191
0.507399
false
SerialShadow/SickRage
lib/imdb/Movie.py
126
17281
""" Movie module (imdb package). This module provides the Movie class, used to store information about a given movie. Copyright 2004-2010 Davide Alberani <da@erlug.linux.it> 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 F...
gpl-3.0
5,731,898,153,006,813,000
42.419598
79
0.53527
false
redhat-cip/horizon
horizon/utils/functions.py
19
4828
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
8,380,285,036,548,949,000
30.97351
79
0.621168
false
ajaxsys/dict-admin
docutils/io.py
2
14324
# $Id: io.py 7073 2011-07-07 06:49:19Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ I/O classes provide a uniform API for low-level input and output. Subclasses will exist for a variety of input/output mechanisms. """ __docformat__ =...
bsd-3-clause
-7,082,353,410,795,681,000
31.862884
78
0.537559
false
timedcy/python-goose
goose/utils/__init__.py
10
4267
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
apache-2.0
4,492,102,474,983,337,000
26.529032
79
0.627139
false
dgarros/ansible
lib/ansible/modules/network/avi/avi_systemconfiguration.py
43
6203
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
5,262,081,532,989,316,000
35.922619
116
0.665162
false
kofron/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/hplink.py
61
2390
"""SCons.Tool.hplink Tool-specific initialization for the HP linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foun...
apache-2.0
3,629,923,187,023,927,300
30.038961
95
0.722594
false
vincent-noel/SigNetSim
signetsim/views/simulate/TimeSeriesSimulationView.py
2
9881
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim 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 Fou...
agpl-3.0
-5,856,404,618,403,677,000
32.608844
167
0.732315
false
blinkbox/shaka-player
third_party/gjslint/python-gflags-2.0/gflags2man.py
407
18864
#!/usr/bin/env python # Copyright (c) 2006, 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 l...
apache-2.0
-7,189,071,377,439,447,000
33.676471
84
0.598229
false
annarev/tensorflow
tensorflow/python/training/experimental/mixed_precision_test.py
8
7435
# 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
-8,371,377,187,877,572,000
40.536313
99
0.698722
false
badloop/SickRage
lib/hachoir_parser/archive/ace.py
95
9944
""" ACE parser From wotsit.org and the SDK header (bitflags) Partial study of a new block type (5) I've called "new_recovery", as its syntax is very close to the former one (of type 2). Status: can only read totally file and header blocks. Author: Christophe Gisquet <christophe.gisquet@free.fr> Creation date: 19 jan...
gpl-3.0
-3,892,141,614,350,475,000
36.243446
106
0.629224
false
vamst/COSMOS2
examples/ex2.py
1
3562
import os import subprocess as sp from cosmos.api import Cosmos, Dependency, draw_stage_graph, draw_task_graph, \ pygraphviz_available, default_get_submit_args from functools import partial from tools import echo, cat, word_count def recipe(workflow): # Create two Tasks that echo "hello" and "world" respectiv...
gpl-3.0
4,995,294,901,209,347,000
42.439024
97
0.586749
false
oleksa-pavlenko/gae-django-project-template
django/templatetags/static.py
227
4084
from django import template from django.template.base import Node from django.utils.encoding import iri_to_uri from django.utils.six.moves.urllib.parse import urljoin register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" % self.name def __in...
mit
-3,830,869,332,631,053,000
24.848101
116
0.587904
false
longmen21/edx-platform
scripts/run_watch_data.py
182
1672
#! /usr/bin/env python # This script requires that you have watchdog installed. You can install # watchdog via 'pip install watchdog' import sys import time import logging import os from subprocess import Popen from signal import SIGTERM from watchdog.observers import Observer from watchdog.events import LoggingEvent...
agpl-3.0
8,205,308,048,129,630,000
31.784314
91
0.674641
false
arenadata/ambari
ambari-server/src/main/resources/stacks/ADH/1.4/services/ATLAS/package/scripts/metadata.py
1
10415
#!/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 "License");...
apache-2.0
361,367,832,036,732,300
38.751908
143
0.648008
false
lukeiwanski/tensorflow
tensorflow/contrib/timeseries/python/timeseries/state_management.py
67
11936
# Copyright 2017 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,811,722,661,922,728,000
44.212121
80
0.693448
false
Changaco/oh-mainline
vendor/packages/django-tastypie/tastypie/serializers.py
34
19714
from __future__ import unicode_literals import datetime import re import django from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.encoding import force_text, smart_bytes from django.core.serializers import json as djangojson from tas...
agpl-3.0
5,509,004,273,034,186,000
36.984586
186
0.59582
false
PatrickKennedy/Sybil
console/app/pygments/plugin.py
27
1841
# -*- coding: utf-8 -*- """ pygments.plugin ~~~~~~~~~~~~~~~ Pygments setuptools plugin interface. The methods defined here also work if setuptools isn't installed but they just return nothing. lexer plugins:: [pygments.lexers] yourlexer = yourmodule:YourLexer formatter pl...
bsd-2-clause
-5,721,741,279,977,180,000
23.878378
77
0.677892
false
cagatayyildiz/boun-sim
bcpm/visualize.py
1
1414
''' This study is a Bogazici University - NETAS Nova V-Gate collaboration and funded by TEYDEB project "Realization of Anomaly Detection and Prevention with Learning System Architectures, Quality Improvement, High Rate Service Availability and Rich Services in a VoIP Firewall Product'', by the Scientific and Technolog...
gpl-2.0
-1,030,810,628,384,460,300
37.216216
357
0.610325
false
dvarrazzo/Pyrseas
pyrseas/dbobject/table.py
1
36138
# -*- coding: utf-8 -*- """ pyrseas.dbobject.table ~~~~~~~~~~~~~~~~~~~~~~ This module defines six classes: DbClass derived from DbSchemaObject, Sequence, Table and View derived from DbClass, MaterializedView derived from View, and ClassDict derived from DbObjectDict. """ import re import os im...
bsd-3-clause
-7,541,867,630,988,346,000
37.691649
79
0.534424
false
pyconca/2017-web
config/settings/common.py
1
9927
# -*- coding: utf-8 -*- """ Django settings for PyCon Canada 2017 project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, u...
mit
-2,867,724,206,952,123,400
33.231034
98
0.600786
false
simonwydooghe/ansible
test/units/modules/network/check_point/test_cp_mgmt_service_dce_rpc.py
19
4165
# Ansible module to manage CheckPoint Firewall (c) 2019 # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dist...
gpl-3.0
2,337,743,495,481,210,400
35.217391
109
0.695798
false
JPFrancoia/scikit-learn
examples/ensemble/plot_forest_iris.py
335
6271
""" ==================================================================== Plot the decision surfaces of ensembles of trees on the iris dataset ==================================================================== Plot the decision surfaces of forests of randomized trees trained on pairs of features of the iris dataset. ...
bsd-3-clause
-831,530,682,119,338,000
40.256579
113
0.633073
false
wang16/swtoolkit
site_scons/site_tools/code_signing.py
21
5108
#!/usr/bin/python2.4 # Copyright 2009, 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...
bsd-3-clause
8,169,266,138,213,743,000
39.220472
80
0.700078
false
dubourg/openturns
python/test/t_ZipfMandelbrot_std.py
2
2964
#! /usr/bin/env python from __future__ import print_function from openturns import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # Instanciate one distribution object distribution = ZipfMandelbrot(15, 1.2, 2.) print("Distribution ", repr(distribution)) print("Distribution ", distribution) # I...
gpl-3.0
-7,777,175,700,739,011,000
34.285714
103
0.668354
false
hectord/lettuce
tests/functional/test_terrain.py
18
2374
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
gpl-3.0
-6,461,394,705,366,818,000
31.506849
146
0.689844
false
hsaputra/tensorflow
tensorflow/python/debug/wrappers/framework.py
9
34269
# 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
-1,927,209,883,524,187,400
36.824503
80
0.670898
false
mtlchun/edx
common/lib/xmodule/xmodule/tests/xml/test_inheritance.py
193
1689
""" Test that inherited fields work correctly when parsing XML """ from nose.tools import assert_equals, assert_in # pylint: disable=no-name-in-module from xmodule.tests.xml import XModuleXmlImportTest from xmodule.tests.xml.factories import CourseFactory, SequenceFactory, ProblemFactory, XmlImportFactory class Tes...
agpl-3.0
220,512,383,462,622,660
34.93617
104
0.651865
false
thaim/ansible
lib/ansible/modules/network/fortios/fortios_web_proxy_forward_server_group.py
14
12179
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
mit
-4,546,365,893,211,620,000
32.275956
157
0.582642
false
pschmitt/home-assistant
tests/components/plum_lightpad/test_init.py
4
3767
"""Tests for the Plum Lightpad config flow.""" from aiohttp import ContentTypeError from requests.exceptions import HTTPError from homeassistant.components.plum_lightpad.const import DOMAIN from homeassistant.core import HomeAssistant from homeassistant.setup import async_setup_component from tests.async_mock import ...
apache-2.0
4,237,602,566,724,296,000
35.221154
86
0.682771
false
ProfHoekstra/bluesky
bluesky/traffic/traffic.py
1
33317
""" BlueSky traffic implementation.""" from __future__ import print_function try: from collections.abc import Collection except ImportError: # In python <3.3 collections.abc doesn't exist from collections import Collection from math import * from random import randint import numpy as np import bluesky as b...
gpl-3.0
-1,523,497,785,252,001,800
40.081381
117
0.512891
false
mnahm5/django-estore
Lib/site-packages/troposphere/sqs.py
27
1054
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import integer try: from awacs.aws import Policy policytypes = (dict, Policy) except ImportError: policytypes = dict, class RedrivePolic...
mit
4,638,158,703,464,037,000
24.095238
58
0.642315
false
trdean/grEME
gr-qtgui/examples/pyqt_histogram_f.py
7
6691
#!/usr/bin/env python # # Copyright 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 option) # ...
gpl-3.0
-2,997,486,534,241,303,600
32.455
82
0.62726
false
mcsalgado/ansible
lib/ansible/parsing/yaml/objects.py
169
2012
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
1,015,766,392,867,262,200
29.953846
74
0.682406
false
wilsonianb/nacl_contracts
src/trusted/validator_mips/dgen/dgen_dump.py
6
1434
#!/usr/bin/python # # Copyright 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. # Copyright 2012, Google Inc. # """ Produces a table from the in-memory representation. Useful for storing the optimized table for...
bsd-3-clause
-5,543,102,430,589,723,000
27.68
77
0.613668
false
midgardproject/midgard-core
tests/GIR/test_200_user.py
1
2601
# coding=utf-8 import sys import struct import unittest from test_000_config import TestConfig from test_020_connection import TestConnection from gi.repository import Midgard from gi.repository import GObject class TestUser(unittest.TestCase): mgd = None def setUp(self): if self.mgd == None: self.mgd...
lgpl-2.1
-5,917,744,233,182,356,000
23.771429
101
0.677047
false
Stavitsky/nova
nova/tests/unit/objects/test_vcpu_model.py
36
3702
# 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 # d...
apache-2.0
1,995,867,734,596,297,200
35.294118
78
0.675041
false
mlperf/inference_results_v0.7
closed/QCT/code/rnnt/tensorrt/harness.py
12
5140
# Copyright (c) 2020, NVIDIA 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 by appli...
apache-2.0
5,947,880,858,701,901,000
44.892857
176
0.651362
false
rahuldhote/scikit-learn
sklearn/neighbors/tests/test_dist_metrics.py
230
5234
import itertools import pickle import numpy as np from numpy.testing import assert_array_almost_equal import scipy from scipy.spatial.distance import cdist from sklearn.neighbors.dist_metrics import DistanceMetric from nose import SkipTest def dist_func(x1, x2, p): return np.sum((x1 - x2) ** p) ** (1. / p) de...
bsd-3-clause
945,605,324,503,457,000
34.605442
79
0.559992
false
camptocamp/odoo
addons/sale_layout/models/sale_layout.py
62
5080
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
-8,840,971,639,350,526,000
39
137
0.60374
false
cloudnautique/python-agent
cattle/plugins/docker/network/ipsec_tunnel.py
1
1316
import logging from .util import has_service from cattle.utils import get_or_create_map, get_or_create_list from cattle.agent.handler import BaseHandler log = logging.getLogger('docker') class IpsecTunnelSetup(BaseHandler): def __init__(self): pass def before_start(self, instance, host, config, sta...
apache-2.0
-5,685,047,527,746,711,000
29.604651
70
0.574468
false
WMD-group/SMACT
examples/Practical_tutorial/Site/surface_points.py
1
13393
#!/usr/bin/env python # Defines the positions (on a 2D grid) of the positions of under-coordinated # atoms at the surface of a material ################################################################################ # Copyright Keith T Butler (2015) # # ...
mit
-891,064,547,232,425,900
41.789137
238
0.520794
false
ArneBab/pypyjs
website/demo/home/rfk/repos/pypy/lib_pypy/ctypes_config_cache/resource.ctc.py
13
1502
""" 'ctypes_configure' source for resource.py. Run this to rebuild _resource_cache.py. """ from ctypes import sizeof import dumpcache from ctypes_configure.configure import (configure, ExternalCompilationInfo, ConstantInteger, DefinedConstantInteger, SimpleType) _CONSTANTS = ( 'RLIM_INFINITY', 'RLIM...
mit
7,115,137,846,860,632,000
23.225806
77
0.679095
false
arista-eosplus/ansible
lib/ansible/modules/files/fetch.py
27
4058
# this is a virtual module that is entirely implemented server side # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
gpl-3.0
4,750,066,654,055,674,000
34.596491
91
0.684081
false
streamlink/streamlink
src/streamlink/utils/url.py
3
4825
import re from collections import OrderedDict from urllib.parse import parse_qsl, quote_plus, urlencode, urljoin, urlparse, urlunparse _re_uri_implicit_scheme = re.compile(r"""^[a-z0-9][a-z0-9.+-]*://""", re.IGNORECASE) def update_scheme(current: str, target: str) -> str: """ Take the scheme from the curren...
bsd-2-clause
5,218,574,943,609,108,000
38.876033
124
0.654508
false
CMartelLML/numpy
numpy/polynomial/tests/test_hermite_e.py
123
17069
"""Tests for hermite_e module. """ from __future__ import division, absolute_import, print_function import numpy as np import numpy.polynomial.hermite_e as herme from numpy.polynomial.polynomial import polyval from numpy.testing import ( TestCase, assert_almost_equal, assert_raises, assert_equal, assert_, run...
bsd-3-clause
5,109,232,450,692,529,000
32.015474
77
0.517488
false
beckdaniel/GPy
GPy/old_tests/mapping_tests.py
15
2156
# Copyright (c) 2012, 2013 GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import unittest import numpy as np import GPy class MappingGradChecker(GPy.core.Model): """ This class has everything we need to check the gradient of a mapping. It implement a simple like...
bsd-3-clause
-1,642,972,962,200,836,900
36.824561
109
0.68321
false
qvazzler/Flexget
tests/test_exec.py
1
3067
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import sys class TestExec(object): __tmp__ = True config = """ templates: global: set: temp_dir: '__tmp__' acc...
mit
7,183,825,171,892,839,000
44.102941
173
0.511901
false
beni55/picochess
libs/requests/auth.py
331
6123
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header ...
gpl-3.0
-1,553,409,804,620,124,700
30.725389
107
0.553324
false