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
aplanas/rally
tests/unit/verification/test_diff.py
20
4951
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
6,392,971,523,426,498,000
45.271028
78
0.361139
false
NL66278/OCB
addons/l10n_fr_hr_payroll/l10n_fr_hr_payroll.py
340
2012
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
-5,073,569,388,437,999,000
36.259259
125
0.629225
false
fusionbox/mezzanine
mezzanine/pages/migrations/south/0014_auto__add_field_page_created__add_field_page_updated.py
8
6156
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Page.created' db.add_column(u'pages_page', 'created', self.gf('django....
bsd-2-clause
2,893,206,036,587,356,000
63.8
176
0.542235
false
vicky2135/lucious
oscar/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py
326
6536
import base64 import io import json import zlib from pip._vendor.requests.structures import CaseInsensitiveDict from .compat import HTTPResponse, pickle, text_type def _b64_encode_bytes(b): return base64.b64encode(b).decode("ascii") def _b64_encode_str(s): return _b64_encode_bytes(s.encode("utf8")) def ...
bsd-3-clause
-4,706,950,758,376,271,000
32.346939
78
0.549266
false
clebergnu/autotest
client/tests/aio_dio_bugs/aio_dio_bugs.py
6
1345
import os from autotest_lib.client.bin import test, utils # tests is a simple array of "cmd" "arguments" tests = [["aio-dio-invalidate-failure", "poo"], ["aio-dio-subblock-eof-read", "eoftest"], ["aio-free-ring-with-bogus-nr-pages", ""], ["aio-io-setup-with-nonwritable-context-pointer", ""]...
gpl-2.0
8,529,738,110,963,801,000
31.804878
78
0.524164
false
nurmd2/nurmd
addons/google_spreadsheet/google_spreadsheet.py
41
4717
# Part of Odoo. See LICENSE file for full copyright and licensing details. import cgi import json import logging from lxml import etree import re import werkzeug.urls import urllib2 from openerp.osv import osv from openerp.addons.google_account import TIMEOUT _logger = logging.getLogger(__name__) class config(osv.o...
gpl-3.0
-5,975,585,331,864,059,000
45.245098
172
0.61607
false
Fireblend/chromium-crosswalk
tools/telemetry/telemetry/util/find_dependencies.py
5
9310
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import fnmatch import imp import logging import modulefinder import optparse import os import sys import zipfile from telemetry import benchmark from teleme...
bsd-3-clause
-1,086,916,298,362,818,400
35.944444
79
0.694737
false
DrMeers/django
tests/order_with_respect_to/tests.py
21
2849
from __future__ import unicode_literals from operator import attrgetter from django.test import TestCase from .models import Post, Question, Answer class OrderWithRespectToTests(TestCase): def test_basic(self): q1 = Question.objects.create(text="Which Beatle starts with the letter 'R'?") q2 = Q...
bsd-3-clause
-7,001,601,081,572,186,000
38.027397
85
0.609688
false
hackerbot/DjangoDev
tests/postgres_tests/test_hstore.py
5
7364
import json from django.core import exceptions, serializers from . import PostgresSQLTestCase from .models import HStoreModel try: from django.contrib.postgres import forms from django.contrib.postgres.fields import HStoreField from django.contrib.postgres.validators import KeysValidator except ImportErr...
bsd-3-clause
-2,227,871,661,116,768,300
32.935484
114
0.601711
false
decebel/dataAtom_alpha
bin/plug/py/external/pattern/vector/svm/svm.py
1
9178
#!/usr/bin/env python from ctypes import * from ctypes.util import find_library import sys import os # For unix the prefix 'lib' is not considered. if find_library('svm'): libsvm = CDLL(find_library('svm')) elif find_library('libsvm'): libsvm = CDLL(find_library('libsvm')) else: for i, binary in enumerate(( # I...
apache-2.0
-6,594,749,808,247,385,000
29.491694
122
0.635759
false
Tokyo-Buffalo/tokyosouth
env/lib/python3.6/site-packages/pyasn1_modules/rfc2459.py
72
44828
# # X.509 message syntax # # ASN.1 source from: # http://www.trl.ibm.com/projects/xml/xss4j/data/asn1/grammars/x509.asn # http://www.ietf.org/rfc/rfc2459.txt # # Sample captures from: # http://wiki.wireshark.org/SampleCaptures/ # from pyasn1.type import tag,namedtype,namedval,univ,constraint,char,useful MAX = 64 # XX...
mit
-9,129,836,742,262,980,000
48.588496
278
0.756112
false
anorfleet/turntable
test/lib/python2.7/site-packages/scipy/interpolate/tests/test_fitpack2.py
7
18719
#!/usr/bin/env python # Created by Pearu Peterson, June 2003 from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.testing import (assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_allclose, assert_raises, TestCase...
mit
7,027,878,597,349,935,000
39.429806
98
0.511459
false
B-MOOC/edx-platform
cms/djangoapps/contentstore/views/certificates.py
3
19144
""" Certificates Data Model: course.certificates: { 'certificates': [ { 'version': 1, // data contract version 'id': 12345, // autogenerated identifier 'name': 'Certificate 1', 'description': 'Certificate 1 Description', 'course_title': 'course ti...
agpl-3.0
3,251,929,802,354,216,400
39.645435
121
0.637746
false
audiolion/django-shibauth-rit
tests/test_backends.py
1
6303
# -*- coding: utf-8 -*- # Third Party Library Imports from django.conf import settings from django.contrib import auth from django.contrib.auth.models import User from django.test import RequestFactory, TestCase, override_settings # First Party Library Imports from shibauth_rit.compat import reverse from shibauth_rit...
mit
-352,922,252,984,526,800
41.877551
101
0.680946
false
bd339/servo
tests/dromaeo/run_dromaeo.py
111
2507
#!/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 subprocess import sys import BaseHTTPServer import SimpleHTTPServer import urlpa...
mpl-2.0
-6,130,129,712,141,503,000
30.734177
111
0.609493
false
charlesccychen/beam
sdks/python/apache_beam/utils/retry_test.py
5
7723
# # 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
7,037,875,279,751,662,000
33.632287
79
0.658811
false
vebin/Wox
PythonHome/Lib/site-packages/setuptools/command/bdist_egg.py
155
17606
"""setuptools.command.bdist_egg Build .egg distributions""" # This module should be kept compatible with Python 2.3 from distutils.errors import DistutilsSetupError from distutils.dir_util import remove_tree, mkpath from distutils import log from types import CodeType import sys import os import marshal import textwr...
mit
-2,876,553,395,860,691,500
35.755741
79
0.572589
false
40223202/test
static/Brython3.1.3-20150514-095342/Lib/textwrap.py
745
16488
"""Text wrapping and filling. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> import re __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent'] # Hardcode the recognized whitespace characters to the US-ASCII # whit...
agpl-3.0
8,402,692,835,381,830,000
39.116788
80
0.594554
false
ESS-LLP/erpnext
erpnext/healthcare/doctype/fee_validity/fee_validity.py
13
1166
# -*- coding: utf-8 -*- # Copyright (c) 2015, ESS LLP and contributors # For license information, please see license.txt from __future__ import unicode_literals from frappe.model.document import Document import frappe from frappe.utils import getdate import datetime class FeeValidity(Document): pass def update_fee_...
gpl-3.0
-5,365,662,938,190,794,000
31.388889
76
0.755575
false
anyonedev/anyonedev-monitor-agent
monitor/metrics/Cpu.py
1
1893
''' Created on 2014-11-12 @author: hongye ''' import psutil from core import regist_monitor_source from core.MetricValue import MultiMetricValue, SingleMetricValue from core.MonitorSource import SampleMonitorSource class CpuTimesMonitorSource(SampleMonitorSource): def sample(self, parms): cpu = psutil.c...
gpl-2.0
-6,940,471,429,278,517,000
33.418182
87
0.744849
false
lzw120/django
build/lib/django/utils/datastructures.py
12
16025
import copy from types import GeneratorType class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more than one of the given dictionaries, only the first occurrenc...
bsd-3-clause
8,165,227,595,859,711,000
30.298828
131
0.54727
false
windyuuy/opera
chromium/src/third_party/python_26/Lib/test/test_xrange.py
53
2512
# Python test set -- built-in functions import test.test_support, unittest import sys import pickle import warnings warnings.filterwarnings("ignore", "integer argument expected", DeprecationWarning, "unittest") class XrangeTest(unittest.TestCase): def test_xrange(self): self.asser...
bsd-3-clause
-1,239,069,336,259,808,800
32.493333
78
0.567675
false
jart/tensorflow
tensorflow/contrib/kfac/examples/tests/convnet_test.py
14
6264
# 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
5,315,397,503,990,249,000
36.73494
80
0.639527
false
Orochimarufan/youtube-dl
youtube_dl/extractor/theintercept.py
71
1801
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str from ..utils import ( parse_iso8601, int_or_none, ExtractorError, ) class TheInterceptIE(InfoExtractor): _VALID_URL = r'https?://theintercept\.com/fieldofvision/(?P<id>[^/?#]+)' ...
unlicense
1,900,185,122,016,027,400
35.714286
99
0.540856
false
telefonicaid/fiware-pep-steelskin
test/acceptance/integration/headers/steps.py
32
1455
# -*- coding: utf-8 -*- """ Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U This file is part of fiware-pep-steelskin fiware-pep-steelskin 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, eithe...
agpl-3.0
1,642,707,539,401,645,600
40.542857
75
0.793531
false
Anonymous-X6/django
django/template/loaders/filesystem.py
418
2158
""" Wrapper for loading templates from the filesystem. """ import errno import io import warnings from django.core.exceptions import SuspiciousFileOperation from django.template import Origin, TemplateDoesNotExist from django.utils._os import safe_join from django.utils.deprecation import RemovedInDjango20Warning fr...
bsd-3-clause
-7,074,299,911,050,740,000
32.71875
79
0.620945
false
proversity-org/edx-platform
openedx/core/lib/edx_api_utils.py
18
3689
"""Helper functions to get data from APIs""" from __future__ import unicode_literals import logging from django.core.cache import cache from openedx.core.lib.cache_utils import zpickle, zunpickle log = logging.getLogger(__name__) def get_fields(fields, response): """Extracts desired fields from the API respon...
agpl-3.0
-8,052,240,791,415,435,000
34.471154
110
0.650583
false
kgullikson88/General
Feiden.py
2
4640
from __future__ import division, print_function import os import os.path import pickle import numpy as np from pkg_resources import resource_filename from scipy.interpolate import LinearNDInterpolator as interpnd try: import pandas as pd except ImportError: pd = None from isochrones.isochrone import Isochro...
gpl-3.0
3,022,859,642,342,912,500
32.868613
103
0.586422
false
cmcantalupo/geopm
integration/experiment/power_sweep/gen_plot_power_limit.py
1
5090
#!/usr/bin/env python # # Copyright (c) 2015 - 2021, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, thi...
bsd-3-clause
-7,181,980,293,217,151,000
36.703704
126
0.655206
false
mkwm/casia
casia/cas/urls.py
1
1180
# -*- coding: utf-8 -*- # This file is part of Casia - CAS server based on Django # Copyright (C) 2013 Mateusz Małek # Casia 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 # L...
agpl-3.0
4,458,565,512,986,749,400
42.666667
74
0.680237
false
LingxiaoJIA/gem5
configs/common/Caches.py
20
3170
# Copyright (c) 2012 ARM Limited # 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 implementation of the functionality ...
bsd-3-clause
4,453,312,303,817,368,000
37.658537
72
0.75205
false
jagguli/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geos/prototypes/prepared.py
623
1032
from ctypes import c_char from django.contrib.gis.geos.libgeos import GEOM_PTR, PREPGEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Prepared geometry constructor and destructors. geos_prepare = GEOSFunc('GEOSPrepare')...
apache-2.0
-2,802,300,033,208,854,500
40.28
89
0.805233
false
enStratus/unix-agent
extensions/docker/dcmdocker/start_container.py
3
2556
# # Copyright (C) 2014 Dell, 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 wri...
apache-2.0
138,115,258,982,316,510
37.727273
77
0.584116
false
MTASZTAKI/ApertusVR
plugins/languageAPI/jsAPI/3rdParty/nodejs/10.1.0/source/deps/v8/third_party/jinja2/constants.py
1169
1626
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean a...
mit
-5,828,995,049,539,576,000
49.8125
79
0.812423
false
callidus/playbot
playbot/bot.py
1
3336
from __future__ import absolute_import from __future__ import print_function import irc.bot import logging import re import ssl import time logger = logging.getLogger(__name__) class PlayBot(irc.bot.SingleServerIRCBot): def __init__(self, channels, nickname, password, server, port=6667, force...
mit
3,843,377,846,509,192,700
30.471698
72
0.525779
false
beni55/olympia
apps/api/views.py
13
18404
""" API views """ import hashlib import itertools import json import random import urllib from datetime import date, timedelta from django.core.cache import cache from django.http import HttpResponse, HttpResponsePermanentRedirect from django.shortcuts import render from django.template.context import get_standard_pro...
bsd-3-clause
-2,194,925,147,266,002,400
33.529081
79
0.583243
false
fgesora/odoo
addons/l10n_co/__openerp__.py
256
1794
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) David Arnold (devCO). # Author David Arnold (devCO), dar@devco.co # Co-Authors Juan Pablo Aries (devCO), jpa@devco.co # Hector Ivan ...
agpl-3.0
-1,411,559,862,458,768,100
34.86
78
0.597323
false
xuyuan/openni.pyx
demo.py
1
1589
#!/usr/bin/env python from openni import xn import cv cvimage = cv.CreateImageHeader( (640, 480), cv.IPL_DEPTH_8U, 3 ) cvdepth = cv.CreateImageHeader( (640, 480), cv.IPL_DEPTH_16U, 1 ) cvlabel = cv.CreateImageHeader( (640, 480), cv.IPL_DEPTH_16U, 1 ) # v1 = xn.Version(0, 1, 1, 1) # v2 = xn.Version(0, 1, 1, 1) # pri...
mit
-3,085,732,931,416,471,000
26.396552
65
0.648206
false
rcbops/python-quantumclient-buildpackage
quantum/client/cli_lib.py
2
12654
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, Inc. # Copyright 2011 Citrix Systems # # 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...
apache-2.0
-8,090,150,393,951,178,000
36.773134
79
0.566303
false
zhjunlang/kbengine
kbe/src/lib/python/Doc/includes/mp_workers.py
52
1586
import time import random from multiprocessing import Process, Queue, current_process, freeze_support # # Function run by worker processes # def worker(input, output): for func, args in iter(input.get, 'STOP'): result = calculate(func, args) output.put(result) # # Function used to calculate resu...
lgpl-3.0
9,187,869,999,894,636,000
19.597403
75
0.605296
false
ingadhoc/odoo
addons/base_gengo/wizard/__init__.py
434
1077
# -*- 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
-9,053,746,830,555,276,000
43.875
78
0.618384
false
MarkTheF4rth/youtube-dl
youtube_dl/extractor/freesound.py
192
1392
from __future__ import unicode_literals import re from .common import InfoExtractor class FreesoundIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?freesound\.org/people/([^/]+)/sounds/(?P<id>[^/]+)' _TEST = { 'url': 'http://www.freesound.org/people/miklovan/sounds/194503/', 'md5': '1228...
unlicense
-1,282,292,062,333,956,900
34.692308
92
0.543822
false
girving/tensorflow
tensorflow/python/ops/inplace_ops.py
36
6296
# 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,495,402,618,330,529,300
26.735683
80
0.641995
false
fevxie/connector-magento
__unported__/magentoerpconnect_options_active/__openerp__.py
11
1420
# -*- coding: utf-8 -*- ############################################################################## # # Author: Markus Schneider # Copyright 2014 initOS GmbH & Co. KG # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as ...
agpl-3.0
-6,390,143,954,784,893,000
34.5
78
0.59507
false
candy7393/VTK
ThirdParty/Twisted/twisted/python/roots.py
68
7311
# -*- test-case-name: twisted.test.test_roots -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Twisted Python Roots: an abstract hierarchy representation for Twisted. Maintainer: Glyph Lefkowitz """ # System imports import types from twisted.python import reflect class NotSupportedErr...
bsd-3-clause
2,673,293,966,575,226,000
28.479839
91
0.63425
false
amenonsen/ansible
lib/ansible/modules/cloud/openstack/os_coe_cluster.py
31
8797
#!/usr/bin/python # Copyright (c) 2018 Catalyst IT Ltd. # 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': ['pr...
gpl-3.0
4,662,569,939,266,239,000
30.195035
125
0.596908
false
laijingtao/landlab
landlab/components/flexure/funcs.py
6
7655
#!/usr/bin/env python import numpy as np import scipy.special from multiprocessing import Pool _POISSON = .25 _N_PROCS = 4 def get_flexure_parameter(h, E, n_dim, gamma_mantle=33000.): """ Calculate the flexure parameter based on some physical constants. *h* is the Effective elastic thickness of Earth's...
mit
2,800,048,137,220,816,400
29.991903
77
0.574135
false
numenta-ci/nupic
scripts/run_opf_experiment.py
37
1210
#!/usr/bin/env python # ---------------------------------------------------------------------- # 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 ...
agpl-3.0
1,228,874,628,268,945,400
36.8125
77
0.661157
false
mateon1/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/client_for_testing.py
451
39706
#!/usr/bin/env python # # Copyright 2012, 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...
mpl-2.0
-241,253,350,295,308,800
35.096364
79
0.587795
false
jolevq/odoopub
addons/account/wizard/account_period_close.py
341
2646
# -*- 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
-2,380,996,891,953,524,000
42.311475
145
0.592733
false
Jackysonglanlan/devops
IDEs/sublime/shared-pkgs/Packages/pygments/all/pygments/lexers/ml.py
47
27891
# -*- coding: utf-8 -*- """ pygments.lexers.ml ~~~~~~~~~~~~~~~~~~ Lexers for ML family languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, default, words from...
mit
5,803,990,518,631,832,000
35.269181
87
0.456957
false
hanlind/nova
nova/policies/evacuate.py
5
1069
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
apache-2.0
-887,845,066,219,517,600
28.694444
78
0.710009
false
GirlsCodePy/girlscode-coursebuilder
modules/dashboard/dashboard_tests.py
3
34294
# 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 by applicable law or ...
gpl-3.0
8,584,921,947,755,167,000
38.83043
80
0.624337
false
vitorio/hold-the-line
holdtheline.py
1
7034
## hold-the-line - Simple Python voicemail and SMS/MMS receiver ## for holding onto phone numbers in Twilio ## ## Written in 2015 and 2016 and 2017 by Vitorio Miliano <http://vitor.io/> ## ## To the extent possible under law, the author has dedicated all ## copyright and related and neighboring rights...
cc0-1.0
-6,082,186,472,180,485,000
33.480392
121
0.632926
false
nburn42/tensorflow
tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py
32
56938
# 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,504,938,355,987,907,000
45.442088
80
0.652148
false
Fale/ansible
lib/ansible/module_utils/connection.py
35
8113
# # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete ...
gpl-3.0
-891,343,664,207,556,100
36.387097
108
0.639961
false
alvin319/CarnotKE
jyhton/lib-python/2.7/os.py
147
25769
r"""OS routines for Mac, NT, or Posix depending on what system we're on. This exports: - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc. - os.path is one of the modules posixpath, or ntpath - os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos' - os.curdir is a string representing the current di...
apache-2.0
-6,478,401,462,278,475,000
33.822973
83
0.597617
false
CryptArc/bitcoinxt
contrib/devtools/symbol-check.py
172
4344
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' A script to check that the (Linux) executables produced by gitian only contain allowed gcc, glibc and libstdc++ ver...
mit
4,517,823,212,617,634,300
35.504202
142
0.641344
false
rynomad/CCNx-Federated-Wiki-Prototype
server/express/node_modules/npm/node_modules/node-gyp/gyp/test/cflags/gyptest-cflags.py
74
1559
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies build of an executable with C++ define specified by a gyp define, and the use of the environment during regeneration when the g...
mit
-7,045,152,750,854,276,000
22.984615
80
0.717126
false
TrondKjeldas/knxmonitor
knxmonitor/Knx/KnxParser.py
1
5381
from time import time, mktime, strptime try: import Gnuplot except: print "Warning: gnuplot not available" from knxmonitor.Knx.KnxPdu import KnxPdu from knxmonitor.Knx.KnxAddressStream import KnxAddressStream from knxmonitor.Knx.KnxAddressCollection import KnxAddressCollection verbose = True def printVerbose(str...
gpl-2.0
6,558,801,920,558,969,000
28.404372
80
0.537447
false
rrrene/django
tests/forms_tests/widget_tests/test_nullbooleanselect.py
179
2142
from django.forms import NullBooleanSelect from django.test import override_settings from django.utils import translation from .base import WidgetTest class NullBooleanSelectTest(WidgetTest): widget = NullBooleanSelect() def test_render_true(self): self.check_html(self.widget, 'is_cool', True, html=...
bsd-3-clause
7,998,247,293,956,354,000
32.46875
69
0.530345
false
palerdot/calibre
src/calibre/gui2/store/stores/waterstones_uk_plugin.py
7
3469
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) store_version = 2 # Needed for dynamic plugin loading __license__ = 'GPL 3' __copyright__ = '2011, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' import urllib2 from contextlib im...
gpl-3.0
-1,608,507,348,840,372,000
38.873563
122
0.557798
false
mikkokeskinen/tunnistamo
auth_backends/adfs/helsinki_library_asko.py
1
3123
import uuid from auth_backends.adfs.base import BaseADFS class HelsinkiLibraryAskoADFS(BaseADFS): """Helsinki Libraries' ASKO ADFS authentication backend""" name = 'helsinki_library_asko_adfs' AUTHORIZATION_URL = 'https://askofs.lib.hel.fi/adfs/oauth2/authorize' ACCESS_TOKEN_URL = 'https://askofs.lib...
mit
-7,898,783,602,054,292,000
42.985915
76
0.639449
false
n0max/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/mock.py
465
6715
# Copyright 2011, 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...
mpl-2.0
7,290,695,741,897,704,000
29.384615
78
0.629039
false
dennisobrien/bokeh
bokeh/models/tests/test_tools.py
3
1491
from __future__ import absolute_import import mock from bokeh.core.validation import check_integrity from bokeh.models.layouts import LayoutDOM from bokeh.models.tools import Toolbar, ToolbarBox # TODO (bev) validate entire list of props def test_Toolbar(): tb = Toolbar() assert tb.active_drag == 'auto' ...
bsd-3-clause
-7,677,830,760,568,657,000
27.673077
92
0.69886
false
mdanielwork/intellij-community
python/helpers/pydev/tests_pydevd_mainloop/gui-qt.py
100
1074
#!/usr/bin/env python """Simple Qt4 example to manually test event loop integration. To run this: 1) Enable the PyDev GUI event loop integration for qt 2) do an execfile on this script 3) ensure you have a working GUI simultaneously with an interactive console Ref: Modified from http://zetcode.com/tutorials/pyqt4/...
apache-2.0
-1,921,897,595,483,880,700
28.833333
68
0.591248
false
espadrine/opera
chromium/src/tools/diagnose-me.py
50
3016
#!/usr/bin/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. """Diagnose some common system configuration problems on Linux, and suggest fixes.""" import os import subprocess import sys all_chec...
bsd-3-clause
2,882,276,566,240,686,600
30.747368
79
0.576923
false
SebastianoF/LabelsManager
tests/tools/test_aux_methods_utils_rotations.py
1
25701
import os import numpy as np from numpy.testing import assert_array_equal, assert_raises, assert_array_almost_equal from nilabels.tools.aux_methods.utils_rotations import get_small_orthogonal_rotation, get_roto_translation_matrix, \ basic_90_rot_ax, axial_90_rotations, flip_data, symmetrise_data, reorient_b_vect, ...
mit
-8,558,416,037,143,464,000
39.537855
141
0.423213
false
andmos/ansible
test/units/modules/source_control/gitlab.py
21
29411
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import import sys from httmock import response # noqa from httmock import urlmatch # noqa from units.c...
gpl-3.0
4,768,407,525,212,499,000
51.239787
137
0.621468
false
vinicius-carvalho/fatec-prog-script
backend/appengine/routes/comportamentos/rest.py
1
1233
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from gaebusiness.business import CommandExecutionException from tekton.gae.middleware.json_middleware import JsonResponse from comportamento_app import facade def index(): cmd = facade.list_comportamentos_cmd() comportamento_list...
mit
3,348,626,290,949,927,400
32.324324
87
0.750203
false
mexeniz/django-oscar
src/oscar/apps/dashboard/shipping/views.py
23
5163
from django import shortcuts from django.contrib import messages from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.views import generic from oscar.core.loading import get_model, get_classes WeightBandForm, WeightBasedForm = get_classes( 'dashboard.shippin...
bsd-3-clause
-4,635,080,362,376,403,000
35.359155
77
0.65737
false
olesk75/SparkLED
Tools/logserver.py
1
3236
#!/usr/bin/env python3 """ Python3 program which listens to sensor information over the network as port 2208. The purpose of this server is to collect data and serve queries from other clients. In the SuperLED project, this acts as a "syslog" server, listening for and recording data from sensors (access cont...
gpl-3.0
-4,166,800,974,136,641,500
38.463415
145
0.682015
false
zrax/moul-scripts
Python/system/encodings/cp1026.py
593
13369
""" Python Character Mapping Codec cp1026 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP1026.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_table) def decode(self,inp...
gpl-3.0
-6,458,926,565,253,153,000
42.547231
118
0.529209
false
eramirem/astroML
book_figures/chapter8/fig_huber_loss.py
3
2933
""" Huber Loss Function ------------------- Figure 8.8 An example of fitting a simple linear model to data which includes outliers (data is from table 1 of Hogg et al 2010). A comparison of linear regression using the squared-loss function (equivalent to ordinary least-squares regression) and the Huber loss function, ...
bsd-2-clause
4,189,784,919,215,258,000
32.329545
79
0.615752
false
yvaucher/stock-logistics-transport
transport_information/__openerp__.py
3
1365
# -*- coding: utf-8 -*- ############################################################################## # # Copyright 2014 Camptocamp SA # Author: Leonardo Pistone # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
agpl-3.0
3,829,911,369,465,723,400
36.916667
78
0.597802
false
pkainz/pylearn2
pylearn2/models/model.py
44
24339
"""Generic "model" class.""" __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from collections import defaultdict from theano.compat.six.moves imp...
bsd-3-clause
-817,098,115,755,556,100
32.386831
79
0.591355
false
shakamunyi/tensorflow
tensorflow/contrib/keras/api/keras/losses/__init__.py
75
2203
# 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
-432,928,622,580,595,700
47.955556
86
0.781661
false
simone-f/qat_script
tools/data/Osmose/Osmose_prefs_gui.py
1
2151
#! /usr/bin/env jython # -*- coding: utf-8 -*- """Preferences for Osmose tool """ from javax.swing import JPanel, JLabel, JTextField, JComboBox from java.awt import GridLayout from java.lang import Integer, NumberFormatException class PrefsPanel(JPanel): """JPanle with gui for tool preferences """ def _...
gpl-2.0
-984,214,471,240,011,800
33.142857
92
0.624826
false
guillermo-sentinella/jaeger-client-python
jaeger_client/local_agent_net.py
1
3685
# Copyright (c) 2016 Uber Technologies, Inc. # # 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, publ...
mit
2,413,121,204,964,829,000
39.944444
83
0.70882
false
Tejas-Khot/deep-learning
test/nnet/fflayers.py
7
2390
"""Feed-forward Layers (not includeing ConvNet Layer) This module contains feedforward layers for + Identity layer + Tanh layer + Sigmoid layer + ReLU layer + Softmax layer """ import theano.tensor as T; import telaugesa.nnfuns as nnfuns; from telaugesa.layer import Layer; class IdentityLayer(Layer): """Ident...
gpl-2.0
-935,516,110,150,137,200
22.91
82
0.533054
false
eayunstack/python-cinderclient
cinderclient/extension.py
10
1409
# Copyright (c) 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 ...
apache-2.0
-1,040,650,254,897,088,000
35.128205
78
0.663591
false
sai16vicky/deepdive
examples/test/test_smoke.py
17
1907
import os import getpass import psycopg2 from sets import Set # Error threshold eps = 0.5 # Get the environment variables DBNAME = os.environ['DBNAME'] PGUSER = os.environ['PGUSER'] PGPASSWORD = os.environ['PGPASSWORD'] PGHOST = os.environ['PGHOST'] PGPORT = os.environ['PGPORT'] # Stanfard status std = dict([]) st...
apache-2.0
-6,854,156,015,969,028,000
24.092105
110
0.657577
false
atosatto/ansible
lib/ansible/modules/cloud/azure/azure_rm_virtualmachineimage_facts.py
68
7702
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 Soft...
gpl-3.0
-1,666,786,931,940,447,000
30.565574
104
0.570371
false
a-doumoulakis/tensorflow
tensorflow/contrib/layers/python/layers/regularizers_test.py
73
6622
# 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
-3,250,233,736,248,000,500
37.725146
80
0.658562
false
MIGreenberg/NFLPredict
scripts/correlation.py
1
1485
import nflgame import math import operator from classes.league import * from scipy.stats.stats import pearsonr def statistical_correlation(statistics, performances): stats_a = [] stats_b = [] for performance in performances: stats_a.append(performance.statistics[statistics[0]]) stats_b.append(performance.statis...
mit
6,581,912,810,090,876,000
20.838235
81
0.687542
false
sarvex/depot-tools
third_party/boto/services/bs.py
115
8115
#!/usr/bin/env python # Copyright (c) 2006-2008 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 rig...
bsd-3-clause
3,883,919,502,657,512,400
44.335196
108
0.582994
false
marco-lancini/Showcase
django/contrib/localflavor/jp/forms.py
333
1211
""" JP-specific Form helpers """ from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from django.forms.fields import RegexField, Select class JPPostalCodeField(RegexField): """ A form field that validates its input is a Japanese postcode. Accepts 7 digits, wit...
mit
2,722,479,080,661,496,000
31.72973
79
0.648225
false
Athrun29/horizon
openstack_dashboard/contrib/trove/content/database_backups/views.py
19
4383
# Copyright 2013 Rackspace Hosting # # 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 ...
apache-2.0
8,503,472,768,327,153,000
38.845455
79
0.660735
false
JioCloud/horizon
openstack_dashboard/dashboards/admin/flavors/panel.py
46
1059
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
-1,642,987,502,206,253,000
32.09375
78
0.744098
false
croxis/SpaceDrive
spacedrive/renderpipeline/rpcore/render_target.py
1
14841
""" RenderTarget Copyright (c) 2015 tobspr <tobias.springer1@gmail.com> 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 u...
mit
2,700,231,084,393,569,300
37.576
100
0.61128
false
catapult-project/catapult
third_party/gsutil/gslib/__main__.py
4
33440
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
bsd-3-clause
1,954,081,867,482,379,000
41.653061
90
0.6625
false
hovsepm/AutoRest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/models/usage_name.py
16
1055
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
6,670,789,685,731,214,000
31.96875
76
0.577251
false
partofthething/home-assistant
homeassistant/components/freebox/device_tracker.py
15
4452
"""Support for Freebox devices (Freebox v6 and Freebox mini 4K).""" from datetime import datetime from typing import Dict from homeassistant.components.device_tracker import SOURCE_TYPE_ROUTER from homeassistant.components.device_tracker.config_entry import ScannerEntity from homeassistant.config_entries import Config...
mit
3,867,445,905,360,972,300
29.285714
86
0.615229
false
Lilykos/invenio
invenio/ext/elasticsearch/tasks.py
13
1428
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
-8,214,721,766,243,339,000
34.7
74
0.737395
false
jaywreddy/django
django/contrib/gis/db/backends/spatialite/operations.py
257
11441
""" SQL functions reference lists: http://www.gaia-gis.it/spatialite-2.4.0/spatialite-sql-2.4.html http://www.gaia-gis.it/spatialite-3.0.0-BETA/spatialite-sql-3.0.0.html http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.1.html """ import re import sys from django.contrib.gis.db.backends.base.operations import \ ...
bsd-3-clause
-1,311,533,496,000,603,400
37.783051
100
0.617516
false
amenonsen/ansible
lib/ansible/modules/cloud/vmware/_vmware_host_config_facts.py
21
3727
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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...
gpl-3.0
122,118,836,678,814,020
29.056452
141
0.661926
false
dvliman/jaikuengine
.google_appengine/lib/django-1.3/django/contrib/messages/storage/fallback.py
627
2171
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Tries to store all messages in the first backend, storing any unstored mes...
apache-2.0
6,933,060,659,648,638,000
39.203704
78
0.60433
false
mzbenami/pyeapi
pyeapi/api/varp.py
1
7989
# # Copyright (c) 2015, Arista Networks, 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 condit...
bsd-3-clause
-437,381,868,914,811,700
37.408654
80
0.623357
false
andrewyoung1991/abjad
abjad/tools/lilypondparsertools/ContextSpeccedMusic.py
2
2353
# -*- encoding: utf-8 -*- from abjad.tools import stringtools from abjad.tools.lilypondparsertools.Music import Music class ContextSpeccedMusic(Music): r'''Abjad model of the LilyPond AST context-specced music node. ''' ### CLASS VARIABLES ### __slots__ = ( #'context', 'context_name'...
gpl-3.0
7,994,195,174,127,207,000
27.011905
73
0.58096
false
nalle/dyndd
dyndd/controller.py
1
9149
from twisted.internet import reactor, defer from twisted.python import failure from twisted.names import client, dns, error, server import ConfigParser import logging import os import time import datetime import socket import signal from twisted.internet.address import IPv4Address import MySQLdb class DynDDServerFac...
gpl-3.0
-6,304,562,743,559,989,000
35.596
78
0.512406
false