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
jmhsi/justin_tinker
lib/python2.7/site-packages/pip/utils/logging.py
516
3327
from __future__ import absolute_import import contextlib import logging import logging.handlers import os try: import threading except ImportError: import dummy_threading as threading from pip.compat import WINDOWS from pip.utils import ensure_dir try: from pip._vendor import colorama # Lots of differen...
apache-2.0
-8,200,614,654,039,108,000
24.592308
77
0.629396
false
luzheqi1987/nova-annotation
nova/openstack/common/eventlet_backdoor.py
4
4762
# Copyright (c) 2012 OpenStack Foundation. # Administrator of the National Aeronautics and Space Administration. # 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 a...
apache-2.0
-3,198,023,656,057,584,000
31.841379
78
0.645317
false
MIPS/external-chromium_org
tools/protoc_wrapper/protoc_wrapper.py
78
3783
#!/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. """ A simple wrapper for protoc. - Adds includes in generated headers. - Handles building with system protobuf as an option. """ ...
bsd-3-clause
-5,299,682,730,316,538,000
33.390909
79
0.651071
false
drglove/SickRage
lib/sqlalchemy/orm/scoping.py
79
6117
# orm/scoping.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .. import exc as sa_exc from ..util import ScopedRegistry, ThreadLocalRegistry, wa...
gpl-3.0
-5,613,926,742,186,333,000
33.755682
84
0.594573
false
intel-iot-devkit/upm
examples/python/ims.py
6
1785
#!/usr/bin/env python # Author: Noel Eck <noel.eck@intel.com> # Copyright (c) 2016 Intel Corporation. # # 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 # withou...
mit
4,747,580,297,500,689,000
39.568182
79
0.69916
false
doug-fish/horizon
openstack_dashboard/test/api_tests/keystone_tests.py
43
4914
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
4,757,724,942,885,468,000
41.730435
78
0.618437
false
malept/gunicorn
gunicorn/debug.py
155
2303
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. """The debug module contains utilities and functions for better debugging Gunicorn.""" import sys import linecache import re import inspect __all__ = ['spew', 'unspew'] _token_spliter = re....
mit
6,042,150,760,623,615,000
31.9
77
0.518888
false
exploreodoo/datStruct
odoo/addons/website/tests/test_views.py
29
8991
# -*- coding: utf-8 -*- import itertools import unittest2 from lxml import etree as ET, html from lxml.html import builder as h from openerp.tests import common def attrs(**kwargs): return dict(('data-oe-%s' % key, str(value)) for key, value in kwargs.iteritems()) class TestViewSaving(common.TransactionCase): ...
gpl-2.0
-6,371,149,402,694,606,000
38.091304
128
0.509176
false
anbasile/flask_sample
flask/lib/python2.7/site-packages/werkzeug/formparser.py
162
21207
# -*- coding: utf-8 -*- """ werkzeug.formparser ~~~~~~~~~~~~~~~~~~~ This module implements the form parsing. It supports url-encoded forms as well as non-nested multipart uploads. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more deta...
mit
-7,921,150,066,936,152,000
39.394286
81
0.578017
false
lliendo/Radar
radar/class_loader/__init__.py
1
2634
# -*- coding: utf-8 -*- """ This file is part of Radar. Radar 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) any later version. Radar is distributed ...
lgpl-3.0
2,113,619,975,999,584,000
33.207792
114
0.66325
false
DARKPOP/external_chromium_org
third_party/closure_linter/closure_linter/common/tokens.py
129
4741
#!/usr/bin/env python # # Copyright 2008 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
4,255,788,805,903,273,500
31.696552
80
0.663784
false
timj/scons
test/TEX/clean.py
3
2833
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
mit
1,548,840,893,365,790,200
25.476636
80
0.716908
false
pshen/ansible
lib/ansible/modules/network/iosxr/_iosxr_template.py
47
5327
#!/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
-8,893,643,827,327,665,000
32.71519
80
0.681246
false
wbc2010/django1.2.5
django1.2.5/django/template/loaders/eggs.py
65
1434
# Wrapper for loading templates from eggs via pkg_resources.resource_string. try: from pkg_resources import resource_string except ImportError: resource_string = None from django.template import TemplateDoesNotExist from django.template.loader import BaseLoader from django.conf import settings class Loader(B...
bsd-3-clause
-5,479,921,764,174,205,000
35.769231
128
0.6841
false
sestrella/ansible
test/units/modules/network/check_point/test_cp_mgmt_tag.py
19
3840
# Ansible module to manage CheckPoint Firewall (c) 2019 # # 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 dist...
gpl-3.0
6,399,293,453,544,189,000
31.820513
109
0.677604
false
molliewhitacre/aston
aston/qtgui/TableFile.py
3
18270
# -*- coding: utf-8 -*- # Copyright 2011-2014 Roderick Bovee # # This file is part of Aston. # # Aston 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 # (...
gpl-3.0
5,619,593,434,808,734,000
37.141962
80
0.559989
false
foolonhill/rietveld
third_party/oauth2client/keyring_storage.py
273
3227
# Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-8,485,844,601,790,202,000
28.605505
80
0.699721
false
Jumpscale/web
pythonlib/watchdog/utils/dirsnapshot.py
3
8949
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 Google, Inc. # Copyright 2014 Thomas Amland <thomas.amland@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the...
apache-2.0
-3,603,700,851,997,609,000
30.510563
79
0.586546
false
Syrcon/servo
tests/wpt/css-tests/tools/webdriver/webdriver/searchcontext.py
251
2153
"""WebDriver element location functionality.""" class SearchContext(object): """Abstract class that provides the core element location functionality.""" def find_element_by_css(self, selector): """Find the first element matching a css selector.""" return self._find_element('css selector', sele...
mpl-2.0
7,807,555,079,920,232,000
38.87037
79
0.595448
false
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/addons/modules/ui_utils.py
6
1405
# -*- coding: utf-8 -*- # ##### BEGIN GPL LICENSE BLOCK ##### # # 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 2 # of the License, or (at your option) any later version. # # ...
gpl-3.0
-3,475,608,645,145,878,000
26.54902
77
0.651957
false
luci/luci-py
appengine/isolate/proto/isolated_prpc_pb2.py
2
7397
# Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT! # source: isolated.proto import base64 import zlib from google.protobuf import descriptor_pb2 # Includes description of the isolated.proto and all of its transitive # dependencies. Includes source code info. FILE_DESCRIPTOR_SET = descriptor_pb2.F...
apache-2.0
-6,725,266,536,144,388,000
67.490741
80
0.871029
false
mspark93/VTK
ThirdParty/Twisted/twisted/test/test_stateful.py
34
2009
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.protocols.stateful """ from twisted.trial.unittest import TestCase from twisted.protocols.test import test_basic from twisted.protocols.stateful import StatefulProtocol from struct import pack, unpack, calcsize clas...
bsd-3-clause
-5,977,447,755,338,609,000
23.802469
73
0.634146
false
datenbetrieb/odoo
addons/marketing_campaign/__openerp__.py
260
3127
# -*- 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,702,719,564,366,317,000
43.042254
137
0.606652
false
tsvstar/vk_downloader
vk/tests.py
1
1723
# coding=utf8 import os import sys import time import unittest import vk from vk.utils import HandyList, make_handy, HandyDict sys.path.append(os.path.join(os.path.dirname(__file__), '..')) # copy to test_props.py and fill it APP_ID = '4643961' # aka API/Client id USER_LOGIN = 'tsvstar@gmail.com' # user email or...
mit
3,941,724,729,523,370,000
27.163934
73
0.6461
false
dongguangming/pygal
pygal/test/test_bar.py
6
1221
# -*- coding: utf-8 -*- # This file is part of pygal # # A python svg graph plotting library # Copyright © 2012-2015 Kozea # # This library 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...
lgpl-3.0
7,964,814,917,312,821,000
31.972973
79
0.67377
false
xiandaicxsj/qemu-copy
scripts/qtest.py
34
1911
# QEMU qtest library # # Copyright (C) 2015 Red Hat Inc. # # Authors: # Fam Zheng <famz@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # # Based on qmp.py. # import errno import socket class QEMUQtestProtocol(object): def __ini...
gpl-2.0
8,801,474,164,776,954,000
25.915493
79
0.581894
false
gvb/odoo
addons/account_budget/wizard/account_budget_crossovered_report.py
375
2089
# -*- 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
6,865,789,457,604,590,000
39.173077
130
0.595979
false
GitAngel/django
tests/raw_query/models.py
150
1034
from django.db import models class Author(models.Model): first_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255) dob = models.DateField() def __init__(self, *args, **kwargs): super(Author, self).__init__(*args, **kwargs) # Protect against annotations...
bsd-3-clause
2,459,366,505,848,057,000
28.542857
69
0.662476
false
CredoReference/edx-platform
common/djangoapps/credo_modules/models.py
1
24536
import logging import time import datetime import json import re import uuid from urlparse import urlparse from django.dispatch import receiver from django.contrib.auth.models import User from django.db import models, IntegrityError, OperationalError, transaction from django.db.models import F, Value from django.db.mod...
agpl-3.0
-8,030,811,223,852,001,000
39.026101
120
0.616115
false
meduz/scikit-learn
examples/linear_model/plot_lasso_lars.py
363
1080
#!/usr/bin/env python """ ===================== Lasso path using LARS ===================== Computes Lasso Path along the regularization parameter using the LARS algorithm on the diabetes dataset. Each color represents a different feature of the coefficient vector, and this is displayed as a function of the regulariza...
bsd-3-clause
-155,444,959,354,534,600
24.714286
77
0.707407
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/boto-2.19.0-py2.7.egg/boto/s3/cors.py
240
8941
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without ...
apache-2.0
6,257,436,382,329,624,000
41.57619
77
0.635164
false
chhao91/QGIS
python/ext-libs/pygments/styles/perldoc.py
364
2175
# -*- coding: utf-8 -*- """ pygments.styles.perldoc ~~~~~~~~~~~~~~~~~~~~~~~ Style similar to the style used in the `perldoc`_ code blocks. .. _perldoc: http://perldoc.perl.org/ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from...
gpl-2.0
3,377,716,182,243,876,000
30.521739
70
0.483218
false
spirrello/spirrello-pynet-work
applied_python/lib/python2.7/site-packages/setuptools/msvc9_support.py
429
2187
try: import distutils.msvc9compiler except ImportError: pass unpatched = dict() def patch_for_specialized_compiler(): """ Patch functions in distutils.msvc9compiler to use the standalone compiler build for Python (Windows only). Fall back to original behavior when the standalone compiler is no...
gpl-3.0
-6,686,666,396,616,547,000
33.714286
93
0.638317
false
40223151/2014c2g9
exts/w2/static/Brython2.0.0-20140209-164925/Lib/shutil.py
720
39101
"""Utility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. """ import os import sys import stat from os.path import abspath import fnmatch import collections import errno import tarfile try: import bz2 del bz2 _...
gpl-2.0
8,871,492,437,878,476,000
33.633304
90
0.60377
false
RaoUmer/django
django/contrib/auth/forms.py
4
13427
from __future__ import unicode_literals from django import forms from django.forms.util import flatatt from django.template import loader from django.utils.datastructures import SortedDict from django.utils.html import format_html, format_html_join from django.utils.http import int_to_base36 from django.utils.safestri...
bsd-3-clause
5,780,367,001,028,654,000
38.031977
112
0.595516
false
sauloal/PiCastPy
sqlalchemy/util/topological.py
18
2656
# util/topological.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Topological sorting algorithms.""" from ..exc import CircularDependencyError f...
mit
-7,620,291,973,427,611,000
26.666667
85
0.569654
false
sszlm/MissionPlanner
Lib/unittest/runner.py
53
6698
"""Running tests""" import sys import time from . import result from .signals import registerResult __unittest = True class _WritelnDecorator(object): """Used to decorate file-like objects with a handy 'writeln' method""" def __init__(self,stream): self.stream = stream def __ge...
gpl-3.0
4,988,601,156,578,807,000
32.173469
79
0.567184
false
actuaryzhang/spark
python/pyspark/tests/test_taskcontext.py
2
9144
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
8,256,407,110,357,641,000
39.821429
98
0.628062
false
svn2github/chromium-depot-tools
third_party/pylint/reporters/html.py
59
2497
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # 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 2 of the License, or (at your option) any later # version. # # This program...
bsd-3-clause
-1,768,536,535,786,423,300
35.188406
80
0.6664
false
huggingface/pytorch-transformers
tests/test_pipelines_translation.py
2
4301
# Copyright 2020 The HuggingFace Team. 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 applicabl...
apache-2.0
-9,124,288,608,941,156,000
41.57
119
0.706366
false
jaruba/chromium.src
tools/telemetry/telemetry/timeline/inspector_importer_unittest.py
44
5399
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from telemetry.timeline import inspector_importer from telemetry.timeline import model from telemetry.timeline import trace_data _BACKGROUND...
bsd-3-clause
596,523,539,545,777,000
35.234899
78
0.60752
false
civisanalytics/ansible
lib/ansible/modules/system/solaris_zone.py
21
17028
#!/usr/bin/python # (c) 2015, Paul Markham <pmarkham@netrefinery.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 you...
gpl-3.0
-4,217,340,596,590,327,300
33.965092
169
0.571882
false
jrandall/python-rt
test_rt.py
4
10246
"""Tests for Rt - Python interface to Request Tracker :term:`API`""" __license__ = """ Copyright (C) 2013 CZ.NIC, z.s.p.o. 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 ...
gpl-3.0
6,281,327,186,178,988,000
52.364583
183
0.618388
false
liu602348184/django
tests/template_tests/syntax_tests/test_filter_syntax.py
221
8844
# coding: utf-8 from __future__ import unicode_literals from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import SomeClass, SomeOtherException, UTF8Class, setup class FilterSyntaxTests(SimpleTestCase): @setup({'filter-syntax01': '{{ var|upper }}'}) def test...
bsd-3-clause
-3,255,777,177,288,275,500
37.452174
100
0.605834
false
torre76/py-crypto-params
docs/conf.py
1
10172
# -*- coding: utf-8 -*- # # py-crypto-params documentation build configuration file, created by # sphinx-quickstart on Tue Dec 29 20:30:34 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 fi...
lgpl-3.0
-5,823,799,457,224,496,000
31.602564
103
0.706646
false
jorge-marques/shoop
shoop/utils/setup.py
8
1445
# 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. class Setup(object): def __init__(self, load_from=None): self.commit(load_from) ...
agpl-3.0
2,670,507,481,527,353,000
28.489796
68
0.553633
false
PlanTool/plantool
code/Deterministic/LAMA/seq-sat-lama/lama/translate/pddl/f_expression.py
10
5321
####################################################################### # # Author: Gabi Roeger # Modified by: Silvia Richter (silvia.richter@nicta.com.au) # (C) Copyright 2008: Gabi Roeger and NICTA # # This file is part of LAMA. # # LAMA is free software; you can redistribute it and/or # modify it under the terms of ...
gpl-2.0
4,340,161,234,069,375,500
37.557971
96
0.601203
false
daj0ker/BinPy
BinPy/examples/source/ic/Series_4000/IC4069.py
5
1254
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=2> # Usage of IC 4069 # <codecell> from __future__ import print_function from BinPy import * # <codecell> # Usage of IC 4069: ic = IC_4069() print(ic.__doc__) # <codecell> # The Pin configuration is: inp = {2: 0, 3: 1, 4: 0, 5: 1, 7: 0, ...
bsd-3-clause
-517,445,174,079,120,600
14.108434
71
0.64673
false
zelbanna/sdcp
core/genlib.py
1
3476
"""Module docstring. Generic Library. Many are for reference, make them "inline" """ __author__ = "Zacharias El Banna" ################################# Generics #################################### def debug_decorator(func_name): def decorator(func): def decorated(*args,**kwargs): res = func(*args,**kwargs) ...
gpl-3.0
9,216,863,462,132,861,000
24.558824
129
0.681243
false
mlperf/training_results_v0.7
Google/benchmarks/transformer/implementations/transformer-research-TF-tpu-v4-128/lingvo/base_trial.py
3
4213
# 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
-9,022,248,341,449,987,000
31.658915
101
0.696653
false
Anonymous-X6/django
django/contrib/gis/geos/geometry.py
216
23649
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ from __future__ import unicode_literals import json from ctypes import addressof, byref, c_double from django.contrib.gis import gdal from django.contrib.gis.geometry.regex import hex_regex, json_regex, wkt_...
bsd-3-clause
6,653,237,889,504,415,000
34.035556
98
0.609244
false
hj91/jaikuengine
api/urls.py
33
1686
# Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
193,767,705,270,037,950
38.209302
81
0.644721
false
amenonsen/ansible
lib/ansible/modules/network/avi/avi_vsvip.py
28
5474
#!/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,836,861,082,007,775,000
33.427673
157
0.602667
false
mauriceatron/iPhone-OpenGL-ES-Tutorial-Series
OpenGLES16/export_gldata.py
5
2088
#!BPY import struct import bpy import Blender def newFileName(ext): return '.'.join(Blender.Get('filename').split('.')[:-1] + [ext]) def saveAllMeshes(filename): for object in Blender.Object.Get(): if object.getType() == 'Mesh': mesh = object.getData() if (len(mesh.verts) > 0)...
gpl-3.0
5,745,829,199,527,983,000
32.693548
86
0.644636
false
hongliangzhao/seastar
tests/memcached/test_memcached.py
25
22367
#!/usr/bin/env python3 # # This file is open source software, licensed to you under the terms # of the Apache License, Version 2.0 (the "License"). See the NOTICE file # distributed with this work for additional information regarding copyright # ownership. You may not use this file except in compliance with the Licen...
apache-2.0
-7,158,991,775,894,665,000
36.340568
158
0.590558
false
ramcn/demo3
venv/lib/python3.4/site-packages/pip/index.py
31
44478
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves.urllib import request as urllib_request f...
mit
-2,632,420,606,462,336,000
36.003328
79
0.53015
false
elijah513/scrapy
scrapy/extensions/throttle.py
142
3586
import logging from scrapy.exceptions import NotConfigured from scrapy import signals logger = logging.getLogger(__name__) class AutoThrottle(object): def __init__(self, crawler): self.crawler = crawler if not crawler.settings.getbool('AUTOTHROTTLE_ENABLED'): raise NotConfigured ...
bsd-3-clause
3,356,887,223,113,517,000
37.55914
94
0.622142
false
caasiu/xbmc-addons-chinese
service.subtitles.subhd/service.py
1
11567
# -*- coding: utf-8 -*- import re import os import sys import xbmc import urllib import xbmcvfs import xbmcaddon import xbmcgui,xbmcplugin from bs4 import BeautifulSoup import requests import simplejson __addon__ = xbmcaddon.Addon() __author__ = __addon__.getAddonInfo('author') __scriptid__ = __addon__.getAddo...
gpl-2.0
4,326,467,380,122,474,000
40.442446
142
0.537106
false
jessefeinman/FintechHackathon
venv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py
780
2128
from __future__ import absolute_import from base64 import b64encode from ..packages.six import b ACCEPT_ENCODING = 'gzip,deflate' def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None, disable_cache=None): """ Shortcuts for generatin...
bsd-2-clause
-1,862,135,929,985,836,800
28.555556
85
0.613252
false
rpm-software-management/yum
test/simpleremovetests.py
11
4749
from testbase import * class SimpleRemoveTests(OperationsTests): @staticmethod def buildPkgs(pkgs, *args): pkgs.leaf = FakePackage('foo', '2.5', '1.1', '0', 'noarch') pkgs.leaf.addFile('/bin/foo') pkgs.requires_leaf = FakePackage('bar', '4') pkgs.requires_leaf.addRequires('foo...
gpl-2.0
3,572,194,663,335,996,000
36.992
103
0.473363
false
highco-groupe/odoo
addons/procurement/procurement.py
44
15869
# -*- 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,433,869,022,334,233,000
44.600575
254
0.591531
false
tnemis/staging-server
baseapp/models.py
2
10846
from django.db import models # from simple_history.models import HistoricalRecords #to store history from django.db.models.fields import * from django.core.mail import send_mail from django.template.loader import get_template from django.template import Context from django.conf import settings import caching.base # ca...
mit
8,680,728,875,108,680,000
23.70615
239
0.679329
false
marcoantoniooliveira/labweb
oscar/lib/python2.7/site-packages/django/conf/global_settings.py
89
22130
# Default Django settings. Override these with settings in the module # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. gettext_noop = lambda s: s #################...
bsd-3-clause
1,896,713,530,117,979,000
35.578512
174
0.683281
false
dparks1134/Art
SVG/Examples/svg_write/examples/basic_shapes.py
2
1608
#!/usr/bin/env python #coding:utf-8 # Author: mozman # Purpose: svg examples # Created: 07.11.2010 # Copyright (C) 2010, Manfred Moitzi # License: MIT License try: import svgwrite except ImportError: # if svgwrite is not 'installed' append parent dir of __file__ to sys.path import sys, os sys.path.ins...
gpl-3.0
4,035,704,171,224,204,000
36.395349
90
0.625
false
jemandez/creaturas-magicas
Configuraciones básicas/scripts/addons/blendertools-1.0.0/makewalk/floor.py
1
11011
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
-5,801,952,940,549,268,000
29.671309
95
0.580692
false
Oslandia/vizitown_plugin
twisted/conch/ssh/session.py
59
10817
# -*- test-case-name: twisted.conch.test.test_session -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This module contains the implementation of SSHSession, which (by default) allows access to a shell and a python interpreter over SSH. Maintainer: Paul Swartz """ import struct import ...
gpl-2.0
1,108,512,902,680,832,400
30.083333
105
0.601923
false
apruden/opal
opal-python-client/src/main/python/opal/file.py
1
3231
""" Opal file management. """ import sys import pycurl import opal.core class OpalFile: """ File on Opal file system """ def __init__(self, path): self.path = path def get_meta_ws(self): return '/files/meta' + self.path def get_ws(self): return '/files' + self.path ...
gpl-3.0
2,970,816,658,193,952,300
33.382979
119
0.573816
false
timkpaine/lantern
tests/plot/test_plot.py
1
1272
from mock import patch import matplotlib matplotlib.use('Agg') class TestConfig: def setup(self): pass # setup() before each test method def teardown(self): pass # teardown() after each test method @classmethod def setup_class(cls): pass # setup_class...
apache-2.0
925,046,494,711,456,600
27.266667
86
0.578616
false
hroncok/horus
pkg/darwin/create-dmg/support/dmg-license.py
47
6252
#! /usr/bin/env python """ This script adds a license file to a DMG. Requires Xcode and a plain ascii text license file. Obviously only runs on a Mac. Copyright (C) 2011-2013 Jared Hobbs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (t...
gpl-2.0
-6,955,224,997,652,710,000
37.355828
79
0.599488
false
pigeonflight/strider-plone
docker/appengine/lib/google-api-python-client/oauth2client/django_orm.py
25
3255
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
mit
5,101,606,434,236,320,000
27.552632
80
0.709985
false
CenterForOpenScience/SHARE
share/transformers/com_peerj.py
2
2280
from share.transform.chain import ChainTransformer, Parser, Delegate, RunPython, ParseDate, ParseName, Map, ctx, Try, Subjects, IRI, Concat class Subject(Parser): name = ctx class ThroughSubjects(Parser): subject = Delegate(Subject, ctx) class Tag(Parser): name = ctx class ThroughTags(Parser): t...
apache-2.0
4,054,376,328,605,593,000
24.054945
139
0.657018
false
neilpelow/wmap-django
venv/lib/python3.5/site-packages/pip/_vendor/html5lib/constants.py
354
83387
from __future__ import absolute_import, division, unicode_literals import string EOF = None E = { "null-character": "Null character in input stream, replaced with U+FFFD.", "invalid-codepoint": "Invalid codepoint in stream.", "incorrectly-placed-solidus": "Solidus (/) incorrectly ...
gpl-3.0
3,670,396,410,211,068,400
27.314771
94
0.503999
false
PrashntS/scikit-learn
examples/decomposition/plot_faces_decomposition.py
103
4394
""" ============================ Faces dataset decompositions ============================ This example applies to :ref:`olivetti_faces` different unsupervised matrix decomposition (dimension reduction) methods from the module :py:mod:`sklearn.decomposition` (see the documentation chapter :ref:`decompositions`) . """...
bsd-3-clause
6,947,843,777,531,474,000
32.287879
79
0.572371
false
emCOMP/twinkle
twinkle/feature_extraction/pipelines.py
1
2688
#!/usr/bin/env python # -*- coding: utf-8 -*- from core import FeatureExtractorRegistry from twinkle.connectors.core import ConnectorRegistry class FeatureExtractorPipelineFactory(object): """ Factory object for creating a pipeline from a file """ def __init__(self): """ """ pass def buildInput(self,...
mit
-8,306,893,356,912,068,000
19.363636
101
0.71131
false
wfxiang08/django178
tests/inspectdb/tests.py
6
11721
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import re from unittest import skipUnless from django.core.management import call_command from django.db import connection from django.test import TestCase, skipUnlessDBFeature from django.utils.six import PY3, StringIO class InspectDBTestCase(TestCa...
bsd-3-clause
1,477,715,790,934,979,600
50.858407
107
0.638908
false
OpenUpgrade-dev/OpenUpgrade
addons/crm_helpdesk/report/__init__.py
442
1083
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
7,441,730,170,282,298,000
42.32
79
0.611265
false
OpenSourcePolicyCenter/PolicyBrain
webapp/apps/register/tests.py
2
2406
from django.test import TestCase import pytest from django.test import Client from django.core.urlresolvers import reverse from webapp.apps.register.models import Subscriber # run this with `py.test --pdb -s -m register` # actually no. `py.test -q webapp/apps/register/tests.py` @pytest.mark.register class Register...
mit
4,057,671,585,503,592,400
37.806452
75
0.608063
false
stormi/tsunami
src/secondaires/crafting/fonctions/a_rang.py
1
3868
# -*-coding:Utf-8 -* # Copyright (c) 2015 LE GOFF Vincent # 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 # lis...
bsd-3-clause
-1,823,801,531,649,955,300
39.515789
79
0.686672
false
hfp/libxsmm
samples/deeplearning/sparse_training/fairseq/tests/test_binaries.py
1
40028
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import contextlib from io import StringIO import logging import os import random import tempfile import unittest import torch from fairseq i...
bsd-3-clause
-7,813,910,436,524,079,000
41.002099
122
0.479364
false
jfhumann/servo
tests/wpt/update_css.py
116
1081
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import sys here = os.path.split(__file__)[0] def wpt_path(*args): return os.path.join(here, *args) # I...
mpl-2.0
1,332,775,066,866,119,400
24.139535
69
0.670675
false
bkeiren/cef
tools/check_style.py
3
4018
# Copyright (c) 2012 The Chromium Embedded Framework Authors. # Portions copyright (c) 2011 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, re, string, sys from file_util import * import git_util as git # scrip...
bsd-3-clause
9,139,277,271,674,562,000
32.206612
78
0.688651
false
cbmoore/statsmodels
docs/source/plots/graphics_gofplots_qqplot.py
38
1911
# -*- coding: utf-8 -*- """ Created on Sun May 06 05:32:15 2012 Author: Josef Perktold editted by: Paul Hobson (2012-08-19) """ from scipy import stats from matplotlib import pyplot as plt import statsmodels.api as sm #example from docstring data = sm.datasets.longley.load() data.exog = sm.add_constant(data.exog, pre...
bsd-3-clause
-6,187,090,041,235,930,000
27.102941
74
0.674516
false
boyuegame/kbengine
kbe/src/lib/python/Lib/distutils/tests/test_bdist_rpm.py
71
4868
"""Tests for distutils.command.bdist_rpm.""" import unittest import sys import os import tempfile import shutil from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm from distutils.tests import support from distutils.spawn import find_executabl...
lgpl-3.0
-7,839,338,785,633,518,000
35.328358
89
0.582375
false
2013Commons/hue
desktop/core/ext-py/Django-1.4.5/django/db/models/sql/query.py
53
85934
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
apache-2.0
8,920,453,358,841,485,000
42.204625
133
0.568494
false
ptisserand/ansible
lib/ansible/modules/network/nxos/nxos_udld.py
16
7946
#!/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
-1,384,887,053,501,105,400
28.649254
88
0.626227
false
peterm-itr/edx-platform
cms/djangoapps/contentstore/features/common.py
4
12232
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name import os from lettuce import world, step from nose.tools import assert_true, assert_in # pylint: disable=no-name-in-module from django.conf import settings from student.roles import CourseStaffRole, CourseInstructorRole, GlobalStaff from stu...
agpl-3.0
7,195,979,226,638,403,000
29.888889
100
0.663506
false
pyocd/pyOCD
pyocd/target/builtin/target_MKE15Z256xxx7.py
3
6018
# pyOCD debugger # Copyright (c) 2018-2019 Arm Limited # Copyright (c) 2017 NXP # Copyright (c) 2016 Freescale Semiconductor, Inc. # SPDX-License-Identifier: Apache-2.0 # # 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...
apache-2.0
-3,661,056,166,638,669,000
58
102
0.759056
false
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/django-1.4/django/views/generic/create_update.py
87
8928
from django.forms.models import ModelFormMetaclass, ModelForm from django.template import RequestContext, loader from django.http import Http404, HttpResponse, HttpResponseRedirect from django.core.xheaders import populate_xheaders from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django....
bsd-3-clause
-6,012,595,282,562,014,000
39.39819
114
0.648634
false
alexallah/django
django/views/generic/edit.py
24
8343
from django.core.exceptions import ImproperlyConfigured from django.forms import models as model_forms from django.http import HttpResponseRedirect from django.views.generic.base import ContextMixin, TemplateResponseMixin, View from django.views.generic.detail import ( BaseDetailView, SingleObjectMixin, SingleObjec...
bsd-3-clause
-7,877,874,950,149,136,000
33.618257
87
0.618722
false
gbaty/pyside2
tests/signals/decorators_test.py
3
2225
#!/usr/bin/env python import unittest from PySide2.QtCore import QObject, Slot, SIGNAL, SLOT class MyObject(QObject): def __init__(self, parent=None): QObject.__init__(self, parent) self._slotCalledCount = 0 @Slot() def mySlot(self): self._slotCalledCount = self._slotCalledCount ...
lgpl-2.1
-6,163,953,406,768,717,000
27.896104
66
0.609888
false
ZihengJiang/mxnet
example/autoencoder/model.py
27
2810
# 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
2,725,879,101,608,685,600
35.493506
86
0.639146
false
switchboardOp/ansible
lib/ansible/modules/windows/win_msg.py
22
3527
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # 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, eith...
gpl-3.0
7,653,764,283,444,003,000
33.242718
155
0.70258
false
ChronoMonochrome/android_external_chromium_org
tools/telemetry/telemetry/core/backends/chrome/misc_web_contents_backend.py
24
1494
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json from telemetry.core import web_contents from telemetry.core.backends.chrome import inspector_backend class MiscWebContentsBackend(object): """...
bsd-3-clause
2,453,397,168,925,748,700
38.315789
80
0.685408
false
pbrod/numpy
numpy/distutils/fcompiler/absoft.py
17
5499
# http://www.absoft.com/literature/osxuserguide.pdf # http://www.absoft.com/documentation.html # Notes: # - when using -g77 then use -DUNDERSCORE_G77 to compile f2py # generated extension modules (works for f2py v2.45.241_1936 and up) import os from numpy.distutils.cpuinfo import cpu from numpy.distutils.fcompiler...
bsd-3-clause
-1,234,171,101,594,383,000
34.25
155
0.525186
false
eusi/MissionPlanerHM
Lib/site-packages/scipy/ndimage/_ni_support.py
62
3326
# Copyright (C) 2003-2005 Peter J. Verveer # # 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 # notice, this list of conditions and the following d...
gpl-3.0
-1,301,951,687,439,718,000
36.370787
79
0.679194
false
nikesh-mahalka/nova
nova/openstack/common/cliutils.py
57
7940
# Copyright 2012 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 agre...
apache-2.0
6,761,229,807,877,314,000
28.298893
79
0.606297
false
mitocw/edx-platform
openedx/features/enterprise_support/tests/test_logout.py
3
2724
""" Tests for logout for enterprise flow """ import ddt import mock from django.test.utils import override_settings from django.urls import reverse from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms from openedx.features.enterprise_support.api import enterprise_enabled from ope...
agpl-3.0
5,656,543,502,723,711,000
40.272727
114
0.72467
false
smathot/PyGaze
opensesame_plugins/pygaze_drift_correct/pygaze_drift_correct.py
3
3469
#-*- coding:utf-8 -*- """ This file is part of PyGaze. PyGaze 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. PyGaze is distributed in the...
gpl-3.0
-544,204,679,658,063,700
24.88806
74
0.712886
false
LeonChambers/bwhglass-server
lib/werkzeug/utils.py
317
22676
# -*- coding: utf-8 -*- """ werkzeug.utils ~~~~~~~~~~~~~~ This module implements various utilities for WSGI applications. Most of them are used by the request and response wrappers but especially for middleware development it makes sense to use them without the wrappers. :copyright: (c) 2013 ...
apache-2.0
7,245,585,580,171,192,000
36.11293
83
0.606765
false
sumedhasingla/VTK
Filters/General/Testing/Python/warplens.py
20
1517
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Create the RenderWindow, Renderer and both Actors ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRen...
bsd-3-clause
-7,738,393,044,938,293,000
21.984848
61
0.775873
false