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
pombredanne/AnotherPyGraphvizAgain
AnotherPyGraphvizAgain/tests/Framework.py
1
1641
# -*- coding: utf-8 -*- # Copyright 2013 Vincent Jacques # vincent@vincent-jacques.net # This file is part of AnotherPyGraphvizAgain. http://jacquev6.github.com/AnotherPyGraphvizAgain # AnotherPyGraphvizAgain is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General ...
gpl-3.0
7,262,110,258,205,641,000
41.184211
154
0.672761
false
iRGBit/QGIS
python/plugins/db_manager/sqledit.py
18
6399
# -*- coding: utf-8 -*- """ *************************************************************************** ScriptEdit.py --------------------- Date : February 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com *************...
gpl-2.0
-536,522,122,541,818,940
34.949438
81
0.607282
false
ivar1234/babu.repo
lib/ansible/plugins/action/include_vars.py
49
2027
# (c) 2013-2014, Benno Joy <benno@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
gpl-3.0
3,446,340,100,772,364,300
34.561404
97
0.647262
false
Linutronix/linux
tools/testing/kunit/kunit_parser.py
239
10790
# SPDX-License-Identifier: GPL-2.0 # # Parses test results from a kernel dmesg log. # # Copyright (C) 2019, Google LLC. # Author: Felix Guo <felixguoxiuping@gmail.com> # Author: Brendan Higgins <brendanhiggins@google.com> import re from collections import namedtuple from datetime import datetime from enum import Enum...
gpl-2.0
-5,476,490,231,178,958,000
29.05571
89
0.685913
false
mogoweb/chromium-crosswalk
tools/valgrind/valgrind_test.py
1
46063
# 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. """Runs an exe through Valgrind and puts the intermediate files in a directory. """ import datetime import glob import logging import optparse import os...
bsd-3-clause
470,539,693,808,898,940
36.297976
89
0.62002
false
bancek/egradebook
src/lib/django/forms/models.py
152
42947
""" Helper functions for creating Form classes from Django models and database field objects. """ from django.utils.encoding import smart_unicode, force_unicode from django.utils.datastructures import SortedDict from django.utils.text import get_text_list, capfirst from django.utils.translation import ugettext_lazy as...
gpl-3.0
7,917,911,124,786,982,000
40.94043
121
0.591543
false
ActiveState/code
recipes/Python/456361_Paypal_IPN/recipe-456361.py
1
3423
#!/usr/bin/python24 import cgi import time import MySQLdb from traceback import format_exception from sys import exc_info from string import split from string import strip from sys import exit from urllib import urlencode import urllib2 DATADIR = "/home/user/data/" PP_URL = "https://www.sandbox.paypal.com/cgi-bin/we...
mit
-7,408,490,656,062,120,000
27.289256
115
0.546889
false
kmatzen/ansible
test/units/parsing/test_data_loader.py
58
3231
# (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
2,017,250,486,176,118,500
34.9
96
0.694212
false
rotula/pdfminer
pdfminer/glyphlist.py
2
121489
""" Mappings from Adobe glyph names to Unicode characters. In some CMap tables, Adobe glyph names are used for specifying Unicode characters instead of using decimal/hex character code. The following data was taken by $ wget https://partners.adobe.com/public/developer/en/opentype/glyphlist.txt $ python tools/c...
mit
-6,605,503,913,319,668,000
26.999309
85
0.640906
false
xguse/blacktie
src/blacktie/scripts/blacktie_pipeline.py
1
9732
#***************************************************************************** # blacktie_pipeline.py (part of the blacktie package) # # (c) 2013 - Augustine Dunn # James Laboratory # Department of Biochemistry and Molecular Biology # University of California Irvine # wadunn83@gmail.com # # Licenced under the GN...
gpl-3.0
-5,756,859,680,306,930,000
35.867424
151
0.592992
false
jwhui/openthread
tests/scripts/thread-cert/Cert_9_2_15_PendingPartition.py
3
8095
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
bsd-3-clause
8,374,749,715,035,453,000
40.091371
306
0.630266
false
PriceChild/ansible
lib/ansible/modules/cloud/univention/udm_user.py
69
21748
#!/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
3,651,408,405,970,147,300
34.828666
81
0.456364
false
davicustodio/geonode
geonode/services/management/commands/importservice.py
35
4156
from django.core.management.base import BaseCommand from optparse import make_option from geonode.services.models import Service from geonode.services.views import _register_cascaded_service, _register_indexed_service, \ _register_harvested_service, _register_cascaded_layers, _register_indexed_layers import json fr...
gpl-3.0
898,095,691,708,498,300
42.291667
119
0.592637
false
modulexcite/catapult
third_party/mapreduce/mapreduce/kv_pb.py
35
10910
#!/usr/bin/env python # Generated by the protocol buffer compiler. DO NOT EDIT! # source: third_party/py/appengine_mapreduce/src/kv.proto from google.net.proto import ProtocolBuffer import array import base64 import thread try: from google.net.proto import _net_proto___parse__python except ImportError: _net_proto...
bsd-3-clause
6,498,816,034,049,506,000
27.78628
440
0.652612
false
Stavitsky/nova
nova/objects/dns_domain.py
17
2588
# Copyright (C) 2014, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-3,259,322,401,809,506,000
32.61039
78
0.669243
false
m4h7/juriscraper
juriscraper/opinions/united_states/federal_appellate/ca7.py
2
4151
# Scraper for the United States Court of Appeals for the Seventh Circuit # CourtID: ca7 # Court Short Name: 7th Cir. import time from datetime import date, timedelta import urllib from dateutil.rrule import rrule, DAILY from lxml import html from juriscraper.OpinionSite import OpinionSite class Site(OpinionSite): ...
bsd-2-clause
-2,673,184,645,781,027,000
36.396396
129
0.547338
false
glewarne/S6-UniKernel
scripts/exynos_checkpatch_helper.py
169
2237
""" exynos_checkpatch_helper.py - a helper script for exynos_checkpatch.sh Dept : S/W Solution Dev Team Author : Solution3 Power Part Update : 2014.12.08 """ import subprocess as sp import sys def print_log(color, log): colored_log = '' if color == 'r': colored_log = "\033[31m" + log + "\033...
gpl-2.0
3,319,923,879,474,630,000
29.643836
91
0.565489
false
ckoch786/PrayerTimes
src/prayertimes.py
1
4151
#!/usr/bin/python # Copyright 2012 Cory Koch # # This file is part of PrayerTimes. # # PrayerTimes 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 la...
gpl-3.0
-3,285,477,060,284,995,600
22.72
173
0.544447
false
Benrflanders/Pytris
pyglet/media/drivers/directsound/lib_dsound.py
78
12874
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
mit
-5,640,416,884,978,043,000
30.553922
79
0.650614
false
drayanaindra/shoop
shoop_tests/utils/__init__.py
6
3979
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import contextlib import logging import sys import string import uuid import...
agpl-3.0
8,942,385,825,535,625,000
29.844961
91
0.695652
false
DBrianKimmel/PyHouse
Project/src/Modules/House/rooms.py
1
12194
""" @name: Modules/House/rooms.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com @copyright: (c) 2013-2020 by D. Brian Kimmel @license: MIT License @note: Created on Apr 10, 2013 @summary: Handle the rooms information for a house. """ __updated__ = '2020-02-17' __version_info__ = (19, 1...
mit
5,040,722,994,889,429,000
34.447674
135
0.574791
false
onitake/ansible
lib/ansible/utils/module_docs_fragments/proxysql.py
29
1293
# Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt class ModuleDocFragment(object): # Documentation fragment for ProxySQL connectivity CONNECTIVITY = ''' options: login_user: description: - The username used to authen...
gpl-3.0
5,288,033,580,499,965,000
26.510638
91
0.679814
false
Kriechi/mitmproxy
docs/scripts/api-events.py
1
4042
#!/usr/bin/env python3 import contextlib import inspect import textwrap from pathlib import Path from typing import List, Type import mitmproxy.addons.next_layer # noqa from mitmproxy import hooks, log, addonmanager from mitmproxy.proxy import server_hooks, layer from mitmproxy.proxy.layers import http, tcp, tls, web...
mit
-6,531,047,635,499,981,000
25.741722
102
0.534671
false
medspx/QGIS
python/plugins/processing/algs/qgis/TextToFloat.py
3
3143
# -*- coding: utf-8 -*- """ *************************************************************************** TextToFloat.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com *************************...
gpl-2.0
-369,508,345,889,962,400
34.715909
100
0.496977
false
lukeiwanski/tensorflow
tensorflow/python/kernel_tests/variable_scope_test.py
4
64569
# 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
-8,853,083,626,123,391,000
41.846052
80
0.642305
false
saimn/astropy
astropy/io/votable/tests/util_test.py
7
1648
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ A set of tests for the util.py module """ # LOCAL from astropy.io.votable import util from astropy.tests.helper import raises def test_range_list(): assert util.coerce_range_list_param((5,)) == ("5.0", 1) def test_range_list2(): assert ut...
bsd-3-clause
1,600,034,169,793,109,000
23.597015
78
0.600121
false
apark263/tensorflow
tensorflow/contrib/feature_column/__init__.py
42
1502
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-5,003,724,599,573,468,000
40.722222
93
0.727696
false
Alwnikrotikz/volatility
volatility/plugins/crashinfo.py
44
5868
# Volatility # Copyright (C) 2009-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
-5,400,627,659,991,058,000
43.454545
114
0.608896
false
ellipsis14/dolfin
demo/documented/tensor-weighted-poisson/python/demo_tensor-weighted-poisson.py
3
3252
"""This demo program solves Poisson's equation - div C grad u(x, y) = f(x, y) on the unit square with source f given by f(x, y) = 10*exp(-((x - 0.5)^2 + (y - 0.5)^2) / 0.02) and boundary conditions given by u(x, y) = 0 for x = 0 or x = 1 du/dn(x, y) = 0 for y = 0 or y = 1 The conductivity C is a sym...
gpl-3.0
2,511,720,334,121,315,000
26.1
87
0.676507
false
soylentdeen/Graffity
src/SQLTools/CIAO_Browser.py
1
3413
import scipy import numpy import sys from astropy import time as aptime sys.path.append('../') import CIAO_DatabaseTools import Graffity import tkinter def getGRAVITY_OBS(GRAVITY_values, frame): tkinter.Label(frame, text="GRAVITY Observations", width = 3, borderwidth="1", relief="solid").grid(row=0, ...
mit
7,112,165,432,358,024,000
31.817308
100
0.607677
false
Immortalin/python-for-android
python3-alpha/python3-src/Lib/test/test_datetime.py
49
1656
import unittest import sys from test.support import import_fresh_module, run_unittest TESTS = 'test.datetimetester' # XXX: import_fresh_module() is supposed to leave sys.module cache untouched, # XXX: but it does not, so we have to save and restore it ourselves. save_sys_modules = sys.modules.copy() try: pure_tests...
apache-2.0
-2,813,565,531,902,316,000
38.428571
77
0.57971
false
alexston/calibre-webserver
src/calibre/utils/fonts/win_fonts.py
8
6186
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
gpl-3.0
192,523,267,781,303,900
34.551724
98
0.521177
false
proversity-org/edx-platform
lms/djangoapps/badges/events/tests/test_course_complete.py
10
2548
""" Tests for the course completion helper functions. """ from datetime import datetime from badges.events import course_complete from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory class ...
agpl-3.0
8,240,053,304,790,058,000
35.927536
119
0.630298
false
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/bx_python-0.7.2-py2.7-linux-x86_64-ucs4.egg/bx/intervals/intersection_tests.py
7
6579
import sys, os import unittest try: sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) except: sys.path.insert(0, os.path.dirname(os.path.abspath("."))) from bx.intervals.intersection import Interval from bx.intervals.intersection import IntervalNode from bx.intervals.intersection import IntervalTr...
gpl-3.0
-3,602,155,913,627,791,000
29.041096
90
0.535796
false
coursemdetw/2014c2
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/sre_parse.py
111
29657
# # Secret Labs' Regular Expression Engine # # convert re-style regular expression to sre pattern # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" # XXX: show string offset and offending ch...
gpl-2.0
-1,524,803,687,100,922,000
33.404872
81
0.461813
false
bdfoster/blumate
blumate/components/scsgate.py
1
5023
""" Support for SCSGate components. For more details about this component, please refer to the documentation at https://home-assistant.io/components/scsgate/ """ import logging from threading import Lock from blumate.core import EVENT_BLUMATE_STOP REQUIREMENTS = ['scsgate==0.1.0'] DOMAIN = "scsgate" SCSGATE = None _...
mit
-4,564,020,504,394,137,600
32.046053
78
0.604022
false
anusornc/vitess
test/queryservice_test.py
8
2628
#!/usr/bin/env python import logging import optparse import traceback import unittest import sys import os import utils import framework from queryservice_tests import cache_tests from queryservice_tests import nocache_tests from queryservice_tests import stream_tests from queryservice_tests import status_tests from...
bsd-3-clause
-8,592,721,607,114,342,000
31.85
89
0.701294
false
ThirdProject/android_external_chromium_org
tools/perf/benchmarks/indexeddb_perf.py
23
1654
# 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. """Runs Chromium's IndexedDB performance test. These test: Databases: create/delete Keys: create/delete Indexes: create/delete Data access: Random r...
bsd-3-clause
-2,080,686,368,664,859,400
26.566667
76
0.681378
false
vipul-sharma20/oh-mainline
vendor/packages/django-inplaceedit/inplaceeditform/perms.py
19
1387
# Copyright (c) 2010-2013 by Yaco Sistemas <goinnn@gmail.com> or <pmartin@yaco.es> # # 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, either version 3 of the License, or # (at your option)...
agpl-3.0
-2,995,502,310,487,503,000
39.794118
86
0.701514
false
sursum/buckanjaren
buckanjaren/lib/python3.5/site-packages/django/contrib/admin/templatetags/admin_modify.py
129
3006
import json from django import template from django.template.context import Context register = template.Library() @register.inclusion_tag('admin/prepopulated_fields_js.html', takes_context=True) def prepopulated_fields_js(context): """ Creates a list of prepopulated_fields that should render Javascript for ...
mit
1,149,675,647,106,198,500
36.111111
111
0.637725
false
1st/django
tests/db_typecasts/tests.py
206
2412
# Unit tests for typecast functions in django.db.backends.util import datetime import unittest from django.db.backends import utils as typecasts from django.utils import six TEST_CASES = { 'typecast_date': ( ('', None), (None, None), ('2005-08-11', datetime.date(2005, 8, 11)), ('1...
bsd-3-clause
-3,655,408,826,116,909,000
42.071429
121
0.553483
false
stroykova/luigi
test/fib_test.py
21
2262
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-3,159,323,642,100,146,700
28
92
0.622458
false
emonty/ansible
lib/ansible/playbook/play.py
19
13265
# (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
-3,397,066,269,610,508,300
37.673469
138
0.614399
false
JJediny/python-social-auth
examples/pyramid_example/example/settings.py
51
2415
SOCIAL_AUTH_SETTINGS = { 'SOCIAL_AUTH_LOGIN_URL': '/', 'SOCIAL_AUTH_LOGIN_REDIRECT_URL': '/done', 'SOCIAL_AUTH_USER_MODEL': 'example.models.User', 'SOCIAL_AUTH_LOGIN_FUNCTION': 'example.auth.login_user', 'SOCIAL_AUTH_LOGGEDIN_FUNCTION': 'example.auth.login_required', 'SOCIAL_AUTH_AUTHENTICATION_...
bsd-3-clause
-4,299,351,953,120,809,000
43.722222
67
0.689855
false
Suninus/NewsBlur
vendor/paypal/standard/ipn/signals.py
23
1129
""" Note that sometimes you will get duplicate signals emitted, depending on configuration of your systems. If you do encounter this, you will need to add the "dispatch_uid" to your connect handlers: http://code.djangoproject.com/wiki/Signals#Helppost_saveseemstobeemittedtwiceforeachsave """ from django.dispatch impor...
mit
-2,253,449,041,286,952,400
25.27907
103
0.772365
false
ac0x/googletest
scripts/release_docs.py
1167
6132
#!/usr/bin/env python # # Copyright 2013 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...
bsd-3-clause
-4,213,825,131,831,000,600
37.810127
80
0.669276
false
andreparrish/python-for-android
python3-alpha/python3-src/Lib/multiprocessing/synchronize.py
51
10685
# # Module implementing synchronization primitives # # multiprocessing/synchronize.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistribution...
apache-2.0
-5,004,236,021,120,555,000
29.971014
78
0.593542
false
agepoly/mezzanine
mezzanine/conf/admin.py
9
1866
from __future__ import unicode_literals from django.contrib import admin from django.contrib.messages import info from django.http import HttpResponseRedirect from django.utils.translation import ugettext_lazy as _ try: from django.utils.encoding import force_text except ImportError: # Backward compatibility f...
bsd-2-clause
375,200,088,273,714,560
34.884615
74
0.672562
false
iDTLabssl/kitsune
kitsune/flagit/migrations/0001_initial.py
19
1986
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('contenttypes', '0001_init...
bsd-3-clause
9,183,218,900,251,103,000
47.439024
294
0.59567
false
pquentin/django
django/db/models/fields/subclassing.py
111
2015
""" Convenience routines for creating non-trivial Field subclasses, as well as backwards compatibility utilities. Add SubfieldBase as the metaclass for your Field subclass, implement to_python() and the other necessary methods and everything will work seamlessly. """ import warnings from django.utils.deprecation imp...
bsd-3-clause
4,315,718,768,321,422,000
30.984127
91
0.663027
false
kalahbrown/HueBigSQL
desktop/core/ext-py/pysaml2-2.4.0/example/attributemaps/adfs_v20.py
40
3595
# See http://technet.microsoft.com/en-us/library/ee913589(v=ws.10).aspx # for information regarding the default claim types supported by # Microsoft ADFS v2.0. MAP = { "identifier": "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified", "fro": { 'http://schemas.xmlsoap.org/ws/2005/05/identity/claim...
apache-2.0
4,902,313,009,131,950,000
75.489362
117
0.705424
false
zadgroup/edx-platform
common/djangoapps/util/model_utils.py
45
7133
""" Utilities for django models. """ import unicodedata import re from eventtracking import tracker from django.conf import settings from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django_countries.fields import Country # The setting name used for events when "sett...
agpl-3.0
-8,730,564,692,317,271,000
35.768041
114
0.652601
false
LumPenPacK/NetworkExtractionFromImages
osx_build/nefi2_osx_amd64_xcode_2015/site-packages/numpy/core/fromnumeric.py
12
95796
"""Module containing non-deprecated functions borrowed from Numeric. """ from __future__ import division, absolute_import, print_function import types import warnings import numpy as np from .. import VisibleDeprecationWarning from . import multiarray as mu from . import umath as um from . import numerictypes as nt ...
bsd-2-clause
-8,282,707,019,854,138,000
29.971872
79
0.591883
false
PrincetonUniversity/AdvNet-OF_Scripts
evaluation/switch/flowmod_test/pox/pox/samples/old/l2_modification_proactive_total.py
1
6001
# Copyright 2011 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
apache-2.0
-3,572,249,534,080,332,300
32.52514
75
0.662556
false
qateam123/eq
tests/app/validation/test_textarea_type_check.py
1
1095
import unittest from app.validation.abstract_validator import AbstractValidator from app.validation.textarea_type_check import TextAreaTypeCheck class TextAreaTest(unittest.TestCase): def test_textarea_validator(self): textarea = TextAreaTypeCheck() # validate integer result = textarea....
mit
5,801,879,829,549,064,000
30.285714
72
0.67032
false
pbrunet/pythran
pythran/tests/test_import_all.py
2
1424
from test_env import TestEnv from textwrap import dedent import pythran class TestImportAll(TestEnv): def test_import_all(self): self.run_test("from math import *\ndef import_all(l): return cos(l)", 3.3, import_all=[float]) def test_import_cmath_all(self): self.run_test("from cmath import *\n...
bsd-3-clause
-5,839,128,713,282,599,000
37.486486
134
0.638343
false
sudkannan/xen-hv
tools/python/xen/remus/vm.py
43
4590
#!/usr/bin/env python import xmlrpclib from xen.xend.XendClient import server from xen.xend import sxp, osdep from xen.lowlevel.xc import xc import vif import blkdev # need a nicer way to load disk drivers import vbd class VMException(Exception): pass class VM(object): "Representation of a virtual machine" ...
gpl-2.0
-1,197,109,422,857,219,800
26.321429
76
0.531155
false
AIML/scikit-learn
sklearn/utils/tests/test_validation.py
133
18339
"""Tests for input validation functions""" import warnings from tempfile import NamedTemporaryFile from itertools import product import numpy as np from numpy.testing import assert_array_equal import scipy.sparse as sp from nose.tools import assert_raises, assert_true, assert_false, assert_equal from sklearn.utils....
bsd-3-clause
-5,093,259,463,462,979,000
39.217105
84
0.606085
false
seanballais/sage-aes
botos/modules/voting/views.py
1
12161
# botos/modules/voting/views.py # Copyright (C) 2016 Sean Francis N. Ballais # # This module is part of Botos and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Views for voting. """ import json import collections from flask import render_template from flask import flas...
gpl-3.0
1,216,980,585,727,075,600
32.501377
119
0.514514
false
psolstice/zcoin
qa/rpc-tests/wallet-dump.py
81
4788
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import (start_nodes, s...
mit
-2,551,625,124,091,940,400
43.333333
114
0.566416
false
danlurie/C-PAC
CPAC/utils/datasource.py
3
9911
import nipype.pipeline.engine as pe import nipype.interfaces.utility as util def create_func_datasource(rest_dict, wf_name='func_datasource'): import nipype.pipeline.engine as pe import nipype.interfaces.utility as util wf = pe.Workflow(name=wf_name) inputnode = pe.Node(util.IdentityInterface( ...
bsd-3-clause
47,470,722,559,775,500
34.651079
120
0.501766
false
olivierdalang/QGIS
tests/src/python/test_qgsnullsymbolrenderer.py
45
3186
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgsnullsymbolrenderer.py ----------------------------- Date : April 2016 Copyright : (C) 2016 by Nyall Dawson Email : nyall dot dawson at gmail dot ...
gpl-2.0
484,555,535,935,866,800
35.62069
75
0.56968
false
mhils/mitmproxy
test/pathod/language/test_http.py
11
10165
import io import pytest from pathod import language from pathod.language import http, base from .. import tservers def parse_request(s): return next(language.parse_pathoc(s)) def test_make_error_response(): d = io.BytesIO() s = http.make_error_response("foo") language.serve(s, d, {}) class TestR...
mit
8,757,475,698,398,366,000
27.633803
81
0.550418
false
willthames/ansible
lib/ansible/plugins/lookup/nested.py
46
2098
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
3,138,913,037,939,142,700
37.145455
129
0.678742
false
OpenCobolIDE/OpenCobolIDE
open_cobol_ide/extlibs/qdarkstyle/pyqt_style_rc.py
3
92074
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt4 (Qt v4.8.7) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = b"\ \x00\x00\x11\x43\ \x00\ \x00\x5f\xaa\x78\x9c\xc5\x1c\xdb\x72\xdb\xb6\xf2\x5d\x5f\x81\x3a\ \x2f\x49\x8e\x9...
gpl-3.0
-6,439,614,919,411,884,000
57.201011
129
0.724482
false
lokirius/python-for-android
python3-alpha/python3-src/Lib/test/test_socket.py
47
73373
#!/usr/bin/env python3 import unittest from test import support import errno import io import socket import select import time import traceback import queue import sys import os import array import platform import contextlib from weakref import proxy import signal import math try: import fcntl except ImportError:...
apache-2.0
2,185,638,480,764,533,200
34.428502
117
0.608697
false
NetDBNCKU/GAE-Conference-Web-App
django/contrib/gis/sitemaps/views.py
84
4413
from django.http import HttpResponse, Http404 from django.template import loader from django.contrib.sites.models import get_current_site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnInteger from django.contrib.gis.db.models.fields import GeometryField from django.db import...
bsd-3-clause
241,433,157,723,541,150
38.401786
116
0.649445
false
civisanalytics/ansible
lib/ansible/modules/monitoring/pingdom.py
19
4360
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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
7,738,134,947,335,959,000
26.25
91
0.617661
false
edfungus/Crouton-Python-Example
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py
482
2055
""" urllib3 - Thread-safe connection pooling and re-using. """ __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' __license__ = 'MIT' __version__ = '1.10.4' from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import en...
mit
4,059,640,065,496,252,400
28.782609
84
0.721655
false
valkjsaaa/sl4a
python/src/Lib/json/tests/test_fail.py
51
2884
from unittest import TestCase import json # Fri Dec 30 18:57:26 2005 JSONDOCS = [ # http://json.org/JSON_checker/test/fail1.json '"A JSON payload should be an object or array, not a string."', # http://json.org/JSON_checker/test/fail2.json '["Unclosed array"', # http://json.org/JSON_checker/test/f...
apache-2.0
-6,908,720,314,650,029,000
36.947368
78
0.602288
false
JackPrice/ansible-modules-extras
monitoring/airbrake_deployment.py
51
3918
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2013 Bruce Pennypacker <bruce@pennypacker.org> # # 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...
gpl-3.0
-579,292,450,843,379,700
29.138462
118
0.657223
false
bradh/openchange
mapiproxy/services/web/rpcproxy/rpcproxy/RPCProxyApplication.py
12
4107
# RPCProxyApplication.py -- OpenChange RPC-over-HTTP implementation # # Copyright (C) 2012 Wolfgang Sourdeau <wsourdeau@inverse.ca> # # 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 vers...
gpl-3.0
482,135,646,355,934,700
34.102564
94
0.572437
false
jiachenning/odoo
doc/_themes/odoodoc/sphinx_monkeypatch.py
22
3300
# -*- coding: utf-8 -*- import sphinx.roles import sphinx.environment from sphinx.writers.html import HTMLTranslator from docutils.writers.html4css1 import HTMLTranslator as DocutilsTranslator def patch(): # navify toctree (oh god) @monkey(sphinx.environment.BuildEnvironment) def resolve_toctree(old_resolv...
agpl-3.0
-7,061,385,168,438,124,000
33.736842
83
0.583636
false
SmartXiaoMing/clean_openwrt_sdk
staging_dir/host/lib/scons-2.1.0/SCons/Tool/PharLapCommon.py
21
5236
"""SCons.Tool.PharLapCommon This module contains common code used by all Tools for the Phar Lap ETS tool chain. Right now, this is linkloc and 386asm. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any ...
gpl-2.0
-1,099,168,288,463,227,500
37.218978
124
0.663293
false
open-craft/XBlock
xblock/test/test_json_conversion.py
1
1905
""" Tests asserting that ModelTypes convert to and from json when working with ModelDatas """ # Allow inspection of private class members # pylint: disable=W0212 from mock import Mock from xblock.core import XBlock from xblock.fields import Field, Scope from xblock.field_data import DictFieldData from xblock.test.too...
apache-2.0
614,928,734,316,104,800
26.214286
69
0.611024
false
mudbungie/NetExplorer
env/lib/python3.4/site-packages/bulbs/tests/model_tests.py
3
2922
import unittest from .testcase import BulbsTestCase from bulbs.model import Node, NodeProxy, Relationship, RelationshipProxy from bulbs.property import Integer, String, DateTime, Bool from bulbs.utils import current_datetime class Knows(Relationship): label = "knows" timestamp = DateTime(default=current_datet...
mit
-4,461,923,926,999,946,000
31.831461
76
0.661533
false
servalproject/nikola
tests/test_rst_extensions.py
1
8282
# coding: utf8 # Author: Rodrigo Bistolfi # Date: 03/2013 """ Test cases for Nikola ReST extensions. A base class ReSTExtensionTestCase provides the tests basic behaivor. Subclasses must override the "sample" class attribute with the ReST markup. The sample will be rendered as HTML using publish_parts() by setUp(). O...
mit
2,268,167,092,267,349,000
36.139013
106
0.619657
false
diegocortassa/TACTIC
src/context/client/pyasm/application/xsi/xsi_builder.py
2
1975
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
3,594,049,566,910,524,400
28.044118
87
0.611139
false
synopat/pyload
module/network/HTTPRequest.py
5
11514
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This prog...
gpl-3.0
4,473,661,637,355,451,400
33.166172
124
0.581119
false
datapythonista/pandas
pandas/core/window/indexers.py
2
12001
"""Indexer objects for computing start/end window bounds for rolling operations""" from datetime import timedelta from typing import ( Dict, Optional, Tuple, Type, ) import numpy as np from pandas._libs.window.indexers import calculate_variable_window_bounds from pandas.util._decorators import Appende...
bsd-3-clause
2,734,410,592,533,205,000
30.832891
88
0.580785
false
jotes/pontoon
pontoon/base/management/commands/calculate_stats.py
1
1652
import logging from django.core.management.base import BaseCommand from django.db.models import Count from pontoon.base.models import ( Project, TranslatedResource, ) log = logging.getLogger(__name__) class Command(BaseCommand): help = """ Re-calculate statistics for all translated resources a...
bsd-3-clause
7,728,167,482,505,672,000
31.392157
88
0.644068
false
PetePriority/home-assistant
homeassistant/components/cover/group.py
7
10162
""" This platform allows several cover to be grouped into one cover. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/cover.group/ """ import logging import voluptuous as vol from homeassistant.core import callback from homeassistant.components.cover imp...
apache-2.0
6,022,765,871,228,524,000
36.498155
74
0.594371
false
pirata-cat/mieli
identity/registration/backend/urls.py
1
3742
from identity.registration.backend.views import ActivationView from identity.registration.backend.views import RegistrationView from identity.registration.backend.views import ApproveView from identity.registration.backend.forms import LoginForm from django.contrib.auth import views as auth_views from django.views.gene...
agpl-3.0
6,901,554,465,111,864,000
58.396825
106
0.494121
false
sanmiguel/home-assistant
homeassistant/helpers/state.py
4
1685
""" homeassistant.helpers.state ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Helpers that help with state related things. """ import logging from homeassistant import State import homeassistant.util.dt as dt_util from homeassistant.const import ( STATE_ON, STATE_OFF, SERVICE_TURN_ON, SERVICE_TURN_OFF, ATTR_ENTITY_ID) _LOGGER = l...
mit
3,324,135,476,688,280,600
28.051724
77
0.637982
false
jallohm/django
django/contrib/admin/actions.py
395
3316
""" Built-in, globally-available admin actions. """ from django.contrib import messages from django.contrib.admin import helpers from django.contrib.admin.utils import get_deleted_objects, model_ngettext from django.core.exceptions import PermissionDenied from django.db import router from django.template.response impo...
bsd-3-clause
-1,715,085,126,970,005,200
36.681818
95
0.68275
false
2014c2g1/c2g1
w2/static/Brython2.0.0-20140209-164925/Lib/posix.py
96
20839
"""This module provides access to operating system functionality that is standardized by the C Standard and the POSIX standard (a thinly disguised Unix interface). Refer to the library manual and corresponding Unix manual entries for more information on calls.""" import datetime F_OK = 0 O_APPEND = 8 O_BINARY = 32...
gpl-2.0
1,848,515,093,038,603,800
33.731667
122
0.668506
false
mistio/libcloud
libcloud/common/gogrid.py
28
6395
# 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 use ...
apache-2.0
4,390,661,437,541,527,600
33.38172
79
0.58061
false
zbigniewz/jenkins-build-failure-analyzer
analyzer.py
2
3862
#!/usr/bin/python import pprint import re import argparse from datetime import datetime from statsd import StatsClient from utils import failureReasons, JenkinsClient def is_build_failed(job): if 'lastBuild' in job and job['lastBuild'] is not None and 'result' in job['lastBuild']: if job['lastBuild']...
apache-2.0
1,702,778,642,163,474,200
32.582609
114
0.63594
false
vikas-parashar/zulip
zerver/context_processors.py
13
2865
from __future__ import absolute_import from typing import Dict, Any from django.http import HttpRequest from django.conf import settings from zerver.models import UserProfile, get_realm_by_string_id from zproject.backends import (password_auth_enabled, dev_auth_enabled, google_auth_enab...
apache-2.0
9,041,569,834,313,356,000
39.928571
83
0.611169
false
bobwalker99/Pydev
plugins/org.python.pydev.jython/Lib/_weakrefset.py
33
6305
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of the # weak containe...
epl-1.0
-7,106,188,348,346,712,000
28.740566
78
0.562411
false
sean797/Flexget
flexget/plugins/filter/exists_movie.py
8
7530
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from past.builtins import basestring import logging import re from path import Path from flexget import plugin from flexget.config_schema import one_or_more from flexget....
mit
1,740,796,789,839,448,800
37.22335
101
0.501461
false
zsjohny/jumpserver
apps/terminal/api/storage.py
1
2385
# coding: utf-8 # from rest_framework import viewsets, generics, status from rest_framework.response import Response from django.utils.translation import ugettext_lazy as _ from common.permissions import IsSuperUser from ..models import CommandStorage, ReplayStorage from ..serializers import CommandStorageSerializer,...
gpl-2.0
-274,155,680,951,173,380
31.22973
76
0.66499
false
damiansoriano/odoo
addons/event/__openerp__.py
20
2407
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
5,043,181,528,750,914,000
36.030769
129
0.610719
false
xq262144/hue
desktop/core/ext-py/Mako-0.8.1/test/test_filters.py
36
9579
# -*- coding: utf-8 -*- from mako.template import Template import unittest from test import TemplateTest, eq_, requires_python_2 from test.util import result_lines, flatten_result from mako.compat import u class FilterTest(TemplateTest): def test_basic(self): t = Template(""" ${x | myfilter} """) ...
apache-2.0
-5,857,037,453,928,052,000
26.627168
138
0.440632
false
tjsavage/sfcsdatabase
sfcs/django/db/utils.py
78
6129
import inspect import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module DEFAULT_DB_ALIAS = 'default' # Define some exceptions that mirror the PEP249 interface. # We will rethrow any backend-specific errors using these # commo...
bsd-3-clause
6,802,576,287,612,716,000
35.052941
128
0.556208
false
cnsoft/kbengine-cocos2dx
kbe/src/lib/python/Lib/test/test_metaclass.py
59
6062
doctests = """ Basic class construction. >>> class C: ... def meth(self): print("Hello") ... >>> C.__class__ is type True >>> a = C() >>> a.__class__ is C True >>> a.meth() Hello >>> Use *args notation for the bases. >>> class A: pass >>> class B: pass >>>...
lgpl-3.0
9,209,900,511,530,187,000
22.587549
96
0.479875
false
rombie/contrail-controller
src/container/kube-cni/kube_cni/params/params.py
3
10883
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2016 Juniper Networks, Inc. All rights reserved. # """ CNI plugin parameters processing module Parameters are defined in 3 different classes - ContrailParams : Contains contrain specific parameters - K8SParams : Contains kubernetes specific parameters - Cni...
apache-2.0
-7,495,640,680,299,226,000
35.036424
81
0.586327
false
benjaminjack/pinetree
lib/pybind11/setup.py
17
4485
#!/usr/bin/env python # Setup script for PyPI; use CMakeFile.txt to build extension modules from setuptools import setup from distutils.command.install_headers import install_headers from pybind11 import __version__ import os # Prevent installation of pybind11 headers by setting # PYBIND11_USE_CMAKE. if os.environ.g...
mit
-8,874,152,503,473,255,000
40.527778
85
0.689632
false
anandpdoshi/frappe
frappe/email/doctype/email_alert/test_email_alert.py
8
3857
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe, frappe.utils, frappe.utils.scheduler import unittest test_records = frappe.get_test_records('Email Alert') class TestEmailAlert(unittest.TestCase): def setUp(self): frappe....
mit
513,287,495,613,038,850
32.25
91
0.69873
false
google-research/google-research
better_storylines/src/evaluate_story_cloze_test.py
1
4258
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
2,379,261,840,144,286,000
31.257576
80
0.715594
false