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
varuntiwari27/rally
todo-api/flask/lib/python2.7/site-packages/setuptools/package_index.py
32
39963
"""PyPI and direct package downloading""" import sys import os import re import shutil import socket import base64 import hashlib import itertools from functools import wraps try: from urllib.parse import splituser except ImportError: from urllib2 import splituser from setuptools.extern import six from setupt...
apache-2.0
-1,370,013,009,798,207,500
34.841256
87
0.564597
false
liberatorqjw/scikit-learn
sklearn/neighbors/regression.py
39
10464
"""Nearest Neighbor Regression""" # Authors: Jake Vanderplas <vanderplas@astro.washington.edu> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl> # Multi-output support by Arna...
bsd-3-clause
5,071,833,011,946,888,000
35.333333
78
0.606174
false
ashray/VTK-EVM
ThirdParty/Twisted/twisted/pair/ethernet.py
67
1703
# -*- test-case-name: twisted.pair.test.test_ethernet -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # """Support for working directly with ethernet frames""" import struct from twisted.internet import protocol from twisted.pair import raw from zope.interface import implements, Interf...
bsd-3-clause
-6,492,360,107,958,124,000
29.410714
70
0.606577
false
jasonpr59/lisp
datatypes.py
1
3115
from collections import namedtuple import fractions class DataType(object): """ABC for Lisp Datatypes. We do not guarantee that all Lisp data inherrits from DataType. """ class Fraction(DataType, fractions.Fraction): def __repr__(self): if self.denominator == 1: print 'NUM %s' % ...
gpl-2.0
4,845,982,860,921,634,000
26.086957
72
0.607705
false
kajgan/stbgui
lib/python/Screens/SessionGlobals.py
29
2428
from Screens.Screen import Screen from Components.Sources.CurrentService import CurrentService from Components.Sources.EventInfo import EventInfo from Components.Sources.FrontendStatus import FrontendStatus from Components.Sources.FrontendInfo import FrontendInfo from Components.Sources.Source import Source from Compon...
gpl-2.0
4,380,544,440,975,197,000
45.692308
140
0.71911
false
gawrysz/piernik
bin/qa.py
3
15772
#!/usr/bin/env python import re import sys import hashlib import subprocess as sp import numpy as np debug = False typ1 = np.dtype([('name', 'a50'), ('beg', 'i'), ('end', 'i'), ('type', 'a4')]) # starts with spaces or spaces and one of { 'end', 'pure', ... } # if function it can have a type next goes subroutine or f...
gpl-3.0
4,441,384,564,578,813,000
38.039604
136
0.537408
false
SimVascular/VTK
Examples/Annotation/Python/annotatePick.py
9
2637
#!/usr/bin/env python # This example demonstrates cell picking using vtkCellPicker. It # displays the results of picking using a vtkTextMapper. from __future__ import print_function import vtk # create a sphere source, mapper, and actor sphere = vtk.vtkSphereSource() sphereMapper = vtk.vtkPolyDataMapper() sphereMap...
bsd-3-clause
-9,188,953,440,532,430,000
29.310345
70
0.768677
false
larroy/mxnet
tests/python/unittest/test_io.py
2
22312
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
6,485,250,830,659,649,000
36.881154
120
0.580988
false
yize/grunt-tps
tasks/lib/python/Lib/python2.7/collections.py
35
25883
__all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __all__ += _abcoll.__all__ from _collections import deque, ...
mit
7,878,783,581,307,923,000
36.349206
99
0.540393
false
CACTUS-Mission/TRAPSat
TRAPSat_cFS/cfs/cfe/tools/cFS-GroundSystem/MainWindow.py
1
7489
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainWindow.ui' # # Created: Wed Jun 24 09:56:47 2015 # by: PyQt4 UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Att...
mit
8,071,100,762,507,740,000
51.006944
104
0.723328
false
plum-umd/pasket
pasket/rewrite/proxy.py
1
3168
import copy as cp import logging import lib.const as C import lib.visit as v from .. import util from ..meta import class_lookup from ..meta.template import Template from ..meta.clazz import Clazz from ..meta.method import Method from ..meta.field import Field from ..meta.statement import Statement, to_statements fro...
mit
-461,203,738,840,445,440
28.06422
79
0.597538
false
undoware/neutron-drive
google_appengine/lib/PyAMF/pyamf/tests/test_imports.py
26
2326
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Tests pyamf.util.imports @since: 0.3.1 """ import unittest import sys import os.path from pyamf.util import imports class InstalledTestCase(unittest.TestCase): """ Tests to ensure that L{imports.finder} is installed in L{sys.meta_path} ...
bsd-3-clause
-5,583,400,372,620,251,000
21.152381
75
0.599312
false
replicatorg/ReplicatorG
skein_engines/skeinforge-35/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py
6
34046
""" Tableau has a couple of base classes for analyze viewers. """ from __future__ import absolute_import #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module. import __init__ from fabmetheus_utilities.hidden_scrol...
gpl-2.0
7,626,457,955,642,946,000
44.213811
191
0.763937
false
apache/couchdb-mango
test/04-key-tests.py
5
4947
# -*- coding: latin-1 -*- # 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, softwar...
apache-2.0
4,436,157,106,361,956,000
31.708609
79
0.533711
false
CiscoSystems/nova
nova/tests/db/test_sqlite.py
16
1931
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
7,072,318,078,823,942,000
36.134615
78
0.68928
false
ricard33/dojango
dojango/decorators.py
6
5526
from django import VERSION as django_version if django_version >= (1, 5, 0): import json else: from django.utils import simplejson as json from django.http import HttpResponseNotAllowed, HttpResponseServerError from util import to_json_response from util import to_dojo_data try: from functools import wrap...
bsd-3-clause
-3,045,648,045,221,180,400
35.84
117
0.622874
false
dimid/ansible-modules-extras
cloud/centurylink/clc_server.py
40
57449
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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) any la...
gpl-3.0
-1,997,936,124,154,776,800
35.245426
120
0.543891
false
MrNuggles/HeyBoet-Telegram-Bot
temboo/Library/Wordnik/Word/GetAudio.py
5
4208
# -*- coding: utf-8 -*- ############################################################################### # # GetAudio # Retrieves the audio pronunciation of a given word. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
gpl-3.0
1,395,585,380,613,507,000
38.327103
218
0.660409
false
arborh/tensorflow
tensorflow/python/ops/ragged/ragged_string_ops_test.py
8
5449
# Copyright 2018 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
2,945,865,950,922,724,400
37.104895
80
0.480272
false
galak/zephyr
scripts/kconfig/kconfiglib.py
6
259872
# Copyright (c) 2011-2019, Ulf Magnusson # SPDX-License-Identifier: ISC """ Overview ======== Kconfiglib is a Python 2/3 library for scripting and extracting information from Kconfig (https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt) configuration systems. See the homepage at https://github.com/u...
apache-2.0
4,434,720,175,618,536,000
35.274707
102
0.576838
false
yugangw-msft/azure-cli
scripts/curl_install_pypi/install.py
2
16843
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
mit
7,156,793,176,365,455,000
39.007126
271
0.632726
false
TAMU-CPT/galaxy-tools
tools/efetch/attic/cpt-efetch_OBSOLETE.py
1
4271
import argparse import sys from time import sleep from Bio import Entrez from Bio import SeqIO import urllib # Not very DRY, but, I think this will get the job done and be easy to read/alter for anyone in the future. def do_multi(user_input,db,sleep_amt,ret_type): """ Formats a multi-fasta/gbk """ acc_list = ...
gpl-3.0
6,414,762,377,580,697,000
40.076923
147
0.57668
false
the-archer/ai-project
TrafficModel/roads.py
1
1433
from road import Road import csv import math class Roads(): def __init__(self,roadsList): self.roads =[] for itr in roadsList: self.roads.append(Road(itr[0],itr[1],itr[2],itr[3],itr[4],itr[5],itr[6], itr[7], itr[8])) def SignalCheck(self,itr): if (itr+1)%20 == 0: #check itr logic ...
gpl-2.0
4,976,586,320,390,679,000
21.883333
92
0.618981
false
mrtukkin/svm-street-detector
devkit_kitti/transform2BEV.py
1
4409
#!/usr/bin/env python # # THE KITTI VISION BENCHMARK SUITE: ROAD BENCHMARK # # Copyright (C) 2013 # Honda Research Institute Europe GmbH # Carl-Legien-Str. 30 # 63073 Offenbach/Main # Germany # # UNPUBLISHED PROPRIETARY MATERIAL. # ALL RIGHTS RESERVED. # # Authors: Tobias Kuehnl <tkuehnl@cor-lab.uni-bielefeld....
gpl-3.0
-6,132,846,286,899,009,000
37.017241
134
0.588115
false
peterli2012/ipmanagement
WebContent/jslib/flatlab/assets/file-uploader/server/gae-python/main.py
242
5844
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.1.1 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appe...
apache-2.0
-6,320,846,155,306,343,000
33.376471
90
0.549281
false
tibbe/ghc
testsuite/driver/runtests.py
7
10195
# # (c) Simon Marlow 2002 # import sys import os import string import getopt import platform import time import re # We don't actually need subprocess in runtests.py, but: # * We do need it in testlibs.py # * We can't import testlibs.py until after we have imported ctypes # * If we import ctypes before subprocess on...
bsd-3-clause
-2,389,885,932,227,656,700
32.536184
114
0.583325
false
chyeh727/django
tests/ordering/tests.py
301
10033
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.db.models import F from django.test import TestCase from .models import Article, Author, Reference class OrderingTests(TestCase): def setUp(self): self.a1 = Article.objects.create( ...
bsd-3-clause
-6,320,177,567,299,417,000
29.776074
98
0.48789
false
ms-iot/python
cpython/Lib/distutils/command/install_headers.py
205
1298
"""distutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" from distutils.core import Command # XXX force is never used class install_headers(Command): description = "install C/C++ header files" user_options = ...
bsd-3-clause
-4,953,566,051,336,893,000
26.617021
75
0.564715
false
bonitadecker77/python-for-android
python3-alpha/python3-src/Lib/test/test_dbm_dumb.py
60
5823
#! /usr/bin/env python3 """Test script for the dumbdbm module Original by Roger E. Masse """ import io import os import unittest import dbm.dumb as dumbdbm from test import support _fname = support.TESTFN def _delete_files(): for ext in [".dir", ".dat", ".bak"]: try: os.unlink(_fname + ext...
apache-2.0
-3,722,879,330,746,263,000
27.404878
83
0.498197
false
photoninger/ansible
lib/ansible/modules/system/group.py
17
13681
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Stephen Fromm <sfromm@gmail.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': ...
gpl-3.0
-959,868,078,657,006,500
28.170576
92
0.535049
false
rodrigoprimo/gitinspector_wp
gitinspector/metrics.py
2
9387
# coding: utf-8 # # Copyright © 2012-2014 Ejwa Software. All rights reserved. # # This file is part of gitinspector. # # gitinspector 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...
gpl-3.0
7,081,360,285,834,687,000
43.065728
144
0.62508
false
zzzombat/precise-python-django-social-auth
social_auth/backends/contrib/instagram.py
7
1683
from urllib import urlencode from django.utils import simplejson from social_auth.backends import BaseOAuth2, OAuthBackend, USERNAME from social_auth.utils import dsa_urlopen INSTAGRAM_SERVER = 'instagram.com' INSTAGRAM_AUTHORIZATION_URL = 'https://instagram.com/oauth/authorize' INSTAGRAM_ACCESS_TOKEN_URL = 'https:...
bsd-3-clause
-7,391,008,993,317,231,000
29.6
71
0.663696
false
abaditsegay/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_posix.py
51
9802
"Test posix functions" from test import test_support try: import posix except ImportError: raise test_support.TestSkipped, "posix is not available" import time import os import pwd import shutil import unittest import warnings warnings.filterwarnings('ignore', '.* potential security risk .*', ...
apache-2.0
-6,561,888,327,826,015,000
34.258993
121
0.52224
false
abaditsegay/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/lib/winerror.py
45
101427
"""Error related constants for win32 Generated by h2py from winerror.h """ # Few extras added manually... TRUST_E_PROVIDER_UNKNOWN = -2146762751 TRUST_E_ACTION_UNKNOWN = -2146762750 TRUST_E_SUBJECT_FORM_UNKNOWN = -2146762749 TRUST_E_SUBJECT_NOT_TRUSTED = -2146762748 # up to here... FACILITY_WINRM = 51 FACILITY_WINDOW...
apache-2.0
-6,184,702,772,341,464,000
32.674303
67
0.778905
false
bgxavier/nova
nova/tests/unit/objects/test_flavor.py
36
10238
# Copyright 2013 Red Hat, 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 a...
apache-2.0
-1,940,057,475,974,960,000
39.466403
78
0.581657
false
shakamunyi/neutron
neutron/db/api.py
7
1845
# Copyright 2011 VMware, 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
-3,732,843,330,278,926,000
27.384615
78
0.690515
false
csrg-utfsm/acscb
LGPL/CommonSoftware/nctest/ws/test/pyStructureEventTest.py
8
1355
#!/usr/bin/env python from Acspy.Nc.CommonNC import CommonNC from Acspy.Nc.Supplier import Supplier import datacapEx from datacapEx import ExecBlockProcessedEvent, DataCapturerId, ExecBlockStartedEvent, ScanStartedEvent import asdmEX s = Supplier('pyTest-NC') name = 'DATACAP1' s.publishEvent(name) ses...
mit
-4,993,675,096,094,127,000
29.111111
115
0.75203
false
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/openstack/tests/unit/compute/v2/test_limits.py
3
5732
# 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...
mit
5,214,594,145,331,738,000
35.980645
79
0.641137
false
bufferx/stormed-amqp
stormed/serialization.py
4
6242
import time import datetime from struct import Struct from itertools import izip from stormed import method from stormed.message import ContentHeader, Message def parse_fields(fields, data): vals = [] offset = 0 bit_parser = None for f in fields: if f == 'bit': if bit_parser is Non...
mit
2,755,973,569,133,018,600
27.244344
80
0.584108
false
javilinux/stampython
stampy/plugin/welcome.py
2
2377
#!/usr/bin/env python # encoding: utf-8 # # Description: Plugin for processing welcome to chats # Author: Pablo Iranzo Gomez (Pablo.Iranzo@gmail.com) import logging import stampy.plugin.config import stampy.stampy from stampy.i18n import _ from stampy.i18n import _L def init(): """ Initializes module :r...
gpl-3.0
2,849,230,937,932,558,000
23.760417
163
0.624737
false
johtani/elasticsearch
dev-tools/get-bwc-version.py
29
2725
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
apache-2.0
8,242,536,106,040,447,000
31.831325
90
0.696147
false
WilJoey/tn_ckan
ckan/new_tests/logic/auth/test_init.py
1
5834
import nose import ckan.model as core_model import ckan.logic as logic import ckan.new_tests.helpers as helpers import ckan.logic.auth as logic_auth class TestGetObjectErrors(object): def _get_function(self, obj_type): _get_object_functions = { 'package': logic_auth.get_package_object, ...
mit
4,935,829,021,922,854,000
33.72619
77
0.544909
false
EduardoMolina/SU2
SU2_PY/SU2/util/mp_eval.py
5
3376
import os import multiprocessing as mp import numpy as np import sys if sys.version_info[0] > 2: # In Py3, range corresponds to Py2 xrange xrange = range class mp_eval(object): def __init__(self,function,num_procs=None): self.__name__ = function.__name__ tasks = m...
lgpl-2.1
-4,901,467,251,500,575,000
25.170543
63
0.490225
false
nii-cloud/dodai-compute
nova/api/openstack/contrib/rescue.py
2
2465
# Copyright 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...
apache-2.0
-1,541,159,810,058,917,000
28.698795
77
0.655172
false
qtproject/pyside-pyside
tests/QtWidgets/bug_785.py
1
2144
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
lgpl-2.1
-1,993,517,601,716,054,300
35.965517
77
0.646922
false
mvala/AliPhysics
PWGMM/MC/aligenqa/aligenqa/compare.py
41
10130
import re from rootpy import ROOT from rootpy.io import root_open from aligenqa import roofie, utils def _reduce_single_canvases(results_dirs, gen_names, get_canvas_func, legend_regex): fig_comp = roofie.Figure() for i, (result_dir, marker) in enumerate(zip(results_dirs, ['opendiamond', 'cross'])): ...
bsd-3-clause
2,072,407,519,743,616,300
49.904523
124
0.501382
false
amontefusco/gnuradio-amontefusco
gnuradio-examples/python/usrp/usrp_wfm_rcv_pll.py
9
14148
#!/usr/bin/env python # # Copyright 2005,2006,2007 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 you...
gpl-3.0
-7,192,675,197,548,091,000
38.966102
119
0.544883
false
seanchen/taiga-back
taiga/projects/history/serializers.py
5
1379
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.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 F...
agpl-3.0
1,637,639,904,845,635,000
40.727273
78
0.75236
false
proteus-cpi/FixedPoint.py
fixedpoint/test/test_fixedpoint.py
1
27232
###!/usr/bin/env python """ unit tests for FixedPoint This module is intended to be run as a regression test during Python installation """ import sys # Added the module path to sys.path sys.path.extend([ '../../']) #print sys.path from fixedpoint import * __copyright__ = "Copyright (C) Python Software Foundatio...
gpl-2.0
-266,373,271,261,005,900
29.910329
85
0.553577
false
fpeyre/shinken
test/test_dummy.py
18
2022
#!/usr/bin/env python # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken 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 F...
agpl-3.0
-3,267,551,562,894,659,000
35.763636
134
0.661721
false
Nespa32/sm_project
wordcloud_gen/wordcloud_package/wordcloud/wordcloud.py
1
14076
# Author: Andreas Christian Mueller <amueller@ais.uni-bonn.de> # (c) 2012 # Modified by: Paul Nechifor <paul@nechifor.net> # # License: MIT from random import Random import os import re import sys import numpy as np from operator import itemgetter from PIL import Image from PIL import ImageDraw from PIL import ImageF...
mit
1,665,463,907,156,999,000
33.415648
96
0.552288
false
anchor/vaultaire-tools
telemetry/watch_outstanding.py
1
1176
#!/usr/bin/env python2.6 import sys '''watch a telemetry log and show how many databursts are outstanding over time TTT 1393979427248973000 ffffffff messages_in = 68751 TTT 1393979427249019000 ffffffff acks_received_from_upstream = 68722 ''' from datetime import datetime import time import select def outstanding_d...
bsd-3-clause
1,802,011,389,727,716,900
24.021277
79
0.687925
false
kumaralokgithub/grpc
tools/run_tests/sanity/check_version.py
14
2810
#!/usr/bin/env python # Copyright 2016 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
-3,738,873,924,885,419,500
31.674419
124
0.647331
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/DataHandlers/Mcl_Cmd_GetAdmin_DataHandler.py
1
2279
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: Mcl_Cmd_GetAdmin_DataHandler.py def DataHandlerMain(namespace, InputFilename, OutputFilename): import mcl.imports import mcl.data.Input ...
unlicense
687,496,102,544,706,000
39
90
0.686266
false
kosgroup/odoo
addons/website_payment/controllers/main.py
9
4462
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import http, _ from odoo.http import request class WebsitePayment(http.Controller): @http.route(['/my/payment_method'], type='http', auth="user", website=True) def payment_method(self, **kwargs): ...
gpl-3.0
4,283,709,320,380,577,300
51.494118
203
0.621918
false
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/google/auth/transport/__init__.py
27
3442
# 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,...
mit
-8,832,527,858,401,201,000
34.854167
79
0.687972
false
carlodef/s2p
utils/s2p_to_potree.py
2
6815
#!/usr/bin/env python # Copyright (C) 2017, Gabriele Facciolo <gfacciol@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 option) a...
agpl-3.0
-5,099,886,897,646,737,000
34.310881
183
0.623184
false
geektoni/shogun
examples/undocumented/python/distance_canberraword.py
2
1165
#!/usr/bin/env python from tools.load import LoadMatrix import shogun as sg lm=LoadMatrix() traindna = lm.load_dna('../data/fm_train_dna.dat') testdna = lm.load_dna('../data/fm_test_dna.dat') parameter_list = [[traindna,testdna,3,0,False],[traindna,testdna,3,0,False]] def distance_canberraword (fm_train_dna=traindn...
bsd-3-clause
-899,271,487,659,250,200
34.30303
98
0.755365
false
amlyj/pythonStudy
2.7/data_analysis/study_numpy/numpy_ndarray.py
1
5118
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 17-7-22 上午12:41 # @Author : tom.lee # @docs : http://old.sebug.net/paper/books/scipydoc/numpy_intro.html # @File : study_numpy.py # @Software: PyCharm """ numpy Numpy是Python的一个科学计算的库,提供了矩阵运算的功能,其一般与Scipy,matplotlib一起使用. NumPy提供了两种基本的对象: ndarray(N-d...
mit
8,926,785,202,037,982,000
20.380952
71
0.594933
false
sahiljain/catapult
third_party/gsutil/third_party/boto/boto/manage/task.py
153
6781
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
bsd-3-clause
1,528,276,492,954,670,300
37.528409
104
0.59416
false
tctimmeh/dc-django-base
dcbase/tests/unit/models/testUserProfile.py
1
1456
from dcbase.apps import TIMEZONE_SESSION_KEY from django.utils.timezone import get_current_timezone from dcbase.models import UserProfile from dcbase.tests.unit import UnitTestCase from django.utils import translation from django.utils.translation import LANGUAGE_SESSION_KEY class TestUserProfile(UnitTestCase): d...
mit
7,954,828,067,341,185,000
32.860465
77
0.710165
false
RaoUmer/django
django/contrib/admin/validation.py
104
20582
from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.fields import FieldDoesNotExist from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model, _get_foreign_key) from django.contrib.admin import ListFilter, FieldListFilter from django.co...
bsd-3-clause
1,509,278,499,232,580,900
48.121718
146
0.565397
false
nthien/pulp
bindings/pulp/bindings/exceptions.py
15
3895
""" Defines exception classes to handle server connection and request exceptions """ from gettext import gettext as _ class RequestException(Exception): """ Base exception class for all exceptions that originate by the Pulp server. These exceptions coming from the server use the standard exception struct...
gpl-2.0
-3,054,216,538,059,623,000
29.912698
100
0.679332
false
lpramuk/automation-tools
tests/test_log.py
4
5728
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from automation_tools.satellite6.log import LogAnalyzer @pytest.fixture(autouse=True) def execute(mocker): """Mock fabric's execute function to avoid call through network""" execute_mock = mocker.patch('automation_tools.satellite6...
gpl-3.0
4,972,498,337,346,531,000
32.302326
76
0.643156
false
chaudum/crate-viz
src/crate/__init__.py
1
1227
# -*- coding: utf-8; -*- # # Licensed to CRATE Technology GmbH ("Crate") under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. Crate licenses # this file to you under the Apache License, Version 2.0 (the "License"...
apache-2.0
-4,092,897,553,084,480,500
37.34375
77
0.752241
false
JesseLivezey/plankton
pylearn2/scripts/datasets/download_binarized_mnist.py
44
1673
""" Download script for the unlabeled version of the MNIST dataset, used in On the Quantitative Analysis of Deep Belief Networks Salakhutdinov and Murray http://www.mit.edu/~rsalakhu/papers/dbn_ais.pdf The MNIST database of handwritten digits LeCun and Cortes http://yann.lecun.com/exdb/mnist/ "...
bsd-3-clause
4,041,865,013,143,901,000
33.142857
78
0.664077
false
mkaluza/external_chromium_org
tools/telemetry/telemetry/value/list_of_scalar_values_unittest.py
26
3046
# Copyright 2013 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. import os import unittest from telemetry import value from telemetry.page import page_set from telemetry.value import list_of_scalar_values class TestBase(u...
bsd-3-clause
6,106,454,995,718,517,000
35.698795
72
0.670716
false
zouyapeng/horizon
openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/workflows/create.py
6
11799
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
-6,374,503,991,507,907,000
37.433225
78
0.599288
false
carvalhomb/tsmells
fetch/src/snavtofamix/src/common/entity_references/EntityReferences.py
1
10176
# !/usr/bin/python # This file is part of snavtofamix (Source Navigator to FAMIX). # # snavtofamix 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 lat...
gpl-2.0
6,902,018,609,074,059,000
29.558559
105
0.658903
false
sinbazhou/odoo
addons/base_gengo/ir_translation.py
343
4344
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-5,903,222,956,478,336,000
41.174757
198
0.523941
false
sebrandon1/nova
nova/tests/unit/api/openstack/compute/test_consoles.py
3
11416
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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-2.0
-6,941,240,385,088,162,000
37.053333
78
0.589874
false
applicationdevm/XlsxWriter
xlsxwriter/test/comparison/test_textbox15.py
8
1119
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
6,346,789,165,322,493,000
25.642857
79
0.57462
false
kobejean/tensorflow
tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable.py
19
6628
# 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
407,105,974,785,115,100
38.218935
80
0.630809
false
DinoCow/airflow
airflow/sensors/web_hdfs_sensor.py
7
1167
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-1,324,661,222,095,175,000
39.241379
94
0.767781
false
ambikeshwar1991/gnuradio-3.7.4
gr-fft/python/fft/__init__.py
54
1057
# # Copyright 2012 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) # any later version. # #...
gpl-3.0
-8,449,761,521,765,768,000
32.03125
70
0.726585
false
mumuwoyou/vnpy
vn.trader/ibGateway/ibGateway.py
1
26652
# encoding: UTF-8 ''' ibpy的gateway接入 注意事项: 1. ib api只能获取和操作当前连接后下的单,并且每次重启程序后,之前下的单子收不到 2. ib api的成交也只会推送当前连接后的成交 3. ib api的持仓和账户更新可以订阅成主推模式,因此qryAccount和qryPosition就用不到了 4. 目前只支持股票和期货交易,ib api里期权合约的确定是基于Contract对象的多个字段,比较复杂暂时没做 5. 海外市场的交易规则和国内有很多细节上的不同,所以一些字段类型的映射可能不合理,如果发现问题欢迎指出 ''' import os import json import ca...
mit
3,896,315,225,088,160,300
36.176647
151
0.507168
false
lucychambers/lucychambers.github.io
.bundle/ruby/2.0.0/gems/pygments.rb-0.6.0/vendor/pygments-main/tests/test_cfm.py
34
1433
# -*- coding: utf-8 -*- """ Basic ColdfusionHtmlLexer Test ~~~~~~~~~~~~~~~~~ :copyright: Copyright 2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import unittest import os from pygments.token import Token from pygments.lexers import ColdfusionHtmlLexer class Col...
gpl-2.0
6,326,434,020,643,821,000
30.152174
73
0.551989
false
wildjan/Flask
Work/Trivia - Module 5/env/Lib/site-packages/pip/_vendor/requests/packages/urllib3/request.py
567
5808
# urllib3/request.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php try: from urllib.parse import urlencode except ImportError: from urllib import urlencod...
apache-2.0
5,710,481,016,150,111,000
40.191489
81
0.612603
false
fermat618/pida
pida-plugins/rfc/rfc.py
1
10272
# -*- coding: utf-8 -*- # Copyright (c) 2007 The PIDA Project #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, modif...
gpl-2.0
-5,516,691,187,225,682,000
30.127273
97
0.5809
false
paulhayes/fofix
src/Video.py
2
9281
################################################################## # -*- coding: iso-8859-1 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
gpl-2.0
5,253,343,211,417,889,000
42.369159
167
0.640771
false
DaniilLeksin/gc
wx/richtext.py
1
185239
# This file was created automatically by SWIG 1.3.29. # Don't modify this file, modify the SWIG interface instead. import _richtext import new new_instancemethod = new.instancemethod def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name ...
apache-2.0
1,721,687,771,661,979,400
39.330721
142
0.662285
false
ArcherCraftStore/ArcherVMPeridot
Python/Lib/xml/sax/__init__.py
237
3503
"""Simple API for XML (SAX) implementation for Python. This module provides an implementation of the SAX 2 interface; information about the Java version of the interface can be found at http://www.megginson.com/SAX/. The Python version of the interface is documented at <...>. This package contains the following modu...
apache-2.0
-2,566,691,962,737,051,000
32.361905
73
0.691122
false
django-oscar/django-oscar-sagepay-direct
oscar_sagepay/dashboard/views.py
1
1351
from django.views.generic import ListView, DetailView from django.db.models import Q from oscar_sagepay import models from . import forms class Transactions(ListView): model = models.RequestResponse context_object_name = 'transactions' template_name = 'sagepay/dashboard/request_list.html' paginate_by...
bsd-3-clause
8,422,364,454,013,887,000
31.95122
79
0.646188
false
barbour-em/osf.io
tasks.py
1
23428
#!/usr/bin/env python # -*- coding: utf-8 -*- """Invoke tasks. To run a task, run ``$ invoke <COMMAND>``. To see a list of commands, run ``$ invoke --list``. """ import os import sys import code import platform import subprocess import logging from invoke import task, run from website import settings logging.getLogg...
apache-2.0
3,966,476,144,218,623,500
28.285
121
0.638552
false
omniacreator/qtcreator
tests/system/suite_qtquick/tst_qtquick_creation/test.py
3
4077
############################################################################# ## ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this f...
lgpl-2.1
5,733,300,208,502,593,000
47.535714
99
0.622517
false
geopython/QGIS
tests/src/python/test_qgsserver_accesscontrol_wcs.py
10
5400
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __autho...
gpl-2.0
-2,916,215,830,938,663,400
36.5
87
0.555185
false
zhongliliu/muse
muse/Crystaloper/How2rep.py
1
1119
""" MUSE -- A Multi-algorithm-collaborative Universal Structure-prediction Environment Copyright (C) 2010-2017 by Zhong-Li Liu This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of ...
gpl-2.0
3,827,382,686,552,916,500
31.911765
86
0.652368
false
caesar2164/edx-platform
common/djangoapps/student/management/tests/test_change_enrollment.py
44
4210
""" Test the change_enrollment command line script.""" import ddt from mock import patch from django.core.management import call_command from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from student.tests.factories import UserF...
agpl-3.0
1,465,981,579,450,905,300
33.227642
106
0.585273
false
Senseg/Py4A
python3-alpha/extra_modules/gdata/analytics/__init__.py
261
6995
#!/usr/bin/python # # Original Copyright (C) 2006 Google Inc. # Refactored in 2009 to work for Google Analytics by Sal Uryasev at Juice 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 # ...
apache-2.0
-25,650,583,290,376,510
30.367713
78
0.661187
false
joachimmetz/plaso
plaso/output/shared_json.py
3
3773
# -*- coding: utf-8 -*- """Shared functionality for JSON based output modules.""" import json from plaso.lib import errors from plaso.output import dynamic from plaso.output import formatting_helper from plaso.serializer import json_serializer class JSONEventFormattingHelper(formatting_helper.EventFormattingHelper)...
apache-2.0
5,456,922,606,542,207,000
34.261682
80
0.690167
false
nwjs/chromium.src
third_party/blink/web_tests/external/wpt/tools/third_party/more-itertools/setup.py
39
2130
# Hack to prevent stupid error on exit of `python setup.py test`. (See # http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html.) try: import multiprocessing # noqa except ImportError: pass from re import sub from setuptools import setup, find_packages def get_long_description(): # Fix display iss...
bsd-3-clause
-3,907,654,480,670,130,000
35.101695
78
0.621127
false
draugiskisprendimai/odoo
addons/website_forum_doc/__openerp__.py
322
1508
# -*- 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
225,389,171,925,834,300
33.272727
78
0.572281
false
jamielennox/keystone
keystone/common/sql/migrate_repo/versions/065_add_domain_config.py
11
1694
# 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,602,853,619,612,037,000
35.826087
75
0.687131
false
michael-dev2rights/ansible
lib/ansible/modules/web_infrastructure/jboss.py
72
4641
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be> # 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,954,459,552,547,969,500
30.571429
93
0.639733
false
orbweb/ParsePy
parse_rest/query.py
7
6184
# 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. # # This program is distributed in the hope that it will ...
gpl-3.0
-1,392,001,480,957,408,800
32.069519
128
0.588131
false
jxs/servo
tests/wpt/css-tests/css-text-decor-3_dev/xhtml1print/reference/support/generate-text-emphasis-style-property-tests.py
841
3434
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests text-emphasis-style-property-011 ~ 020 which cover all possible values of text-emphasis-style property, except none and <string>, with horizontal writing mode. It outputs a list of all tests it generated in the format of Mozilla reftest....
mpl-2.0
1,192,494,417,125,961,200
39.164706
113
0.614528
false
taroplus/spark
python/pyspark/sql/streaming.py
15
40034
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
-743,752,403,602,917,400
43.780761
100
0.614727
false
haikuginger/urllib3
dummyserver/testcase.py
3
6096
import unittest import socket import threading from nose.plugins.skip import SkipTest from tornado import ioloop, web from dummyserver.server import ( SocketServerThread, run_tornado_app, run_loop_in_thread, DEFAULT_CERTS, ) from dummyserver.handlers import TestingApp from dummyserver.proxy import Prox...
mit
9,156,511,749,318,400,000
29.178218
77
0.6104
false
mfmarlonferrari/django-bootstrap-calendar
django_bootstrap_calendar/templatetags/bootstrap_calendar.py
5
2245
# -*- coding: utf-8 -*- __author__ = 'sandlbn' from django import template from django.template.loader import render_to_string from django_bootstrap_calendar.utils import MinifyJs register = template.Library() @register.simple_tag def bootstrap_calendar(css_classes): """ return a calendar div if none push e...
bsd-3-clause
-944,136,512,177,300,700
21.227723
92
0.627617
false
google-code-export/pyglet
tests/window/WINDOW_SET_MOUSE_SYSTEM_CURSOR.py
30
2382
#!/usr/bin/env python '''Test that mouse cursor can be set to a platform-dependent image. Expected behaviour: One window will be opened. Press the left and right arrow keys to cycle through the system mouse cursors. The current cursor selected will be printed to the terminal. Note that not all curs...
bsd-3-clause
5,154,007,731,366,783,000
31.630137
88
0.588161
false