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
xzturn/tensorflow
tensorflow/python/platform/analytics.py
21
1090
# Copyright 2019 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
-7,466,640,668,838,553,000
37.928571
80
0.688073
false
alikins/ansible
lib/ansible/modules/cloud/cloudscale/cloudscale_floating_ip.py
49
9740
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, Gaudenz Steinlin <gaudenz.steinlin@cloudscale.ch> # 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 = {'metadata_ve...
gpl-3.0
-5,044,150,468,854,152,000
33.785714
136
0.664271
false
idjaw/keystone
keystone/contrib/endpoint_policy/backends/sql.py
11
1154
# 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, software # distributed under t...
apache-2.0
5,520,692,860,816,521,000
35.0625
75
0.696707
false
autopulated/yotta
yotta/test/cli/test_shrinkwrap.py
3
5298
#!/usr/bin/env python # Copyright 2015 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import unittest import os import copy # internal modules: from yotta.test.cli import cli from yotta.test.cli import util Test_Target = "x86-osx-native...
apache-2.0
-4,777,817,509,146,135,000
29.624277
117
0.62684
false
waynew/salmon
salmon/data/prototype/config/testing.py
2
1091
from config import settings from salmon import view from salmon.routing import Router from salmon.server import Relay import jinja2 import logging import logging.config import os logging.config.fileConfig("config/test_logging.conf") # the relay host to actually send the final message to (set debug=1 to see what # the...
gpl-3.0
-3,787,804,342,444,455,400
32.060606
79
0.739688
false
pwmarcz/django
django/contrib/gis/geos/prototypes/errcheck.py
48
3013
""" Error checking functions for GEOS ctypes prototype functions. """ from ctypes import c_void_p, string_at from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Getting the `free` routine used to free the memory allocated for # string pointers ...
bsd-3-clause
-3,538,619,859,370,856,000
31.053191
118
0.685695
false
pigeonflight/strider-plone
docker/appengine/lib/django-1.4/tests/regressiontests/utils/decorators.py
43
3919
from django.http import HttpResponse from django.template import Template, Context from django.template.response import TemplateResponse from django.test import TestCase, RequestFactory from django.utils.decorators import decorator_from_middleware class ProcessViewMiddleware(object): def process_view(self, reques...
mit
9,212,274,074,216,585,000
35.287037
86
0.681551
false
shishaochen/TensorFlow-0.8-Win
third_party/grpc/tools/buildgen/plugins/generate_vsprojects.py
59
3748
# Copyright 2015, 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 conditions and the f...
apache-2.0
4,306,720,619,705,118,700
38.452632
210
0.685165
false
mozilla/verbatim
vendor/lib/python/django/contrib/admin/actions.py
98
3205
""" Built-in, globally-available admin actions. """ from django.core.exceptions import PermissionDenied from django.contrib.admin import helpers from django.contrib.admin.util import get_deleted_objects, model_ngettext from django.db import router from django.template.response import TemplateResponse from django.utils...
gpl-2.0
8,849,255,511,410,657,000
37.614458
96
0.674883
false
breisfeld/avoplot
src/AvoPlot.py
3
1352
#!/usr/bin/python #Copyright (C) Nial Peters 2013 # #This file is part of AvoPlot. # #AvoPlot 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,966,053,977,851,366,000
25
69
0.695266
false
tashigaofei/BlogSpider
scrapy/contrib/downloadermiddleware/httpcache.py
33
4327
from email.utils import formatdate from scrapy import signals from scrapy.exceptions import NotConfigured, IgnoreRequest from scrapy.utils.misc import load_object class HttpCacheMiddleware(object): def __init__(self, settings, stats): if not settings.getbool('HTTPCACHE_ENABLED'): raise NotCon...
mit
-5,509,226,404,100,606,000
42.707071
86
0.671366
false
BonexGu/Blik2D-SDK
Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/tensorboard/plugins/base_plugin.py
27
2305
# 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...
mit
4,267,386,590,756,381,700
34.461538
80
0.71757
false
kmee/odoo-brazil-hr
l10n_br_hr_arquivos_governo/models/arquivo_grrf.py
2
9714
# -*- coding: utf-8 -*- # (c) 2017 KMEE- Hendrix Costa <hendrix.costa@kmee.com.br> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from .abstract_arquivos_governo import AbstractArquivosGoverno class Grrf(AbstractArquivosGoverno): # Informações do Responsavel def _registro_00(self): ...
agpl-3.0
3,326,533,055,808,073,000
45.440191
79
0.566042
false
nikhilnrng/algorithms-and-data-structures
data_structures/trees/binary_search_tree.py
1
5647
class BSTNode(object): """A node in a binary search tree.""" def __init__(self, data, left=None, right=None): self.data = data self.left = left self.right = right class BinarySearchTree(object): """A class for a binary search tree that stores unique values.""" def __init__(sel...
mit
1,731,931,667,831,310,000
33.858025
87
0.574818
false
chubbymaggie/simuvex
simuvex/vex/statements/storeg.py
1
1135
from . import SimIRStmt from ... import s_options as o from ...s_action_object import SimActionObject from ...s_action import SimActionData class SimIRStmt_StoreG(SimIRStmt): def _execute(self): addr = self._translate_expr(self.stmt.addr) data = self._translate_expr(self.stmt.data) expr = d...
bsd-2-clause
-7,561,061,208,202,909,000
46.291667
146
0.653744
false
tsteinholz/cldoc
setup.py
2
4372
#!/usr/bin/env python from setuptools import setup, Command import subprocess, os, shutil, glob, sys coffee_files = [ 'cldoc.coffee', 'page.coffee', 'sidebar.coffee', 'node.coffee', 'type.coffee', 'doc.coffee', 'category.coffee', 'enum.coffee', 'templated.coffee', 'struct.coff...
gpl-2.0
-1,318,778,946,616,082,400
25.658537
93
0.57022
false
fmichea/srddl
srddl/filetypes/pcap.py
1
1307
import srddl.data as sd import srddl.fields as sf import srddl.helpers as sh import srddl.models as sm class PcapFileHeader(sm.Struct): magic = sf.IntField('magic', size=4) version_major = sf.IntField('', size=2) version_minor = sf.IntField('', size=2) thiszone = sf.IntField('gmt to local correction', size=4) ...
bsd-3-clause
2,239,988,226,641,521,000
30.878049
72
0.671002
false
isc-projects/forge
tests/dhcpv6/kea_only/config_backend/test_cb_v6_options.py
1
13970
"""Kea database config backend commands hook testing""" import pytest import srv_msg from cb_model import setup_server_for_config_backend_cmds pytestmark = [pytest.mark.v6, pytest.mark.kea_only, pytest.mark.controlchannel, pytest.mark.hook, pytest.mark.config_b...
isc
5,516,182,167,346,533,000
46.355932
118
0.441589
false
joone/chromium-crosswalk
tools/findit/svn_repository_parser.py
74
9178
# Copyright (c) 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 xml.dom.minidom as minidom from xml.parsers.expat import ExpatError import crash_utils from repository_parser_interface import ParserInterface ...
bsd-3-clause
-5,720,899,906,033,852,000
35.712
79
0.662454
false
flyingrub/scdl
scdl/scdl.py
1
26778
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- """scdl allows you to download music from Soundcloud Usage: scdl -l <track_url> [-a | -f | -C | -t | -p][-c | --force-metadata][-n <maxtracks>]\ [-o <offset>][--hidewarnings][--debug | --error][--path <path>][--addtofile][--addtimestamp] [--onlymp3][--hide-progress...
gpl-2.0
-2,508,192,172,228,753,000
33.317949
123
0.57565
false
CrankWheel/grit-i18n
grit/gather/rc.py
62
11190
#!/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. '''Support for gathering resources from RC files. ''' import re from grit import exception from grit import lazy_re from grit im...
bsd-2-clause
-7,685,267,934,937,110,000
31.623907
89
0.611081
false
ravibhure/ansible
lib/ansible/modules/cloud/cloudstack/cs_loadbalancer_rule_member.py
49
9858
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Darren Worrall <darren@iweb.co.uk> # (c) 2015, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free So...
gpl-3.0
-6,768,110,492,942,747,000
26.685393
128
0.619318
false
paweljasinski/ironpython3
Tests/interop/net/loadorder/t3h.py
3
1606
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of t...
apache-2.0
8,980,872,658,003,718,000
31.77551
97
0.609589
false
CiscoUcs/Ironic
build/lib/ironic/openstack/common/periodic_task.py
5
8319
# # 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, software # ...
apache-2.0
-1,193,395,185,536,850,000
34.857759
79
0.60464
false
bdh1011/wau
venv/lib/python2.7/site-packages/twisted/conch/scripts/tkconch.py
10
22833
# -*- test-case-name: twisted.conch.test.test_scripts -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation module for the `tkconch` command. """ import Tkinter, tkFileDialog, tkMessageBox from twisted.conch import error from twisted.conch.ui import tkvt100 from twisted.conch....
mit
2,780,690,984,822,895,000
38.848168
151
0.573687
false
txemi/ansible
lib/ansible/utils/module_docs_fragments/cnos.py
77
3621
# Copyright (C) 2017 Lenovo, Inc. # # 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. # # Ansi...
gpl-3.0
-4,527,045,131,739,280,400
41.6
78
0.654515
false
andreymaznyak/ontologydatabase
vendor/sonata-project/admin-bundle/Resources/doc/conf.py
77
7893
# -*- coding: utf-8 -*- # # IoC documentation build configuration file, created by # sphinx-quickstart on Fri Mar 29 01:43:00 2013. # # 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 file. # # All con...
mit
1,346,134,147,674,066,000
31.481481
102
0.703788
false
111t8e/h2o-2
py/testdir_multi_jvm/test_rf_hhp_2a_fvec.py
9
2453
import unittest, time, sys sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i, h2o_exec, h2o_rf class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): h2o.init(3) @classmethod def tearDownCl...
apache-2.0
5,537,834,460,399,093,000
32.60274
116
0.50265
false
rahushen/ansible
lib/ansible/modules/packaging/os/svr4pkg.py
14
7700
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.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 = {'metadata_version': '1...
gpl-3.0
8,818,445,718,800,478,000
28.166667
147
0.624156
false
ExPHAT/binding-of-isaac
Gurdy.py
1
1437
# Gurdy.py # Aaron Taylor # Moose Abumeeiz # # This is the first boss, Gurdy. He just sits there and takes your bullets # from pygame import * from const import * from func import * from Animation import * from Enemy import * class Gurdy(Enemy): x = 6 y = 3 health = 100 hurtDistance = 2 def __init__(self, tex...
mit
-8,015,570,992,150,425,000
24.22807
152
0.677105
false
Vignesh2208/Awlsim
awlsim/core/systemblocks/system_sfc_m1.py
2
1118
# -*- coding: utf-8 -*- # # AWL simulator - SFCs # # Copyright 2012-2015 Michael Buesch <m@bues.ch> # # 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 yo...
gpl-2.0
-6,153,355,982,676,479,000
31.882353
82
0.741503
false
nicko96/Chrome-Infra
appengine/findit/handlers/failure_log.py
1
1213
# Copyright 2015 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. from base_handler import BaseHandler from base_handler import Permission from waterfall import buildbot from waterfall import masters from model.wf_step impo...
bsd-3-clause
8,295,678,212,597,268,000
32.694444
72
0.661995
false
pyrocko/kite
src/deramp.py
1
2008
import numpy as num from pyrocko.guts import Bool from .plugin import PluginConfig, Plugin class DerampConfig(PluginConfig): demean = Bool.T(optional=True, default=True) class Deramp(Plugin): def __init__(self, scene, config=None): self.scene = scene self.config = config or DerampConfig()...
gpl-3.0
5,594,579,679,038,935,000
27.28169
77
0.606076
false
sarvex/tensorflow
tensorflow/python/training/slot_creator.py
9
10200
# 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
1,254,468,155,171,513,000
36.226277
80
0.641569
false
fake-name/ReadableWebProxy
alembic/versions/2019-09-14_5552dfae2cb0_add_hash_function_and_dependent_pgcrpyto.py
1
1402
"""Add has function and dependent pgcrpyto Revision ID: 5552dfae2cb0 Revises: c225ea8fbf5e Create Date: 2019-09-14 06:19:36.520447 """ # revision identifiers, used by Alembic. revision = '5552dfae2cb0' down_revision = 'c225ea8fbf5e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as ...
bsd-3-clause
4,563,255,934,391,378,000
27.612245
113
0.770328
false
AngelkPetkov/titanium_mobile
support/common/markdown/etree_loader.py
136
1287
from markdown import message, CRITICAL import sys ## Import def importETree(): """Import the best implementation of ElementTree, return a module object.""" etree_in_c = None try: # Is it Python 2.5+ with C implemenation of ElementTree installed? import xml.etree.cElementTree as etree_in_c exce...
apache-2.0
-6,243,583,753,512,620,000
38
80
0.625486
false
BruceDai/testkit-lite
testkitlite/engines/bdd.py
4
5938
#!/usr/bin/python # # Copyright (C) 2012 Intel Corporation # # 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 pr...
gpl-2.0
-277,435,149,972,247,840
34.136095
96
0.549343
false
GoSteven/PythonPractice
basic/solution/mimic.py
208
2995
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
apache-2.0
6,752,393,953,761,020,000
29.252525
78
0.694491
false
sgraham/nope
chrome/common/extensions/docs/server2/object_store_creator_test.py
94
1899
#!/usr/bin/env python # 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 unittest from environment import GetAppVersion from test_object_store import TestObjectStore from object_store_creator import O...
bsd-3-clause
-8,496,585,660,257,451,000
34.166667
73
0.685624
false
ryfeus/lambda-packs
Tensorflow_Pandas_Numpy/source3.6/numpy/polynomial/__init__.py
11
1150
""" A sub-package for efficiently dealing with polynomials. Within the documentation for this sub-package, a "finite power series," i.e., a polynomial (also referred to simply as a "series") is represented by a 1-D numpy array of the polynomial's coefficients, ordered from lowest order term to highest. For example, a...
mit
4,276,336,793,805,179,000
41.592593
76
0.78
false
haukurk/qlivestats
qlivestats/core/config.py
1
1253
import yaml import os class BaseConfigError(Exception): pass class ConfigParsingError(BaseConfigError): pass class ConfigReadError(BaseConfigError): pass class BaseHolder(object): def __init__(self, configfile="/etc/qlivestats.yaml"): self.name = self.__class__.__name__.lower() ...
mit
3,480,691,786,184,741,400
25.659574
88
0.602554
false
naritta/numpy
numpy/f2py/cb_rules.py
23
20754
#!/usr/bin/env python """ Build call-back mechanism for f2py2e. Copyright 2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 20...
bsd-3-clause
9,088,062,274,967,377,000
37.504638
238
0.564036
false
RaspberryCoin/RaspberryCoinCore
qa/rpc-tests/forknotify.py
15
2204
#!/usr/bin/env python3 # Copyright (c) 2014-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 -alertnotify # from test_framework.test_framework import BitcoinTestFramework from test_framew...
mit
-7,960,034,582,481,537,000
32.393939
108
0.605263
false
dsoft20/romrenamer
rm.py
1
3004
#Replace game name with the rom name, github: https://github.com/dsoft20 #This script takes the gamelist.xml generated by the Universal XML-Scraper #and replace the scraped name field (<name>) with the rom name # <path>./Game name (Europe).zip</path> # <name>Game name</name> # TO # <path>./Game name (Europe).z...
mit
-8,281,409,172,827,786,000
29.04
332
0.671771
false
jcpowermac/ansible
test/runner/lib/powershell_import_analysis.py
102
2276
"""Analyze powershell import statements.""" from __future__ import absolute_import, print_function import os import re from lib.util import ( display, ) def get_powershell_module_utils_imports(powershell_targets): """Return a dictionary of module_utils names mapped to sets of powershell file paths. :ty...
gpl-3.0
-1,167,632,781,364,284,000
28.558442
134
0.63181
false
resmo/ansible
test/units/modules/network/fortios/test_fortios_user_security_exempt_list.py
21
7891
# Copyright 2019 Fortinet, Inc. # # 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 program is distributed in the...
gpl-3.0
-443,048,741,326,540,200
35.031963
142
0.670384
false
kaniini/aerospike-py
aerospike_py/message.py
1
10055
import asyncio from collections import namedtuple import struct from aerospike_py.connection import Connection, ASConnectionError from aerospike_py.result_code import ASMSGProtocolException class ASIOException(Exception): pass class InvalidMessageException(Exception): pass # --- all messages --- Aerospi...
isc
-3,203,398,103,769,479,000
32.184818
150
0.662854
false
yzl0083/orange
docs/reference/rst/code/freeviz-pca.py
6
1686
# Description: FreeViz projector # Category: projection # Uses: zoo # Referenced: Orange.projection.linear # Classes: Orange.projection.linear.FreeViz, Orange.projection.linear.Projector import Orange import numpy as np tab = Orange.data.Table('titanic') ind = Orange.data.sample.SubsetIndices2(p0=0.99...
gpl-3.0
-6,188,600,318,107,453,000
32.72
83
0.714709
false
pombredanne/similarityPy
tests/algorihtm_tests/mean_test.py
2
1357
from unittest import TestCase from similarityPy.algorithms.mean import Mean from tests import test_logger __author__ = 'cenk' class MeanTest(TestCase): def setUp(self): pass def test_algorithm_with_list(self): test_logger.debug("MeanTest - test_algorithm_with_list Starts") mean = M...
mit
2,047,680,943,459,410,200
35.675676
95
0.59322
false
curiousbadger/pyWitnessSolver
src/lib/Partition.py
1
10104
''' Created on Mar 9, 2016 @author: charper ''' from collections import Counter import logging from lib import lib_dbg_filehandler, lib_consolehandler, lib_inf_filehandler module_logger=logging.getLogger(__name__) module_logger.addHandler(lib_inf_filehandler) module_logger.addHandler(lib_dbg_filehandler) ...
gpl-3.0
-3,282,056,982,195,413,500
40.822034
111
0.544042
false
xiaoxiaoyao/MyApp
PythonApplication1/自己的小练习/Sankey桑基图.py
2
4119
from pyecharts.charts import Sankey from pyecharts import options as opts linkes=[ {'source':'03万','target':'续费后03万','value':20}, {'source':'03万','target':'续费后05万','value':70}, {'source':'03万','target':'续费后10万','value':25}, {'source':'03万','target':'续费后15万','value':12}, {'source':'03万','target':'续费后25万','value':10}, {...
unlicense
-335,884,128,557,556,160
34
88
0.584946
false
KhronosGroup/COLLADA-CTS
StandardDataSets/collada/library_effects/effect/profile_COMMON/technique/lambert/transparent/effect_lambert_transparent_texture_aone/effect_lambert_transparent_texture_aone.py
2
4099
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
mit
-1,201,763,295,549,468,700
52
466
0.708953
false
masia02/chainer
tests/cupy_tests/manipulation_tests/test_split.py
15
1695
import unittest from cupy import testing @testing.gpu class TestSplit(unittest.TestCase): _multiprocess_can_split_ = True @testing.numpy_cupy_array_equal() def test_array_spliti1(self, xp): a = testing.shaped_arange((3, 11), xp) split = xp.array_split(a, 4, 1) return xp.concaten...
mit
-8,884,933,788,094,839,000
28.736842
49
0.59469
false
daevaorn/sentry
src/sentry/quotas/redis.py
1
2795
""" sentry.quotas.redis ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from time import time from sentry.exceptions import InvalidConfiguration from sentry.quotas.base import NotRa...
bsd-3-clause
5,905,162,369,599,147,000
36.266667
144
0.632558
false
Kronuz/pyScss
scss/extension/extra.py
5
16464
"""Functions new to the pyScss library.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import os.path import random import six from six.moves import xrange from scss import config from scss.errors ...
mit
-3,570,999,651,704,590,000
34.559395
230
0.521866
false
HiroIshikawa/21playground
microblog/flask/lib/python3.5/site-packages/pbr/pbr_json.py
41
1228
# Copyright 2011 OpenStack LLC. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # 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 # # htt...
mit
3,666,673,279,361,592,000
35.117647
78
0.692997
false
iblacksand/SimpleDiveMeets
node_modules/dmg-builder/vendor/ds_store/store.py
11
45209
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from __future__ import division import binascii import struct import biplist import mac_alias try: next except NameError: next = lambda x: x.next() try: unicode except NameError: unicode = str from ....
gpl-3.0
4,712,990,719,029,029,000
35.138289
82
0.461236
false
KWierso/treeherder
treeherder/etl/perf.py
1
9481
import copy import logging from hashlib import sha1 from typing import List import simplejson as json from treeherder.log_parser.utils import validate_perf_data from treeherder.model.models import OptionCollection from treeherder.perf.models import (PerformanceDatum, PerformanceFra...
mpl-2.0
7,283,850,430,736,886,000
42.691244
87
0.567134
false
dendisuhubdy/tensorflow
tensorflow/python/ops/image_grad_test.py
18
15052
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-6,814,768,759,958,954,000
38.925729
80
0.61241
false
meghana1995/sympy
sympy/ntheory/generate.py
58
17478
""" Generating and counting primes. """ from __future__ import print_function, division import random from bisect import bisect # Using arrays for sieving instead of lists greatly reduces # memory consumption from array import array as _array from .primetest import isprime from sympy.core.compatibility import as_int...
bsd-3-clause
4,621,076,705,788,751,000
26.83121
76
0.535759
false
skycucumber/xuemc
python/venv/lib/python2.7/site-packages/whoosh/codec/plaintext.py
30
14257
# Copyright 2012 Matt Chaput. 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 notice, # this list of conditions and the...
gpl-2.0
-1,765,292,208,970,344,200
30.542035
78
0.579996
false
faulkner/swampdragon
tests/test_base_model_router_delete.py
13
1163
from swampdragon.route_handler import BaseModelRouter, SUCCESS from swampdragon.serializers.model_serializer import ModelSerializer from swampdragon.testing.dragon_testcase import DragonTestCase from .models import TwoFieldModel class Serializer(ModelSerializer): class Meta: update_fields = ('text', 'numb...
bsd-3-clause
-4,959,001,896,668,782,000
31.305556
74
0.687016
false
openplans/shareabouts-api
src/sa_api_v2/south_migrations/0033_create_clients_for_existing_api_keys.py
2
9942
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): depends_on = ( ("apikey", "0002_auto__add_field_apikey_client"), ) def forwards(self, orm): "Write your forwards methods here." ...
gpl-3.0
-6,644,609,541,796,393,000
75.476923
187
0.550694
false
flacjacket/pywayland
example/surface.py
1
5108
# Copyright 2015 Sean Vig # # 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, sof...
apache-2.0
1,562,376,300,431,030,300
26.76087
88
0.66621
false
ChemiKhazi/Sprytile
rx/backpressure/pausable.py
2
1729
from rx.core import Observable, ObservableBase, Disposable from rx.internal import extensionmethod from rx.disposables import CompositeDisposable from rx.subjects import Subject class PausableObservable(ObservableBase): def __init__(self, source, pauser=None): self.source = source self.controller...
mit
4,046,471,900,322,341,400
28.305085
75
0.660497
false
beck/django
django/apps/config.py
131
8077
import os from importlib import import_module from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured from django.utils._os import upath from django.utils.module_loading import module_has_submodule MODELS_MODULE_NAME = 'models' class AppConfig(object): """ Class representing a Django ap...
bsd-3-clause
-7,752,670,779,774,975,000
38.788177
81
0.601709
false
mfasDa/raadev
analysis/base/DataSet.py
1
10982
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
gpl-3.0
-2,915,359,751,007,681,000
35.36755
118
0.574668
false
chronicwaffle/PokemonGo-DesktopMap
app/pywin/Lib/lib-tk/test/test_ttk/test_extensions.py
38
10397
import sys import unittest import Tkinter as tkinter import ttk from test.test_support import requires, run_unittest, swap_attr from test_ttk.support import AbstractTkTest, destroy_default_root requires('gui') class LabeledScaleTest(AbstractTkTest, unittest.TestCase): def tearDown(self): self.root.update...
mit
-6,336,100,404,727,405,000
34.728522
79
0.597384
false
blackzw/openwrt_sdk_dev1
staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib/python2.7/xml/sax/_exceptions.py
250
4785
"""Different kinds of SAX Exceptions""" import sys if sys.platform[:4] == "java": from java.lang import Exception del sys # ===== SAXEXCEPTION ===== class SAXException(Exception): """Encapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser o...
gpl-2.0
251,745,205,723,551,800
35.526718
79
0.680251
false
cloudsigma/cloud-init
cloudinit/sources/helpers/openstack.py
1
15113
# vi: ts=4 expandtab # # Copyright (C) 2012 Canonical Ltd. # Copyright (C) 2012 Yahoo! Inc. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Joshua Harlow <harlowja@yahoo-inc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gene...
gpl-3.0
-7,917,658,748,366,077,000
33.662844
79
0.531
false
smoitra87/gerbil
deepnet/sparse_coder.py
13
9682
from neuralnet import * from sparse_code_layer import * import scipy.linalg class SparseCoder(NeuralNet): def SetLayerAndEdgeClass(self): self.LayerClass = SparseCodeLayer self.EdgeClass = Edge def Show(self): encoder = self.encoder.params['weight'].asarray() decoder = self.decoder.params['weight'...
bsd-3-clause
4,869,630,504,541,890,000
30.953795
103
0.6541
false
theshadowx/enigma2
lib/python/Screens/HelpMenu.py
13
1630
from Screen import Screen from Components.Pixmap import Pixmap, MovingPixmap from Components.Label import Label from Components.ActionMap import ActionMap from Components.HelpMenuList import HelpMenuList from Screens.Rc import Rc class HelpMenu(Screen, Rc): def __init__(self, session, list): Screen.__init__(self, s...
gpl-2.0
30,548,365,747,224,150
25.721311
77
0.691411
false
NERC-CEH/jules-jasmin
job_runner/job_runner/config/environment.py
1
1725
"""Pylons environment configuration""" import os from mako.lookup import TemplateLookup from pylons.configuration import PylonsConfig from pylons.error import handle_mako_error import job_runner.lib.app_globals as app_globals import job_runner.lib.helpers from job_runner.config.routing import make_map def load_envir...
gpl-2.0
-5,238,014,816,602,831,000
34.9375
77
0.685217
false
neerajvashistha/pa-dude
lib/python2.7/site-packages/docx/opc/part.py
13
8157
# encoding: utf-8 """ Open Packaging Convention (OPC) objects related to package parts. """ from __future__ import ( absolute_import, division, print_function, unicode_literals ) from .compat import cls_method_fn from .oxml import serialize_part_xml from ..oxml import parse_xml from .packuri import PackURI from ...
mit
-7,663,951,193,407,104,000
32.846473
77
0.628908
false
wnoc-drexel/gem5-stable
src/mem/AddrMapper.py
69
3530
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
7,765,328,409,248,755,000
48.027778
72
0.770822
false
joausaga/participa
cparte/test.py
1
9070
from django.test import TestCase from cparte.models import Channel import channel_middleware import ConfigParser import json import re import tweepy class TwitterTestCase(TestCase): fixtures = ['cparte.json'] url = "https://twitter.com/" config = ConfigParser.ConfigParser() config.read('cparte/config...
mit
236,364,786,579,387,870
52.994048
131
0.654686
false
deltreey/ansible
lib/ansible/utils/unicode.py
88
11283
# (c) 2012-2014, Toshio Kuraotmi <a.badger@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
-6,639,795,911,102,284,000
43.596838
79
0.641673
false
DevOps4Networks/ansible
lib/ansible/plugins/lookup/shelvefile.py
132
2906
# (c) 2015, Alejandro Guirao <lekumberri@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
-7,331,589,775,760,689,000
34.012048
104
0.591535
false
PySyncer/shows_sync
shows_sync/providers/output/myanimelist.py
1
2643
from lxml import etree import time import requests import constants as CONSTANTS import urllib import logging from pymal import Mal import sys class MyAnimeList(object): def __init__(self, username, password): self.username = username self.password = password self.mal = Mal.Mal(username, p...
mit
-6,878,175,192,716,910,000
42.311475
122
0.537093
false
soarpenguin/ansible
lib/ansible/plugins/action/fetch.py
42
9898
# (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,222,134,646,279,107,000
45.469484
149
0.58628
false
eyalfa/spark
python/pyspark/ml/wrapper.py
24
12950
# # 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,377,895,958,449,699,000
36.319885
98
0.616139
false
quoclieu/codebrew17-starving
env/lib/python3.5/site-packages/Crypto/Math/Numbers.py
10
5358
# =================================================================== # # Copyright (c) 2014, Legrandin <helderijs@gmail.com> # 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. Redistributio...
mit
-6,440,675,566,534,138,000
35.951724
79
0.657895
false
pplatek/odoo
addons/account_asset/account_asset_invoice.py
193
3070
# -*- encoding: 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 G...
agpl-3.0
7,456,950,067,074,750,000
43.492754
112
0.583713
false
Yannig/ansible
lib/ansible/plugins/action/ce_template.py
65
3803
# # Copyright 2015 Peter Sprygada <psprygada@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...
gpl-3.0
2,359,550,585,992,945,700
35.92233
88
0.621877
false
anton-golubkov/Garland
src/gui/image_convert.py
1
3100
#------------------------------------------------------------------------------- # Copyright (c) 2011 Anton Golubkov. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU Public License v2.0 # which accompanies this distribution, and is available at # http:/...
lgpl-2.1
2,739,386,952,985,313,000
30.632653
80
0.605484
false
michaeljohn32/odoomrp-wip
mrp_product_variants_operations/__openerp__.py
17
1511
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
agpl-3.0
5,520,086,380,306,062,000
36.775
78
0.573792
false
tquilian/exelearningTest
twisted/enterprise/sqlreflector.py
17
11849
# -*- test-case-name: twisted.test.test_reflector -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.enterprise import reflector from twisted.enterprise.util import DBError, getKeyColumn, quote, safe from twisted.enterprise.util import _TableInfo from twisted.enterprise...
gpl-2.0
-3,448,332,031,492,945,000
35.570988
106
0.56241
false
wuhengzhi/chromium-crosswalk
tools/grit/grit/node/io_unittest.py
52
6149
#!/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. '''Unit tests for io.FileNode''' import os import sys if __name__ == '__main__': sys.path.append(os.path.join(os.path.dirname(__...
bsd-3-clause
3,540,910,111,749,043,000
35.820359
97
0.602212
false
cblecker/test-infra
scenarios/kubernetes_bazel.py
12
10166
#!/usr/bin/env python # Copyright 2017 The Kubernetes 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 appli...
apache-2.0
-26,729,983,285,502,500
34.298611
97
0.586366
false
sankhesh/VTK
ThirdParty/Twisted/twisted/trial/_dist/managercommands.py
45
1560
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Commands for reporting test success of failure to the manager. @since: 12.3 """ from twisted.protocols.amp import Command, String, Boolean, ListOf class AddSuccess(Command): """ Add a success. """ arguments = [('testName',...
bsd-3-clause
-8,144,238,084,674,748,000
19.526316
72
0.558333
false
singingwolfboy/invoke
invoke/vendor/yaml3/scanner.py
235
51879
# Scanner produces tokens of the following types: # STREAM-START # STREAM-END # DIRECTIVE(name, value) # DOCUMENT-START # DOCUMENT-END # BLOCK-SEQUENCE-START # BLOCK-MAPPING-START # BLOCK-END # FLOW-SEQUENCE-START # FLOW-MAPPING-START # FLOW-SEQUENCE-END # FLOW-MAPPING-END # BLOCK-ENTRY # FLOW-ENTRY # KEY # VALUE # AL...
bsd-2-clause
-6,645,377,378,860,501,000
34.828039
103
0.529521
false
DasIch/django
tests/serializers/test_json.py
81
9163
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import re from django.core import serializers from django.core.serializers.base import DeserializationError from django.core.serializers.json import DjangoJSONEncoder from django.test import SimpleTestCase, TestCase, TransactionTestCase from ...
bsd-3-clause
7,179,133,480,970,037,000
30.815972
93
0.510313
false
gam-phon/taiga-back
taiga/base/utils/urls.py
3
1794
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2016 Anler Hernández <hello@anler.me> # This ...
agpl-3.0
6,899,503,905,536,076,000
39.704545
90
0.73311
false
vmindru/ansible
test/units/modules/network/nxos/test_nxos_pim.py
44
2195
# (c) 2016 Red Hat Inc. # # 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 dis...
gpl-3.0
4,127,949,063,324,993,000
36.20339
90
0.699772
false
alkyl1978/gnuradio
gr-wxgui/python/wxgui/plotter/channel_plotter.py
57
7757
# # Copyright 2008, 2009, 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later ...
gpl-3.0
283,081,465,240,661,120
30.15261
92
0.669331
false
osvalr/odoo
openerp/addons/__init__.py
378
1537
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
-6,039,887,769,374,298,000
40.540541
78
0.661028
false
strahlc/exaile
xl/migrations/settings/rating.py
5
1797
# Copyright (C) 2008-2010 Adam Olsen # # 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, or (at your option) # any later version. # # This program is distributed in the hope that...
gpl-2.0
3,628,690,341,367,220,000
42.829268
84
0.741792
false
shipci/sympy
sympy/external/importtools.py
85
7294
"""Tools to assist importing optional external modules.""" from __future__ import print_function, division import sys # Override these in the module to change the default warning behavior. # For example, you might set both to False before running the tests so that # warnings are not printed to the console, or set bo...
bsd-3-clause
-2,389,749,522,724,141,000
41.16185
89
0.646696
false
lokkju/gr-smartnet
docs/doxygen/doxyxml/text.py
333
1832
# # Copyright 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
gpl-3.0
-2,632,073,359,134,840,300
31.714286
104
0.679585
false
jmt4/django-oscar
tests/integration/offer/fixed_price_benefit_tests.py
53
3007
from decimal import Decimal as D from django.test import TestCase import mock from oscar.apps.offer import models from oscar.test import factories from oscar.test.basket import add_product, add_products class TestAFixedPriceDiscountAppliedWithCountCondition(TestCase): def setUp(self): range = models.Ra...
bsd-3-clause
-7,427,354,696,532,030,000
45.261538
80
0.672764
false