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
kingvuplus/TT-gui
lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py
8
13872
from Screens.Wizard import wizardManager, WizardSummary from Screens.WizardLanguage import WizardLanguage from Screens.Rc import Rc from Screens.MessageBox import MessageBox from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap from Components.Sources.Boolean import Boolean from Components.Network import iNet...
gpl-2.0
-399,704,221,532,327,740
35.601583
207
0.717488
false
google-research/ott
tests/core/sinkhorn_unbalanced_test.py
1
2940
# coding=utf-8 # Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
apache-2.0
5,401,304,138,509,941,000
27.269231
77
0.591497
false
shibanis1/spark-tk
python/sparktk/models/classification/random_forest_classifier.py
1
9387
from sparktk.loggers import log_load; log_load(__name__); del log_load from sparktk.propobj import PropertiesObject from sparktk.frame.ops.classification_metrics_value import ClassificationMetricsValue import os def train(frame, label_column, observation_columns, num_classes = 2, ...
apache-2.0
7,923,857,274,872,778,000
40.535398
186
0.587302
false
sysadminmatmoz/OCB
addons/warning/warning.py
6
10871
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import api from openerp.osv import fields,osv from openerp.tools.translate import _ WARNING_MESSAGE = [ ('no-message','No Message'), ('warning','Warning'), ...
agpl-3.0
-4,465,848,662,373,873,700
37.413428
224
0.579156
false
sanjeevtripurari/hue
apps/rdbms/setup.py
37
1209
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
apache-2.0
-5,244,022,926,272,756,000
40.689655
74
0.713813
false
jankoslavic/numpy
tools/swig/test/testMatrix.py
116
14309
#! /usr/bin/env python from __future__ import division, absolute_import, print_function # System imports from distutils.util import get_platform import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = TypeE...
bsd-3-clause
-104,149,469,292,760,270
38.527624
86
0.557411
false
kidburglar/youtube-dl
youtube_dl/extractor/nosvideo.py
64
2480
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, sanitized_Request, urlencode_postdata, xpath_text, xpath_with_ns, ) _x = lambda p: xpath_with_ns(p, {'xspf': 'http://xspf.org/ns/0/'}) class NosVideoIE(InfoE...
unlicense
-3,327,583,181,065,467,000
32.066667
75
0.523387
false
knifenomad/django
tests/template_backends/test_jinja2.py
315
3048
# Since this package contains a "jinja2" directory, this is required to # silence an ImportWarning warning on Python 2. from __future__ import absolute_import from unittest import skipIf from django.template import TemplateSyntaxError from .test_dummy import TemplateStringsTests try: import jinja2 except Import...
bsd-3-clause
46,215,310,352,167,190
39.105263
87
0.662402
false
anksp21/Community-Zenpacks
ZenPacks.example.Techniques/setup.py
2
2673
################################ # These variables are overwritten by Zenoss when the ZenPack is exported # or saved. Do not modify them directly here. # NB: PACKAGES is deprecated NAME = "ZenPacks.example.Techniques" VERSION = "1.4.1" AUTHOR = "Chet Luther" LICENSE = "" NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.exa...
gpl-2.0
-7,889,431,797,147,808,000
35.616438
79
0.685746
false
shaunbrady/boto
boto/redshift/exceptions.py
151
8236
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
972,764,550,539,484,300
16.943355
77
0.809131
false
android-ia/platform_external_chromium_org
tools/perf/measurements/session_restore.py
26
2907
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections from measurements import startup from metrics import cpu from metrics import startup_metric from telemetry.core import util from telemetr...
bsd-3-clause
-9,008,401,439,244,783,000
35.797468
80
0.706914
false
pigeonflight/strider-plone
docker/appengine/lib/django-1.4/django/contrib/sessions/backends/signed_cookies.py
94
3019
try: import cPickle as pickle except ImportError: import pickle from django.conf import settings from django.core import signing from django.contrib.sessions.backends.base import SessionBase class PickleSerializer(object): """ Simple wrapper around pickle to be used in signing.dumps and signing....
mit
-5,196,731,043,719,268,000
31.462366
78
0.620404
false
ShadowKyogre/mypaint
gui/brushiconeditor.py
3
12995
# -*- encoding: utf-8 -*- # This file is part of MyPaint. # Copyright (C) 2009-2013 by Martin Renold <martinxyz@gmx.ch> # Copyright (C) 2013-2016 by the MyPaint Development Team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
gpl-2.0
1,338,019,505,943,729,000
34.787879
78
0.603572
false
fangxingli/hue
desktop/core/ext-py/pysaml2-2.4.0/src/saml2/config.py
8
16500
#!/usr/bin/env python __author__ = 'rolandh' import copy import sys import os import re import logging import logging.handlers from importlib import import_module from saml2 import root_logger, BINDING_URI, SAMLError from saml2 import BINDING_SOAP from saml2 import BINDING_HTTP_REDIRECT from saml2 import BINDING_HT...
apache-2.0
6,093,781,510,750,108,000
28.569892
80
0.56103
false
gdw2/zim
tests/tags.py
1
11770
# -*- coding: utf-8 -*- # Copyright 2011 Jaap Karssenberg <jaap.karssenberg@gmail.com> import tests import gtk import pango from zim.index import Index, IndexPath, IndexTag from zim.notebook import Path from zim.gui.pageindex import FGCOLOR_COL, \ EMPTY_COL, NAME_COL, PATH_COL, STYLE_COL # Explicitly don't import...
gpl-2.0
-3,791,806,458,005,445,000
33.314869
95
0.729227
false
pipermerriam/django
tests/gis_tests/gdal_tests/test_geom.py
256
20748
import json import unittest from binascii import b2a_hex from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from django.utils.six.moves import range from ..test_data import TestDataMixin try: from django.utils.six.moves import cPickle as pickle except ImportError: import pickle if...
bsd-3-clause
5,070,150,641,486,555,000
41.342857
97
0.601407
false
dbbhattacharya/kitsune
vendor/packages/sqlalchemy/lib/sqlalchemy/test/requires.py
6
9872
"""Global database feature support policy. Provides decorators to mark tests requiring specific feature support from the target database. """ from testing import \ _block_unconditionally as no_support, \ _chain_decorators_on, \ exclude, \ emits_warning_on,\ skip_if,\ fails_on,\ fai...
bsd-3-clause
2,485,461,649,200,191,500
33.638596
107
0.623278
false
andreparrish/python-for-android
python3-alpha/python3-src/Lib/test/test_list.py
53
2600
import sys from test import support, list_tests class ListTest(list_tests.CommonTest): type2test = list def test_basic(self): self.assertEqual(list([]), []) l0_3 = [0, 1, 2, 3] l0_3_bis = list(l0_3) self.assertEqual(l0_3, l0_3_bis) self.assertTrue(l0_3 is not l0_3_bis) ...
apache-2.0
-6,712,079,117,923,703,000
32.333333
77
0.559231
false
google/grr
grr/core/grr_response_core/lib/registry.py
1
5649
#!/usr/bin/env python """This is the GRR class registry. A central place responsible for registering plugins. Any class can have plugins if it defines __metaclass__ = MetaclassRegistry. Any derived class from this baseclass will have the member classes as a dict containing class name by key and class as value. """ #...
apache-2.0
-7,348,031,194,561,359,000
27.530303
79
0.652151
false
rwgdrummer/maskgen
maskgen/software_loader.py
1
28738
# ============================================================================= # Authors: PAR Government # Organization: DARPA # # Copyright (c) 2016 PAR Government # All rights reserved. # ============================================================================== import json import logging import os from json i...
bsd-3-clause
-7,429,292,932,377,921,000
39.87909
153
0.599207
false
finfish/scrapy
tests/test_utils_conf.py
2
4165
import unittest from scrapy.settings import BaseSettings from scrapy.utils.conf import build_component_list, arglist_to_dict class BuildComponentListTest(unittest.TestCase): def test_build_dict(self): d = {'one': 1, 'two': None, 'three': 8, 'four': 4} self.assertEqual(build_component_list(d, con...
bsd-3-clause
-2,630,516,114,137,063,400
42.842105
93
0.52605
false
htzy/bigfour
common/djangoapps/cors_csrf/tests/test_views.py
150
2397
"""Tests for cross-domain request views. """ import json from django.test import TestCase from django.core.urlresolvers import reverse, NoReverseMatch import ddt from config_models.models import cache from cors_csrf.models import XDomainProxyConfiguration @ddt.ddt class XDomainProxyTest(TestCase): """Tests for...
agpl-3.0
2,079,769,672,689,885,400
32.291667
87
0.627451
false
morph027/ansible-modules-extras
cloud/cloudstack/cs_ip_address.py
33
7989
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Darren Worrall <darren@iweb.co.uk> # (c) 2015, René Moser <mail@renemoser.net> # # 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 So...
gpl-3.0
375,532,266,963,628,540
28.913858
92
0.628897
false
tdegrunt/or-tools
examples/python/crypta.py
34
3413
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.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 applicable ...
apache-2.0
-3,790,485,967,875,447,300
28.422414
104
0.58746
false
utkarsh-goswami/erpnext
erpnext/demo/user/accounts.py
33
4171
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import random from frappe.utils import random_string from frappe.desk import query_report from erpnext.accounts.doctype.journal_entry.jo...
gpl-3.0
4,403,884,196,325,438,500
34.347458
109
0.713018
false
tsaitsai/jasper-client
client/populate.py
28
5053
# -*- coding: utf-8-*- import os import re from getpass import getpass import yaml from pytz import timezone import feedparser import jasperpath def run(): profile = {} print("Welcome to the profile populator. If, at any step, you'd prefer " + "not to enter the requested information, just hit 'Ente...
mit
-6,358,675,409,753,429,000
36.42963
79
0.574312
false
Xowap/ansible
lib/ansible/playbook/handler.py
237
1957
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-6,567,281,502,828,106,000
35.924528
97
0.69954
false
adrifloresm/sssweep
sssweep/web_viewer_gen.py
1
13431
""" * Copyright (c) 2012-2017, Adriana Flores * 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 co...
bsd-3-clause
-5,049,409,654,571,146,000
28.261438
80
0.567791
false
DDelon/youtube-dl
youtube_dl/downloader/rtmp.py
17
8354
from __future__ import unicode_literals import os import re import subprocess import time from .common import FileDownloader from ..compat import compat_str from ..utils import ( check_executable, encodeFilename, encodeArgument, get_exe_version, ) def rtmpdump_version(): return get_exe_version( ...
unlicense
-3,263,989,459,475,636,700
40.152709
121
0.494015
false
syedsuhail/customer_analyzer
lib/flask/signals.py
783
2140
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ signals_available = False try: from blinker import Name...
apache-2.0
8,851,114,825,711,569,000
37.909091
71
0.662617
false
gam17/QAD
qad_break_fun.py
1
4906
# -*- coding: utf-8 -*- """ /*************************************************************************** QAD Quantum Aided Design plugin funzioni per comando SPEZZA per tagliare un oggetto ------------------- begin : 2019-08-08 copyright ...
gpl-3.0
2,953,694,900,859,195,400
41.705357
133
0.549132
false
joebowen/movement_validation_cloud
djangodev/lib/python2.7/site-packages/django/shortcuts.py
78
5688
""" This module collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. """ from django.template import loader, RequestContext from django.http import HttpResponse, Http404 from django.http import HttpRespons...
mit
-832,662,720,353,733,200
32.857143
90
0.658228
false
JPMoresmau/aifh
vol2/vol2-python-examples/lib/aifh/aifh_error.py
6
1218
""" Artificial Intelligence for Humans Volume 2: Nature-Inspired Algorithms Python Version http://www.aifh.org http://www.jeffheaton.com Code repository: https://github.com/jeffheaton/aifh Copyright 2013 by Jeff Heaton Licensed under the Apache License, Version 2.0 (the "License")...
apache-2.0
9,087,343,678,150,114,000
30.25641
96
0.706076
false
eenchev/idea-note-taking-app
env/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/gaerdbms.py
33
3387
# mysql/gaerdbms.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+gaerdbms :name: Google Cloud SQL :dbapi: rdbms :...
mit
7,314,556,820,720,296,000
32.205882
91
0.658105
false
Denisolt/Tensorflow_Chat_Bot
local/lib/python2.7/site-packages/tensorflow/contrib/distributions/python/ops/distribution.py
7
33841
# 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...
gpl-3.0
1,255,708,913,969,260,300
34.962806
80
0.655093
false
d33tah/npyscreen
tokentextbox.py
9
1333
#!/usr/bin/env python # -*- coding: utf-8 -*- # filename: npsapp.py import cProfile import pstats from npyscreen import NPSApp from npyscreen import Form from npyscreen import TextTokens, TitleTextTokens class TextBoxForm(Form): def create(self): tb = self.add(TextTokens, name="TokenField", )#max_width=25...
bsd-2-clause
-83,342,801,809,311,300
24.576923
68
0.427068
false
emedvedev/st2
st2common/tests/unit/test_util_api.py
7
3292
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
2,895,635,442,480,118,000
38.662651
95
0.625152
false
SqueezeStudioAnimation/omtk
python/omtk/vendor/pyparsing.py
22
157475
# module pyparsing.py # # Copyright (c) 2003-2013 Paul T. McGuire # # 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
5,709,935,698,927,364,000
40.015742
196
0.571507
false
quizlet/grpc
src/python/grpcio_tests/tests/testing/_time_test.py
12
6050
# Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
-4,169,475,018,417,231,400
35.666667
78
0.64595
false
google/nitroml
nitroml/benchmark/suites/openml_cc18_test.py
1
1850
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-3,053,389,581,779,941,400
32.035714
79
0.672432
false
artemh/asuswrt-merlin
release/src/router/samba36/wintest/test-s3.py
19
9730
#!/usr/bin/env python '''automated testing of Samba3 against windows''' import sys, os import optparse import wintest def set_libpath(t): t.putenv("LD_LIBRARY_PATH", "${PREFIX}/lib") def set_krb5_conf(t): t.run_cmd("mkdir -p ${PREFIX}/etc") t.write_file("${PREFIX}/etc/krb5.conf", ''...
gpl-2.0
6,256,183,168,282,289,000
34.381818
143
0.584995
false
ZHAW-INES/rioxo-uClinux-dist
user/python/python-2.4.4/Lib/_strptime.py
11
18819
"""Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information FUNCTIONS: _getlang -- Figure out what language is being used for the locale ...
gpl-2.0
1,180,111,993,181,234,700
42.064073
105
0.548541
false
azurestandard/django
tests/regressiontests/comment_tests/tests/app_api_tests.py
50
2600
from __future__ import absolute_import from django.conf import settings from django.contrib import comments from django.contrib.comments.models import Comment from django.contrib.comments.forms import CommentForm from . import CommentTestCase class CommentAppAPITests(CommentTestCase): """Tests for the "comment ...
bsd-3-clause
4,304,082,047,380,734,500
33.666667
90
0.695385
false
CTSNE/NodeDefender
NodeDefender/mail/node.py
1
1136
from flask_mail import Message from flask import render_template, url_for import NodeDefender import smtplib @NodeDefender.decorators.mail_enabled @NodeDefender.decorators.celery_task def new_node(group, node): group = NodeDefender.db.group.get(group) if group is None: return False if group.email i...
mit
1,991,880,481,027,996,200
35.645161
91
0.659331
false
kevin-coder/tensorflow-fork
tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py
8
6532
# 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 applicable ...
apache-2.0
5,517,690,364,646,745,000
40.341772
92
0.684783
false
foxwill/ol-api-tester
env/lib/python2.7/site-packages/setuptools/tests/test_find_packages.py
43
6005
"""Tests for setuptools.find_packages().""" import os import sys import shutil import tempfile import unittest import platform import setuptools from setuptools import find_packages from setuptools.tests.py26compat import skipIf find_420_packages = setuptools.PEP420PackageFinder.find # modeled after CPython's test.s...
gpl-2.0
6,998,133,970,633,741,000
34.323529
83
0.594338
false
Bergiu/smarthomepi
packages/shp/server/Program.py
1
3915
# from datetime import datetime class Program ( ): #private: """ id # int datetime # datetime description # string status # boolean inactive # boolean weekly # boolean pin # int(4) id_related_dev # int id_initiator # int """ def __init__(self,**kwargs): """ @**kwargs: id: int datetime: date...
gpl-3.0
-920,460,828,087,173,400
17.209302
106
0.62069
false
tereka114/chainer
tests/functions_tests/test_split_axis.py
1
2359
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer.testing import attr if cuda.available: cuda.init() class TestSplitAxis0(unittest.TestCase): def setUp(self): self.x = numpy.arange(42, dtype=numpy.flo...
mit
-7,395,524,975,415,688,000
27.768293
72
0.59983
false
FinalAngel/djangocms-installer
tests/config.py
3
25247
# -*- coding: utf-8 -*- from __future__ import print_function import os import sys from mock import patch from six import StringIO, text_type from tzlocal import get_localzone from djangocms_installer import config from djangocms_installer.install import check_install from djangocms_installer.utils import less_than_v...
bsd-3-clause
5,874,671,321,833,623,000
42.231164
122
0.542322
false
drpngx/tensorflow
tensorflow/tools/docker/simple_console.py
605
1028
# 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
-203,848,976,866,271,100
30.151515
80
0.678988
false
yw374cornell/e-mission-server
emission/tests/storageTests/analysis_ts_common.py
1
3325
# Standard imports import unittest import datetime as pydt import logging import uuid import json import emission.storage.timeseries.abstract_timeseries as esta import emission.storage.decorations.analysis_timeseries_queries as esda import emission.storage.timeseries.timequery as estt import emission.core.get_databas...
bsd-3-clause
-6,959,645,504,513,503,000
40.5625
90
0.682105
false
cfriedt/gnuradio
gr-uhd/examples/python/fm_tx_2_daughterboards.py
58
7706
#!/usr/bin/env python # # Copyright 2005-2007,2011,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at ...
gpl-3.0
-7,199,769,946,225,564,000
34.675926
132
0.53348
false
analyseuc3m/ANALYSE-v1
openedx/core/djangoapps/ccxcon/tests/test_api.py
24
8241
""" Unit tests for the API module """ import datetime import mock import pytz import urlparse from nose.plugins.attrib import attr from opaque_keys.edx.keys import CourseKey from student.tests.factories import AdminFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils ...
agpl-3.0
778,108,877,563,444,100
37.509346
113
0.650771
false
snyderr/robotframework
src/robot/model/message.py
2
2643
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
apache-2.0
-9,209,179,479,988,908,000
34.716216
77
0.640182
false
benlangmuir/swift
utils/build_swift/tests/utils.py
21
2090
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIBUTORS.txt for the list o...
apache-2.0
-5,199,293,003,264,466,000
22.222222
79
0.597608
false
klahnakoski/esShardBalancer
pyLibrary/env/big_data.py
2
12353
# encoding: utf-8 # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import unicode_literals from __fu...
mpl-2.0
5,974,824,802,151,708,000
27.794872
131
0.543107
false
MTASZTAKI/ApertusVR
plugins/physics/bulletPhysics/3rdParty/bullet3/examples/pybullet/examples/getClosestPoints.py
2
2665
import pybullet as p import time p.connect(p.GUI) useCollisionShapeQuery = True p.configureDebugVisualizer(p.COV_ENABLE_GUI, 0) geom = p.createCollisionShape(p.GEOM_SPHERE, radius=0.1) geomBox = p.createCollisionShape(p.GEOM_BOX, halfExtents=[0.2, 0.2, 0.2]) baseOrientationB = p.getQuaternionFromEuler([0, 0.3, 0]) #[0...
mit
-5,667,727,714,677,863,000
36.013889
173
0.601876
false
alexisVallet/anime-character-detection
dpmDetection.py
1
2469
import cv2 import pymatlab as mlb class DPMObjectDetection: def __init__(self): self.session = mlb.session_factory() self.session.run('cd ./voc-dpm/') self.model = None def trainDPMmodel(self, model, pos, neg, warp, randneg, nbiter, nbnegiter, maxnumexamp...
gpl-2.0
-4,481,293,850,010,839,600
43.890909
131
0.563386
false
bendk/thesquirrel
thesquirrel/views.py
1
1123
# thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any la...
agpl-3.0
5,060,170,681,026,645,000
34.09375
78
0.749777
false
agroknow/aginfra
sites/all/modules/ak_cp/js/leaflet_search/tilestache_server_with_autocomplete.py
2
5844
import json import marisa_trie import os import shutil from operator import itemgetter import TileStache from werkzeug.serving import run_simple from werkzeug.wrappers import Request, Response from cartograph import Utils from cartograph import Config """ This is an example from a summer research projec...
gpl-2.0
319,583,478,758,305,400
44.031496
287
0.575804
false
cuckoobox/cuckoo
tests/test_search.py
1
4842
# Copyright (C) 2017-2018 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import mock import os import tempfile from cuckoo.common.elastic import Elastic from cuckoo.common.mongo import Mongo, mongo from cuckoo.common.object...
mit
6,799,490,892,015,483,000
24.619048
68
0.549566
false
asterisk/ari-py
ari_test/utils.py
2
2013
#!/usr/bin/env python import httpretty import os import unittest import urlparse import ari import requests class AriTestCase(unittest.TestCase): """Base class for mock ARI server. """ BASE_URL = "http://ari.py/ari" def setUp(self): """Setup httpretty; create ARI client. """ ...
bsd-3-clause
7,237,302,397,208,412,000
28.602941
77
0.556384
false
LumaPictures/rez
src/rez/cli/complete.py
4
3454
""" Prints package completion strings. """ from rez.vendor import argparse __doc__ = argparse.SUPPRESS def setup_parser(parser, completions=False): pass def command(opts, parser, extra_arg_groups=None): from rez.cli._util import subcommands, hidden_subcommands import os import re # get comp i...
lgpl-3.0
-5,884,535,343,274,367,000
29.839286
79
0.611754
false
daviddupont69/CouchPotatoServer
libs/rsa/transform.py
216
6848
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
gpl-3.0
-3,417,576,358,140,375,000
30.122727
86
0.631517
false
maxamillion/atomic-reactor
atomic_reactor/plugins/pre_inject_parent_image.py
3
5041
""" Copyright (c) 2017 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, unicode_literals from atomic_reactor.build import ImageName from atomic_reactor.koji_util import creat...
bsd-3-clause
7,412,242,715,765,343,000
38.692913
95
0.645507
false
handroissuazo/tensorflow
tensorflow/python/ops/gradient_checker_test.py
18
11199
# 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
6,003,311,263,979,053,000
36.454849
80
0.626038
false
geosharath/sm
drivers/mpath_dmp.py
4
11094
#!/usr/bin/python # # Copyright (C) Citrix Systems Inc. # # This program 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; version 2.1 only. # # This program is distributed in the hope that it will be u...
lgpl-2.1
-119,632,054,546,002,830
32.720365
108
0.618262
false
baris/fullerite
src/diamond/collectors/ipmisensor/ipmisensor.py
23
4467
# coding=utf-8 """ This collector uses the [ipmitool](http://openipmi.sourceforge.net/) to read hardware sensors from servers using the Intelligent Platform Management Interface (IPMI). IPMI is very common with server hardware but usually not available in consumer hardware. #### Dependencies * [ipmitool](http://ope...
apache-2.0
8,484,804,694,733,016,000
32.335821
79
0.488023
false
lpramuk/robottelo
robottelo/cli/puppet.py
1
1998
# -*- encoding: utf-8 -*- """ Usage:: hammer puppet-class [OPTIONS] SUBCOMMAND [ARG] ... Parameters:: SUBCOMMAND subcommand [ARG] ... subcommand arguments Subcommands:: info Show a puppetclass list List all...
gpl-3.0
-6,313,773,293,266,725,000
31.754098
80
0.52002
false
santiag0aragon/pgp_dongle
pgp_wrapper.py
1
11716
import os import gnupg import socket import struct import re import sys import getpass from socket_utils import * # For the generation of the key you may want to run # sudo rngd -r /dev/urandom # to generate randomnes class PGP: def __init__(self, path, email=None, verbose=False, pass_phrase=None): self.D...
gpl-3.0
6,337,142,791,805,982,000
38.053333
147
0.528167
false
sontek/rethinkdb
external/v8_3.30.33.16/build/gyp/test/win/gyptest-link-ordering.py
225
3058
#!/usr/bin/env python # Copyright (c) 2013 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. """ Make sure the link order of object files is the same between msvs and ninja. """ import TestGyp import sys if sys.platform == 'win32'...
agpl-3.0
59,218,725,993,339,760
29.277228
78
0.59189
false
40223133/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/sre_compile.py
630
16898
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" import sys import _sre import sre_parse from sre_constan...
gpl-3.0
5,504,392,161,521,260,000
30.703565
75
0.512013
false
pacificclimate/pdp_util
tests/test_util.py
1
3182
from urllib.parse import urlencode from datetime import datetime from pycds import Network, CrmpNetworkGeoserver as cng from pdp_util.util import get_stn_list, get_clip_dates, get_extension import pytest from sqlalchemy import text from webob.request import Request def test_get_stn_list(test_session): stns = ge...
gpl-3.0
2,471,189,183,973,981,700
27.159292
82
0.543997
false
numpy/numpy
numpy/distutils/intelccompiler.py
5
4234
import platform from distutils.unixccompiler import UnixCCompiler from numpy.distutils.exec_command import find_executable from numpy.distutils.ccompiler import simple_version_match if platform.system() == 'Windows': from numpy.distutils.msvc9compiler import MSVCCompiler class IntelCCompiler(UnixCCompiler): ...
bsd-3-clause
2,835,375,531,588,375,600
37.144144
78
0.541096
false
feliperfranca/django-nonrel-example
django/contrib/admindocs/utils.py
314
3796
"Misc. utility functions/classes for admin documentation generator." import re from email.Parser import HeaderParser from email.Errors import HeaderParseError from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from django.utils.encoding import smart_str try: import docutils....
bsd-3-clause
-3,556,754,438,577,526,300
35.152381
140
0.643572
false
381426068/MissionPlanner
Lib/site-packages/numpy/core/tests/test_scalarmath.py
53
14311
import sys from numpy.testing import * import numpy as np types = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc, np.uintc, np.int_, np.uint, np.longlong, np.ulonglong, np.single, np.double, np.longdouble, np.csingle, np.cdouble, np.clongdouble] real_types = [ np.byte, np.ubyte,...
gpl-3.0
3,984,565,927,031,687,000
33.484337
116
0.488086
false
da2ce7/cjdns
node_build/dependencies/libuv/build/gyp/test/lib/TestCmd.py
330
52544
""" TestCmd.py: a testing framework for commands and scripts. The TestCmd module provides a framework for portable automated testing of executable commands and scripts (in any language, not just Python), especially commands and scripts that require file system interaction. In addition to running tests and evaluating...
gpl-3.0
-8,915,685,874,621,644,000
31.901691
101
0.551005
false
nwjs/chromium.src
ios/build/bots/scripts/run_test.py
1
5516
#!/usr/bin/python # Copyright 2019 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. """Unittests for run.py.""" import json import re import unittest import run class UnitTest(unittest.TestCase): def test_parse_args_o...
bsd-3-clause
-4,793,199,857,715,615,000
23.515556
79
0.433829
false
meituan/mcsapi_python
mosclient/common/client.py
1
4879
import sys import json import urllib import urllib2 from urlparse import urlparse from datetime import datetime import ec2utils from xmltodict import parse class BaseClient(object): def __init__(self, access, secret, url, format=None, timeout=300, debug=False, region='Beijing'): self.a...
mit
1,717,570,367,665,442,300
30.681818
82
0.502152
false
yongshengwang/builthue
desktop/core/ext-py/Paste-1.7.2/tests/test_auth/test_auth_digest.py
10
2959
# (c) 2005 Clark C. Evans # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from paste.auth.digest import * from paste.wsgilib import raw_interactive from paste.response import header_value from paste.httpexceptions import * fr...
apache-2.0
7,419,111,466,484,620,000
32.247191
74
0.663738
false
FCP-INDI/C-PAC
CPAC/pipeline/engine.py
1
92736
import os import ast import six import json import warnings import logging import copy from unittest import TestCase from CPAC.pipeline import nipype_pipeline_engine as pe import nipype.interfaces.utility as util from nipype.interfaces.utility import Rename from CPAC.utils.interfaces.function import Function from CPAC...
bsd-3-clause
-252,832,068,145,758,400
48.858065
382
0.515161
false
amrdraz/brython
www/tests/test_set.py
9
1178
x = set(['a','r','bg','Z']) assert x==set(['bg','Z','a','r']) assert len(x)==4 x.add('tail') assert len(x)==5 x.add('tail') assert len(x)==5 assert 'r' in x assert 'rty' not in x y = set([1,2,3]) assert x.isdisjoint(y) y.add('r') assert not x.isdisjoint(y) z = set(['a','r']) assert z.issubset(x) assert z <= x assert...
bsd-3-clause
6,604,613,360,345,172,000
15.361111
39
0.567912
false
cylc/cylc
cylc/flow/parsec/validate.py
1
34282
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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,...
gpl-3.0
-5,937,824,959,578,395,000
34.451913
79
0.511872
false
eloquentstore/appimager
cli/install.py
1
1599
from cli import base from core import data, container import shutil import os import sys import tarfile from docker import Client from urllib.request import urlretrieve from cement.core.controller import CementBaseController, expose class InstallController(CementBaseController): class Meta: label = 'instal...
mit
-7,275,915,682,717,822,000
29.75
140
0.621639
false
ESOedX/edx-platform
common/test/acceptance/pages/lms/library.py
2
1513
""" Library Content XBlock Wrapper """ from __future__ import absolute_import from bok_choy.page_object import PageObject class LibraryContentXBlockWrapper(PageObject): """ A PageObject representing a wrapper around a LibraryContent block seen in the LMS """ url = None BODY_SELECTOR = '.xblock-st...
agpl-3.0
-250,246,660,050,396,380
29.26
97
0.615995
false
fieraloca/CODEPROJ
PYTHON/COMP_PHOTO/hw0/part0.py
1
3516
import sys import os import numpy as np import cv2 def split_rgb(image): '''Split the target image into its red, green and blue channels. image - a numpy array of shape (rows, columns, 3). output - three numpy arrays of shape (rows, columns) and dtype same as image, containing the corresponding cha...
mit
9,172,736,779,900,084,000
31.555556
78
0.565984
false
popazerty/EG-2
lib/python/Screens/InfoBarGenerics.py
4
131511
# -*- coding: utf-8 -*- from Components.ActionMap import ActionMap, HelpableActionMap, NumberActionMap from Components.Harddisk import harddiskmanager, findMountPoint from Components.Input import Input from Components.Label import Label from Components.MovieList import AUDIO_EXTENSIONS, MOVIE_EXTENSIONS, DVD_EXTENSIONS...
gpl-2.0
-1,694,368,705,194,031,000
32.885854
238
0.715241
false
lyager/rpcz
python/compiler.py
5
1758
#!/usr/bin/env python import os import sys from distutils import spawn class CompilerException(Exception): pass def generate_proto(source, output_dir, with_plugin='python', suffix='_pb2.py', plugin_binary=None): """Invokes the Protocol Compiler to generate a _pb2.py from the given .p...
apache-2.0
3,245,843,021,717,457,400
34.16
79
0.590444
false
eerwitt/tensorflow
tensorflow/python/kernel_tests/losses_test.py
21
54130
# 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
-8,203,578,745,061,066,000
40.670516
80
0.608295
false
leorochael/odoo
addons/subscription/__init__.py
441
1076
# -*- 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...
agpl-3.0
872,003,408,679,586,200
42.04
79
0.610595
false
analyseuc3m/ANALYSE-v1
cms/lib/xblock/tagging.py
5
3903
""" Structured Tagging based on XBlockAsides """ from xblock.core import XBlockAside, XBlock from xblock.fragment import Fragment from xblock.fields import Scope, Dict from xmodule.x_module import STUDENT_VIEW from xmodule.capa_module import CapaModule from abc import ABCMeta, abstractproperty from edxmako.shortcuts i...
agpl-3.0
1,244,296,430,862,461,000
29.492188
110
0.595439
false
hachard/Cra-Magnet
flask/lib/python3.5/site-packages/migrate/changeset/schema.py
66
24237
""" Schema module providing common schema operations. """ import abc try: # Python 3 from collections import MutableMapping as DictMixin except ImportError: # Python 2 from UserDict import DictMixin import warnings import six import sqlalchemy from sqlalchemy.schema import ForeignKeyConstraint from sqlal...
gpl-3.0
-2,761,961,698,758,660,600
33.574893
94
0.602674
false
mvaled/OpenUpgrade
openerp/report/print_fnc.py
458
1318
# -*- 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...
agpl-3.0
8,376,116,647,329,105,000
34.621622
83
0.610774
false
ohsangjin/git-core
contrib/hg-to-git/hg-to-git.py
342
8074
#!/usr/bin/env python """ hg-to-git.py - A Mercurial to GIT converter Copyright (C)2007 Stelian Pop <stelian@popies.net> 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 versi...
gpl-2.0
2,963,695,399,130,692,000
30.662745
120
0.574313
false
minhphung171093/GreenERP
openerp/tools/pdf_utils.py
72
2702
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr manipulate pdf and fdf files. pdftk recommended. Notes regarding pdftk, pdf forms and fdf files (form defin...
gpl-3.0
-3,807,260,001,240,026,600
24.018519
94
0.599926
false
MattsFleaMarket/python-for-android
python3-alpha/python3-src/Lib/idlelib/SearchDialogBase.py
55
4385
from tkinter import * class SearchDialogBase: title = "Search Dialog" icon = "Search" needwrapbutton = 1 def __init__(self, root, engine): self.root = root self.engine = engine self.top = None def open(self, text, searchphrase=None): self.text = text if no...
apache-2.0
-8,812,879,029,661,747,000
30.321429
72
0.545268
false
cfelton/minnesota
examples/cores/fpgalink/led/fpgalink_led.py
1
2713
from myhdl import * from mn.cores.usb_ext import fl_fx2 from mn.cores.usb_ext import fpgalink_fx2 def fpgalink_led( # ~~ FX2 interface signals ~~ IFCLK, # 48 MHz clock from FX2 RST, # active low async reset SLWR, # active low write strobe SLRD, # active low read strobe ...
gpl-3.0
-5,899,048,860,088,826,000
25.861386
70
0.568743
false
huawei-cloud/compass
compass/hdsdiscovery/utils.py
4
4810
"""Utility functions Including functions of get/getbulk/walk/set of snmp for three versions """ import imp import re import logging def load_module(mod_name, path, host=None, credential=None): """ Load a module instance. :param str mod_name: module name :param str path: directory of the module :pa...
apache-2.0
-1,287,850,197,749,334,500
29.0625
79
0.59896
false
miguelparaiso/PracticaOdoo
addons/website_membership/models/product.py
338
1264
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
-6,470,773,106,378,102,000
38.5
84
0.607595
false
google/cloudprint_logocert
_ticket.py
1
5318
"""Copyright 2016 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 agreed to in ...
apache-2.0
-4,244,256,495,647,302,000
26.842932
80
0.618842
false