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
podhmo/boto
boto/route53/__init__.py
145
3103
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # w...
mit
-6,313,769,921,509,523,000
34.666667
75
0.702224
false
JCBarahona/edX
lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py
114
16498
# -*- 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): # Deleting model 'Coupons' db.delete_table('shoppingcart_coupons') # Adding model 'CourseRegistrati...
agpl-3.0
-4,076,909,390,197,027,000
75.37963
182
0.578373
false
nhicher/ansible
test/runner/injector/injector.py
7
7490
#!/usr/bin/env python """Interpreter and code coverage injector for use with ansible-test. The injector serves two main purposes: 1) Control the python interpreter used to run test tools and ansible code. 2) Provide optional code coverage analysis of ansible code. The injector is executed one of two ways: 1) On the...
gpl-3.0
-4,592,787,728,634,407,400
30.603376
130
0.642056
false
DonHilborn/DataGenerator
faker/providers/internet.py
1
4491
# coding=utf-8 from __future__ import unicode_literals from . import BaseProvider import random from faker.providers.lorem import Provider as Lorem from faker.utils.decorators import slugify, slugify_domain class Provider(BaseProvider): safe_email_tlds = ('org', 'com', 'net') free_email_domains = ('gmail.co...
mit
4,032,403,439,560,295,400
31.078571
119
0.574482
false
drewmiller/tornado
docs/conf.py
9
2900
# Ensure we get the local copy of tornado instead of what's on the standard path import os import sys sys.path.insert(0, os.path.abspath("..")) import tornado master_doc = "index" project = "Tornado" copyright = "2011, Facebook" version = release = tornado.version extensions = [ "sphinx.ext.autodoc", "sphin...
apache-2.0
-840,884,663,241,199,500
26.358491
95
0.691379
false
gfyoung/pandas
pandas/tests/indexes/datetimes/test_scalar_compat.py
2
12213
""" Tests for DatetimeIndex methods behaving like their Timestamp counterparts """ from datetime import datetime import numpy as np import pytest from pandas._libs.tslibs import OutOfBoundsDatetime, to_offset from pandas._libs.tslibs.offsets import INVALID_FREQ_ERR_MSG import pandas as pd from pandas import Datetime...
bsd-3-clause
-4,901,913,757,879,301,000
34.606414
79
0.531565
false
meredith-digops/ansible
docs/bin/dump_keywords.py
33
2403
#!/usr/bin/env python import optparse import yaml from jinja2 import Environment, FileSystemLoader from ansible.playbook import Play from ansible.playbook.block import Block from ansible.playbook.role import Role from ansible.playbook.task import Task template_file = 'playbooks_keywords.rst.j2' oblist = {} clist = ...
gpl-3.0
-8,022,833,435,978,108,000
33.826087
145
0.660008
false
xiaohaidao007/pandoraBox-SDK-mt7620
staging_dir/host/lib/scons-2.5.0/SCons/Job.py
3
16096
"""SCons.Job This module defines the Serial and Parallel classes that execute tasks to complete a build. The Jobs class provides a higher level interface to start, stop, and wait on jobs. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining ...
gpl-2.0
-3,971,081,428,687,374,300
36.002299
98
0.573434
false
SwainLi/TeamTalk
win-client/3rdParty/src/json/amalgamate.py
127
6807
"""Amalgate json-cpp library sources into a single source and header file. Requires Python 2.6 Example of invocation (must be invoked from json-cpp top directory): python amalgate.py """ import os import os.path import sys class AmalgamationFile: def __init__( self, top_dir ): self.top_dir = top_dir ...
apache-2.0
8,084,577,438,781,655,000
44.38
119
0.627736
false
eesatfan/openpli-enigma2
lib/python/Tools/NumericalTextInput.py
16
3334
# -*- coding: UTF-8 -*- from enigma import eTimer from Components.Language import language # Dict languageCode -> array of strings MAP_SEARCH = ( u"%_0", u" 1", u"abc2", u"def3", u"ghi4", u"jkl5", u"mno6", u"pqrs7", u"tuv8", u"wxyz9", ) MAP_SEARCH_UPCASE = ( U"0%_", U"1 ", U"ABC2", U"DEF3", U"GHI4", U...
gpl-2.0
8,630,109,322,025,628,000
16.417582
89
0.598107
false
glove747/liberty-neutron
neutron/tests/unit/extensions/test_external_net.py
6
7741
# Copyright (c) 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
7,486,398,218,559,680,000
42.982955
79
0.594884
false
lgarren/spack
lib/spack/external/_pytest/recwarn.py
10
7361
""" recording warnings during test function execution. """ import inspect import _pytest._code import py import sys import warnings import pytest @pytest.yield_fixture def recwarn(request): """Return a WarningsRecorder instance that provides these methods: * ``pop(category=None)``: return last warning matc...
lgpl-2.1
-3,810,861,104,813,229,600
31.570796
79
0.616764
false
jjanssen/django-cms-patches
cms/admin/useradmin.py
2
2246
from django.conf import settings from cms.admin.forms import PageUserForm, PageUserGroupForm from cms.admin.permissionadmin import GenericCmsPermissionAdmin from cms.exceptions import NoPermissionsException from cms.models import PageUser, PageUserGroup from cms.utils.permissions import get_subordinate_users from djang...
bsd-3-clause
9,025,991,281,404,371,000
37.741379
111
0.660285
false
UniMOOC/AAClassroom
modules/dashboard/course_settings.py
5
15703
# Copyright 2012 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 ...
apache-2.0
-4,669,929,664,366,945,000
36.122931
80
0.610329
false
rossburton/yocto-autobuilder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/manhole/telnet.py
37
3494
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Telnet-based shell.""" # twisted imports from twisted.protocols import telnet from twisted.internet import protocol from twisted.python import log, failure # system imports import string, copy, sys from cStringIO import StringIO class Shel...
gpl-2.0
6,508,369,808,368,335,000
28.863248
92
0.508872
false
TeamEOS/external_chromium_org
tools/cr/cr/commands/info.py
44
1236
# 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. """A module for the info implementation of Command.""" import cr class InfoCommand(cr.Command): """The cr info command implementation.""" def __init_...
bsd-3-clause
-6,554,393,157,461,776,000
27.744186
72
0.63835
false
alexandregz/simian
src/simian/mac/admin/packages.py
1
7391
#!/usr/bin/env python # # Copyright 2012 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 require...
apache-2.0
2,467,566,175,966,245,000
35.053659
79
0.621837
false
DwangoMediaVillage/pqkmeans
test/encoder/test_pq_encoder.py
2
1590
import unittest import pqkmeans import numpy import pipe class TestPQEncoder(unittest.TestCase): def data_source(self, n: int): for i in range(n): for _ in range(3): yield [i * 100] * 6 def setUp(self): self.encoder = pqkmeans.encoder.PQEncoder(num_subdim=2) d...
mit
-1,177,935,312,318,469,000
35.976744
110
0.646541
false
rs2/pandas
pandas/tests/indexes/test_base.py
1
93051
from collections import defaultdict from datetime import datetime, timedelta from io import StringIO import math import operator import re import numpy as np import pytest import pandas._config.config as cf from pandas._libs.tslib import Timestamp from pandas.compat.numpy import np_datetime64_compat from pandas.util...
bsd-3-clause
8,710,660,139,587,784,000
34.393881
88
0.542197
false
kennethgillen/ansible
lib/ansible/modules/network/ldap_attr.py
28
11014
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Peter Sagerson <psagers@ignorare.net> # (c) 2016, Jiri Tyr <jiri.tyr@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 So...
gpl-3.0
-7,757,366,830,278,018,000
29.679666
79
0.615217
false
cchurch/ansible-modules-core
network/junos/junos_config.py
11
11221
#!/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
-528,848,127,193,416,000
31.714286
81
0.654309
false
projecthamster/hamster-gtk
hamster_gtk/overview/widgets/misc.py
1
5056
# -*- coding: utf-8 -*- # This file is part of 'hamster-gtk'. # # 'hamster-gtk' 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. # # 'h...
gpl-3.0
5,358,059,220,522,168,000
37.015038
90
0.641218
false
healpy/healpy
healpy/newvisufunc.py
1
17516
__all__ = ["projview", "newprojplot"] import numpy as np from .pixelfunc import ang2pix, npix2nside from .rotator import Rotator import matplotlib.pyplot as plt from matplotlib.projections.geo import GeoAxes from matplotlib.ticker import MultipleLocator, FormatStrFormatter, AutoMinorLocator import warnings class The...
gpl-2.0
7,630,636,766,318,857,000
33.753968
141
0.594028
false
indykish/heroku-buildpack-python
vendor/distribute-0.6.36/setuptools/command/setopt.py
167
5053
import distutils, os from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import * __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] def config_file(kind="local"): """Get the filename of the distutils, local, global, or per-user co...
mit
-2,111,368,828,108,263,700
29.810976
79
0.56323
false
ntt-pf-lab/backup_openstackx
openstackx/auth/tokens.py
1
1872
from openstackx.api import base class Tenant(base.Resource): def __repr__(self): return "<Tenant %s>" % self._info @property def id(self): return self._info['id'] @property def description(self): return self._info['description'] @property def enabled(self): ...
bsd-3-clause
-8,851,234,189,612,941,000
24.643836
81
0.568376
false
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/django/contrib/contenttypes/models.py
49
6717
from __future__ import unicode_literals from django.apps import apps from django.db import models from django.utils.encoding import force_text, python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ class ContentTypeManager(models.Manager): use_in_migrations = True def __init__(...
mit
-1,299,013,781,508,792,600
35.906593
105
0.584934
false
Princeton-CDH/derrida-django
derrida/people/migrations/0001_initial.py
1
3871
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-06 19:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('places', '0001_initial'), ] op...
apache-2.0
-1,408,887,249,575,479,000
42.011111
151
0.55567
false
lz1988/company-site
django/conf/locale/ru/formats.py
107
1134
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j E Y г.' TIME_FORMAT = 'G:i:s' D...
bsd-3-clause
5,382,774,954,390,505,000
33.272727
77
0.597701
false
earonesty/bitcoin
test/functional/p2p-segwit.py
5
90114
#!/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. """Test segwit transactions and blocks on P2P network.""" from test_framework.mininode import * from test_fram...
mit
-5,399,243,964,587,180,000
45.164959
152
0.634496
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/idlelib/Bindings.py
7
2976
"""Define the menu contents, hotkeys, and event bindings. There is additional configuration information in the EditorWindow class (and subclasses): the menus are created there based on the menu_specs (class) variable, and menus not created are silently skipped in the code here. This makes it possible, for example, to...
gpl-3.0
2,501,025,880,566,990,000
31.703297
79
0.573925
false
johndpope/tensorflow
tensorflow/python/kernel_tests/shape_ops_test.py
12
22678
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,668,680,388,526,436,000
37.765812
80
0.626422
false
ideasman42/nirw-search
_misc/readme_update_helptext.py
1
1880
#!/usr/bin/env python3 # GPL License, Version 3.0 or later import os import subprocess import textwrap import re BASE_DIR = os.path.join(os.path.dirname(__file__), "..") COMMAND_NAME = 'nirw-search' def patch_help_test(help_output): help_output = help_output.replace( 'usage: ' + COMMAND_NAME, 'u...
gpl-3.0
6,781,015,439,794,729,000
23.415584
79
0.557447
false
andresgz/django
tests/migrations/test_graph.py
99
11829
import warnings from django.db.migrations.exceptions import ( CircularDependencyError, NodeNotFoundError, ) from django.db.migrations.graph import RECURSION_DEPTH_WARNING, MigrationGraph from django.test import SimpleTestCase from django.utils.encoding import force_text class GraphTests(SimpleTestCase): """ ...
bsd-3-clause
3,032,008,089,554,108,400
38.962838
108
0.507482
false
ex1usive-m4d/TemplateDocx
controllers/phpdocx/lib/openoffice/openoffice.org/basis3.4/program/python-core-2.6.1/lib/encodings/unicode_internal.py
827
1196
""" Python 'unicode-internal' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is in...
bsd-3-clause
5,250,936,364,363,388,000
25.577778
69
0.721572
false
galtys/odoo
addons/website/models/ir_actions.py
363
3074
# -*- coding: utf-8 -*- import urlparse from openerp.http import request from openerp.osv import fields, osv class actions_server(osv.Model): """ Add website option in server actions. """ _name = 'ir.actions.server' _inherit = ['ir.actions.server'] def _compute_website_url(self, cr, uid, id, websit...
agpl-3.0
-1,722,944,007,512,355,300
46.292308
131
0.619714
false
schumi2004/NOT_UPDATED_Sick-Beard-Dutch
lib/requests/compat.py
289
2433
# -*- coding: utf-8 -*- """ pythoncompat """ from .packages import charade as chardet import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) #: Python 3.0.x is_py30 = (is_py3 and _ver[1] == 0) #: Python 3.1....
gpl-3.0
277,311,219,310,263,360
20.530973
132
0.633785
false
Distrotech/PyQt-x11
examples/animation/stickman/stickman_rc3.py
5
44472
# -*- coding: utf-8 -*- # Resource object code # # Created: Wed Mar 20 11:18:27 2013 # by: The Resource Compiler for PyQt (Qt v4.8.4) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = b"\ \x00\x00\x05\x1c\ \xff\ \xff\xff\xff\x00\x00\x00\x05\x00\x00\x00\x10\x00\...
gpl-2.0
656,845,548,716,472,400
61.285714
96
0.726322
false
AICP/external_chromium_org
tools/cr/cr/commands/init.py
59
5608
# 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. """A module for the init command.""" import os import cr # The set of variables to store in the per output configuration. OUT_CONFIG_VARS = [ 'CR_VERS...
bsd-3-clause
7,889,578,943,912,553,000
34.27044
80
0.644793
false
jve/rabbittop
rabbittop/terminal.py
1
5872
""" The MIT License (MIT) Copyright (c) 2014 Jozef van Eenbergen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,...
mit
-8,038,196,374,112,639,000
31.627778
115
0.626192
false
manasapte/pants
src/python/pants/java/nailgun_client.py
7
6693
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
apache-2.0
1,414,510,970,747,774,000
40.571429
100
0.666368
false
detrout/pykolab
pykolab/cli/cmd_remove_mailaddress.py
1
3308
# -*- coding: utf-8 -*- # Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com) # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software ...
gpl-3.0
4,002,420,812,717,639,000
34.569892
95
0.66052
false
klonage/nlt-gcs
packages/IronPython.StdLib.2.7.4/content/Lib/pickle.py
42
46516
"""Create portable serialized representations of Python objects. See module cPickle for a (much) faster implementation. See module copy_reg for a mechanism for registering custom picklers. See module pickletools source for extensive comments. Classes: Pickler Unpickler Functions: dump(obje...
gpl-3.0
2,992,326,597,203,099,600
31.44069
80
0.529882
false
jjmleiro/hue
desktop/core/ext-py/cffi-1.5.2/demo/pyobj.py
13
3399
referents = [] # list "object descriptor -> python object" freelist = None def store(x): "Store the object 'x' and returns a new object descriptor for it." global freelist p = freelist if p is None: p = len(referents) referents.append(x) else: freelist = referents[p] ...
apache-2.0
-8,240,845,674,043,694,000
26.41129
74
0.523095
false
ActiveState/code
recipes/Python/579037_How_execute_x86_64bit_assembly_code_directly/recipe-579037.py
1
1537
#!/usr/bin/env python import subprocess, os, tempfile from ctypes import * PAGE_SIZE = 4096 class AssemblerFunction(object): def __init__(self, code, ret_type, *arg_types): # Run Nasm fd, source = tempfile.mkstemp(".S", "assembly", os.getcwd()) os.write(fd, code) os.close(fd) target = os...
mit
4,346,553,609,545,770,500
26.446429
71
0.612882
false
lkhomenk/integration_tests
cfme/tests/optimize/test_bottlenecks.py
5
7933
# -*- coding: utf-8 -*- import fauxfactory import pytest from datetime import timedelta from cfme.optimize.bottlenecks import Bottlenecks from cfme.utils import conf from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.blockers import BZ from cfme.utils.timeutil import parsetime from cfme.ut...
gpl-2.0
-5,769,613,551,466,446,000
46.789157
100
0.662801
false
gdreich/geonode
geonode/services/models.py
6
6197
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
-1,489,865,166,235,389,400
37.974843
99
0.688882
false
neumerance/cloudloon2
.venv/lib/python2.7/site-packages/lxml/html/soupparser.py
53
4360
__doc__ = """External interface to the BeautifulSoup HTML parser. """ __all__ = ["fromstring", "parse", "convert_tree"] from lxml import etree, html from BeautifulSoup import \ BeautifulSoup, Tag, Comment, ProcessingInstruction, NavigableString def fromstring(data, beautifulsoup=None, makeelement=None, **bsarg...
apache-2.0
2,575,153,873,812,638,700
33.88
72
0.668578
false
MyAOSP/external_chromium_org
tools/json_schema_compiler/dart_generator_test.py
25
2388
#!/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. import os import sys import unittest from compiler import GenerateSchema # If --rebase is passed to this test, this is set to Tru...
bsd-3-clause
-2,191,838,094,733,130,500
28.481481
80
0.668342
false
NL66278/odoo
addons/account_cancel/__openerp__.py
52
1667
# -*- 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,223,729,447,985,070,000
37.767442
81
0.602879
false
samthor/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geos/prototypes/errcheck.py
623
3522
""" Error checking functions for GEOS ctypes prototype functions. """ import os from ctypes import c_void_p, string_at, CDLL from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.libgeos import GEOS_VERSION from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Getting the...
apache-2.0
-7,250,681,628,632,668,000
36.073684
129
0.684838
false
dimid/ansible-modules-extras
cloud/amazon/ec2_group_facts.py
12
5047
#!/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
-4,173,176,529,530,374,000
29.96319
155
0.690113
false
sodexis/odoo
addons/account_analytic_plans/wizard/analytic_plan_create_model.py
384
2829
# -*- 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,207,221,363,995,383,300
46.949153
150
0.57865
false
isidorn/test2
test/rdb_workloads/stress.py
1
12326
#!/usr/bin/python import sys, os, time, signal, random, string, subprocess from tempfile import NamedTemporaryFile from optparse import OptionParser sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'drivers', 'python'))) import rethinkdb as r client_script = os.path.join(os.path....
agpl-3.0
-8,497,769,647,382,522,000
40.362416
176
0.612689
false
zlsun/XX-Net
code/default/python27/1.0/lib/win32/cryptography/hazmat/primitives/kdf/concatkdf.py
58
4109
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import struct from cryptography import utils from cryptography.exception...
bsd-2-clause
-6,185,853,059,870,201,000
31.872
79
0.634218
false
RackHD-Mirror/RackHD
test/tests/api/v2_0/schema_tests.py
16
2321
from config.api2_0_config import * from modules.logger import Log from on_http_api2_0 import ApiApi as api20 from on_http_api2_0 import rest from proboscis.asserts import assert_equal from proboscis.asserts import assert_not_equal from proboscis.asserts import assert_true from proboscis.asserts import fail from probosc...
apache-2.0
7,457,309,283,560,259,000
39.017241
109
0.628608
false
sayan801/indivo_server
indivo/migrations/0016_auto__del_field_document_type.py
3
52062
# encoding: 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): # Deleting field 'Document.type' db.delete_column('indivo_document', 'type_id') def backwards(self, ...
gpl-3.0
2,188,460,089,523,783,000
92.636691
181
0.55359
false
petesburgh/or-tools
examples/python/labeled_dice.py
34
4106
# 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
5,448,742,784,316,329,000
27.123288
87
0.613492
false
KarimAllah/celery
docs/conf.py
17
3240
# -*- coding: utf-8 -*- import sys import os # eventlet/gevent should not monkey patch anything. os.environ["GEVENT_NOPATCH"] = "yes" os.environ["EVENTLET_NOPATCH"] = "yes" os.environ["CELERY_LOADER"] = "default" this = os.path.dirname(os.path.abspath(__file__)) # If your extensions are in another directory, add it...
bsd-3-clause
6,859,345,410,117,625,000
28.454545
78
0.675926
false
xtuml/pyxtuml
examples/list_bp_enums.py
2
1385
#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2017 John Törnblom # # This file is part of pyxtuml. # # pyxtuml 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...
lgpl-3.0
-8,952,911,738,587,387,000
29.755556
73
0.690029
false
rancher/python-agent
cattle/agent/handler.py
3
3291
import re import logging from cattle import utils from cattle.lock import lock from cattle.utils import JsonObject log = logging.getLogger("agent") class BaseHandler(object): def __init__(self): pass def events(self): ret = [] for i in utils.events_from_methods(self): re...
apache-2.0
-3,908,730,040,892,918,300
24.315385
71
0.517168
false
steven-cutting/icsisumm
icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/inference/inference.py
9
3449
# Natural Language Toolkit: Interface to Theorem Provers # # Author: Dan Garrette <dhgarrette@gmail.com> # Ewan Klein <ewan@inf.ed.ac.uk> # # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT from nltk.sem.logic import ApplicationExpression, Operator, LogicParser import tableau im...
gpl-3.0
-5,746,815,121,541,323,000
32.838384
80
0.596405
false
Intel-tensorflow/tensorflow
tensorflow/python/eager/monitoring_test.py
14
4979
# 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,664,138,620,009,820,000
38.204724
107
0.675236
false
Bluscream/Discord-Selfbot
cogs/debugger.py
1
17971
import pkg_resources import contextlib import sys import inspect import os import shutil import glob import math import textwrap from PythonGists import PythonGists from discord.ext import commands from io import StringIO from traceback import format_exc from cogs.utils.checks import * from contextlib imp...
gpl-3.0
6,991,569,216,241,980,000
43.601523
166
0.523014
false
albertomurillo/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_inventory_source.py
38
11320
#!/usr/bin/python # coding: utf-8 -*- # Copyright: (c) 2018, Adrien Fleury <fleu42@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], ...
gpl-3.0
9,069,161,357,011,588,000
34.936508
95
0.587633
false
ahsquared/arc
arc-assets/themes/ut-thehill/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSUtil.py
566
9386
# 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. """Utility functions shared amongst the Windows generators.""" import copy import os _TARGET_TYPE_EXT = { 'executable': '.exe', 'loadable_module': '.dll', ...
gpl-2.0
2,459,139,348,113,441,300
34.157303
80
0.667697
false
wenqvip/pytuto
proj3/pagemaker.py
1
1061
__author__ = 'Spencer' from xml.sax.handler import ContentHandler from xml.sax import parse class PageMaker(ContentHandler): passthrough = False def startElement(self, name, attrs): if name == 'page': self.passthrough = True self.out = open(attrs['name'] + '.html', 'w') ...
gpl-3.0
-1,734,967,306,656,178,200
26.947368
66
0.533459
false
areitz/pants
src/python/pants/backend/jvm/tasks/jvm_compile/jvm_dependency_analyzer.py
4
13065
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from colle...
apache-2.0
-4,437,477,147,543,314,400
46.682482
102
0.661692
false
CuriousLearner/kivy
examples/canvas/fbo_canvas.py
59
2544
''' FBO Canvas ========== This demonstrates a layout using an FBO (Frame Buffer Off-screen) instead of a plain canvas. You should see a black canvas with a button labelled 'FBO' in the bottom left corner. Clicking it animates the button moving right to left. ''' __all__ = ('FboFloatLayout', ) from kivy.graphics impo...
mit
-1,158,806,525,977,715,000
26.956044
76
0.625
false
pgiraud/georchestra
extractorapp/jsbuild/util/gen-go-jstools.py
24
1441
#!/usr/bin/env python """Generate go-jstools.py""" import sys import textwrap import virtualenv filename = 'go-jstools.py' after_install = """\ import os, subprocess def after_install(options, home_dir): etc = join(home_dir, 'etc') ## TODO: this should all come from distutils ## like distutils.sysconfig.g...
gpl-3.0
2,323,279,601,125,958,000
25.2
67
0.603747
false
boompieman/iim_project
project_python2/lib/python2.7/site-packages/pattern/server/cherrypy/cherrypy/lib/gctools.py
40
7396
import gc import inspect import os import sys import time try: import objgraph except ImportError: objgraph = None import cherrypy from cherrypy import _cprequest, _cpwsgi from cherrypy.process.plugins import SimplePlugin class ReferrerTree(object): """An object which gathers all referrers of an object ...
gpl-3.0
8,837,314,561,475,576,000
33.560748
80
0.527312
false
mohitsethi/packstack
packstack/installer/exceptions.py
13
1622
# -*- coding: utf-8 -*- __all__ = ( 'PackStackError', 'InstallError', 'FlagValidationError', 'MissingRequirements', 'PluginError', 'ParamProcessingError', 'ParamValidationError', 'NetworkError', 'ScriptRuntimeError', ) class PackStackError(Exception): """Default Exception c...
apache-2.0
1,240,357,896,755,142,400
20.064935
69
0.689889
false
texcaltech/windmilltownhomes-old
django/core/mail/backends/base.py
660
1164
"""Base email backend class.""" class BaseEmailBackend(object): """ Base class for email backend implementations. Subclasses must at least overwrite send_messages(). """ def __init__(self, fail_silently=False, **kwargs): self.fail_silently = fail_silently def open(self): """Op...
bsd-3-clause
-5,029,092,739,704,117,000
28.846154
78
0.64433
false
talos/jsongit
jsongit/wrappers.py
1
9151
# -*- coding: utf-8 -*- """ jsongit.wrappers These classes provide limited interfaces to pygit2 and json_diff constructs. """ import json_diff import itertools import copy class Commit(object): """A wrapper around :class:`pygit2.Commit` linking to a single key in the repo. """ def __init__(self, re...
bsd-3-clause
5,856,023,118,903,913,000
25.914706
81
0.518413
false
lindareijnhoudt/resync
resync/test/test_client_utils.py
2
2589
import unittest from resync.client_utils import count_true_args,parse_links,parse_link,parse_capabilities,parse_capability_lists from resync.client import ClientFatalError class TestClientUtils(unittest.TestCase): def test01_count_true_args(self): self.assertEqual( count_true_args(), 0 ) self.asse...
apache-2.0
-2,733,318,485,685,817,000
52.9375
112
0.62611
false
junkoda/fs2
doc/conf.py
1
10050
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # fs documentation build configuration file, created by # sphinx-quickstart on Sun Jun 5 18:48:51 2016. # # 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 # autogen...
gpl-3.0
4,489,397,436,459,284,000
27.551136
80
0.693532
false
blackzw/openwrt_sdk_dev1
staging_dir/host/lib/python2.7/json/decoder.py
65
13785
"""Implementation of JSONDecoder """ import re import sys import struct from json import scanner try: from _json import scanstring as c_scanstring except ImportError: c_scanstring = None __all__ = ['JSONDecoder'] FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): _BYTES = '7FF800000000...
gpl-2.0
-4,720,612,494,095,835,000
34.805195
78
0.532028
false
vFense/vFenseAgent-nix
agent/deps/rpm6/Python-2.7.5/lib/python2.7/bsddb/test/test_misc.py
68
4803
"""Miscellaneous bsddb module test cases """ import os, sys import unittest from test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path #---------------------------------------------------------------------- class MiscTestCase(unittest.TestCase): def setUp(self): ...
lgpl-3.0
5,788,092,869,546,380,000
33.804348
106
0.532792
false
IT-Department-Projects/OOAD-Project
Flask_App/oakcrest/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py
356
1555
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName, Attrs from genshi.core import START, END, TEXT, COMMENT, DOCTYPE def to_genshi(walker): text = [] for token in walker: type = token["type"] if type in ("Characters", "SpaceCharacters"): ...
mit
-9,223,351,895,964,839,000
32.085106
94
0.47717
false
jylaxp/django
tests/template_tests/syntax_tests/test_list_index.py
521
2694
from django.test import SimpleTestCase from ..utils import setup class ListIndexTests(SimpleTestCase): @setup({'list-index01': '{{ var.1 }}'}) def test_list_index01(self): """ List-index syntax allows a template to access a certain item of a subscriptable object. """ ...
bsd-3-clause
3,240,438,636,950,674,400
34.92
101
0.571641
false
thedep2/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/moevideo.py
15
3685
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, int_or_none, ) class MoeVideoIE(InfoExtractor): IE_DESC = 'LetitBit video ser...
gpl-3.0
4,911,426,098,837,324,000
31.324561
88
0.498507
false
romain-dartigues/ansible
lib/ansible/modules/storage/netapp/na_elementsw_volume.py
7
13498
#!/usr/bin/python # (c) 2017, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Element OS Software Volume Manager""" from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
7,505,285,887,136,647,000
33.085859
120
0.552897
false
x3ro/RIOT
tests/eepreg/tests/01-run.py
30
1057
#!/usr/bin/env python3 # Copyright (C) 2018 Acutam Automation, LLC # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import sys from testrunner import run def testfunc(child): child.expect_exa...
lgpl-2.1
-3,500,785,719,814,803,500
39.653846
91
0.730369
false
littlstar/chromium.src
third_party/closure_linter/closure_linter/common/filetestcase.py
109
3893
#!/usr/bin/env python # Copyright 2007 The Closure Linter 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 # #...
bsd-3-clause
7,674,920,894,543,389,000
35.046296
80
0.666324
false
morphis/home-assistant
homeassistant/components/notify/free_mobile.py
12
1750
""" Support for thr Free Mobile SMS platform. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.free_mobile/ """ import logging import voluptuous as vol from homeassistant.components.notify import ( PLATFORM_SCHEMA, BaseNotificationService) fro...
apache-2.0
3,225,798,003,885,568,500
33.313725
75
0.682286
false
rwth-ti/gr-ofdm
python/ofdm/qa_channel_equalizer_mimo.py
1
1301
#!/usr/bin/env python # # Copyright 2014 Institute for Theoretical Information Technology, # RWTH Aachen University # www.ti.rwth-aachen.de # # This 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 S...
gpl-3.0
-1,449,024,540,686,177,000
30.731707
79
0.691776
false
sunu/jasper-client
client/modules/Notifications.py
35
1743
# -*- coding: utf-8-*- import re import facebook WORDS = ["FACEBOOK", "NOTIFICATION"] def handle(text, mic, profile): """ Responds to user-input, typically speech text, with a summary of the user's Facebook notifications, including a count and details related to each individual notificat...
mit
-6,853,585,447,248,681,000
29.051724
78
0.6179
false
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/theano/tensor/tests/test_opt_uncanonicalize.py
1
6708
from __future__ import absolute_import, print_function, division import unittest import numpy import theano from theano import function, config from theano import scalar from theano.gof import FunctionGraph from theano.gof.opt import out2in from theano.tensor.opt_uncanonicalize import ( local_alloc_dimshuffle, ...
agpl-3.0
-3,565,223,495,913,316,000
31.095694
78
0.596154
false
Kast0rTr0y/ansible
lib/ansible/modules/messaging/rabbitmq_policy.py
25
5071
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, John Dewey <john@dewey.ws> # # 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, o...
gpl-3.0
-2,703,297,284,644,614,000
27.172222
90
0.610333
false
greedymouse/openwrt
tools/b43-tools/files/b43-fwsquash.py
494
4767
#!/usr/bin/env python # # b43 firmware file squasher # Removes unnecessary firmware files # # Copyright (c) 2009 Michael Buesch <mb@bu3sch.de> # # Licensed under the GNU/GPL version 2 or (at your option) any later version. # import sys import os def usage(): print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm...
gpl-2.0
4,091,595,116,069,625,000
30.993289
79
0.520663
false
philotas/enigma2
lib/python/Components/Converter/ChannelNumbers.py
42
1835
from Components.NimManager import nimmanager class ChannelNumbers: def __init__(self): pass def getChannelNumber(self, frequency, nim): f = int(self.getMHz(frequency)) descr = self.getTunerDescription(nim) if "Europe" in descr: if "DVB-T" in descr: if 174 < f < 230: # III d = (f + 1) % 7 ...
gpl-2.0
7,270,777,003,644,120,000
27.230769
86
0.600545
false
omniscale/gbi-server
app/gbi_server/views/context.py
1
8042
# This file is part of the GBI project. # Copyright (C) 2013 Omniscale GmbH & Co. KG <http://omniscale.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/licens...
apache-2.0
5,225,329,362,212,287,000
35.554545
142
0.564661
false
adrienpacifico/openfisca-france
setup.py
1
1776
#! /usr/bin/env python # -*- coding: utf-8 -*- """ -- a versatile microsimulation free software""" from setuptools import setup, find_packages setup( name = 'OpenFisca-France', version = '0.5.4.dev0', author = 'OpenFisca Team', author_email = 'contact@openfisca.fr', classifiers = [ "De...
agpl-3.0
-3,220,461,249,796,911,600
30.157895
102
0.552928
false
Azure/azure-sdk-for-python
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py
1
76895
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
3,652,307,642,086,196,700
50.503684
251
0.651395
false
laurentb/weboob
modules/dlfp/pages/board.py
2
2106
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of a weboob module. # # This weboob module 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 ...
lgpl-3.0
-499,012,757,471,253,700
35.310345
89
0.591168
false
bala4901/odoo
addons/l10n_ch/__openerp__.py
160
2936
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA # Financial contributors: Hasa SA, Open Net SA, # Prisme Solutions Informatique SA, Quod SA # # Translation contributors: brain-te...
agpl-3.0
2,963,038,136,650,359,000
44.169231
180
0.677112
false
openstack/barbican
barbican/tests/queue/test_client.py
1
2387
# Copyright (c) 2013-2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
1,069,328,405,754,065,500
34.102941
75
0.659405
false
switchboardOp/ansible
lib/ansible/modules/network/cloudengine/ce_vxlan_arp.py
46
24139
#!/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
-6,733,892,660,492,759,000
34.188047
106
0.563031
false
aptrishu/coala-bears
bears/general/LicenseCheckBear.py
13
1675
from coalib.bearlib.abstractions.Linter import linter from dependency_management.requirements.DistributionRequirement import ( DistributionRequirement) @linter(executable='licensecheck', output_format='regex', output_regex=r'.*: .*UNKNOWN$', result_message='No license found.') class Licens...
agpl-3.0
-4,778,393,930,779,427,000
35.413043
79
0.617313
false
di0spyr0s/pants
tests/python/pants_test/tasks/test_jar_task.py
6
11198
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
apache-2.0
-3,857,164,723,873,663,500
35.714754
98
0.633238
false
Intel-tensorflow/tensorflow
tensorflow/python/debug/lib/debug_utils_test.py
14
13535
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
3,162,440,409,753,238,500
35.779891
88
0.644108
false