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
joergdietrich/astropy
astropy/vo/client/async.py
3
2515
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Asynchronous VO service requests.""" from __future__ import absolute_import, division, print_function, unicode_literals # LOCAL from ...utils.compat.futures import ThreadPoolExecutor from ...utils.decorators import deprecated __all__ = ['AsyncBase'] ...
bsd-3-clause
-1,948,799,579,731,903,700
28.244186
82
0.6167
false
fangxingli/hue
desktop/core/ext-py/cryptography-1.3.1/src/_cffi_src/openssl/bio.py
7
5009
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/bio.h> """ TYPES = """ typedef struct b...
apache-2.0
-2,738,364,705,397,106,700
28.815476
79
0.675384
false
Bernardo-MG/CWR-WebClient
cwr_webclient/report/mera.py
2
8673
# -*- encoding: utf-8 -*- import StringIO import xlsxwriter """ Web app module. """ __author__ = 'Bernardo Martínez Garrido' __license__ = 'MIT' __status__ = 'Development' def generate_match_report_excel(matches, filename): output = StringIO.StringIO() workbook = xlsxwriter.Workbook(output, {'in_memory': ...
mit
6,492,093,312,754,635,000
37.542222
80
0.523409
false
Jorge-Rodriguez/ansible
lib/ansible/module_utils/facts/virtual/freebsd.py
31
2052
# 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 later version. # # Ansible is distributed in the hope that ...
gpl-3.0
7,314,445,263,512,565,000
35.642857
121
0.701754
false
proxysh/Safejumper-for-Desktop
buildmac/Resources/env/lib/python2.7/site-packages/twisted/trial/test/test_keyboard.py
16
4036
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for interrupting tests with Control-C. """ from __future__ import absolute_import, division from twisted.python.compat import NativeStringIO from twisted.trial import unittest from twisted.trial import reporter, runner class TrialTe...
gpl-2.0
-2,359,802,292,131,744,000
32.355372
80
0.676412
false
gengliangwang/spark
python/pyspark/tests/test_serializers.py
15
9192
# # 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
-4,727,961,035,161,897,000
38.282051
99
0.614774
false
grlee77/numpy
setup.py
1
18343
#!/usr/bin/env python3 """ NumPy is the fundamental package for array computing with Python. It provides: - a powerful N-dimensional array object - sophisticated (broadcasting) functions - tools for integrating C/C++ and Fortran code - useful linear algebra, Fourier transform, and random number capabilities - and muc...
bsd-3-clause
1,028,821,390,566,915,100
34.411197
88
0.595868
false
WillieMaddox/numpy
numpy/distutils/command/build_src.py
141
32258
""" Build swig, f2py, pyrex sources. """ from __future__ import division, absolute_import, print_function import os import re import sys import shlex import copy from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.util import get_platform from distutils.errors impo...
bsd-3-clause
3,010,673,648,088,964,000
39.022333
122
0.506107
false
BonexGu/Blik2D-SDK
Blik2D/addon/opencv-3.1.0_for_blik/samples/python/color_histogram.py
5
1373
#!/usr/bin/env python ''' Video histogram sample to show live histogram of video Keys: ESC - exit ''' import numpy as np import cv2 # built-in modules import sys # local modules import video if __name__ == '__main__': hsv_map = np.zeros((180, 256, 3), np.uint8) h, s = np.indices(hsv_map.shape[:2]...
mit
9,064,375,754,352,287,000
21.145161
97
0.550619
false
github-borat/cinder
cinder/volume/rpcapi.py
4
7290
# Copyright 2012, Intel, 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 agree...
apache-2.0
-2,469,441,097,626,058,000
42.652695
79
0.603292
false
tengyifei/grpc
examples/python/helloworld/run_codegen.py
10
1765
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
-195,439,106,658,186,780
41.02381
75
0.758074
false
coxmediagroup/googleads-python-lib
examples/dfp/v201411/company_service/get_all_companies.py
4
2020
#!/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
-7,238,686,653,382,042,000
32.114754
80
0.715842
false
mruffalo/sysv_ipc
tests/test_message_queues.py
1
14661
# Python imports # Don't add any from __future__ imports here. This code should execute # against standard Python. import unittest import time import os # Project imports import sysv_ipc # Hack -- add tests directory to sys.path so Python 3 can find base.py. import sys sys.path.insert(0, os.path.join(os.getcwd(), 'tes...
bsd-3-clause
-6,764,458,483,930,550,000
41.495652
100
0.642998
false
jamilatta/scielo-manager
scielomanager/journalmanager/context_processors.py
2
2205
# coding: utf-8 from django.conf import settings from journalmanager import models from maintenancewindow import models as maintenance_models def dynamic_template_inheritance(request): """ Changes between base_lv0.html e base_lv1.html """ if request.GET.get('popup', None): return {'dynamic_tpl...
bsd-2-clause
-8,135,289,592,261,036,000
25.566265
84
0.64263
false
inspyration/odoo
addons/website_forum/tests/test_forum.py
87
7632
# -*- coding: utf-8 -*- from openerp.addons.website_forum.tests.common import KARMA, TestForumCommon from openerp.addons.website_forum.models.forum import KarmaError from openerp.exceptions import Warning, AccessError from openerp.tools import mute_logger class TestForum(TestForumCommon): @mute_logger('openerp....
agpl-3.0
-8,255,475,422,770,101,000
41.4
157
0.625262
false
mvaled/OpenUpgrade
addons/product_margin/wizard/product_margin.py
338
3457
# -*- 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,487,853,274,898,728,000
34.989583
81
0.568741
false
newsteinking/docker
tests/lib/test_lib.py
48
1899
"""Test the test support.""" from __future__ import absolute_import import filecmp import re from os.path import join, isdir from tests.lib import SRC_DIR def test_tmp_dir_exists_in_env(script): """ Test that $TMPDIR == env.temp_path and path exists and env.assert_no_temp() passes (in fast env) """ ...
mit
2,241,522,035,273,296,100
29.629032
79
0.64139
false
onceuponatimeforever/oh-mainline
vendor/packages/django-tastypie/tastypie/fields.py
20
32548
from __future__ import unicode_literals import datetime from dateutil.parser import parse from decimal import Decimal import re from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.utils import datetime_safe, importlib from django.utils import six from tastypie.bundle import Bundle...
agpl-3.0
-6,310,350,739,987,978,000
35.124306
210
0.598193
false
dodger487/MIST
data/baselines.py
1
1444
# Chris Riederer # Google, Inc # 2014-08-15 """Record baselines and show improvements for working on magnet""" import test_detect as t import glob cleanedList = t.GetRunDataFromArgs(glob.glob('cleaned/*.json')) snipList = t.GetRunDataFromArgs(glob.glob('snips/*.json')) decalCleanedList = t.GetRunDataFromArgs(glob....
apache-2.0
8,282,532,759,856,382,000
25.740741
68
0.761773
false
aioue/ansible
lib/ansible/modules/packaging/language/pear.py
70
7380
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com> # (c) 2015, Jonathan Lestrelin <jonathan.lestrelin@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # i...
gpl-3.0
562,808,273,344,174,140
29.495868
117
0.606911
false
cloudfoundry/php-buildpack-legacy
builds/runtimes/python-2.7.6/lib/python2.7/lib2to3/patcomp.py
304
7091
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Pattern compiler. The grammer is taken from PatternGrammar.txt. The compiler compiles a pattern to a pytree.*Pattern instance. """ __author__ = "Guido van Rossum <guido@python.org>" # Python imports import os imp...
mit
4,648,367,028,249,069,000
33.590244
79
0.573121
false
marcuskelly/recover
Lib/site-packages/werkzeug/contrib/limiter.py
365
1334
# -*- coding: utf-8 -*- """ werkzeug.contrib.limiter ~~~~~~~~~~~~~~~~~~~~~~~~ A middleware that limits incoming data. This works around problems with Trac_ or Django_ because those directly stream into the memory. .. _Trac: http://trac.edgewall.org/ .. _Django: http://www.djangoproject.com/ ...
bsd-2-clause
8,489,479,626,022,038,000
31.536585
79
0.661919
false
sasukeh/neutron
neutron/tests/unit/agent/linux/test_keepalived.py
15
11362
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com> # # 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 applicabl...
apache-2.0
-8,656,308,352,433,272,000
33.017964
79
0.576483
false
bollu/vispy
examples/demo/gloo/shadertoy.py
18
11859
#!/usr/bin/env python # -*- coding: utf-8 -*- # vispy: gallery 2, testskip # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Shadertoy demo. You can copy-paste shader code from an example on www.shadertoy.com and get the demo. TODO: support cub...
bsd-3-clause
7,483,251,668,822,055,000
25.830317
79
0.523906
false
argivaitv/argivaitv
plugin.video.salts/scrapers/furk_scraper.py
1
10706
""" SALTS XBMC Addon Copyright (C) 2014 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. T...
gpl-2.0
-2,915,448,060,389,353,500
48.564815
191
0.540164
false
cgwalters/gnome-ostree
src/ostbuild/pyostbuild/builtin_deploy_qemu.py
3
2370
# Copyright (C) 2012 Colin Walters <walters@verbum.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # Thi...
lgpl-2.1
6,428,826,549,748,417,000
35.461538
85
0.677215
false
KrzysztofStachanczyk/Sensors-WWW-website
www/env/lib/python2.7/site-packages/django/conf/urls/__init__.py
133
3546
import warnings from importlib import import_module from django.core.exceptions import ImproperlyConfigured from django.urls import ( LocaleRegexURLResolver, RegexURLPattern, RegexURLResolver, ) from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning __all__ = ['handler400', 'ha...
gpl-3.0
6,107,213,879,796,230,000
40.717647
102
0.659616
false
gylian/sickbeard
bs4/__init__.py
82
12936
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides methods and Pythonic idioms that make it easy to navigate...
gpl-3.0
-8,869,437,902,903,152,000
35.033426
232
0.605751
false
alfonsokim/nupic
tests/external/testfixture_test.py
15
1744
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
-8,229,066,336,341,487,000
31.90566
77
0.701835
false
BeyondTheClouds/nova
nova/tests/unit/virt/vmwareapi/test_vif.py
6
14654
# Copyright 2013 Canonical Corp. # 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 ...
apache-2.0
-3,214,062,990,901,584,000
46.423948
78
0.542992
false
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/scons-2.1.0/SCons/Tool/javac.py
21
8571
"""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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Founda...
gpl-2.0
-9,093,293,600,429,228,000
36.265217
158
0.597713
false
Codefans-fan/odoo
addons/marketing_campaign/marketing_campaign.py
286
41776
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
agpl-3.0
4,613,625,072,463,847,000
49.576271
284
0.548473
false
nickmain/pyswip
pyswip/core.py
8
32565
# -*- coding: utf-8 -*- # pyswip -- Python SWI-Prolog bridge # Copyright (c) 2007-2012 Yüce Tekol # # 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 ...
mit
1,566,039,309,842,346,200
31.760563
116
0.603028
false
cod3monk/kerncraft
kerncraft/prefixedunit.py
2
6289
#!/usr/bin/env python3 import re from ruamel import yaml class PrefixedUnit(yaml.YAMLObject): PREFIXES = {'k': 1e3, 'M': 1e6, 'G': 1e9, 'T': 1e13, 'P': 1e16, 'E': 1e19, 'Z': 1e21, 'Y': 1e24, '': 1} yaml_loader = yaml.Loader yaml_dumper = yaml.Dumper yaml_tag = u'!prefixed' yaml_...
agpl-3.0
5,175,230,509,580,825,000
29.381643
100
0.530768
false
yupasik/AT
Tests/NPKT/manual_upd2.py
1
1536
import os import sys modeules_path = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) sys.path.append(modeules_path) from Devices.application import Application test = os.path.split(os.path.dirname(os.path.abspath(__file__)))[-1] print(test) testintex = 2 testscript = os.path.basename(os.path.abspath(__fil...
apache-2.0
2,388,299,796,612,423,700
30.346939
75
0.516927
false
blockstack/packaging
imported/future/src/future/backports/xmlrpc/server.py
82
37285
r""" Ported using Python-Future from the Python 3.3 standard library. XML-RPC Servers. This module can be used to create simple XML-RPC servers by creating a server and either installing functions, a class instance, or by extending the SimpleXMLRPCServer class. It can also be used to handle XML-RPC requests in a CGI...
gpl-3.0
6,763,122,053,385,319,000
36.322322
88
0.589942
false
40223201/40223201
static/Brython3.1.1-20150328-091302/Lib/_random.py
518
2451
from browser import window def _randint(a, b): return int(window.Math.random()*(b-a+1)+a) def _urandom(n): """urandom(n) -> str Return n random bytes suitable for cryptographic use.""" randbytes= [_randint(0,255) for i in range(n)] return bytes(randbytes) class Random: """Random n...
gpl-3.0
2,156,962,742,498,390,300
30.831169
79
0.608731
false
Johnzero/erp
openerp/addons/hr_payroll/wizard/hr_payroll_contribution_register_report.py
9
2115
# -*- 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,170,412,630,460,965,000
37.454545
112
0.604728
false
maxlit/pyEdgeworthBox
pyEdgeworthBox/pyEdgeworthBox.py
1
10602
import numpy as np import matplotlib.pyplot as plt from math import sqrt, copysign from scipy.optimize import brenth from scipy.optimize import fsolve,fmin_l_bfgs_b,fmin_cg,fminbound """ sign of the number """ def sign(x): if x==0: return 0 else: return copysign(1,x) """ if function f can't b...
mit
-3,591,506,064,467,310,000
35.061224
176
0.575363
false
salilab/rmf
tools/dev_tools/test/test_cpp_format.py
3
9735
import unittest import os import sys import utils TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.insert(0, TOPDIR) try: from python_tools import cpp_format finally: del sys.path[0] from pygments import token # Tokens we'd expect to see in an OK header ok_header_tokens = [ ...
apache-2.0
-4,622,702,454,292,472,000
41.510917
77
0.587673
false
lmprice/ansible
lib/ansible/modules/remote_management/ucs/ucs_wwn_pool.py
49
8651
#!/usr/bin/python # -*- coding: utf-8 -*- # 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', 'status': ['preview'], ...
gpl-3.0
-6,619,231,049,321,512,000
35.196653
139
0.573691
false
dmccloskey/SBaaS_LIMS
SBaaS_LIMS/lims_msMethod_query.py
1
27469
# sbaas from .lims_msMethod_postgresql_models import * from SBaaS_base.postgresql_dataType_converter import postgresql_dataType_converter from SBaaS_base.sbaas_base_query_update import sbaas_base_query_update from SBaaS_base.sbaas_base_query_drop import sbaas_base_query_drop from SBaaS_base.sbaas_base_query_initialize...
mit
9,016,265,673,675,425,000
52.753425
183
0.546984
false
flh/odoo
addons/website_sale/models/sale_order.py
8
10376
# -*- coding: utf-8 -*- import random from openerp import SUPERUSER_ID from openerp.osv import osv, orm, fields from openerp.addons.web.http import request class payment_transaction(orm.Model): _inherit = 'payment.transaction' _columns = { # link with the sale order 'sale_order_id': fields.m...
agpl-3.0
-5,608,157,789,875,064,000
45.950226
136
0.582884
false
errx/django
tests/m2m_and_m2o/tests.py
61
2463
from django.db.models import Q from django.test import TestCase from .models import Issue, User, UnicodeReferenceModel class RelatedObjectTests(TestCase): def test_m2m_and_m2o(self): r = User.objects.create(username="russell") g = User.objects.create(username="gustav") i1 = Issue(num=1) ...
bsd-3-clause
6,085,319,629,159,727,000
26.988636
91
0.496955
false
vrv/tensorflow
tensorflow/python/saved_model/constants.py
114
1994
# 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
-3,331,876,208,117,835,000
30.650794
80
0.718656
false
steveklabnik/servo
tests/jquery/run_jquery.py
215
9582
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import re import subprocess import sys import BaseHTTPServer import SimpleHTTPServer im...
mpl-2.0
-7,811,200,625,986,201,000
34.753731
114
0.550616
false
Almad/sneakylang
sneakylang/test/test_register.py
2
5586
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test context-sensitive Parser registry. """ from unittest import TestCase #logging.basicConfig(level=logging.DEBUG) from sneakylang.register import * from sneakylang.macro import Macro from sneakylang.parser import Parser from sneakylang.treebuilder import TreeBuil...
bsd-3-clause
5,974,659,001,462,623,000
37.75
100
0.675986
false
openstack/sahara
sahara/cli/image_pack/api.py
1
4206
# Copyright 2015 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 agreed to in writing, s...
apache-2.0
4,737,120,681,941,215,000
31.10687
76
0.652639
false
rit-sse/openbci
openbci_2015/scripts/udp_server.py
6
2039
"""A server that handles a connection with an OpenBCI board and serves that data over both a UDP socket server and a WebSocket server. Requires: - pyserial - asyncio - websockets """ import argparse import cPickle as pickle import json import sys; sys.path.append('..') # help python find open_bci_v3.py relative...
mit
5,443,543,312,123,999,000
26.554054
94
0.679745
false
js0701/chromium-crosswalk
tools/metrics/histograms/extract_histograms.py
40
16108
# 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. """Extract histogram names from the description XML file. For more information on the format of the XML file, which is self-documenting, see histograms.xml;...
bsd-3-clause
-8,342,328,814,513,178,000
32.075975
80
0.680904
false
arborh/tensorflow
tensorflow/python/eager/remote_benchmarks_test.py
4
6795
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,118,767,909,576,194,600
32.80597
80
0.685798
false
FusionSP/android_external_chromium_org
tools/python/google/platform_utils_mac.py
183
5676
# Copyright (c) 2011 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. """Platform-specific utility methods shared by several scripts.""" import os import subprocess import google.path_utils class PlatformUtility(object)...
bsd-3-clause
2,429,526,948,170,508,300
38.144828
78
0.625088
false
plesiv/hac
hac/util_data.py
1
10044
# -*- coding: utf-8 -*- """Utilities for application plugin-system. NOTE: for simplicity, language and runner templates are referred to as plug-ins in this file (along with site plug-ins). """ import imp import os import sys import re import requests from string import Template from difflib import SequenceMatche...
gpl-2.0
7,004,968,730,493,303,000
36.33829
79
0.55217
false
tarthy6/dozer-thesis
py/tests/shapepack.py
3
4138
# encoding: utf-8 # 2013 © Václav Šmilauer <eu@doxos.eu> import unittest from minieigen import * import woo._customConverters import woo.core import woo.dem import woo.utils import math from woo.dem import * class TestShapePack(unittest.TestCase): # def setUp(self): def testLoadSampleTxt(self): 'ShapePack: load s...
gpl-2.0
8,548,774,211,002,975,000
39.539216
156
0.695768
false
echanna/EdxNotAFork
lms/djangoapps/django_comment_client/tests.py
69
2053
import string # pylint: disable=W0402 import random from django.contrib.auth.models import User from django.test import TestCase from student.models import CourseEnrollment from django_comment_client.permissions import has_permission from django_comment_common.models import Role class PermissionsTestCase(Test...
agpl-3.0
6,838,187,506,876,595,000
40.06
103
0.677545
false
defance/edx-platform
lms/djangoapps/class_dashboard/tests/test_dashboard_data.py
88
13672
""" Tests for class dashboard (Metrics tab in instructor dashboard) """ import json from django.core.urlresolvers import reverse from django.test.client import RequestFactory from mock import patch from nose.plugins.attrib import attr from capa.tests.response_xml_factory import StringResponseXMLFactory from coursewa...
agpl-3.0
-3,743,274,178,803,562,000
41.067692
141
0.612127
false
aam-at/tensorflow
tensorflow/python/kernel_tests/xent_op_test.py
5
15784
# 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
7,394,250,744,897,832,000
39.997403
108
0.564749
false
alvaroaleman/ansible
lib/ansible/plugins/action/net_config.py
6
4154
# # Copyright 2015 Peter Sprygada <psprygada@ansible.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...
gpl-3.0
502,938,227,469,923,500
36.423423
85
0.616033
false
bensternthal/bedrock
bedrock/mozorg/cron.py
25
1085
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django.conf import settings from django.core.cache import cache import cronjobs import feedparser from bedrock.mo...
mpl-2.0
-7,255,761,149,588,303,000
30.911765
72
0.667281
false
marook/tagfs
src/test/tagfs_test_small/test_freebase_support_query.py
2
1239
# # Copyright 2012 Markus Pielmeier # # This file is part of tagfs. # # tagfs 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. # # tagfs...
gpl-3.0
-7,813,140,469,527,203,000
36.545455
90
0.744149
false
co63oc/p2pool
nattraverso/pynupnp/upnpxml.py
288
3026
""" This module parse an UPnP device's XML definition in an Object. @author: Raphael Slinckx @copyright: Copyright 2005 @license: LGPL @contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>} @version: 0.1.0 """ __revision__ = "$id" from xml.dom import minidom import logging # Allowed UPnP services to use when ...
gpl-3.0
8,637,808,750,568,071,000
33
79
0.581956
false
fredericlepied/ansible
lib/ansible/modules/cloud/amazon/ec2_scaling_policy.py
72
7106
#!/usr/bin/python # 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 later version. # # Ansible is distributed...
gpl-3.0
7,993,749,608,264,667,000
34.888889
156
0.665635
false
ChanChiChoi/scikit-learn
examples/ensemble/plot_adaboost_regression.py
311
1529
""" ====================================== Decision Tree Regression with AdaBoost ====================================== A decision tree is boosted using the AdaBoost.R2 [1] algorithm on a 1D sinusoidal dataset with a small amount of Gaussian noise. 299 boosts (300 decision trees) is compared with a single decision tr...
bsd-3-clause
4,361,871,148,334,198,300
27.314815
78
0.680183
false
tangyiyong/odoo
openerp/addons/base/res/__init__.py
384
1261
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
6,119,158,039,729,295,000
34.027778
78
0.647898
false
bemehow/yum-s3-tools
scripts/find-package.py
1
1355
#!/usr/bin/env python """ Usage: find-package.py --repourl=<repo-url> --package=<package-name> [--env|--iam] [--debug] [--filter=<filter>] Attributes: --repourl=<repourl> -r Repository URL eg. https://BUCKET_NAME.s3.amazonaws.com/cent6/ --package=<package-name> -p Package name to search for...
apache-2.0
-1,575,406,954,222,261,000
36.638889
110
0.612546
false
tecan/xchat-rt
plugins/scripts/Supybot-0.83.4.1-bitcoinotc-bot/build/lib/supybot/plugins/Lart/plugin.py
15
3812
### # Copyright (c) 2005, Daniel DiPaolo # 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 condition...
gpl-2.0
4,986,760,437,572,310,000
41.355556
79
0.641396
false
krishnab-datakind/mining-data-acquisition
data_gather/HandlerSetRadius.py
1
1730
#!/usr/bin/python """ Handler for setting radius on the request. """ ## MIT License ## ## Copyright (c) 2017, krishna bhogaonker ## 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 r...
mit
109,617,376,152,681,940
41.195122
463
0.735838
false
dongjoon-hyun/tensorflow
tensorflow/python/layers/utils.py
31
8695
# 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
4,759,516,817,093,049,000
29.402098
80
0.642208
false
Adnn/django
django/core/management/commands/dbshell.py
467
1192
from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections class Command(BaseCommand): help = ("Runs the command-line client for specified database, or the " "default database if none is provided.") requires_system_checks = False def add...
bsd-3-clause
-402,508,868,836,915,650
44.846154
99
0.666107
false
benoitsteiner/tensorflow-xsmm
tensorflow/contrib/estimator/python/estimator/baseline_test.py
9
15538
# 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
3,445,385,738,723,457,500
35.134884
81
0.649504
false
Konubinix/lazygal
lazygal/generators.py
1
35055
# Lazygal, a lazy static web gallery generator. # Copyright (C) 2007-2012 Alexandre Rossi <alexandre.rossi@gmail.com> # # 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 Li...
gpl-2.0
4,046,373,839,278,259,000
37.186275
163
0.573756
false
linked67/p2pool-cryptcoin
p2pool/util/graph.py
226
7325
from __future__ import absolute_import from __future__ import division import math from p2pool.util import math as math2 class DataViewDescription(object): def __init__(self, bin_count, total_width): self.bin_count = bin_count self.bin_width = total_width/bin_count def _shift(x, shift, pad_item...
gpl-3.0
-8,362,563,049,989,987,000
46.875817
195
0.584846
false
shawnadelic/shuup
shuup/admin/modules/products/views/list.py
1
2246
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.models import Q from...
agpl-3.0
-4,175,472,040,729,126,400
40.592593
116
0.612199
false
alobbs/ansible
samples/multi_queues.py
38
4867
#!/usr/bin/env python import sys import time import Queue import traceback import multiprocessing from ansible.inventory import Inventory from ansible.inventory.host import Host from ansible.playbook.play import Play from ansible.playbook.task import Task from ansible.executor.connection_info import ConnectionInforma...
gpl-3.0
-7,020,945,062,849,697,000
26.811429
98
0.617629
false
manahl/pytest-plugins
pytest-pyramid-server/setup.py
1
1728
import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__))) from setuptools import setup from common_setup import common_setup classifiers = [ 'License :: OSI Approved :: MIT License', 'Development Status :: 5 - Production/Stable', 'Topic :: Software Development :: Libraries', 'To...
mit
-8,963,866,385,399,345,000
28.288136
68
0.582755
false
jorik041/scrapy
scrapy/contrib/linkextractors/lxmlhtml.py
14
4121
""" Link extractor based on lxml.html """ import re from six.moves.urllib.parse import urlparse, urljoin import lxml.etree as etree from scrapy.selector import Selector from scrapy.link import Link from scrapy.utils.misc import arg_to_iter from scrapy.utils.python import unique as unique_list, str_to_unicode from sc...
bsd-3-clause
5,522,727,419,926,257,000
36.463636
105
0.613443
false
aperigault/ansible
lib/ansible/modules/cloud/cloudstack/cs_portforward.py
38
12535
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # 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,742,945,696,605,913,000
30.48995
116
0.620282
false
raghavs1108/DataPlotter
pyqtgraph/util/cprint.py
38
3028
""" Cross-platform color text printing Based on colorama (see pyqtgraph/util/colorama/README.txt) """ import sys, re from .colorama.winterm import WinTerm, WinColor, WinStyle from .colorama.win32 import windll from ..python2_3 import basestring _WIN = sys.platform.startswith('win') if windll is not None: winterm...
mit
-2,497,989,626,961,892,400
28.686275
98
0.559775
false
mleinart/graphite-web
webapp/graphite/remote_storage.py
8
8672
import socket import time import httplib from urllib import urlencode from threading import Lock, Event from django.conf import settings from django.core.cache import cache from graphite.node import LeafNode, BranchNode from graphite.intervals import Interval, IntervalSet from graphite.readers import FetchInProgress fr...
apache-2.0
4,022,347,793,010,224,000
31
129
0.635609
false
sargas/scipy
scipy/signal/cont2discrete.py
1
5015
""" Continuous to discrete transformations for state-space and transfer function. """ from __future__ import division, print_function, absolute_import # Author: Jeffrey Armstrong <jeff@approximatrix.com> # March 29, 2011 import numpy as np from scipy import linalg from .ltisys import tf2ss, ss2tf, zpk2ss, ss2zpk __...
bsd-3-clause
4,929,083,587,312,615,000
34.06993
98
0.590429
false
RobertWWong/WebDev
djangoApp/ENV/lib/python3.5/site-packages/django/contrib/auth/tokens.py
45
2862
from datetime import date from django.conf import settings from django.utils import six from django.utils.crypto import constant_time_compare, salted_hmac from django.utils.http import base36_to_int, int_to_base36 class PasswordResetTokenGenerator(object): """ Strategy object used to generate and check token...
mit
7,849,073,929,304,912,000
33.071429
112
0.622292
false
maleficarium/youtube-dl
test/test_write_annotations.py
18
2547
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import get_params, try_rm import io import xml.etree.ElementTree import youtu...
unlicense
2,672,646,831,796,877,300
31.653846
105
0.647821
false
TaliesinSkye/evennia
contrib/procpools/ampoule/pool.py
6
15205
import time import random import heapq import itertools import signal choice = random.choice now = time.time count = itertools.count().next pop = heapq.heappop from twisted.internet import defer, task, error from twisted.python import log, failure from contrib.procpools.ampoule import commands, main try: DIE = s...
bsd-3-clause
2,393,559,098,911,871,500
35.727053
82
0.583624
false
x13n/contrib
keepalived-vip/vendor/github.com/ugorji/go/codec/test.py
1138
3876
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). # Ensure msgpack-python and cbor are installed first, using: # sudo apt-get install python-dev # sudo apt-g...
apache-2.0
-1,775,303,916,705,789,000
31.3
96
0.569917
false
FusionWorks/adam
bin/append_to_option.py
18
1630
#!/usr/bin/env python # # Licensed to Big Data Genomics (BDG) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The BDG licenses this file # to you under the Apache License, Version 2.0 (the # "License"); yo...
apache-2.0
6,222,189,615,572,732,000
30.346154
104
0.727607
false
apache-spark-on-k8s/spark
examples/src/main/python/pi.py
14
1468
from __future__ import print_function # # 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...
apache-2.0
577,542,432,301,234,700
30.913043
90
0.675749
false
fake-name/ReadableWebProxy
sqlalchemy_continuum_vendored/relationship_builder.py
2
12507
import sqlalchemy as sa from .exc import ClassNotVersioned from .expression_reflector import VersionExpressionReflector from .operation import Operation from .table_builder import TableBuilder from .utils import adapt_columns, version_class, option class RelationshipBuilder(object): def __init__(self, versioning...
bsd-3-clause
-8,089,108,278,027,290,000
33.265753
79
0.552571
false
pyramania/scipy
scipy/integrate/tests/test_quadrature.py
40
8072
from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy import cos, sin, pi from numpy.testing import TestCase, run_module_suite, assert_equal, \ assert_almost_equal, assert_allclose, assert_ from scipy.integrate import (quadrature, romberg, romb, newton_cote...
bsd-3-clause
5,053,139,402,224,384,000
35.858447
79
0.522919
false
amwelch/a10sdk-python
a10sdk/core/A10_file/file_debug_monitor.py
2
1972
from a10sdk.common.A10BaseClass import A10BaseClass class DebugMonitor(A10BaseClass): """ :param action: {"optional": true, "enum": ["create", "import", "export", "copy", "rename", "check", "replace", "delete"], "type": "string", "description": "'create': create; 'import': import; 'export': export; 'copy'...
apache-2.0
-8,874,901,441,906,951,000
44.860465
327
0.62931
false
nemith/Marlin-BigBoxPro
Marlin/scripts/g29_auto.py
184
4842
#!/usr/bin/python3 # This file is for preprocessing gcode and the new G29 Autobedleveling from Marlin # It will analyse the first 2 Layer and return the maximum size for this part # After this it will replace with g29_keyword = ';MarlinG29Script' with the new G29 LRFB # the new file will be created in the same folder....
gpl-3.0
7,742,437,118,603,765,000
25.032258
88
0.540066
false
partofthething/home-assistant
homeassistant/components/bmw_connected_drive/lock.py
4
3564
"""Support for BMW car locks with BMW ConnectedDrive.""" import logging from bimmer_connected.state import LockState from homeassistant.components.lock import LockEntity from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED from . import DOMAIN as BMW_DOMAIN, BMWConnectedDriveBaseEntity from .const import CON...
mit
3,316,240,936,382,475,000
33.941176
86
0.637205
false
tjsavage/tmrwmedia
django/db/utils.py
16
5970
import inspect import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module DEFAULT_DB_ALIAS = 'default' # Define some exceptions that mirror the PEP249 interface. # We will rethrow any backend-specific errors using these # common...
bsd-3-clause
-7,439,698,659,316,919,000
35.625767
128
0.562982
false
rgacogne/pdns
build-scripts/docker/repo-test/generate-repo-files.py
6
8620
#!/usr/bin/env python3 # # Given Python's versioning history I'm going with `python3`. # # Usage: # - `python3 -m venv venv` # - `bash` # - `source venv/bin/activate` # - `pip install --upgrade pip` # - `pip install -r requirements.txt` # - `./generate-repo-files.py auth-41` # Modules import argparse import subproces...
gpl-2.0
8,487,268,632,367,612,000
31.528302
80
0.54826
false
jmacmahon/invenio
modules/bibformat/lib/elements/bfe_url.py
16
1467
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License,...
gpl-2.0
-1,568,115,993,190,826,000
32.340909
74
0.664622
false
QGuLL/samba
python/samba/tests/__init__.py
18
12737
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2010 # # 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 opti...
gpl-3.0
-6,752,512,728,656,186,000
33.239247
110
0.595195
false
cprov/snapcraft
tests/unit/plugins/test_catkin_tools.py
2
8676
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
gpl-3.0
-4,722,869,989,273,969,000
33.843373
88
0.610535
false
aaltay/beam
sdks/python/apache_beam/runners/worker/bundle_processor.py
1
71716
# # 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
-843,767,137,490,844,200
36.430063
301
0.659978
false
new-xiaji/peewee
playhouse/tests/test_read_slave.py
19
4913
from peewee import * from peewee import Using from playhouse.read_slave import ReadSlaveModel from playhouse.tests.base import database_initializer from playhouse.tests.base import ModelTestCase queries = [] def reset(): global queries queries = [] class QueryLogDatabase(SqliteDatabase): name = '' ...
mit
7,327,114,791,687,340,000
26.294444
79
0.575412
false
philsch/ansible
lib/ansible/modules/windows/win_unzip.py
5
4047
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Phil Schwartz <schwartzmx@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 ...
gpl-3.0
-4,535,876,339,203,227,600
32.725
156
0.711638
false
tkaitchuck/nupic
external/common/lib/python2.6/site-packages/logilab/common/registry.py
2
41325
# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of Logilab-common. # # Logilab-common is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as publ...
gpl-3.0
4,572,460,092,425,165,000
36.19622
98
0.621004
false