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
eeshangarg/zulip
zerver/webhooks/freshping/tests.py
1
1324
from zerver.lib.test_classes import WebhookTestCase class FreshpingHookTests(WebhookTestCase): STREAM_NAME = "freshping" URL_TEMPLATE = "/api/v1/external/freshping?api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = "freshping" def test_freshping_check_test(self) -> None: """ Tests ...
apache-2.0
-2,883,182,096,400,899,000
37.941176
91
0.67145
false
davisein/jitsudone
django/django/contrib/comments/__init__.py
423
3333
from django.conf import settings from django.core import urlresolvers from django.core.exceptions import ImproperlyConfigured from django.contrib.comments.models import Comment from django.contrib.comments.forms import CommentForm from django.utils.importlib import import_module DEFAULT_COMMENTS_APP = 'django.contrib....
bsd-3-clause
-2,667,123,168,927,894,500
35.626374
104
0.645065
false
rechner/Taxidi
notify/googlevoice/voice.py
1
11693
from conf import config from util import * import settings import base64 import os import re qpat = re.compile(r'\?') if settings.DEBUG: import logging logging.basicConfig() log = logging.getLogger('PyGoogleVoice') log.setLevel(logging.DEBUG) else: log = None class Voice(object): """ Main...
gpl-3.0
8,404,442,915,427,086,000
34.326284
132
0.545284
false
treejames/viewfinder
backend/www/test/facebook_utils.py
13
7256
#!/usr/bin/env python # # Copyright 2012 Viewfinder Inc. All Rights Reserved. """Facebook-specific test functions. Creating facebook test users should only need to be done once--they persist across unittest runs and are shared by all developers. Create the universe of test users with: % python -m viewfinder.backend....
apache-2.0
-2,897,689,092,403,569,000
39.088398
113
0.658076
false
chokribr/invenio
invenio/legacy/websubmit/icon_creator.py
13
36867
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2008, 2009, 2010, 2011, 2012 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 (a...
gpl-2.0
6,991,498,296,022,429,000
46.631783
94
0.54184
false
SnappleCap/oh-mainline
vendor/packages/celery/celery/tests/test_app/test_routes.py
18
5437
from __future__ import absolute_import from __future__ import with_statement from functools import wraps from celery import routes from celery import current_app from celery.exceptions import QueueNotFound from celery.utils import maybe_promise from celery.tests.utils import unittest def E(queues): def expand(a...
agpl-3.0
-8,796,705,981,209,876,000
36.239726
75
0.569983
false
aerickson/ansible
lib/ansible/modules/cloud/amazon/cloudtrail.py
27
8794
#!/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
1,115,411,345,392,163,800
33.896825
152
0.634637
false
CeltonMcGrath/TACTIC
3rd_party/CherryPy/cherrypy/test/sessiondemo.py
7
5376
#!/usr/bin/python """A session demonstration app.""" import calendar from datetime import datetime import sys import cherrypy from cherrypy.lib import sessions page = """ <html> <head> <style type='text/css'> table { border-collapse: collapse; border: 1px solid #663333; } th { text-align: right; background-color: #6...
epl-1.0
1,094,530,933,738,465,200
34.368421
102
0.590216
false
pschmitt/home-assistant
homeassistant/components/home_connect/entity.py
21
1999
"""Home Connect entity base class.""" import logging from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import Entity from .api import HomeConnectDevice from .const import DOMAIN, SIGNAL_UPDATE_ENTITIES _LOGGER = logging.ge...
apache-2.0
-2,565,503,710,967,988,700
28.835821
95
0.61981
false
rizar/groundhog-private
doc/conf.py
28
6225
# -*- coding: utf-8 -*- # # pylearn2 documentation build configuration file # It is based on Theano documentation build # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module impo...
bsd-3-clause
4,749,203,589,928,550,000
30.923077
82
0.721767
false
UWNetworksLab/metasync
metasync/mapping.py
1
7526
from params import * import dbg, util class DetMapInfo2: def __init__(self, config, hspace, replica, version): self.config = config self.replica = replica self.hspace = hspace self.version = version self._load(config) def _load(self, config): nspace = [] ...
mit
4,169,984,075,551,297,000
28.061776
97
0.55275
false
adit-chandra/tensorflow
third_party/mlir/bindings/python/test/test_py2and3.py
3
19351
# Copyright 2019 The MLIR 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 wri...
apache-2.0
-3,474,678,752,818,992,600
38.092929
167
0.540592
false
citrix-openstack-build/nova
nova/tests/servicegroup/test_zk_driver.py
42
2605
# Copyright (c) AT&T 2012-2013 Yun Mao <yunmao@gmail.com> # Copyright 2012 IBM Corp. # # 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/LICENS...
apache-2.0
-7,268,908,886,710,849,000
39.076923
78
0.686756
false
unusedPhD/amoco
amoco/arch/arm/v7/asm.py
6
25084
# -*- coding: utf-8 -*- # This code is part of Amoco # Copyright (C) 2006-2011 Axel Tillequin (bdcht3@gmail.com) # published under GPLv2 license from .env import * #utilities: #---------- from .utils import * from amoco.cas.utils import * from amoco.arch.core import InstructionError from amoco.logger import Log log...
gpl-2.0
6,853,082,876,322,321,000
26.354417
90
0.597433
false
rajashreer7/autotest-client-tests
linux-tools/pixman/pixman.py
4
1243
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error class pixman(test.test): """ Autotest module for testing basic functionality of pixman @author Kingsuk Deb, kingsdeb@linux.vnet.ibm.com ## """ ...
gpl-2.0
-3,011,023,606,224,123,400
24.895833
85
0.543846
false
omarocegueda/dipy
doc/examples/viz_ui.py
1
3092
import numpy as np from dipy.data import read_viz_icons # Conditional import machinery for vtk. from dipy.utils.optpkg import optional_package # Allow import, but disable doctests if we don't have vtk. from dipy.viz import ui, window vtk, have_vtk, setup_module = optional_package('vtk') if have_vtk: vtkInterac...
bsd-3-clause
9,115,827,068,363,327,000
27.109091
85
0.710543
false
jaggu303619/asylum-v2.0
openerp/addons/purchase_double_validation/__init__.py
441
1090
# -*- 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
3,349,290,472,199,197,700
44.416667
78
0.622018
false
ian-r-rose/SHTOOLS
src/create_wrapper.py
2
5850
#!/usr/bin/env python """ Automatically creates python-wrapper subroutines from the interface file SHTOOLS.f95. Unfortunately all assumed array shapes have to be changed because their structure is only known by the Fortran compiler and can not be directly exposed to C. It is possible that newer f2py versions can handle...
bsd-3-clause
8,885,614,668,304,569,000
38.261745
98
0.597436
false
dasmarci/check_mk
a10/checks/a10_cpu.py
1
1914
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- factory_settings["a10_cpu_default_levels"] = {'cpu': (80.0, 90.0),} a10_cpus = { 0: "average", 1: "Control", 2: "Data" } def inventory_a10_cpu(info): if info: return [ (None, "a10_cpu_default_...
gpl-2.0
9,057,211,000,888,976,000
32
94
0.419018
false
anirudhSK/chromium
build/android/screenshot.py
3
3317
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Takes a screenshot or a screen video capture from an Android device.""" import logging import optparse import os import sys f...
bsd-3-clause
3,775,023,418,594,303,500
35.855556
80
0.617124
false
rogst/datadogpy
tests/unit/api/helper.py
3
3033
# python import unittest # datadog from datadog import initialize, api from datadog.api.base import CreateableAPIResource, UpdatableAPIResource, DeletableAPIResource,\ GetableAPIResource, ListableAPIResource, ActionAPIResource from datadog.util.compat import iteritems, json # 3p import requests from mock import p...
bsd-3-clause
3,103,430,116,106,672,000
26.080357
96
0.665348
false
beni55/edx-platform
common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py
114
10820
# -*- 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 'UserProfile.country' db.add_column('auth_userprofile', 'country', self...
agpl-3.0
-9,027,395,022,131,214,000
73.109589
182
0.547505
false
auferack08/edx-platform
common/lib/xmodule/xmodule/tests/test_capa_module.py
15
74271
# -*- coding: utf-8 -*- """ Tests of the Capa XModule """ # pylint: disable=C0111 # pylint: disable=R0904 # pylint: disable=C0103 # pylint: disable=C0302 import datetime import json import random import os import textwrap import unittest from mock import Mock, patch import webob from webob.multidict import MultiDict ...
agpl-3.0
-1,190,926,482,617,075,500
40.228333
217
0.585223
false
henriquegemignani/py-gocd
docs/conf.py
2
10117
# -*- coding: utf-8 -*- # # GoCD API Client documentation build configuration file, created by # sphinx-quickstart on Sun Aug 9 00:56:28 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
mit
418,187,856,297,621,100
30.705329
79
0.701503
false
rajiteh/taiga-back
tests/integration/resources_permissions/test_auth_resources.py
24
1111
from django.core.urlresolvers import reverse from taiga.base.utils import json from tests import factories as f from tests.utils import disconnect_signals, reconnect_signals import pytest pytestmark = pytest.mark.django_db def setup_module(module): disconnect_signals() def teardown_module(module): reconn...
agpl-3.0
3,594,285,034,670,962,700
22.145833
77
0.658866
false
EmanueleCannizzaro/scons
test/Docbook/basic/html/html.py
3
1724
#!/usr/bin/env python # # Copyright (c) 2001-2010 The SCons Foundation # # 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,...
mit
8,458,716,656,910,885,000
28.724138
100
0.74652
false
joberreiter/pyload
module/plugins/accounts/FastixRu.py
3
2037
# -*- coding: utf-8 -*- from module.plugins.internal.Account import Account from module.common.json_layer import json_loads class FastixRu(Account): __name__ = "FastixRu" __type__ = "account" __version__ = "0.08" __status__ = "testing" __config__ = [("mh_mode" , "all;listed;unlisted", ...
gpl-3.0
9,152,333,656,423,936,000
35.375
97
0.480609
false
unioslo/cerebrum
Cerebrum/modules/bofhd/errors.py
1
2338
# -*- coding: utf-8 -*- # Copyright 2002-2014 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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 # (a...
gpl-2.0
-5,024,367,272,510,985,000
24.977778
79
0.665954
false
Yukarumya/Yukarum-Redfoxes
media/webrtc/trunk/tools/gyp/test/mac/gyptest-postbuild-fail.py
88
2218
#!/usr/bin/env python # Copyright (c) 2011 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 that a failing postbuild step lets the build fail. """ import TestGyp import sys if sys.platform == 'darwin': # set |match...
mpl-2.0
-4,671,948,783,327,080,000
31.617647
76
0.634806
false
kawamon/hue
desktop/core/ext-py/celery-4.2.1/t/unit/worker/test_request.py
2
36038
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import numbers import os import signal import socket import sys from datetime import datetime, timedelta from time import time import pytest from billiard.einfo import ExceptionInfo from case import Mock, patch from kombu.utils.encoding ...
apache-2.0
-8,043,366,806,504,638,000
33.51582
78
0.574333
false
to266/hyperspy
hyperspy/models/model1D.py
1
32769
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
650,623,079,084,865,000
36.708861
79
0.580396
false
DrAA/avro
lang/py/src/avro/tether/tether_task.py
18
17523
""" * 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...
apache-2.0
1,682,110,948,017,590,000
34.186747
139
0.667066
false
civisanalytics/ansible
lib/ansible/modules/network/nxos/nxos_evpn_global.py
4
2899
#!/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 distribut...
gpl-3.0
-7,930,219,972,588,723,000
25.842593
87
0.664712
false
mbareta/edx-platform-ft
lms/djangoapps/notification_prefs/tests.py
26
9892
import json from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.http import Http404 from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_setting...
agpl-3.0
-4,171,015,841,334,844,000
39.37551
109
0.666903
false
HaroldMills/Vesper
scripts/create_clip_zip_files.py
1
1964
""" Script that creates zip files from Vesper archive clip directories. The script puts the zip files in a directory called "Clips (zipped)" that is a sibling of the archive's "Clips" directory. The "Clips (zipped)" directory has the same structure as the "Clips" directory, except that each grandchild directory of the...
mit
-6,001,186,832,532,591,000
31.733333
79
0.590631
false
ttsubo/ryu
ryu/app/cbench.py
51
1787
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at valinux co jp> # # 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://...
apache-2.0
-5,065,530,753,605,298,000
34.74
72
0.695579
false
mlperf/training_results_v0.7
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/topi/tests/python/test_topi_reduce.py
2
6995
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-3,391,800,373,829,415,400
38.297753
95
0.522087
false
joonro/PyTables
tables/filters.py
6
14264
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: 2007-02-23 # Author: Ivan Vilata i Balaguer - ivan at selidor dot net # # $Id$ # ######################################################################## """Functionality related with filters i...
bsd-3-clause
-642,244,743,959,157,200
34.306931
111
0.577398
false
mizdebsk/javapackages
test/osgi_req_test.py
1
2463
import unittest from test_common import * class TestOSGiReq(unittest.TestCase): @osgireq(["basic/buildroot/usr/share/META-INF/MANIFEST.MF"]) def test_basic(self, stdout, stderr, return_value): self.assertEqual(return_value, 0, stderr) sout = [x for x in stdout.split('\n') if x] asser...
bsd-3-clause
362,060,638,693,013,800
40.05
80
0.63784
false
debugger06/MiroX
windows/plat/config.py
2
8122
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
gpl-2.0
8,832,887,120,965,401,000
34.938053
75
0.638636
false
ibmsoe/tensorflow
tensorflow/python/client/session_test.py
4
67123
# 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,613,336,951,559,632,000
39.386883
80
0.622946
false
mdaniel/intellij-community
python/helpers/py2only/docutils/languages/ru.py
128
2155
# -*- coding: utf-8 -*- # $Id: ru.py 7125 2011-09-16 18:36:18Z milde $ # Author: Roman Suzi <rnd@onego.ru> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be...
apache-2.0
8,448,878,917,387,253,000
30.983051
76
0.622682
false
Garrett-R/scikit-learn
sklearn/cross_decomposition/pls_.py
5
28683
""" The :mod:`sklearn.pls` module implements Partial Least Squares (PLS). """ # Author: Edouard Duchesnay <edouard.duchesnay@cea.fr> # License: BSD 3 clause from ..base import BaseEstimator, RegressorMixin, TransformerMixin from ..utils import check_array, check_consistent_length from ..externals import six import w...
bsd-3-clause
-1,411,345,655,723,106,600
35.03392
79
0.583482
false
google/mirandum
alerts/twitchalerts/tests.py
1
1768
# 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 applica...
apache-2.0
-5,575,133,141,791,261,000
33
137
0.68948
false
arnaudsj/pybrain
pybrain/tools/datasets/mnist.py
4
1906
import itertools import os import scipy import struct from pybrain.datasets import SupervisedDataSet def labels(filename): fp = file(filename) magicnumber, length = struct.unpack('>ii', fp.read(8)) assert magicnumber in (2049, 2051), ("Not an MNIST file: %i" % magicnumber) for _ in xrange(length): ...
bsd-3-clause
8,888,558,503,135,659,000
33.053571
81
0.678384
false
bitifirefly/edx-platform
common/djangoapps/student/tests/test_parental_controls.py
155
3850
"""Unit tests for parental controls.""" import datetime from django.test import TestCase from django.test.utils import override_settings from student.models import UserProfile from student.tests.factories import UserFactory class ProfileParentalControlsTest(TestCase): """Unit tests for requires_parental_consent...
agpl-3.0
123,667,222,242,440,510
43.767442
108
0.695844
false
jcobham/barebox
Documentation/gen_commands.py
10
5303
#!/usr/bin/python import errno import os import re import sys import hashlib from collections import defaultdict from pprint import pprint # TODO: handle commands with the same name in multiple files # TODO: handle #ifdefs HELP_START = re.compile(r"""^BAREBOX_CMD_HELP_START\s*\((\w+)\)?\s*$""") HELP_TEXT = re.comp...
gpl-2.0
5,011,712,086,407,226,000
26.764398
100
0.546483
false
lakiw/cripts
cripts/core/mongo_tools.py
1
14342
from django.conf import settings if settings.FILE_DB == settings.S3: from cripts.core.s3_tools import get_file_s3 import gridfs import pymongo import magic class MongoError(Exception): """ Generic MongoError exception. """ pass # TODO: mongo_connector() and gridfs_connector() can probably be com...
mit
6,328,668,662,138,184,000
33.726392
85
0.627109
false
danmar/cppcheck
tools/ci.py
8
2424
#!/usr/bin/env python # continuous integration # build daily reports (doxygen,coverage,etc) import datetime import time import subprocess import pexpect import glob import sys # Upload file to sourceforge web server using scp def upload(file_to_upload, destination): try: password = sys.argv[1] c...
gpl-3.0
-617,789,974,752,907,000
25.933333
101
0.610149
false
jbarriosc/ACSUFRO
LGPL/CommonSoftware/acssim/src/Acssim/Servants/Representations/BaseRepresentation.py
4
4088
# @(#) $Id$ # # Copyright (C) 2001 # Associated Universities, Inc. Washington DC, USA. # # Produced for the ALMA project # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version ...
lgpl-2.1
-7,127,702,261,341,192,000
36.851852
97
0.514432
false
zdw/xos
xos/tosca/resources/controller.py
4
1722
# note: this module named xossite.py instead of site.py due to conflict with # /usr/lib/python2.7/site.py import os import pdb import sys import tempfile sys.path.append("/opt/tosca") from translator.toscalib.tosca_template import ToscaTemplate from core.models import User,Controller,Deployment from xosresource i...
apache-2.0
5,788,630,216,790,204,000
30.888889
165
0.657375
false
fibbo/DIRAC
Interfaces/scripts/dirac-dms-pfn-accessURL.py
15
1415
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-dms-pfn-accessURL # Author : Stuart Paterson ######################################################################## """ Retrieve an access URL for a PFN given a valid DIRAC SE """ __RCSID__ ...
gpl-3.0
676,163,120,995,892,600
28.479167
94
0.487633
false
duyetdev/openerp-6.1.1
openerp/addons/stock_planning/stock_planning.py
9
47400
# -*- 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
-4,970,838,849,846,173,000
62.453815
184
0.576688
false
piquadrat/django
tests/delete_regress/tests.py
17
13296
import datetime from django.db import connection, models, transaction from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import ( Award, AwardNote, Book, Child, Eaten, Email, File, Food, FooFile, FooFileProxy, FooImage, FooPhoto, House, Image, Item, Location, Login, Or...
bsd-3-clause
1,253,371,800,737,191,200
37.427746
95
0.629212
false
AMOboxTV/AMOBox.LegoBuild
plugin.video.salts/salts_lib/url_dispatcher.py
21
3803
import log_utils class URL_Dispatcher: def __init__(self): self.func_registry = {} self.args_registry = {} self.kwargs_registry = {} def register(self, mode, args=None, kwargs=None): """ Decorator function to register a function as a plugin:// url endpoint mode...
gpl-2.0
-2,265,966,192,977,751,300
40.336957
166
0.567973
false
azumimuo/family-xbmc-addon
script.module.youtube.dl/lib/youtube_dl/extractor/pyvideo.py
76
2764
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import int_or_none class PyvideoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?pyvideo\.org/(?P<category>[^/]+)/(?P<id>[^/?#&.]+)' _TESTS = [{ 'url': 'http://pyvide...
gpl-2.0
3,040,511,611,081,146,400
37.388889
98
0.47974
false
kkampardi/Plinth
plinth/menu.py
8
3637
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
agpl-3.0
8,455,977,394,149,732,000
35.737374
93
0.638438
false
chancecoin/chancecoin
lib/exceptions.py
1
1314
#! /usr/bin/python3 class ConfigurationError (Exception): pass class DatabaseError (Exception): pass class VersionError (Exception): pass class ClientVersionError (VersionError): pass class DatabaseVersionError (VersionError): pass class TransactionError(Exception): pass class InputError(Excep...
mit
-1,509,130,478,516,563,000
18.909091
53
0.748097
false
CraigHarris/gpdb
gpAux/extensions/gmock/test/gmock_leak_test.py
779
4384
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
apache-2.0
-3,150,248,206,878,760,000
39.592593
73
0.653513
false
petewarden/tensorflow_makefile
tensorflow/python/lib/io/python_io.py
9
1794
# Copyright 2015 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 a...
apache-2.0
4,328,737,478,417,905,700
31.618182
80
0.712932
false
gabfl/vault
setup.py
1
1471
from setuptools import setup try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except(IOError, ImportError): long_description = open('README.md').read() setup( name='pyvault', version='2.4', description='Python password manager', long_description=long_description...
mit
-274,036,547,945,418,240
34.02381
76
0.583277
false
ptisserand/ansible
lib/ansible/modules/network/cloudengine/ce_evpn_global.py
65
6911
#!/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 distribut...
gpl-3.0
4,729,894,665,043,454,000
28.283898
87
0.610476
false
aerickson/ansible
lib/ansible/utils/plugin_docs.py
44
6418
# (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
gpl-3.0
-5,185,756,236,307,069,000
36.532164
135
0.578997
false
bird-house/twitcher
tests/functional/test_owsproxy_app.py
2
1589
""" Run tests OWSProxy tests with external WPS. Please start `Emu WPS <https://emu.readthedocs.io/en/latest/>`_ on port 5000: http://localhost:5000/wps """ import pytest from .base import FunctionalTest class OWSProxyAppTest(FunctionalTest): def setUp(self): super(OWSProxyAppTest, self).setUp() ...
apache-2.0
2,946,316,377,839,211,000
32.104167
162
0.658276
false
Rajeshkumar90/ansible-modules-extras
univention/udm_user.py
27
21241
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # # 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 Fr...
gpl-3.0
-2,585,338,041,504,384,500
34.520067
81
0.45544
false
viniciusgama/blog_gae
django/contrib/markup/tests.py
245
3155
# Quick tests for the markup templatetags (django.contrib.markup) import re from django.template import Template, Context, add_to_builtins from django.utils import unittest from django.utils.html import escape add_to_builtins('django.contrib.markup.templatetags.markup') try: import textile except ImportError: ...
bsd-3-clause
-5,560,689,029,878,204,000
33.67033
99
0.660539
false
benjixx/ansible
lib/ansible/utils/module_docs_fragments/rackspace.py
232
4190
# (c) 2014, Matt Martz <matt@sivel.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 Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
gpl-3.0
-8,365,781,953,558,790,000
32.790323
119
0.696659
false
YihaoLu/statsmodels
statsmodels/compat/tests/test_itercompat.py
33
1222
# -*- coding: utf-8 -*- """ Created on Wed Feb 29 10:34:00 2012 Author: Josef Perktold """ from statsmodels.compat import lrange, zip_longest, combinations from numpy.testing import assert_ def test_zip_longest(): lili = [['a0', 'b0', 'c0', 'd0'], ['a1', 'b1', 'c1'], ['a2', 'b2', 'c2', '...
bsd-3-clause
-1,047,828,218,259,896,400
28.095238
74
0.454992
false
cloudera/hue
desktop/core/ext-py/dnspython-1.15.0/dns/rdataclass.py
16
3258
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
apache-2.0
3,502,675,681,937,125,000
26.610169
76
0.674954
false
misgeatgit/opencog
opencog/python/pln_old/examples/temporal/temporal_example.py
28
1863
""" Demo to demonstrate use of temporal reasoning pipeline 1. RelEx and RelEx2Logic process natural language sentences 2. PLN performs inferences using AI on output atoms """ from __future__ import print_function from opencog.atomspace import types, AtomSpace, TruthValue from opencog.scheme_wrapper import load_scm, sc...
agpl-3.0
2,741,137,026,648,633,000
31.12069
81
0.689211
false
vguerci/Deluge.app
deluge/core/alertmanager.py
4
5064
# # alertmanager.py # # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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 l...
gpl-3.0
2,224,642,273,168,845,600
37.363636
87
0.653041
false
Tuxemon/Tuxemon
tuxemon/event/actions/clear_variable.py
1
1565
# # Tuxemon # Copyright (c) 2020 William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon # # 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 #...
gpl-3.0
1,790,100,614,074,229,500
29.686275
70
0.735463
false
lijoantony/django-oscar
src/oscar/apps/customer/auth_backends.py
55
2680
import warnings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from oscar.apps.customer.utils import normalise_email from oscar.core.compat import get_user_model User = get_user_model() if hasattr(User, 'REQUIRED_FIELDS'): if not (User.USERNAME_FIEL...
bsd-3-clause
-4,743,367,438,044,007,000
38.411765
79
0.65
false
littlejo/Libreosteo
winserver.py
1
8114
# This file is part of Libreosteo. # # Libreosteo 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. # # Libreosteo is distributed in the ...
gpl-3.0
7,404,327,192,536,045,000
35.38565
94
0.497165
false
Ingenico-ePayments/connect-sdk-python3
tests/unit/test_directory_params.py
1
1664
import unittest from ingenico.connect.sdk.merchant.products.directory_params import DirectoryParams from tests.unit.comparable_param import ComparableParam class DirectoryParamsTest(unittest.TestCase): """Tests if instances of the DirectoryParams class for products can be correctly converted to RequestParame...
mit
-7,989,072,288,077,747,000
35.173913
113
0.686899
false
thnee/ansible
lib/ansible/modules/network/avi/avi_gslbgeodbprofile.py
28
4241
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.2 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
gpl-3.0
5,786,194,718,458,125,000
31.374046
105
0.611177
false
fhaoquan/kbengine
kbe/res/scripts/common/Lib/test/test_builtin.py
72
58513
# Python test set -- built-in functions import ast import builtins import collections import io import locale import os import pickle import platform import random import sys import traceback import types import unittest import warnings from operator import neg from test.support import TESTFN, unlink, run_unittest, c...
lgpl-3.0
-3,891,017,670,108,098,600
34.742211
105
0.528576
false
qspin/qtaste
demo/pywinauto-0.3.8/examples/ForteAgentSample.py
19
2955
"""Perform some tests with Forte Agent NOTE: Forte Agent has a very dynamic interface e.g. whether it is free or not, whether it is still in the grace period. For this reason this example script may or may not work well for you""" print __doc__ import time from pprint import pprint from pywinauto.applic...
lgpl-3.0
-2,993,912,422,958,561,300
29.774194
74
0.732657
false
dafei2015/hugula
Client/tools/site-packages/PIL/ImageGrab.py
13
1926
# # The Python Imaging Library # $Id: ImageGrab.py 2134 2004-10-06 08:55:20Z fredrik $ # # screen grabber (windows only) # # History: # 2001-04-26 fl created # 2001-09-17 fl use builtin driver, if present # 2002-11-19 fl added grabclipboard support # # Copyright (c) 2001-2002 by Secret Labs AB # Copyright (c) 2001-2...
mit
473,356,852,410,785,100
26.126761
70
0.67134
false
matthijsvk/multimodalSR
code/Experiments/neon-master/examples/imagenet/ingest.py
1
9525
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2015-2016 Nervana Systems 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 #...
mit
5,707,514,639,736,904,000
40.593886
98
0.606194
false
tqchen/tvm
tutorials/frontend/deploy_model_on_rasp.py
1
8161
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-7,162,788,721,437,609,000
34.482609
116
0.642078
false
FFMG/myoddweb.piger
myodd/boost/tools/build/test/builtin_exit.py
51
1029
#!/usr/bin/python # Copyright 2012 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # This tests the EXIT rule. import BoostBuild def test_exit(name): t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=...
gpl-2.0
4,757,763,497,724,843,000
23.5
81
0.584062
false
thekindlyone/msg2eml
msg2eml.py
1
6009
# -*- coding: utf-8 -*- import os import sys import glob import traceback from email.parser import Parser as EmailParser import email.utils import OleFileIO_PL as OleFile import email import random import string import mimetypes from email import encoders from email.message import Message from email.mime....
gpl-2.0
1,822,844,102,559,308,300
28.984536
116
0.615909
false
mistercrunch/panoramix
superset/databases/commands/validate.py
1
5684
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-5,033,581,622,412,222,000
40.489051
87
0.606615
false
gkc1000/pyscf
pyscf/fci/test/test_rdm.py
2
10777
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
apache-2.0
1,560,922,090,286,171,100
40.291188
92
0.606198
false
modoboa/modoboa
modoboa/admin/tests/test_mailbox_operations.py
1
3310
"""Management command tests.""" import os import shutil import tempfile from unittest import mock from django.core.management import call_command from django.test import override_settings from django.urls import reverse from modoboa.lib.tests import ModoTestCase from .. import factories, models @override_settings(...
isc
-4,431,807,952,369,130,000
38.404762
77
0.64139
false
shenhzou654321/protobuf-ios
compiler/python/google/protobuf/internal/generator_test.py
15
4312
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
mit
4,220,688,615,417,971,700
42.12
80
0.75603
false
ntuecon/server
pyenv/Lib/site-packages/twisted/words/xish/xpath.py
13
9556
# -*- test-case-name: twisted.words.test.test_xpath -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ XPath query support. This module provides L{XPathQuery} to match L{domish.Element<twisted.words.xish.domish.Element>} instances against XPath-like expressions. """ from __future__ imp...
bsd-3-clause
-2,518,614,410,732,638,000
27.356083
79
0.587275
false
matrixise/odoo
addons/account_anglo_saxon/product.py
384
3035
############################################################################## # # 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 Affero General Publ...
agpl-3.0
-1,043,654,238,069,943,200
41.746479
111
0.615815
false
gitgitcode/myflask
venv/lib/python2.7/site-packages/pip/req/req_set.py
338
34462
from __future__ import absolute_import from collections import defaultdict from itertools import chain import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.compat import expanduser from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path, ...
mit
-8,030,233,339,954,475,000
42.185464
79
0.543265
false
cryptodechange/electrum-asiccoin
plugins/virtualkeyboard.py
3
1951
from PyQt4.QtGui import * from electrum import BasePlugin from electrum.i18n import _ class Plugin(BasePlugin): def fullname(self): return 'Virtual Keyboard' def description(self): return '%s\n%s' % (_("Add an optional, mouse keyboard to the password dialog."), _("Warning: do not use this if...
gpl-3.0
-311,096,198,626,219,300
27.275362
159
0.534085
false
playm2mboy/edx-platform
cms/djangoapps/contentstore/views/tests/test_videos.py
83
15190
#-*- coding: utf-8 -*- """ Unit tests for video-related REST APIs. """ # pylint: disable=attribute-defined-outside-init import csv import json import dateutil.parser import re from StringIO import StringIO from django.conf import settings from django.test.utils import override_settings from mock import Mock, patch fr...
agpl-3.0
-5,958,825,339,790,185,000
38.957895
106
0.560524
false
commtrack/temp-rapidsms
apps/schools/xml.py
3
1531
''' Created on Nov 13, 2009 @author: Cory Zue ''' from __future__ import absolute_import from xml.etree import ElementTree from xml.etree.ElementTree import Element, SubElement from django.db import models class SerializableModel(): '''A serializable model. Override the ATTRS and ELEMS property on the t...
lgpl-3.0
-3,596,816,620,837,900,000
29.019608
71
0.635532
false
kreatorkodi/repository.torrentbr
plugin.video.elementum/resources/site-packages/elementum/dialog_select.py
1
1990
import os import xbmcgui from elementum.addon import ADDON_PATH from dialog import * # NOQA class DialogSelect(xbmcgui.WindowXMLDialog): def __init__(self, *args, **kwargs): xbmcgui.WindowXML.__init__(self) self.items = kwargs['items'] self.title = kwargs['title'] self.count = 0 ...
gpl-2.0
8,088,570,779,420,537,000
31.622951
94
0.536181
false
sergiosgc/Syncthing.py
syncthing/bep/fileinfo.py
1
1801
from syncthing.bep.serializable import BEPSerializable from syncthing.bep.blockinfo import BEPBlockInfo from syncthing.xdr.XDRStringUnserializer import XDRStringUnserializer from syncthing.xdr.XDRIntegerUnserializer import XDRIntegerUnserializer from syncthing.xdr.XDRLongIntegerUnserializer import XDRLongIntegerUnseria...
gpl-2.0
7,003,280,848,381,825,000
45.179487
79
0.74181
false
larrybradley/astropy
astropy/io/votable/tests/vo_test.py
8
35397
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is a set of regression tests for vo. """ # STDLIB import difflib import io import pathlib import sys import gzip from unittest import mock # THIRD-PARTY import pytest import numpy as np from numpy.testing import assert_ar...
bsd-3-clause
4,234,307,268,275,030,000
33.204062
116
0.556564
false
Mirdrack/4chanscrapper
lib/python2.7/site-packages/requests/status_codes.py
926
3200
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
mit
6,539,751,102,043,861,000
34.910112
89
0.583542
false
tardis-sn/tardis
tardis/montecarlo/montecarlo_numba/interaction.py
1
4192
from numba import njit from tardis.montecarlo.montecarlo_numba import njit_dict, njit_dict_no_parallel from tardis.montecarlo.montecarlo_numba.numba_interface import ( LineInteractionType, ) from tardis.montecarlo import ( montecarlo_configuration as montecarlo_configuration, ) from tardis.montecarlo.montecarl...
bsd-3-clause
-1,857,849,678,481,623,800
34.811966
128
0.698091
false
Sodki/ansible
lib/ansible/modules/cloud/vmware/vsphere_copy.py
36
6516
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Dag Wieers <dag@wieers.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 Lice...
gpl-3.0
162,489,652,723,304,200
32.244898
155
0.647176
false
wizardofwhimsy/wizardofwhimsy.github.io
vendor/bundle/ruby/2.7.0/gems/ffi-1.12.2/ext/ffi_c/libffi/generate-darwin-source-and-headers.py
22
6531
#!/usr/bin/env python import subprocess import os import errno import collections import glob import argparse class Platform(object): pass class simulator_platform(Platform): directory = 'darwin_ios' sdk = 'iphonesimulator' arch = 'i386' triple = 'i386-apple-darwin11' version_min = '-miphoneos...
mit
-5,302,908,846,734,554,000
31.492537
136
0.622416
false