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
nwswanson/epulorimiter
lib/wtforms/ext/appengine/ndb.py
174
17124
""" Form generation utilities for App Engine's new ``ndb.Model`` class. The goal of ``model_form()`` is to provide a clean, explicit and predictable way to create forms based on ``ndb.Model`` classes. No malabarism or black magic should be necessary to generate a form for models, and to add custom non-model related fi...
gpl-2.0
-5,817,075,348,677,974,000
39.966507
128
0.554777
false
mushkevych/scheduler
tests/test_site_monthly_aggregator.py
1
1475
__author__ = 'Bohdan Mushkevych' import unittest from settings import enable_test_mode enable_test_mode() from db.model.site_statistics import DOMAIN_NAME, TIMEPERIOD from constants import PROCESS_SITE_MONTHLY from tests import daily_fixtures from tests import monthly_fixtures from tests.test_abstract_worker import A...
bsd-3-clause
7,099,906,112,661,198,000
37.815789
101
0.601356
false
gnuhub/intellij-community
python/lib/Lib/decimal.py
74
183326
# Copyright (c) 2004 Python Software Foundation. # All rights reserved. # Written by Eric Price <eprice at tjhsst.edu> # and Facundo Batista <facundo at taniquetil.com.ar> # and Raymond Hettinger <python at rcn.com> # and Aahz <aahz at pobox.com> # and Tim Peters # This module is currently Py2.3 compatibl...
apache-2.0
-7,333,113,447,127,173,000
34.43901
100
0.546758
false
gavruskin/microinteractions
data_preprocess_Development.py
1
9649
import pandas as pd data = pd.read_csv("DevelopmentData.csv") n = len(data.columns) # Add all parameters (Taylor coefficients) as 0 in rows following the data: for i in range(data.shape[0]): for j in range(n+2, n+34): data.set_value(i, j, 0) data.rename(columns={n+2: "a", n+3: "a1", n+4: "a2"...
mit
-1,746,706,876,334,249,500
31.597973
91
0.603793
false
belokop-an/agenda-tools
code/htdocs/contributionModification.py
1
3733
from MaKaC.webinterface.rh import contribMod def index(req, **params): return contribMod.RHContributionModification( req ).process( params ) def newPrimAuthor(req, **params): return contribMod.RHNewPrimaryAuthor( req ).process( params ) def searchPrimAuthor(req, **params): return contribMod.RHSearchPrima...
gpl-2.0
-509,261,344,922,956,700
29.598361
80
0.728904
false
dydek/django
django/contrib/gis/utils/layermapping.py
8
27310
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: https://docs.djangoproject.com/en/dev/ref/contrib/gi...
bsd-3-clause
4,817,698,132,461,780,000
42.556619
118
0.574332
false
eoyilmaz/anima
anima/mocap/xsens.py
1
5719
# -*- coding: utf-8 -*- from collections import namedtuple # Data containers Header = namedtuple( 'Header', ['sample_counter', 'datagram_counter', 'num_items', 'timecode', 'charID', 'extra_data'] ) Euler = namedtuple( 'Euler', ['segment_ID', 'tx', 'ty', 'tz', 'rx', 'ry', 'rz'] ) Quaternion = nam...
mit
7,722,430,959,091,174,000
31.134831
84
0.472111
false
GreenLunar/Bookie
bookie/tests/test_models/test_bmark.py
7
2534
"""Test the basics including the bmark and tags""" from bookie.models import ( DBSession, Bmark, ) from bookie.models.auth import User from bookie.tests import gen_random_word from bookie.tests import TestDBBase class TestBmark(TestDBBase): """Handle bmark function checks""" def test_has_access_sa...
agpl-3.0
3,446,626,755,637,052,000
29.53012
79
0.577743
false
mozilla/pontoon
pontoon/sync/formats/ftl.py
2
5349
import codecs import copy import logging from fluent.syntax import ast, FluentParser, FluentSerializer from pontoon.sync.exceptions import SyncError from pontoon.sync.formats.base import ParsedResource from pontoon.sync.utils import create_parent_directory from pontoon.sync.vcs.models import VCSTranslation log = log...
bsd-3-clause
-1,569,087,156,880,692,700
29.565714
80
0.544401
false
martydill/url_shortener
code/venv/lib/python2.7/site-packages/mimeparse.py
31
6452
"""MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 Contents: - parse_mi...
mit
1,313,665,026,185,155,300
37.404762
80
0.614693
false
viggates/nova
nova/tests/integrated/v3/test_console_output.py
31
1106
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
930,504,969,293,503,500
39.962963
78
0.688065
false
hynnet/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/bsddb/dbutils.py
157
2964
#------------------------------------------------------------------------ # # Copyright (C) 2000 Autonomous Zone Industries # # License: This is free software. You may use this software for any # purpose including modification/redistribution, so long as # this header remains intact and...
gpl-2.0
-174,053,122,856,143,000
34.710843
77
0.599528
false
ofek/bit
tests/test_base58.py
1
1028
import pytest from bit.base58 import b58decode, b58decode_check, b58encode, b58encode_check from bit.format import MAIN_PUBKEY_HASH from .samples import BINARY_ADDRESS, BITCOIN_ADDRESS, PUBKEY_HASH def test_b58encode(): assert b58encode(BINARY_ADDRESS) == BITCOIN_ADDRESS assert b58encode(BINARY_ADDRESS[:1]) ...
mit
-8,749,311,418,652,603,000
30.151515
81
0.712062
false
mitchrule/Miscellaneous
Django_Project/django/Lib/site-packages/django/contrib/gis/management/commands/ogrinspect.py
111
5738
import argparse import inspect from django.contrib.gis import gdal from django.core.management.base import BaseCommand, CommandError class LayerOptionAction(argparse.Action): """ Custom argparse action for the `ogrinspect` `layer_key` keyword option which may be an integer or a string. """ def __...
mit
3,514,175,149,034,137,000
49.333333
113
0.610143
false
CylanceSPEAR/IntroductionToMachineLearningForSecurityPros
IDPanel/train_lr_model.py
1
4200
from idpanel.training.vectorization import load_raw_feature_vectors from idpanel.training.features import load_raw_features from idpanel.labels import load_labels from sklearn.cross_validation import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.metrics import confusion_matrix import...
gpl-3.0
-5,467,815,361,093,970,000
37.181818
114
0.625
false
Nexenta/s3-tests
virtualenv/lib/python2.7/site-packages/gevent/util.py
10
2050
# Copyright (c) 2009 Denis Bilenko. See LICENSE for details. __all__ = ['wrap_errors', 'lazy_property'] class wrap_errors(object): """Helper to make function return an exception, rather than raise it. Because every exception that is unhandled by greenlet will be logged, it is desirable to prevent non-err...
mit
9,069,504,303,914,436,000
30.538462
97
0.600976
false
snorp/web-page-replay
mockhttprequest.py
40
2150
#!/usr/bin/env python # Copyright 2010 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...
apache-2.0
-3,423,449,302,092,987,400
35.440678
77
0.662326
false
bonitadecker77/python-for-android
python-modules/twisted/twisted/web/http.py
52
59442
# -*- test-case-name: twisted.web.test.test_http -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ HyperText Transfer Protocol implementation. This is used by twisted.web. Future Plans: - HTTP client support will at some point be refactored to support HTTP/1.1. - Accept chun...
apache-2.0
-8,128,036,108,320,843,000
32.078464
125
0.581525
false
CoherentLabs/depot_tools
recipes/infra.py
4
1173
# 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 sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
bsd-3-clause
-2,115,652,398,765,688,600
23.957447
73
0.601876
false
laiqiqi886/kbengine
kbe/src/lib/python/Lib/encodings/iso8859_15.py
272
13212
""" Python Character Mapping Codec iso8859_15 generated from 'MAPPINGS/ISO8859/8859-15.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
lgpl-3.0
4,910,357,755,288,440,000
42.035831
109
0.518317
false
avedaee/DIRAC
FrameworkSystem/scripts/dirac-myproxy-upload.py
14
1686
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-proxy-init.py # Author : Adrian Casajus ######################################################################## __RCSID__ = "$Id$" import sys import getpass import DIRAC from DIRAC.Core.Base i...
gpl-3.0
8,235,232,307,675,703,000
25.34375
88
0.650059
false
aelthwin/Battle-for-Wesnoth--Zombie-Edition
scons/sdl.py
5
4068
# vi: syntax=python:et:ts=4 import os from SCons.Script import * from config_check_utils import * def CheckSDL(context, sdl_lib = "SDL", require_version = None): if require_version: version = require_version.split(".", 2) major_version = int(version[0]) minor_version = int(version[1]) ...
gpl-2.0
5,691,705,483,993,577,000
31.031496
145
0.531957
false
ikaee/bfr-attendant
facerecognitionlibrary/jni-build/jni/include/tensorflow/contrib/metrics/python/kernel_tests/set_ops_test.py
22
34996
# 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
6,781,239,525,449,680,000
34.278226
80
0.497343
false
sqlalchemy/alembic
alembic/util/messaging.py
2
2692
from collections.abc import Iterable import logging import sys import textwrap import warnings from sqlalchemy.engine import url from . import sqla_compat from .compat import binary_type from .compat import string_types log = logging.getLogger(__name__) # disable "no handler found" errors logging.getLogger("alembic...
mit
-6,916,258,975,053,998,000
25.135922
79
0.602897
false
EdLeafe/pyrax
samples/images/export_task.py
13
2383
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c)2014 Rackspace US, 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.ap...
apache-2.0
-2,548,738,818,217,956,400
30.355263
80
0.67436
false
tafaRU/account-financial-tools
__unported__/account_move_template/wizard/select_template.py
7
10189
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) # # This program is free software: you can redistribute it and/or modi...
agpl-3.0
-1,544,787,811,724,058,400
36.737037
78
0.504858
false
aganzha/tweepy
tweepy/streaming.py
1
16268
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. # Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets from __future__ import absolute_import, print_function import logging import requests from requests.exceptions import Timeout from thre...
mit
-3,441,587,163,604,907,500
35.231626
106
0.546902
false
rosarior/rua
rua/apps/permissions/migrations/0001_initial.py
4
5607
# encoding: utf-8 from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Permission' db.create_table('permissions_permission', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ...
gpl-3.0
-6,359,721,924,134,243,000
53.970588
161
0.589263
false
jetty840/ReplicatorG
skein_engines/skeinforge-35/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py
6
43737
""" This page is in the table of contents. Skeiniso is an analysis script to display a gcode file in an isometric view. The skeiniso manual page is at: http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Skeiniso ==Operation== The default 'Activate Skeiniso' checkbox is on. When it is on, the functions desc...
gpl-2.0
-3,032,917,172,814,936,600
48.36456
957
0.763816
false
nschaetti/EchoTorch
examples/generation/narma10_esn_feedbacks.py
1
3043
# -*- coding: utf-8 -*- # # File : examples/timeserie_prediction/switch_attractor_esn # Description : NARMA 30 prediction with ESN. # Date : 26th of January, 2018 # # This file is part of EchoTorch. EchoTorch is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # Licen...
gpl-3.0
2,895,090,207,993,003,500
28.543689
100
0.734144
false
lzw120/django
tests/regressiontests/many_to_one_regress/models.py
124
1396
""" Regression tests for a few ForeignKey bugs. """ from django.db import models # If ticket #1578 ever slips back in, these models will not be able to be # created (the field names being lower-cased versions of their opposite # classes is important here). class First(models.Model): second = models.IntegerField(...
bsd-3-clause
-605,078,995,199,431,600
29.347826
80
0.708453
false
virtuald/pynsq
setup.py
1
1354
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno...
mit
725,036,700,026,116,100
26.632653
72
0.615214
false
Hikari-no-Tenshi/android_external_skia
tools/skpbench/_hardware_pixel2.py
12
4472
# Copyright 2018 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from _hardware import Expectation from _hardware_android import HardwareAndroid CPU_CLOCK_RATE = 2035200 MEM_CLOCK_RATE = 13763 GPU_CLOCK_RATE = 670000000 GPU_POWER_LEVEL = 1 # lower i...
bsd-3-clause
283,019,268,900,692,350
36.579832
80
0.621646
false
swatilodha/coala
tests/output/ConfWriterTest.py
26
2819
import os import tempfile import unittest from coalib.output.ConfWriter import ConfWriter from coalib.parsing.ConfParser import ConfParser class ConfWriterTest(unittest.TestCase): example_file = ("to be ignored \n" " save=true\n" " a_default, another = val \n" ...
agpl-3.0
-4,108,384,563,005,265,000
37.616438
77
0.425683
false
DataDog/integrations-core
ibm_mq/datadog_checks/ibm_mq/collectors/stats_collector.py
1
4767
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from pymqi.CMQCFC import MQCMD_STATISTICS_CHANNEL, MQCMD_STATISTICS_Q from datadog_checks.ibm_mq.stats.base_stats import BaseStats from datadog_checks.ibm_mq.stats.queue_stats import QueueStats from ..m...
bsd-3-clause
4,378,983,449,848,918,500
41.945946
114
0.611496
false
netmanchris/PYHPEIMC
archived/pyhpimc.py
3
35486
#!/usr/bin/env python3 # author: @netmanchris """ Copyright 2015 Hewlett Packard Enterprise Development LP 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/lic...
apache-2.0
5,006,875,680,719,793,000
41.045024
644
0.657809
false
gonboy/sl4a
python/src/Demo/pdist/rrcs.py
47
3993
#! /usr/bin/env python "Remote RCS -- command line interface" import sys import os import getopt import string import md5 import tempfile from rcsclient import openrcsclient def main(): sys.stdout = sys.stderr try: opts, rest = getopt.getopt(sys.argv[1:], 'h:p:d:qvL') if not rest: ...
apache-2.0
-5,787,019,018,167,917,000
23.95625
71
0.515402
false
kevenli/FeedIn
tests/util/etreetodicttests.py
2
1761
# -*- coding: utf-8 -*- ''' Created on 2014��11��21�� @author: ��� ''' import unittest from lxml.etree import Element from feedin import util class Test(unittest.TestCase): def test_etree_to_dict(self): root = Element('div') root.append(Element('a', {'href': 'http://aaa.bbb/'})) result =...
apache-2.0
1,726,964,570,116,123,000
29.068966
69
0.540448
false
bgxavier/nova
nova/tests/unit/api/openstack/test_common.py
38
23913
# Copyright 2010 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 requ...
apache-2.0
1,379,386,230,785,718,000
40.952632
78
0.60327
false
ljnutal6/media-recommend
app/virtualenvs/recommedia/lib/python2.7/site-packages/pip/vendor/html5lib/trie/py.py
80
1774
from __future__ import absolute_import, division, unicode_literals from pip.vendor.six import text_type from bisect import bisect_left from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): if not all(isinstance(x, text_type) for x in data.keys()): raise TypeError(...
gpl-2.0
-1,381,304,061,357,224,700
25.477612
66
0.552988
false
mozilla/ichnaea
ichnaea/webapp/app.py
1
1488
""" Holds global web application state and the WSGI handler. You can run this script for a one-process webapp. Further, you can pass in ``--check`` which will create the app and then exit making it easier to suss out startup and configuration issues. """ import sys from waitress import serve from ichnaea.conf imp...
apache-2.0
2,826,358,123,356,549,600
23.8
76
0.652554
false
hhg2288/mkdocs
mkdocs/tests/config/config_tests.py
27
7563
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import os import shutil import tempfile import unittest from mkdocs import config from mkdocs import utils from mkdocs.config import config_options from mkdocs.exceptions import ConfigurationError from mkdocs.tests.base import dedent def ...
bsd-2-clause
-8,498,583,348,184,588,000
34.341121
83
0.529287
false
mgamer/gyp
test/defines/gyptest-defines-env-regyp.py
268
1350
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies build of an executable with C++ define specified by a gyp define, and the use of the environment during regeneration when the g...
bsd-3-clause
-6,343,266,060,352,900,000
25.470588
80
0.72963
false
rysson/filmkodi
plugin.video.mrknow/mylib/_pydev_bundle/_pydev_filesystem_encoding.py
50
1095
import sys def __getfilesystemencoding(): ''' Note: there's a copy of this method in interpreterInfo.py ''' try: ret = sys.getfilesystemencoding() if not ret: raise RuntimeError('Unable to get encoding.') return ret except: try: #Handle Jytho...
apache-2.0
1,525,762,225,558,611,000
25.707317
110
0.536073
false
josephwilk/qscintilla
Python/configure-old.py
3
14886
# This script configures QScintilla for PyQt v3 and/or v4. # # Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com> # # This file is part of QScintilla. # # This file may be used under the terms of the GNU General Public License # version 3.0 as published by the Free Software Foundation and ap...
gpl-3.0
-5,943,953,250,607,968,000
34.697842
195
0.629383
false
ReactiveX/RxPY
tests/test_observable/test_map.py
1
12515
import unittest from rx import Observable, return_value, throw, empty, create from rx.testing import TestScheduler, ReactiveTest from rx.disposable import SerialDisposable from rx.operators import map, map_indexed on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_erro...
mit
3,369,721,882,812,496,400
32.196286
118
0.535597
false
liveblog/superdesk
server/apps/archived/archived.py
5
2238
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from eve.uti...
agpl-3.0
-833,867,324,872,695,200
30.971429
120
0.656836
false
AnnalisaS/migration_geonode
geonode/catalogue/backends/pycsw_local.py
8
5656
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
gpl-3.0
1,561,721,165,937,707,500
35.96732
130
0.58575
false
splaice/Virtbox
tests/functional.py
1
1841
# -*- coding: utf-8 -*- """ This module contains the functional tests for using virbox. :copyright: (c) 2012 by Sean Plaice :license: ISC, see LICENSE for more details. """ #import logging #import testify # #from virtbox.manage import ( # modifyvm, # storageattach, # startvm, # ) #from vir...
isc
3,461,058,510,328,671,000
29.683333
74
0.577947
false
blueboxgroup/nova
nova/tests/unit/virt/test_imagecache.py
63
7011
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
5,468,539,680,693,303,000
39.761628
78
0.559692
false
proversity-org/edx-platform
lms/djangoapps/grades/tests/base.py
14
4306
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from lms.djangoapps.course_blocks.api import get_course_blocks from openedx.core.djangolib.testing.utils import get_mock_request from student.models import CourseEnrollment from student.tests.factories import UserFactory from xmodule.modulesto...
agpl-3.0
-756,047,252,493,387,900
38.504587
117
0.553182
false
aeron15/luigi
test/wrap_test.py
72
2886
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
5,711,729,161,812,691,000
25.971963
141
0.643798
false
lbernau/smarthome
tests/mock/core.py
2
6808
import os import datetime import dateutil.tz import logging import lib.config import lib.connection import lib.item import lib.plugin from lib.shtime import Shtime from lib.module import Modules import lib.utils from lib.model.smartplugin import SmartPlugin from lib.constants import (YAML_FILE, CONF_FILE, DEFAULT_F...
gpl-3.0
2,713,218,963,109,509,600
29.945455
152
0.57785
false
od-eon/django-fts-odeon
fts/backends/unported/simple.py
2
3124
"Simple Fts backend" import os from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db.models import Q from django.db import transaction from fts.backends.base import BaseClass, BaseModel, BaseManager from fts.models import IndexWord, Index ...
bsd-3-clause
-1,322,868,830,046,021,000
34.325581
151
0.545455
false
giltis/scikit-xray
skxray/core/tests/test_calibration.py
3
4493
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # @author: Li Li (lili@bnl.g...
bsd-3-clause
-1,842,919,412,499,855,600
45.319588
73
0.508569
false
Titan-C/scikit-learn
sklearn/linear_model/omp.py
8
31640
"""Orthogonal matching pursuit algorithms """ # Author: Vlad Niculae # # License: BSD 3 clause import warnings import numpy as np from scipy import linalg from scipy.linalg.lapack import get_lapack_funcs from .base import LinearModel, _pre_fit from ..base import RegressorMixin from ..utils import as_float_array, ch...
bsd-3-clause
-177,021,436,470,604,220
35.367816
79
0.604772
false
unifycore/ryu
ryu/ofproto/ofproto_v1_0.py
11
28910
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # ...
apache-2.0
2,075,096,537,713,241,000
34.913043
79
0.674645
false
bnbowman/MetagenomicTools
src/pbmgx/nucmer/segment.py
2
2790
#! /usr/bin/env python __author__ = 'bbowman@pacificbiosciences.com' class Segment( object ): """ A Class for representing a segment of a Nucmer Alignment """ def __init__(self, start, end, source=None): assert isinstance(start, int) assert isinstance(end, int) assert start !=...
bsd-3-clause
577,823,873,102,683,000
25.330189
86
0.573118
false
tkhirianov/kpk2016
graphs/input_graph.py
1
2588
import networkx import matplotlib.pyplot as plt def input_edges_list(): """считывает список рёбер в форме: в первой строке N - число рёбер, затем следует N строк из двух слов и одного числа слова - названия вершин, концы ребра, а число - его вес return граф в форме словаря рёбер и соответствую...
gpl-3.0
6,082,997,356,407,498,000
27.168831
73
0.624712
false
justinpotts/mozillians
vendor-local/lib/python/markdown/extensions/abbr.py
11
3057
''' Abbreviation Extension for Python-Markdown ========================================== This extension adds abbreviation handling to Python-Markdown. Simple Usage: >>> import markdown >>> text = """ ... Some text with an ABBR and a REF. Ignore REFERENCE and ref. ... ... *[ABBR]: Abb...
bsd-3-clause
2,323,769,038,129,900,000
29.84375
148
0.573111
false
kogotko/carburetor
horizon/contrib/bootstrap_datepicker.py
87
1584
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
-4,007,550,032,030,140,000
22.294118
75
0.499369
false
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/tools/swarming_client/swarming.py
1
46560
#!/usr/bin/env python # Copyright 2013 The Swarming Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 that # can be found in the LICENSE file. """Client tool to trigger tasks or retrieve results from a Swarming server.""" __version__ = '0.8.2' import collection...
mit
4,742,297,272,377,951,000
31.951168
80
0.641624
false
freakynit/kaggle-ndsb
configurations/featharalick_convroll5_preinit_resume_drop@420.py
6
2821
import numpy as np import theano import theano.tensor as T import lasagne as nn import data import load import nn_plankton import dihedral import tmp_dnn import tta features = [ # "hu", # "tutorial", "haralick", # "aaronmoments", # "lbp", # "pftas", # "zernike_moments", # "image_siz...
mit
-1,826,745,448,666,668,000
30.707865
143
0.685218
false
lgeiger/ide-python
lib/debugger/VendorLib/vs-py-debugger/pythonFiles/jedi/common/context.py
12
1798
class BaseContext(object): def __init__(self, evaluator, parent_context=None): self.evaluator = evaluator self.parent_context = parent_context def get_root_context(self): context = self while True: if context.parent_context is None: return context ...
mit
8,847,714,973,644,918,000
25.835821
89
0.536151
false
labcodes/django
django/contrib/gis/gdal/prototypes/ds.py
189
4413
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_long, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
bsd-3-clause
1,447,997,754,597,354,200
53.481481
100
0.732608
false
zephyrplugins/zephyr
zephyr.plugin.jython/jython2.5.2rc3/Lib/test/test_datetime.py
17
131537
"""Test date/time type. See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases """ import os import sys import pickle import cPickle import unittest from test import test_support from datetime import MINYEAR, MAXYEAR from datetime import timedelta from datetime import tzinfo from datetime import time from da...
epl-1.0
7,797,972,768,468,651,000
39.017341
80
0.565826
false
mkhutornenko/incubator-aurora
src/main/python/apache/aurora/client/binding_helper.py
1
4930
# # 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 ...
apache-2.0
-7,184,163,350,143,157,000
37.515625
93
0.743205
false
hogarthj/ansible
lib/ansible/modules/network/nxos/nxos_interface_ospf.py
29
17076
#!/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
2,038,966,795,493,178,600
37.897494
120
0.597095
false
sublime1809/django
tests/generic_views/test_detail.py
19
5272
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.test import TestCase, override_settings from django.views.generic.base import View from .models import Artist, Author, Page @override_settings(ROOT_URLCONF='generic_views.urls') class Deta...
bsd-3-clause
9,140,826,543,740,030,000
47.814815
94
0.68475
false
pombredanne/drf-generators
drf_generators/templates/viewset.py
2
2003
__all__ = ['VIEW_SET_URL', 'VIEW_SET_VIEW'] VIEW_SET_URL = """from rest_framework.routers import SimpleRouter from {{ app }} import views router = SimpleRouter() {% for model in models %} router.register(r'{{ model | lower }}', views.{{ model }}ViewSet, '{{model}}'){% endfor %} urlpatterns = router.urls """ VIE...
mit
6,819,749,945,244,757,000
31.306452
90
0.616076
false
mioann47/mobile-app-privacy-analyzer
mypythonscripts/AndroBugs_Framework-master/tools/modified/androguard/core/analysis/ganalysis.py
7
112699
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # 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...
gpl-3.0
-8,647,798,780,298,265,000
31.310493
344
0.519073
false
eggplantbren/DNest4
python/dnest4/builder.py
1
7221
from __future__ import print_function import numpy as np from .distributions import * __all__ = ["Model", "Node", "data_declaration", "data_definition",\ "generate_h", "generate_cpp"] class Model: def __init__(self): self.nodes = [] self.indices = {} self.num_params = 0 d...
mit
1,760,695,089,332,572,200
32.742991
100
0.456585
false
drpaneas/linuxed.gr
lib/python2.7/site-packages/paramiko/sftp_file.py
34
19081
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 2.1 of the License, or (a...
mit
2,379,686,336,631,327,000
37.940816
122
0.590273
false
akash1808/nova_test_latest
nova/tests/unit/objects/test_bandwidth_usage.py
20
4910
# 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 # d...
apache-2.0
-560,019,095,732,082,100
37.661417
79
0.610591
false
alinbalutoiu/tempest
tempest/services/compute/json/services_client.py
9
2135
# Copyright 2013 NEC Corporation # Copyright 2013 IBM Corp. # 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-...
apache-2.0
8,463,418,302,742,541,000
36.45614
78
0.665574
false
acsone/sale-workflow
sale_service_fleet/report/project_report.py
9
1101
# -*- coding: utf-8 -*- # (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel # (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields from openerp import tools class ReportProjectTaskUser(models.Model): _inherit = 'report.p...
agpl-3.0
-3,721,506,666,057,585,700
36.896552
77
0.595086
false
fusionpig/ansible
v1/ansible/module_utils/gce.py
305
4179
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
-9,159,662,015,868,070,000
43.935484
92
0.693946
false
tecnologiaenegocios/tn.plonemailing
src/tn/plonemailing/converter.py
1
2960
from five import grok from htmlentitydefs import entitydefs from plone.intelligenttext.transforms import \ convertHtmlToWebIntelligentPlainText from tn.plonemailing import interfaces import lxml.html import re links_with_href_re = re.compile( r'(?m)<a([^<]+)href="([^<"]+)"([^<]*)>([^<]+)<\/a>', re.IGNOREC...
bsd-3-clause
-285,694,762,499,224,540
34.238095
79
0.605068
false
reedessick/lvalertTest
bin/sanityCheck_FakeDb.py
1
10948
#!/usr/bin/python usage = "sanityCheck_FakeDb.py [--options]" description = "provides unit tests and basic checks of FakeDb functionality" author = "reed.essick@ligo.org" #------------------------------------------------- import os import random from ligoTest.gracedb.rest import FakeDb import simUtils as utils im...
mit
3,825,498,371,247,596,000
33.64557
161
0.555535
false
mikebenfield/scipy
benchmarks/benchmarks/go_benchmark_functions/go_funcs_E.py
35
9862
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import from numpy import abs, asarray, cos, exp, arange, pi, sin, sqrt, sum from .go_benchmark import Benchmark class Easom(Benchmark): r""" Easom objective function. This class defines the Easom [1]_ global optimization ...
bsd-3-clause
-4,719,643,329,706,358,000
31.228758
97
0.540763
false
eeshangarg/oh-mainline
vendor/packages/Django/django/contrib/gis/db/models/query.py
93
36167
from django.db import connections from django.db.models.query import QuerySet, ValuesQuerySet, ValuesListQuerySet from django.contrib.gis import memoryview from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models.fields import get_srid_info, PointField, LineStringField from django.contrib....
agpl-3.0
-3,753,223,508,577,374,000
45.249361
124
0.588686
false
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/YouTube/Channels/ListChannelsByID.py
5
6409
# -*- coding: utf-8 -*- ############################################################################### # # ListChannelsByID # Returns a list of channels that match the list of IDs provided. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "Licen...
apache-2.0
-2,109,163,522,930,628,000
47.55303
279
0.687627
false
YongseopKim/crosswalk-test-suite
wrt/wrt-packertool-android-tests/metacomm/combinatorics/combinatorics.py
33
1259
#=============================================================================== # code from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465 # all (c) etc. are of the authors of this procedures, see link above #=============================================================================== def ...
bsd-3-clause
-9,211,260,203,536,967,000
29.475
80
0.453535
false
ezarko/cfn-init
comtypes/test/test_server.py
1
10411
import atexit, os, unittest ##import comtypes import comtypes.typeinfo, comtypes.client class TypeLib(object): """This class collects IDL code fragments and eventually writes them into a .IDL file. The compile() method compiles the IDL file into a typelibrary and registers it. A function is also ...
apache-2.0
5,599,584,163,406,590,000
33.776632
96
0.554029
false
XXMrHyde/android_external_chromium_org
native_client_sdk/src/tools/tests/sel_ldr_test.py
104
2080
#!/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 os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARENT_DIR = os.path.dirname(SCRIPT_DIR) ...
bsd-3-clause
7,604,992,452,091,700,000
34.254237
74
0.61875
false
SciTools/biggus
biggus/tests/integration/test_maths.py
3
1427
# (C) British Crown Copyright 2015 - 2016, Met Office # # This file is part of Biggus. # # Biggus 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) a...
gpl-3.0
5,358,080,508,513,192,000
31.431818
75
0.711282
false
saydulk/django
tests/postgres_tests/test_array.py
70
19822
import decimal import json import unittest import uuid from django import forms from django.core import exceptions, serializers, validators from django.core.management import call_command from django.db import IntegrityError, connection, models from django.test import TransactionTestCase, override_settings from django...
bsd-3-clause
-1,846,219,875,327,906,000
37.340426
140
0.634396
false
krzysztofwos/BitcoinUnlimited
qa/rpc-tests/mempool_limit.py
8
2293
#!/usr/bin/env python3 # Copyright (c) 2014-2015 The Bitcoin Core developers # Copyright (c) 2015-2017 The Bitcoin Unlimited developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test mempool limiting together/eviction with...
mit
-7,099,063,750,310,747,000
40.690909
119
0.656345
false
otherness-space/myProject002
my_project_002/lib/python2.7/site-packages/django/contrib/localflavor/fr/forms.py
100
2008
""" FR-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.fr.fr_department import DEPARTMENT_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import CharField, RegexField,...
mit
4,200,102,691,934,227,500
34.22807
99
0.640936
false
bennomadic/django-webid-provider
src/django_webid/provider/webiduri.py
1
3264
import types from django.conf import settings from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext, TemplateDoesNotExist from django.utils.decorators import classonlymethod from django_conneg.views import ContentNegotiatedView from django_conneg.decorators impo...
gpl-2.0
-7,759,710,218,652,460,000
34.478261
83
0.595895
false
JustArchi/program-y
src/programy/config/brain.py
2
8932
""" Copyright (c) 2016 Keith Sterling 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, distribute,...
mit
-6,516,297,829,428,607,000
36.847458
134
0.640506
false
AnnaWyszomirska/lesson1_1
tests/test_change_in_the contact.py
1
1546
from model.contact import Contact from random import randrange def test_change_in_the_contact(app,db): if len(db.get_contact_list()) == 0: app.contact.add(Contact(bday="//div[@id='content']/form/select[1]//option[4]", bmonth= "//div[@id='content']/form/select[2]//option[3]"...
apache-2.0
8,052,814,881,731,668,000
54.214286
101
0.514877
false
VaibhavAgarwalVA/sympy
sympy/simplify/powsimp.py
39
26056
from __future__ import print_function, division from collections import defaultdict from sympy.core.function import expand_log, count_ops from sympy.core import sympify, Basic, Dummy, S, Add, Mul, Pow, expand_mul, factor_terms from sympy.core.compatibility import ordered, default_sort_key, reduce from sympy.core.numb...
bsd-3-clause
-3,214,060,950,495,625,000
36.276109
110
0.494013
false
highweb-project/highweb-webcl-html5spec
build/config/mac/mac_app.py
21
2701
# Copyright (c) 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. import argparse import errno import os import subprocess import sys def MakeDirectories(path): try: os.makedirs(path) except OSError as exc: ...
bsd-3-clause
-2,820,320,347,789,209,000
26.282828
78
0.643465
false
automl/RoBO
robo/acquisition_functions/log_ei.py
1
4117
import logging from scipy.stats import norm import numpy as np from robo.acquisition_functions.base_acquisition import BaseAcquisitionFunction logger = logging.getLogger(__name__) class LogEI(BaseAcquisitionFunction): def __init__(self, model, par=0.0, **kwargs): r""" Computes for a given x th...
bsd-3-clause
65,689,105,968,901,290
32.745902
85
0.485548
false
40223134/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/encodings/aliases.py
726
15414
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. Con...
gpl-3.0
9,187,882,824,865,854,000
27.334559
83
0.420202
false
finklabs/banana
tests/test_template.py
1
3235
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import os try: from banana import template TEMPLATE_MISSING = False except ImportError: TEMPLATE_MISSING = True import pytest from .helpers import create_tempfile, cleanup_tempfiles, temp_folder from . import here @pytest.ma...
mit
2,647,294,753,277,708,000
26.887931
80
0.673879
false
dotKom/onlineweb4
apps/marks/models.py
1
8113
# -*- coding: utf-8 -*- from datetime import date, datetime, timedelta from django.conf import settings from django.db import models from django.utils import timezone from django.utils.translation import ugettext as _ User = settings.AUTH_USER_MODEL DURATION = 30 # summer starts 1st June, ends 15th August SUMMER = ...
mit
6,720,799,509,996,727,000
35.372197
116
0.64394
false
raj-krishnan/PyAlpha
pyalpha/alpha/stock_lists.py
1
23247
""" Contains lists of stocks in the S&P100 and S&P500. NOTE ==== Some of the stocks have been commented out due to errors arising when on attempting to procure their data using ystockquote. ISSUE: https://github.com/cgoldberg/ystockquote/issues/43 """ SNP100 = [ "AAPL", # Apple Inc. "ABBV", # AbbV...
apache-2.0
5,215,947,652,637,566,000
36.313002
79
0.468081
false
PXke/invenio
invenio/legacy/websubmit/functions/Print_Success_CPLX.py
4
2815
## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later ...
gpl-2.0
2,962,244,565,807,847,000
45.147541
205
0.651865
false