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
lumig242/Hue-Integration-with-CDAP
desktop/core/ext-py/guppy-0.1.10/guppy/heapy/View.py
37
15803
#._cv_part guppy.heapy.View class Horizon: def __init__(self, mod): self.mod = mod self._hiding_tag_ = mod._hiding_tag_ # Make preallocations of things that will be needed for news() self.retset = self.mod.retset self.hv = mod.hv self.exc_info = self.mod._root.sys.exc_info self.iso = self.mod.iso str(self....
apache-2.0
3,074,327,571,739,286,500
27.119217
96
0.648927
false
eayunstack/neutron
neutron/db/migration/alembic_migrations/versions/mitaka/expand/3894bccad37f_add_timestamp_to_base_resources.py
9
1093
# Copyright 2015 HuaWei Technologies. # # 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
-1,190,092,259,487,699,000
28.540541
78
0.706313
false
BizzCloud/PosBox
addons/account/wizard/__init__.py
362
2345
# -*- 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
-8,761,384,751,244,138,000
33.485294
78
0.746695
false
roadmapper/ansible
lib/ansible/utils/plugin_docs.py
28
6674
# Copyright: (c) 2012, Jan-Piet Mens <jpmens () 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 from ansible import constants as C from ansible.release import __version__ as ...
gpl-3.0
-5,099,433,336,539,839,000
39.695122
128
0.633203
false
andreparrish/python-for-android
python3-alpha/python3-src/Lib/encodings/cp437.py
272
34564
""" Python Character Mapping Codec cp437 generated from 'VENDORS/MICSFT/PC/CP437.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict...
apache-2.0
7,458,370,242,593,095,000
48.518625
103
0.604386
false
rkube/blob_tracking
analysis/correlate_test.py
1
7170
#!/opt/local/bin/python #-*- Encoding: UTF-8 -*- import numpy as np import matplotlib.pyplot as plt from misc.correlate import correlate from sys import exit """ Correlate timeseries of two pixels. Trigger on large amplitudes. Try estimating radial blob velocity from this. """ shotnr = 1120711010 frame0 = 20000 nf...
mit
-2,382,334,053,577,675,000
41.426036
140
0.620502
false
richardfergie/googleads-python-lib
examples/dfp/v201411/inventory_service/get_top_level_ad_units.py
4
2260
#!/usr/bin/python # # Copyright 2014 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
-2,085,369,402,630,550,500
31.753623
78
0.702212
false
js0701/chromium-crosswalk
tools/clang/blink_gc_plugin/tests/test.py
40
4935
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import glob import os import subprocess import sys def run_test(test_base_name, cmd, reset_results): """Run a test...
bsd-3-clause
-7,510,420,996,773,791,000
32.80137
80
0.650253
false
michael-dev2rights/ansible
lib/ansible/modules/network/netscaler/netscaler_lb_monitor.py
22
47419
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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
-5,046,516,464,862,796,000
33.361594
144
0.547354
false
petrvanblokland/Xierpa3
xierpa3/adapters/dynamodbadapter.py
1
1331
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ buro@petr.com, www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------...
mit
-8,644,806,658,218,483,000
26.163265
137
0.567243
false
espressopp/espressopp
src/FixedTripleAngleList.py
1
4092
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the G...
gpl-3.0
-6,926,775,807,159,753,000
29.088235
112
0.601173
false
silverlogic/djangorestframework-timed-auth-token
tests/test_models.py
1
1333
from datetime import timedelta import pytest from django.utils import timezone from timed_auth_token.models import TimedAuthToken from users.models import CustomUser pytestmark = pytest.mark.django_db @pytest.fixture def token(): return TimedAuthToken(user=CustomUser.objects.create(identifier='blah')) def...
mit
-7,390,941,720,491,483,000
28.622222
83
0.738185
false
elijah513/tornado
tornado/test/log_test.py
111
8368
#!/usr/bin/env python # # Copyright 2012 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.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
7,276,263,449,788,894,000
39.230769
105
0.63707
false
matiasherranz/keyczar
cpp/src/tools/swtoolkit/site_scons/site_tools/seven_zip.py
15
5446
#!/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...
apache-2.0
-8,421,848,679,787,878,000
36.558621
78
0.688579
false
Endika/account-invoice-reporting
invoice_print_report_balance_payment/__init__.py
11
1056
# -*- encoding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
-6,597,430,133,704,787,000
43
79
0.611742
false
AdamIsrael/PerfKitBenchmarker
perfkitbenchmarker/providers/alicloud/ali_virtual_machine.py
2
13868
# Copyright 2015 PerfKitBenchmarker 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 appli...
apache-2.0
5,022,751,965,483,299,000
33.67
79
0.64739
false
eulo/miff-project
bower_components/jasmine/setup.py
191
1983
from setuptools import setup, find_packages, os import json with open('package.json') as packageFile: version = json.load(packageFile)['version'] setup( name="jasmine-core", version=version, url="http://pivotal.github.io/jasmine/", author="Pivotal Labs", author_email="jasmine-js@googlegroups.com...
mit
-2,075,709,023,174,786,300
41.191489
115
0.619264
false
lfaller/name-that-microbe
annotate.py
1
4385
#!/usr/bin/env # # Lina Faller, April 2016 # # Usage: python annotate.py -r REF_FILE -i FASTA -o OUTFILE -l LOG # # This script reads in a reference file with two columns. The first column contains an ID # and the second column contains a short fragment of nucleotide sequence that uniquely # identifies this specific re...
mit
4,099,042,656,589,251,600
34.362903
516
0.617788
false
DirectXMan12/nova-hacking
nova/cmd/spicehtml5proxy.py
4
2893
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation # 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.a...
apache-2.0
6,559,316,135,713,641,000
35.1625
78
0.581403
false
linktlh/Toontown-journey
toontown/nametag/NametagGlobals.py
2
9188
from pandac.PandaModules import VBase4 CCNormal = 0 CCNoChat = 1 CCNonPlayer = 2 CCSuit = 3 CCToonBuilding = 4 CCSuitBuilding = 5 CCHouseBuilding = 6 CCSpeedChat = 7 CCFreeChat = 8 CHAT = 0 SPEEDCHAT = 1 CHAT_BALLOON = 0 THOUGHT_BALLOON = 1 cardModel = None arrowModel = None chatBalloon3dModel = None chatBalloon3d...
apache-2.0
8,063,597,720,567,553,000
35.316206
88
0.559316
false
hfp/libxsmm
samples/deeplearning/sparse_training/fairseq/fairseq/models/bart/model.py
1
13648
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension """ import logging impo...
bsd-3-clause
-1,283,638,999,832,824,800
41.25387
111
0.617746
false
aaronfang/personal_scripts
af_scripts/tmp/twigGen.py
2
1158
# generate twigs based on selected curves # automaticly layout uvs # rebuild curve to the certain length of one segment # set root/tip size # chridren twigs root/tip scale down relatively # UI # | [get curves] [rebuild] <unit> | # | -------------------------------------- | # | root size:<2.5> tip si...
mit
-8,612,154,611,137,586,000
31.166667
114
0.567358
false
odoousers2014/odoo
addons/mass_mailing/wizard/test_mailing.py
10
1886
# -*- coding: utf-8 -*- from openerp import tools from openerp.osv import osv, fields class TestMassMailing(osv.TransientModel): _name = 'mail.mass_mailing.test' _description = 'Sample Mail Wizard' _columns = { 'email_to': fields.char('Recipients', required=True, help='Comma-separate...
agpl-3.0
555,256,044,453,715,800
42.860465
123
0.569459
false
Juniper/contrail-dev-neutron
neutron/plugins/ml2/drivers/mechanism_odl.py
4
15181
# Copyright (c) 2013-2014 OpenStack Foundation # 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 # # Un...
apache-2.0
-6,450,496,317,822,348,000
40.365123
79
0.604769
false
WilsonWangTHU/fast-rcnn
lib/fast_rcnn/test.py
43
11975
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Test a Fast R-CNN network on an imdb (image database).""" from fast...
mit
4,616,371,454,746,946,000
35.620795
78
0.574781
false
myusernamejeep/AutobahnPython
examples/wamp/serial2ws/serial2ws.py
26
4486
############################################################################### ## ## Copyright 2012 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 ## ## http://www...
apache-2.0
-796,326,710,591,124,600
26.863354
98
0.63687
false
alobbs/autome
plugin.py
1
1419
import imp import logging import os _shared_objs = {} def _get_one(name): global _shared_objs # Build path here = os.path.dirname(os.path.abspath(__file__)) plugins_dir = os.path.join(here, "plugins") filepath = os.path.join(plugins_dir, '%s.py' % name) # Load plug-in with open(filepath...
mit
-6,117,837,002,146,925,000
21.887097
74
0.599718
false
jelly/calibre
src/calibre/ebooks/rtf/rtfml.py
2
11681
# -*- coding: utf-8 -*- __license__ = 'GPL 3' __copyright__ = '2009, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' ''' Transform OEB content into RTF markup ''' import os import re import cStringIO from lxml import etree from calibre.ebooks.metadata import authors_to_string from calib...
gpl-3.0
-1,022,477,364,762,170,000
37.424342
340
0.546443
false
oihane/odoomrp-utils
purchase_order_line_form_button/models/purchase_order.py
2
1142
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, api, _ class PurchaseOrderLi...
agpl-3.0
-152,419,146,136,152,860
30.722222
78
0.457968
false
NeovaHealth/odoo
addons/l10n_nl/__init__.py
424
1413
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # con...
agpl-3.0
-1,463,066,413,499,595,500
47.724138
80
0.685067
false
faun/django_test
build/lib/django/db/models/options.py
4
19324
import re from bisect import bisect from django.conf import settings from django.db.models.related import RelatedObject from django.db.models.fields.related import ManyToManyRel from django.db.models.fields import AutoField, FieldDoesNotExist from django.db.models.fields.proxy import OrderWrt from django.db.models.loa...
bsd-3-clause
-2,485,314,655,642,649,000
38.92562
122
0.580108
false
Vutshi/qutip
qutip/examples/ex_43.py
1
2912
# # Using the propagator to find the steady state of a driven system. # from qutip import * from pylab import * def run(): # # configure the parameters # delta = 0.075 * 2 * pi # qubit sigma_x coefficient eps0 = 0.0 * 2 * pi # qubit sigma_z coefficient A = 2.0 * 2 * pi # sweep rat...
gpl-3.0
1,423,806,995,877,678,800
23.888889
78
0.539148
false
adybbroe/pyspectral
bin/download_rsr.py
2
1863
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2018, 2019 Pytroll developers # # Author(s): # # Adam.Dybbroe <adam.dybbroe@smhi.se> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Found...
gpl-3.0
7,584,665,210,254,703,000
30.576271
98
0.678476
false
prutseltje/ansible
lib/ansible/modules/windows/win_domain.py
15
2170
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Red Hat, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'core'} DOCUMENTATI...
gpl-3.0
5,866,729,828,626,640,000
34
138
0.688479
false
Pirata-Repository/Pirata
script.navi-x/src/CDialogBrowse.py
6
5956
############################################################################# # # Copyright (C) 2013 Navi-X # # This file is part of Navi-X. # # Navi-X is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation,...
gpl-2.0
8,725,761,048,437,542,000
37.185897
118
0.496138
false
xuechong87/Moegirlwiki
extensions/Widgets/googlecode/googlecode_distutils_upload.py
7
3784
# Copyright 2007 Google Inc. All Rights Reserved. # # Licensed under the terms of the Apache Software License 2.0: # http://www.apache.org/licenses/LICENSE-2.0 # # Questions, comments, feature requests and patches are most welcome. # Please direct all of these to the Google Code users group: # http://groups.google.co...
gpl-2.0
4,046,900,411,250,923,000
31.34188
79
0.613636
false
FreeAgent/djangoappengine-starter
django/forms/fields.py
103
38484
""" Field classes. """ import datetime import os import re import time import urlparse import warnings from decimal import Decimal, DecimalException try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.core.exceptions import ValidationError from django.core import ...
bsd-3-clause
8,956,947,479,971,410,000
39.045786
134
0.608669
false
leapcode/leap_mx
src/leap/mx/tcp_map.py
1
2207
#!/usr/bin/env python # -*- encoding: utf-8 -*- # tcpmap.py # Copyright (C) 2015 LEAP # # 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...
agpl-3.0
1,864,479,382,164,148,200
30.084507
78
0.680109
false
leighpauls/k2cro4
net/tools/testserver/testserver_base.py
1
4300
# 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. import json import optparse import os import struct import sys import warnings # Ignore deprecation warnings, they make our output more cluttered. warni...
bsd-3-clause
-4,025,060,605,070,236,700
33.126984
80
0.608605
false
frreiss/tensorflow-fred
tensorflow/python/framework/device_test.py
8
4043
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-5,223,482,172,206,419,000
40.680412
80
0.658175
false
taknevski/tensorflow-xsmm
tensorflow/contrib/cmake/tools/create_def_file.py
4
4580
# 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
-34,810,069,575,563,430
32.430657
80
0.668122
false
Endika/odoomrp-wip
mrp_stock_location_route_fix/models/stock_warehouse.py
28
1158
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
2,332,386,680,526,471,700
40.357143
78
0.614853
false
osm-fr/osmose-backend
plugins/TagFix_MultipleTag_Lang_fr.py
4
5678
#-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2011 ## ## ...
gpl-3.0
2,661,335,611,068,583,000
50.990826
195
0.50397
false
mattclark/osf.io
addons/onedrive/migrations/0002_auto_20171121_1426.py
22
1426
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-21 20:26 from __future__ import unicode_literals import datetime import pytz from django.db import migrations import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('addons_onedrive', '0001_initial'), ...
apache-2.0
961,913,906,473,882,100
34.65
173
0.631136
false
kromain/chromium-tools
tests/rietveld_test.py
17
15115
#!/usr/bin/env python # 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. """Unit tests for rietveld.py.""" import logging import os import ssl import sys import time import traceback import unittest sys...
bsd-3-clause
7,024,600,442,537,989,000
29.784114
89
0.597089
false
LucHermitte/ITK
Modules/ThirdParty/pygccxml/src/pygccxml/parser/project_reader.py
12
25417
# Copyright 2014 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt import os import time import types from . import source_reader from . import declarations_cache import pygccxml.declarations from ...
apache-2.0
8,976,952,674,609,854,000
39.026772
79
0.551088
false
PYPIT/PYPIT
pypeit/data/arc_lines/generate.py
1
5420
""" Module for generating Arc Line lists Should be run where it is located (for now) """ from __future__ import print_function, absolute_import, division, unicode_literals import numpy as np import os, imp, glob, pdb, gzip import subprocess from astropy import units as u from astropy.units.quantity import Quantity ...
gpl-3.0
-2,047,043,158,704,528,400
31.071006
93
0.510701
false
kitsunde/ansible
lib/ansible/template/vars.py
45
3455
# (c) 2012, 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) any lat...
gpl-3.0
-1,702,991,984,504,979,200
35.368421
94
0.632417
false
maxdeliso/elevatorSim
Lib/sunau.py
55
16822
"""Stuff to parse Sun and NeXT audio files. An audio file consists of a header followed by the data. The structure of the header is as follows. +---------------+ | magic word | +---------------+ | header size | +---------------+ | data size | +--------...
bsd-2-clause
7,208,472,287,320,902,000
33.684536
83
0.574189
false
kevthehermit/VolUtility
volgui/settings.py
1
4765
""" Django settings for volgui project. Generated by 'django-admin startproject' using Django 1.9.2. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os fro...
gpl-3.0
-8,151,305,203,264,801,000
25.926554
98
0.619307
false
Anlim/decode-Django
Django-1.5.1/django/utils/unittest/runner.py
571
6761
"""Running tests""" import sys import time import unittest from django.utils.unittest import result try: from django.utils.unittest.signals import registerResult except ImportError: def registerResult(_): pass __unittest = True class _WritelnDecorator(object): """Used to decorate file-like obj...
gpl-2.0
848,972,424,142,586,800
31.820388
80
0.586895
false
jeroendierckx/Camelot
camelot/admin/object_admin.py
1
35970
# ============================================================================ # # Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved. # www.conceptive.be / project-camelot@conceptive.be # # This file is part of the Camelot Library. # # This file may be used under the terms of the GNU General...
gpl-2.0
-2,867,206,674,349,982,000
37.023256
140
0.584098
false
jedie/pypyjs-standalone
website/js/pypy.js-0.3.0/lib/modules/test/test_undocumented_details.py
136
1169
from test.test_support import run_unittest, check_py3k_warnings import unittest class TestImplementationComparisons(unittest.TestCase): def test_type_comparisons(self): self.assertTrue(str < int or str > int) self.assertTrue(int <= str or int >= str) self.assertTrue(cmp(int, str) != 0) ...
mit
-1,901,981,885,466,694,100
28.974359
63
0.559453
false
jendap/tensorflow
tensorflow/contrib/eager/python/examples/revnet/revnet.py
11
7742
# 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
-8,924,865,303,528,338,000
34.513761
80
0.656032
false
alex-justes/en_scripts
level_upload_task.py
1
2646
#!/usr/bin/python #TODO: Check if cookie-file exists #TODO: Somehow check correctness import pycurl import sys from io import BytesIO from optparse import OptionParser from urllib.parse import urlencode import time import random parser = OptionParser() parser.add_option("-v", "--verbose", action="store_true", dest="...
bsd-3-clause
5,580,291,676,662,700,000
31.666667
109
0.6387
false
frmichel/vo-support-tools
SE/cleanup-se/dump-se-files.py
1
9938
#!/usr/bin/python # This script lists the files of a SE using the gfal2 python api. # The SE whose files are listed is the one corresponding to the url given as argument. # This script outputs a file of which filename is given as argument or stdout if no filename is specified. # The output dump file provides the follow...
mit
151,830,280,212,441,860
36.643939
130
0.568424
false
CapOM/ChromiumGStreamerBackend
tools/telemetry/third_party/gsutilz/third_party/boto/boto/route53/healthcheck.py
151
5824
# Copyright (c) 2014 Tellybug, Matt Millar # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publis...
bsd-3-clause
7,074,106,038,676,884,000
38.890411
214
0.656765
false
telefonicaid/fiware-livedemoapp
package/location2cb/stop_vans.py
1
1067
#!/usr/bin/python # -*- coding: latin-1 -*- # Copyright 2013 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE LiveDemo App # # FI-WARE LiveDemo App 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 ...
agpl-3.0
-7,191,569,714,527,648,000
33.419355
116
0.737582
false
global-humanitarians-unite/ghu
ghu_web/ghu_main/forms.py
1
1204
from django import forms from django.core.exceptions import ValidationError from ghu_global.models import User from django.contrib.auth.validators import UnicodeUsernameValidator from django.contrib.auth.password_validation import validate_password def unused_username(username): if User.objects.filter(username=use...
apache-2.0
8,147,732,982,554,934,000
45.307692
91
0.664452
false
js0701/chromium-crosswalk
tools/telemetry/third_party/modulegraph/modulegraph_tests/test_util.py
23
1801
import unittest import encodings import encodings.aliases from modulegraph import util import sys try: from io import BytesIO except ImportError: from cStringIO import StringIO as BytesIO class TestUtil (unittest.TestCase): def test_imp_find_module(self): fn = util.imp_find_module('encodings.alias...
bsd-3-clause
7,725,963,813,817,848,000
29.525424
81
0.609661
false
ramr/kubernetes
cluster/juju/charms/trusty/kubernetes/hooks/kubernetes_installer.py
213
2518
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
5,911,091,168,795,898,000
36.029412
77
0.611994
false
MihaiMoldovanu/ansible
test/integration/targets/aws_lambda/files/mini_lambda.py
139
1237
from __future__ import print_function import json import os def handler(event, context): """ The handler function is the function which gets called each time the lambda is run. """ # printing goes to the cloudwatch log allowing us to simply debug the lambda if we can find # the log entry. ...
gpl-3.0
5,136,369,159,161,359,000
27.113636
95
0.656427
false
duncanmmacleod/gwpy
gwpy/segments/tests/test_segments.py
3
5648
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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)...
gpl-3.0
-8,258,617,877,686,043,000
33.864198
79
0.574363
false
BehavioralInsightsTeam/edx-platform
lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py
61
2057
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json # Converted from the original South migration 0020_certificatehtmlviewconfiguration_data.py from django.db import migrations, models def forwards(apps, schema_editor): """ Bootstraps the HTML view template with some default configu...
agpl-3.0
-1,220,270,339,833,365,000
33.283333
114
0.64317
false
ClockworkNet/OpScripts
opscripts/config/v5.py
1
4898
# vim: set fileencoding=utf-8 : """OpScripts configuration library (thin wrapper over ConfigArgParse) """ # Standard library from __future__ import absolute_import, division, print_function import os.path import sys # Third-party import configargparse # Local/library specific from opscripts.notify.email import v3 a...
mit
-6,216,933,881,329,285,000
41.224138
77
0.591466
false
ccxt/ccxt
examples/py/tickers.py
1
3385
# -*- coding: utf-8 -*- import os import sys import time root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root + '/python') import ccxt # noqa: E402 def style(s, style): return style + s + '\033[0m' def green(s): return style(s, '\033[92m') def blue(s)...
mit
-3,694,507,562,587,964,000
25.038462
111
0.571049
false
e110c0/unisono
src/unisono/mmplugins/pathmtu.py
1
1898
''' pathmtu.py Created on: May 14, 2009 Authors: dh $LastChangedBy$ $LastChangedDate$ $Revision$ (C) 2008-2009 by Computer Networks and Internet, University of Tuebingen This file is part of UNISONO Unified Information Service for Overlay Network Optimization. UNISONO is free software: you can redist...
gpl-2.0
1,327,504,076,275,457,300
27.757576
73
0.665437
false
jamiefolsom/edx-platform
common/djangoapps/track/shim.py
40
6431
"""Map new event context values to old top-level field values. Ensures events can be parsed by legacy parsers.""" import json import logging from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import UsageKey log = logging.getLogger(__name__) CONTEXT_FIELDS_TO_INCLUDE = [ 'username', 'session...
agpl-3.0
-1,484,493,056,771,462,100
34.142077
118
0.580625
false
cnc-club/linuxcnc
src/hal/user_comps/vismach/scaragui.py
23
5700
#!/usr/bin/python2.4 # Copyright 2007 John Kasunich and Jeff Epler # # 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 lat...
lgpl-2.1
3,438,108,938,155,912,000
29.810811
79
0.671228
false
hitszxp/scikit-learn
sklearn/neighbors/kde.py
32
7925
""" Kernel Density Estimation ------------------------- """ # Author: Jake Vanderplas <jakevdp@cs.washington.edu> import numpy as np from scipy.special import gammainc from ..base import BaseEstimator from ..utils import check_array, check_random_state from ..utils.extmath import row_norms from .ball_tree import BallT...
bsd-3-clause
-4,636,580,290,036,365,000
36.03271
79
0.590662
false
tjhei/burnman_old2
burnman/minerals/Matas_etal_2007.py
2
3277
# BurnMan - a lower mantle toolkit # Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S. # Released under GPL v2 or later. """ Matas_etal_2007 ^^^^^^^^^^^^^^^ Minerals from Matas et al. 2007 and references therein """ from burnman.minerals_base import * class mg_perovskite(material): # ...
gpl-2.0
6,076,168,484,328,200,000
25.216
80
0.429051
false
jrmsdev/bottled-md
setup.py
1
1534
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- import sys from os import path from setuptools import setup def cat(fpath): with open(fpath, 'r') as fh: blob = fh.read() fh.close() return blob desc = 'generate static html5 files from markdown sources (or serve dinamically)' install_requires...
bsd-3-clause
-1,002,207,163,926,811,100
22.584615
81
0.555121
false
Diptanshu8/zulip
tools/test_user_agent_parsing.py
29
1026
#!/usr/bin/env python from __future__ import print_function import re from collections import defaultdict import os import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) from zerver.lib.user_agent import parse_user_agent user_agents_parsed = defaultdict(int) # type: Dict[str, int] user_agents_...
apache-2.0
6,163,543,687,969,769,000
29.176471
80
0.648148
false
alex/treq
treq/test/test_utils.py
11
2084
import mock from treq.test.util import TestCase from treq._utils import default_reactor, default_pool, set_global_pool class DefaultReactorTests(TestCase): def test_passes_reactor(self): mock_reactor = mock.Mock() self.assertEqual(default_reactor(mock_reactor), mock_reactor) def test_uses_...
mit
-3,852,630,059,365,433,000
26.064935
70
0.637716
false
huangbin0709/easyLinux
boot/u-boot-2015.01/tools/patman/command.py
25
4223
# Copyright (c) 2011 The Chromium OS Authors. # # SPDX-License-Identifier: GPL-2.0+ # import os import cros_subprocess """Shell command ease-ups for Python.""" class CommandResult: """A class which captures the result of executing a command. Members: stdout: stdout obtained from command, as a string...
gpl-3.0
-3,159,934,341,182,684,700
33.333333
79
0.619938
false
nuigroup/pymt-widgets
examples/games/tictactoe/tictactoe.py
2
4900
from pymt import * from OpenGL.GL import * # PYMT Plugin integration IS_PYMT_PLUGIN = True PLUGIN_TITLE = 'TicTacToe Game' PLUGIN_AUTHOR = 'Thomas Hansen + Mathieu Virbel' PLUGIN_DESCRIPTION = 'Tic Tac Toe game!' class TTTWinner(MTWidget): def __init__(self, **kwargs): super(TTTWinner, self).__init__(**k...
lgpl-3.0
-3,463,337,430,236,210,700
30.410256
109
0.526531
false
dknlght/dkodi
src/script.module.cryptopy/lib/crypto/cipher/tkip_fake_crc_test.py
1
3754
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- """ crypto.cipher.tkip_fake_crc_test This module tests the creation of TKIP data that passes the WEP crc, but would fail the Michael MIC check. The IEEE TGi specification mandates a 60 second dissassociation of all sessions when two of these malicious pac...
gpl-2.0
-8,979,317,935,381,370,000
39.722222
97
0.648375
false
uannight/reposan
plugin.video.tvalacarta/channels/ib3.py
1
9215
# -*- coding: utf-8 -*- #------------------------------------------------------------ # tvalacarta - XBMC Plugin # Canal para IB3 # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ #------------------------------------------------------------ import urlparse,re from core import logger from core import scrapertools ...
gpl-2.0
887,393,480,064,573,400
43.391304
262
0.641707
false
rrohan/scikit-learn
sklearn/pipeline.py
61
21271
""" The :mod:`sklearn.pipeline` module implements utilities to build a composite estimator, as a chain of transforms and estimators. """ # Author: Edouard Duchesnay # Gael Varoquaux # Virgile Fritsch # Alexandre Gramfort # Lars Buitinck # Licence: BSD from collections import defaultdict...
bsd-3-clause
-4,833,095,201,159,083,000
36.057491
89
0.598373
false
pnorman/mapnik
scons/scons-local-2.4.1/SCons/Tool/javac.py
6
8631
"""SCons.Tool.javac Tool-specific initialization for javac. 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 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge...
lgpl-2.1
-5,517,823,027,640,428,000
36.202586
158
0.596802
false
WeblateOrg/weblate
weblate/trans/models/change.py
2
22952
# # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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 Foundation, either version 3 of the Lice...
gpl-3.0
1,540,004,723,965,509,400
36.932231
88
0.622947
false
Qalthos/ansible
lib/ansible/modules/network/fortios/fortios_firewall_internet_service_group.py
24
8318
#!/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...
gpl-3.0
961,505,548,001,359,900
28.496454
101
0.59762
false
IEEERobotics/high-level
qwe/localizer/map.py
1
2010
#!/usr/bin/python from numpy import array, zeros import csv # loads map into 2d list: # [y][x] are map coordinates # [0][0] is bottom left corner class Map(): def __init__(self, filename = None, scale = 1, logger = None): self.logger = logger if filename: data = list( csv.reader(open(filename, 'r'...
bsd-2-clause
1,573,968,482,916,466,700
28.130435
123
0.61393
false
Habbie/pdns
regression-tests.recursor-dnssec/test_RootNXTrust.py
4
3474
import dns import requests import socket from recursortests import RecursorTest class RootNXTrustRecursorTest(RecursorTest): def getOutgoingQueriesCount(self): headers = {'x-api-key': self._apiKey} url = 'http://127.0.0.1:' + str(self._wsPort) + '/api/v1/servers/localhost/statistics' r = r...
gpl-2.0
-7,317,880,396,573,705,000
29.743363
94
0.64479
false
nitish116/pystache
pystache/parser.py
28
11623
# coding: utf-8 """ Exposes a parse() function to parse template strings. """ import re from pystache import defaults from pystache.parsed import ParsedTemplate END_OF_LINE_CHARACTERS = [u'\r', u'\n'] NON_BLANK_RE = re.compile(ur'^(.)', re.M) # TODO: add some unit tests for this. # TODO: add a test case that ch...
mit
922,586,446,650,476,800
29.748677
108
0.572055
false
yd0str/infernal-twin
build/pillow/Tests/test_image_getpixel.py
12
1416
from helper import unittest, PillowTestCase from PIL import Image Image.USE_CFFI_ACCESS = False def color(mode): bands = Image.getmodebands(mode) if bands == 1: return 1 else: return tuple(range(1, bands+1)) class TestImageGetPixel(PillowTestCase): def check(self, mode, c=None): ...
gpl-3.0
4,727,245,436,057,002,000
25.716981
78
0.526836
false
AnishWalawalkar/weekdays
weekdays/weekdays.py
1
2474
'''python module to work with weekdays''' import time from datetime import timedelta from datetime import datetime __all__ = [ 'is_weekday', 'weekdays_passed', 'weekdays_until', 'date_range', 'prev_weekday', 'next_weekday', 'time_to_datetime' ] def time_to_datetime(time_struct=None, time_in_seconds=None): ...
mit
-3,598,974,704,217,215,500
27.436782
103
0.61924
false
suneeth51/neutron
neutron/extensions/quotasv2.py
25
5305
# Copyright 2011 OpenStack Foundation. # 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 req...
apache-2.0
-386,247,958,716,333,950
34.13245
78
0.6377
false
thedrow/django
django/db/models/lookups.py
194
16328
import inspect from copy import copy from django.utils.functional import cached_property from django.utils.six.moves import range from .query_utils import QueryWrapper class RegisterLookupMixin(object): def _get_lookup(self, lookup_name): try: return self.class_lookups[lookup_name] e...
bsd-3-clause
-7,208,914,633,442,724,000
33.666667
109
0.619794
false
kaiyuanl/gem5
src/arch/x86/isa/insts/general_purpose/no_operation.py
91
2323
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
bsd-3-clause
83,931,178,913,795,340
44.54902
72
0.786053
false
serpilliere/miasm
test/core/sembuilder.py
2
1414
from __future__ import print_function import inspect from pdb import pm from miasm.core.sembuilder import SemBuilder from miasm.core.locationdb import LocationDB import miasm.expression.expression as m2_expr # Test classes class IR(object): def __init__(self, loc_db): self.loc_db = loc_db IRDst = m...
gpl-2.0
6,684,697,503,393,509,000
19.794118
53
0.605375
false
ocadotechnology/appengine-pipelines
python/demo/pipeline/util.py
14
6994
#!/usr/bin/env python # # Copyright 2010 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 o...
apache-2.0
-4,705,396,415,553,857,000
29.277056
78
0.666857
false
ccnmtl/lettuce
lettuce/languages.py
11
7581
# -*- 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
3,966,783,386,915,370,000
34.094527
89
0.565353
false
thanhacun/odoo
addons/mass_mailing/models/mail_mail.py
114
5292
# -*- 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 o...
agpl-3.0
1,434,817,603,316,411,100
49.884615
152
0.617914
false
GoogleCloudPlatform/training-data-analyst
courses/developingapps/python/appengine/start/frontend/quiz/gcp/pubsub.py
20
1995
# Copyright 2017 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
-447,933,753,650,608,000
23.62963
74
0.749373
false
dknlght/dkodi
src/script.module.turtle/lib/TurtleContainer.py
1
6944
''' Created on Oct 17, 2011 ''' from common import DataObjects, XBMCInterfaceUtils, AddonUtils from common.Singleton import SingletonClass from common.XBMCInterfaceUtils import ProgressDisplayer from definition.Turtle import Action, Move, Service import sys import xbmcaddon #@UnresolvedImport __author__ = "ajju" __v...
gpl-2.0
64,257,018,845,677,920
41.601227
160
0.627592
false
ksmaheshkumar/mycli
mycli/clibuffer.py
10
1242
from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CLIBuffer(Buffer): def __init__(self, always_multiline, *args, **kwargs): self.always_multiline = always_multiline @Condition def is_multiline(): doc = self.document return s...
bsd-3-clause
-67,407,564,073,789,464
39.064516
88
0.599839
false
ivanlyon/exercises
kattis/k_pebblesolitaire2.py
1
1050
''' Optimal result for pebble solitaire state Status: Accepted ''' PRECOMPUTED = {} for _i in range(23): PRECOMPUTED['-' * _i + 'o' + '-' * (22 - _i)] = 1 ############################################################################### def dfs(state): """Depth First Search for best possible score""" glo...
mit
209,896,007,530,744,770
24.609756
79
0.404762
false
SanchayanMaity/gem5
configs/example/garnet_synth_traffic.py
10
5950
# Copyright (c) 2016 Georgia Institute of Technology # 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 conditi...
bsd-3-clause
-9,027,329,909,872,244,000
37.141026
79
0.649412
false
hfp/libxsmm
samples/deeplearning/sparse_training/fairseq/fairseq/models/nat/iterative_nonautoregressive_transformer.py
1
8426
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch from fairseq.models import register_model, register_model_architecture from fairseq.models.nat import NATransformerModel def _...
bsd-3-clause
4,214,298,391,178,991,000
40.102439
99
0.593639
false