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
swirkert/ipcai2016
msi/test/test_spectrometerreader.py
1
1921
# -*- coding: utf-8 -*- """ ipcai2016 Copyright (c) German Cancer Research Center, Computer Assisted Interventions. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE for details """ """ Crea...
bsd-3-clause
1,517,000,166,234,055,700
29.492063
85
0.5924
false
thaim/ansible
test/units/modules/network/check_point/test_checkpoint_host.py
40
3698
# Copyright (c) 2018 Red Hat # # 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 i...
mit
3,296,490,059,139,122,000
36.353535
110
0.690914
false
MaplePlan/djwp
django/db/models/sql/compiler.py
15
50040
import datetime from django.conf import settings from django.core.exceptions import FieldError from django.db.backends.util import truncate_name from django.db.models.constants import LOOKUP_SEP from django.db.models.query_utils import select_related_descend, QueryWrapper from django.db.models.sql.constants import (SI...
lgpl-3.0
-2,589,775,919,723,596,000
43.559216
136
0.558733
false
rmcgibbo/scipy
scipy/sparse/csr.py
39
14549
"""Compressed Sparse Row matrix format""" from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['csr_matrix', 'isspmatrix_csr'] import numpy as np from scipy._lib.six import xrange from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \ ...
bsd-3-clause
-8,461,554,383,235,488,000
32.756381
87
0.513712
false
Qalthos/ansible
lib/ansible/modules/network/f5/bigip_gtm_virtual_server.py
38
40714
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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.1', ...
gpl-3.0
4,852,453,653,491,234,000
33.041806
125
0.59213
false
broadcastyourseb/SADR
raspberry/allskySCRIPT/dev/test.py
1
6342
#!/usr/bin/python #-*- coding: iso-8859-15 -*- # SADR METEOLLSKY # http://www.sadr.fr # SEBASTIEN LECLERC 2018 # Inspired by Marcus Degenkolbe # http://indilib.org/develop/tutorials/151-time-lapse-astrophotography-with-indi-python.html # allsky frame script import sys, time, logging import PyIndi import pyfits import ...
apache-2.0
2,963,232,855,068,012,500
40.181818
123
0.582308
false
stefan-caraiman/cloudbase-init
cloudbaseinit/tests/metadata/services/test_ec2service.py
1
3611
# Copyright 2014 Cloudbase Solutions Srl # # 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 l...
apache-2.0
4,115,162,737,295,496,000
39.122222
78
0.64442
false
alexthered/kienhoc-platform
common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py
114
16366
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'AnonymousUserId' db.create_table('student_anonymoususerid', ( ('id', self.gf('dj...
agpl-3.0
-4,133,884,038,272,998,000
83.360825
182
0.551387
false
l2isbad/netdata
collectors/python.d.plugin/python_modules/bases/FrameworkServices/ExecutableService.py
3
3319
# -*- coding: utf-8 -*- # Description: # Author: Pawel Krupa (paulfantom) # Author: Ilya Mashchenko (ilyam8) # SPDX-License-Identifier: GPL-3.0-or-later import os from subprocess import Popen, PIPE from bases.FrameworkServices.SimpleService import SimpleService from bases.collection import find_binary class Execut...
gpl-3.0
-5,485,645,888,340,434,000
35.472527
108
0.57216
false
MikeAmy/django
tests/i18n/sampleproject/update_catalogs.py
344
1780
#!/usr/bin/env python """ Helper script to update sampleproject's translation catalogs. When a bug has been identified related to i18n, this helps capture the issue by using catalogs created from management commands. Example: The string "Two %% Three %%%" renders differently using trans and blocktrans. This issue i...
bsd-3-clause
4,228,443,035,337,914,000
28.666667
82
0.696067
false
caidongyun/Dato-Core
src/unity/python/graphlab/meta/decompiler/tests/test_simple.py
13
8056
''' Created on Nov 9, 2011 @author: sean ''' from graphlab.meta.testing import py2only from graphlab.meta.decompiler.tests import Base import unittest class Simple(Base): def test_assign(self): 'a = b' self.statement('a = b') def test_assign2(self): 'a = b = c' self.statemen...
agpl-3.0
-7,818,147,776,160,930,000
20.714286
51
0.516385
false
supriyantomaftuh/pip
pip/_vendor/requests/packages/chardet/charsetprober.py
3127
1902
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
3,666,652,945,981,660,000
29.677419
69
0.654048
false
slank/ansible
lib/ansible/plugins/callback/debug.py
137
1190
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.plugins.callback.default import CallbackModule as CallbackModule_default class CallbackModule(CallbackModule_default): # pylint: disable=too-few-public-methods,no-init ''' Override for the default callback m...
gpl-3.0
5,502,261,416,137,742,000
30.315789
95
0.612605
false
arulkumarkandasamy/clictest
clictest/common/rpc.py
1
9370
# Copyright 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
1,306,894,628,989,761,300
31.648084
79
0.571185
false
CiscoSystems/fabric_enabler
setup_enabler.py
1
36241
# Copyright 2014 Cisco Systems, 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 requi...
apache-2.0
9,082,188,667,527,871,000
42.247017
112
0.540382
false
2ndQuadrant/ansible
lib/ansible/modules/commands/telnet.py
38
2786
# this is a virtual module that is entirely implemented server side # Copyright: Ansible Project # 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
2,969,803,084,076,577,000
23.875
102
0.64537
false
pelson/pyggybank
testing/test_wizard.py
1
3067
""" These integration tests exist solely to test the interaction between pyggybank and GPG on the CLI. All attempts should be made to avoid extending these tests in preference for unit tests of the functions themselves (where necessary, mocking out the GPG interactions). TODO: It would be great to bring these tests in...
bsd-3-clause
543,091,508,911,298,500
26.141593
112
0.650799
false
matheuscas/hackathon_paypal
modules/requests/packages/chardet/escprober.py
2936
3187
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
-5,556,199,902,876,789,000
36.05814
90
0.610606
false
UOWPhysSoc/Barnes-Hutt-Simulation--James-MattG-
barnesdist.py
1
4826
''' Distribution function module for Barnes-Hutt n-body simulation developed by Matt Griffiths and James Archer. Example distribution written by Matt Griffiths, list idea concieved by James Archer. Special thanks to Matt Sanderson for ideas regarding distribution implementation. Avaliable for use under a GPL v3 licenc...
gpl-3.0
5,294,715,606,679,174,000
30.960265
130
0.470162
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/django/apps/config.py
51
8187
import os from importlib import import_module from django.core.exceptions import 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 application and its con...
gpl-3.0
1,198,966,138,935,475,700
38.550725
81
0.594235
false
40223123/finaltest2
static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/display.py
603
25179
#!/usr/bin/env python '''Pygame module to control the display window and screen. This module offers control over the pygame display. Pygame has a single display Surface that is either contained in a window or runs full screen. Once you create the display you treat it as a regular Surface. Changes are not immediately ...
gpl-3.0
8,654,878,434,712,905,000
33.491781
80
0.663013
false
shadyueh/pyranking
env/lib/python2.7/site-packages/django/contrib/gis/db/models/functions.py
59
15777
from decimal import Decimal from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import AreaField from django.contrib.gis.measure import ( Area as AreaMeasure, Distance as DistanceMeasure, ) from django.core.exceptions import FieldError from django.db.models import Fl...
mit
3,429,165,818,981,497,000
35.948478
108
0.637384
false
popazerty/obh-sh4
lib/python/Plugins/Extensions/MediaPlayer/settings.py
28
5037
from Screens.Screen import Screen from Screens.HelpMenu import HelpableScreen from Components.FileList import FileList from Components.Sources.StaticText import StaticText from Components.MediaPlayer import PlayList from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, Conf...
gpl-2.0
102,267,908,119,171,890
34.723404
154
0.747072
false
willhess/aima-python
submissions/Conklin/vaccuum.py
18
6471
import agents as ag import envgui as gui import random # ______________________________________________________________________________ loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world def RandomVacuumAgent(): "Randomly choose one of the actions from the vacuum environment." p = ag.Ra...
mit
-470,252,549,717,240,500
30.2657
81
0.561273
false
jesusfcr/airflow
tests/contrib/sensors/test_hdfs_sensors.py
28
9240
# -*- coding: utf-8 -*- # # 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
-3,182,755,037,578,295,300
35.812749
105
0.509416
false
bashrc/zeronet-debian
src/src/lib/pybitcointools/bitcoin/composite.py
1
3833
#!/usr/bin/python from .main import * from .transaction import * from .bci import * from .deterministic import * from .blocks import * # Takes privkey, address, value (satoshis), fee (satoshis) def send(frm, to, value, fee=10000): return sendmultitx(frm, to + ":" + str(value), fee) # Takes privkey, "address1:va...
gpl-2.0
5,217,794,390,807,423,000
28.713178
77
0.583616
false
Yuego/dbfread
dbfread/struct_parser.py
5
1169
""" Parser that converts (C style) binary structs named tuples. The struct can be read from a file or a byte string. """ import struct import collections def _make_struct_class(name, names): class Struct(object): _names = names def __init__(self, **kwargs): vars(self).update(kwargs) ...
mit
-7,953,603,162,748,463,000
28.225
74
0.586826
false
revolunet/requests
requests/packages/chardet/mbcharsetprober.py
215
3182
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
isc
7,818,033,431,311,266,000
37.804878
108
0.613451
false
Ledoux/ShareYourSystem
Pythonlogy/ShareYourSystem/Specials/_Lifers/Stabilizer/tests/test_05_stability_lif_I_ExampleCell.py
2
1370
#ImportModules import ShareYourSystem as SYS #ImportModules import ShareYourSystem as SYS LateralWeightVariablesList=[ [[-100.]] ] #Check for __LateralWeightVariable in LateralWeightVariablesList: #Define MyStabilizer=SYS.StabilizerClass( ).stationarize( _MeanWeightVariable=__Lateral...
mit
-4,715,319,006,059,288,000
30.860465
134
0.683212
false
Narcolapser/Octo
logfile.py
2
7834
from tkinter import * from tkinter import ttk import connection import paramiko import threading import sqlite3 import time import os import random class LogFile(ttk.Frame): def __init__(self,master,filterFrame,con,log,addr,tempdir): ttk.Frame.__init__(self,master) self.master = master se...
apache-2.0
5,743,233,714,471,661,000
30.58871
103
0.520807
false
scaphilo/koalixcrm
koalixcrm/accounting/rest/product_categorie_rest.py
2
2866
# -*- coding: utf-8 -*- from koalixcrm.accounting.rest.account_rest import OptionAccountJSONSerializer from rest_framework import serializers from koalixcrm.accounting.accounting.product_category import ProductCategory from koalixcrm.accounting.models import Account class ProductCategoryMinimalJSONSerializer(seriali...
bsd-3-clause
3,329,460,462,312,490,000
35.74359
104
0.634682
false
nickdex/cosmos
code/data_structures/src/tree/multiway_tree/union_find/union_find.py
3
1628
#!/usr/bin/env python class UnionFind: def __init__(self): self.parent = {} self.rank = {} def root(self, a): current_item = a path = [] while self.parent[current_item] != current_item: path.append(current_item) current_item = self.parent[curren...
gpl-3.0
7,034,465,989,312,200,000
23.666667
58
0.509828
false
Opentopic/ot-api
ot_api/base.py
1
2508
import json from booby import Model from ot_api.endpoints import GET_URL from ot_api.exceptions import NoParamException from .utils import build_endpoint_url class OpentopicModel(Model): """ Base Model class. Provide functionalists for needed in all opentopic objects return by endpoints """ parser = ...
gpl-2.0
7,117,219,794,117,446,000
32.44
100
0.656699
false
grigorisg9gr/menpo
menpo/image/test/boolean_image_constrain_test.py
4
2020
import numpy as np from numpy.testing import assert_allclose from menpo.image import BooleanImage from menpo.shape import PointCloud def test_boolean_image_constrain_landmarks(): mask = BooleanImage.init_blank((10, 10), fill=False) mask.landmarks['test'] = PointCloud( np.array([[1, 1], [8, 1], [8, 8],...
bsd-3-clause
4,558,680,386,581,944,300
37.846154
78
0.633168
false
cylc/cylc
tests/unit/batch_sys_handlers/test_lsf.py
1
2520
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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,...
gpl-3.0
7,952,588,363,559,450,000
33.520548
76
0.518651
false
Adai0808/BuildingMachineLearningSystemsWithPython
ch06/install.py
23
9264
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License # # Sanders-Twitter Sentiment Corpus Install Script # Version 0.1 # # Pulls tweet data from Twitter bec...
mit
2,656,378,337,197,743,000
28.597444
100
0.570272
false
polimediaupv/edx-platform
common/lib/xmodule/xmodule/raw_module.py
146
2027
from lxml import etree from xmodule.editing_module import XMLEditingDescriptor from xmodule.xml_module import XmlDescriptor import logging from xblock.fields import String, Scope from exceptions import SerializationError log = logging.getLogger(__name__) class RawDescriptor(XmlDescriptor, XMLEditingDescriptor): ...
agpl-3.0
2,155,288,880,077,373,000
35.196429
94
0.638382
false
rssenar/PyToolkit
JoinDatasets.py
1
2552
#!/usr/bin/env python3.4 # ---------------------------------------------------------------------------- # import os, csv, glob, re import pandas as pd from Constants import ConvPercentage from tqdm import tqdm # ---------------------------------------------------------------------------- # os.chdir('../../../../Deskto...
bsd-2-clause
8,817,431,598,654,597,000
28.333333
80
0.476881
false
IoveSunny/DreamBox
package/mac80211/files/host_bin/b43-fwsquash.py
30
3181
#!/usr/bin/env python # # b43 firmware file squasher # Removes unnecessary firmware files # # Copyright (c) 2009 Michael Buesch <mb@bu3sch.de> # # Licensed under the GNU/GPL version 2 or (at your option) any later version. # import sys import os def usage(): print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm...
gpl-2.0
5,005,417,775,527,563,000
25.957627
79
0.574976
false
mahendra-r/edx-platform
cms/djangoapps/contentstore/views/tests/test_library.py
114
9392
""" Unit tests for contentstore.views.library More important high-level tests are in contentstore/tests/test_libraries.py """ from contentstore.tests.utils import AjaxEnabledTestClient, parse_json from contentstore.utils import reverse_course_url, reverse_library_url from contentstore.views.component import get_compon...
agpl-3.0
-5,399,752,227,860,042,000
40.192982
110
0.636073
false
zeroSteiner/smoke-zephyr
smoke_zephyr/utilities.py
1
27644
#!/usr/bin/env python # -*- coding: utf-8 -*- # # smoke_zephyr/utilities.py # # 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 l...
bsd-3-clause
-767,310,314,023,425,400
30.811277
184
0.704927
false
ryfeus/lambda-packs
LightGBM_sklearn_scipy_numpy/source/scipy/optimize/tests/test_zeros.py
10
3685
from __future__ import division, print_function, absolute_import from math import sqrt, exp, sin, cos from numpy.testing import (assert_warns, assert_, assert_allclose, assert_equal) from numpy import finfo from scipy.optimize import zeros as cc from scipy.optim...
mit
-2,001,423,797,597,531,600
31.324561
78
0.541113
false
Glutanimate/FrozenFields
src/frozen_fields/main.py
1
6350
# -*- coding: utf-8 -*- """ This file is part of the Frozen Fields add-on for Anki. Main Module, hooks add-on methods into Anki. Copyright: (c) 2012-2015 Tiago Barroso <https://github.com/tmbb> (c) 2015-2018 Glutanimate <https://glutanimate.com/> License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl.htm...
bsd-2-clause
7,209,222,615,657,010,000
29.666667
104
0.618305
false
pylada/pylada-light
src/pylada/ipython/launch/interactive.py
1
4693
############################### # This file is part of PyLaDa. # # Copyright (C) 2013 National Renewable Energy Lab # # PyLaDa is a high throughput computational platform for Physics. It aims to # make it easier to submit large numbers of jobs on supercomputers. It # provides a python interface to physical input, ...
gpl-3.0
-6,333,819,627,955,589,000
40.530973
106
0.595568
false
mhvk/numpy
numpy/core/_internal.py
3
27343
""" A place for internal code Some things are more easily handled Python. """ import ast import re import sys import platform import warnings from .multiarray import dtype, array, ndarray try: import ctypes except ImportError: ctypes = None IS_PYPY = platform.python_implementation() == 'PyPy' if sys.byteor...
bsd-3-clause
2,199,691,672,506,513,200
29.080308
86
0.545624
false
wolfier/incubator-airflow
airflow/operators/dagrun_operator.py
14
3160
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
3,470,535,087,413,104,000
38.5
76
0.664873
false
skoppisetty/idigbio-appliance
lib/sqlalchemy/log.py
39
6820
# sqlalchemy/log.py # Copyright (C) 2006-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # Includes alterations by Vinay Sajip vinay_sajip@yahoo.co.uk # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Logging control and...
gpl-3.0
1,262,033,742,489,070,800
31.169811
84
0.640469
false
lovetox/gajim
src/common/jingle_rtp.py
1
18136
## ## Copyright (C) 2006 Gajim Team ## ## Gajim 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; version 3 only. ## ## Gajim is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; wit...
gpl-3.0
-3,605,830,643,790,092,000
38.511983
90
0.588002
false
alkemics/graphalchemy
graphalchemy/ogm/mapper.py
1
1095
#! /usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================== # IMPORTS # ============================================================================== class Mapper(object): """ """ _new_mappers = Fals...
apache-2.0
2,526,221,967,872,212,500
30.285714
80
0.496804
false
crazy-canux/django
tests/template_tests/syntax_tests/test_with.py
391
2245
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class WithTagTests(SimpleTestCase): @setup({'with01': '{% with key=dict.key %}{{ key }}{% endwith %}'}) def test_with01(self): output = self.engine.render_to_string('with01', {'dict': {'k...
bsd-3-clause
-2,890,134,277,189,953,500
42.173077
84
0.554566
false
MyAOSP/external_skia
tools/generate_fir_coeff.py
198
4546
#!/usr/bin/python ''' Copyright 2013 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ''' import math import pprint def withinStdDev(n): """Returns the percent of samples within n std deviations of the normal.""" return math.erf(n / math.sqrt(2)) def...
bsd-3-clause
3,743,486,719,887,148,500
37.201681
162
0.685878
false
atul-bhouraskar/django
django/contrib/contenttypes/migrations/0001_initial.py
585
1227
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.contenttypes.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ContentType', fields=...
bsd-3-clause
-7,484,827,215,819,977,000
32.162162
114
0.537082
false
CameronLonsdale/jam
docs/highlighting.py
2
3364
from pygments.lexer import RegexLexer, bygroups, include, combined, words from pygments.token import * import sphinx class JamLexer(RegexLexer): name = "Jam" aliases = ["jam"] filenames = ["*.jm"] INTEGER_REGEX = r"[0-9]([0-9_]*[0-9])?" tokens = { 'root': [ (r"#.*?$", Comment)...
mit
-2,978,422,307,554,546,000
25.488189
73
0.250595
false
htwenhe/DJOA
env/Lib/site-packages/django/db/models/options.py
149
36502
from __future__ import unicode_literals import warnings from bisect import bisect from collections import OrderedDict, defaultdict from itertools import chain from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db import connections from djang...
mit
-7,838,568,295,928,204,000
41.592765
111
0.606022
false
low-sky/pyspeckit
pyspeckit/spectrum/models/n2hp.py
4
11414
""" =========== N2H+ fitter =========== Reference for line params: Dore (Private Communication), improving on the determinations from L. Pagani, F. Daniel, and M. L. Dubernet A&A 494, 719-727 (2009) DOI: 10.1051/0004-6361:200810570 http://www.strw.leidenuniv.nl/~moldata/N2H+.html http://adsabs.harvard.edu/abs/2005M...
mit
-4,758,778,314,814,676,000
29.437333
137
0.558612
false
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/site-packages/numpy/distutils/errors.py
152
3577
"""distutils.errors Provides exceptions used by the Distutils modules. Note that Distutils modules may raise standard exceptions; in particular, SystemExit is usually raised for errors that are obviously the end-user's fault (eg. bad command-line arguments). This module is safe to use in "from ... import *" mode; it...
gpl-3.0
-3,347,789,524,100,294,700
35.876289
72
0.731339
false
moondrop-entertainment/django-nonrel-drawp
django/template/defaultfilters.py
1
29877
"""Default variable filters.""" import re from decimal import Decimal, InvalidOperation, ROUND_HALF_UP import random as random_module try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. from django.template.base import Variable, Library from d...
bsd-3-clause
1,510,230,589,541,639,200
30.154327
97
0.626535
false
atopuzov/nitro-python
nssrc/com/citrix/netscaler/nitro/resource/config/audit/auditmessages.py
3
6812
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
-149,714,483,823,062,300
30.105023
143
0.700969
false
madjam/mxnet
example/rcnn/rcnn/processing/bbox_regression.py
25
5519
# 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
-8,815,891,689,819,334,000
39.284672
102
0.647038
false
agoose77/hivesystem
manual/movingpanda/panda-7.py
1
4435
import dragonfly import dragonfly.pandahive import bee from bee import connect import math, functools from panda3d.core import NodePath import dragonfly.scene.unbound import dragonfly.std import dragonfly.io import dragonfly.canvas import Spyder # ## random matrix generator from random import random def random_m...
bsd-2-clause
5,094,960,144,891,984,000
27.248408
96
0.680496
false
thaim/ansible
lib/ansible/modules/network/aci/aci_access_sub_port_block_to_access_port.py
5
12106
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Simon Metzger <smnmtzgr@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version'...
mit
259,469,785,254,539,970
31.718919
158
0.637948
false
thaim/ansible
lib/ansible/modules/storage/purestorage/purefb_dsrole.py
38
6212
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Simon Dodsley (simon@purestorage.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.1',...
mit
4,473,119,757,255,198,000
34.295455
123
0.645686
false
lihui7115/ChromiumGStreamerBackend
PRESUBMIT_test_mocks.py
28
3773
# 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 json import os import re import subprocess import sys class MockInputApi(object): """Mock class for the InputApi class. This class can be used ...
bsd-3-clause
3,074,744,432,690,311,000
27.156716
78
0.686721
false
angad/libjingle-mac
scons-2.2.0/build/lib/SCons/Memoize.py
14
9676
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # 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 ...
bsd-3-clause
-5,450,399,662,030,099,000
38.655738
107
0.630943
false
yig/intpy
intpy/src/support/__init__.py
1
1101
# support/__init__.py # # Copyright 2008 Rafael Menezes Barreto <rmb3@cin.ufpe.br, # rafaelbarreto87@gmail.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 2 # as published by the Free Software Foundation. # # This program is di...
gpl-2.0
-3,825,667,554,815,318,500
33.40625
71
0.769301
false
consbio/gis-metadata-parser
gis_metadata/iso_metadata_parser.py
1
32865
""" A module to contain utility ISO-19115 metadata parsing helpers """ import six from collections import OrderedDict from copy import deepcopy from frozendict import frozendict, FrozenOrderedDict from parserutils.collections import filter_empty, reduce_value, wrap_value from parserutils.elements import get_element_...
bsd-3-clause
5,265,614,501,988,057,000
46.017167
119
0.656352
false
fedorahungary/fedinv
fedinv/fedinv/wsgi.py
1
1419
""" WSGI config for fedinv project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` s...
gpl-2.0
-6,546,401,735,348,726,000
43.34375
79
0.792812
false
asrar7787/Test-Frontools
node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
1363
58344
# 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. import filecmp import gyp.common import gyp.xcodeproj_file import gyp.xcode_ninja import errno import os import sys import posixpath import re import shutil import...
mit
-6,321,602,846,669,131,000
43.88
80
0.658251
false
nlaurens/budgetRapportage
model/budget/kostensoortgroup.py
1
5986
class KostensoortGroup: def __init__(self, name, descr, level, parent): self.name = name self.descr = descr self.parent = parent # KostensoortGroup class self.level = level self.kostenSoorten = {} # KS die bij deze node horen (uit kostensoortgroep) self.children = [...
mit
-3,703,301,859,731,230,000
29.540816
89
0.55279
false
lanthaler/schemaorg
lib/rdflib/plugins/parsers/pyRdfa/options.py
14
11840
# -*- coding: utf-8 -*- """ L{Options} class: collect the possible options that govern the parsing possibilities. The module also includes the L{ProcessorGraph} class that handles the processor graph, per RDFa 1.1 (i.e., the graph containing errors and warnings). @summary: RDFa parser (distiller) @requires: U{RDFLib<...
apache-2.0
5,340,126,883,293,282,000
44.19084
248
0.705997
false
cgstudiomap/cgstudiomap
main/eggs/Werkzeug-0.11.2-py2.7.egg/werkzeug/contrib/lint.py
128
12322
# -*- coding: utf-8 -*- """ werkzeug.contrib.lint ~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module provides a middleware that performs sanity checks of the WSGI application. It checks that :pep:`333` is properly implemented and warns on some common HTTP errors such as non-empty respons...
agpl-3.0
1,290,110,911,593,788,000
35.672619
84
0.554537
false
aduric/crossfit
nonrel/tests/regressiontests/settings_tests/tests.py
47
2686
from django.conf import settings from django.utils import unittest from django.conf import settings, UserSettingsHolder, global_settings class SettingsTests(unittest.TestCase): # # Regression tests for #10130: deleting settings. # def test_settings_delete(self): settings.TEST = 'test' ...
bsd-3-clause
-5,885,316,123,135,358,000
33.435897
110
0.625093
false
tumbl3w33d/ansible
lib/ansible/modules/network/aci/aci_interface_policy_leaf_profile.py
8
6901
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.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_...
gpl-3.0
-998,370,966,276,386,800
26.714859
141
0.620345
false
katrid/django
tests/check_framework/test_security.py
242
17428
from django.conf import settings from django.core.checks.security import base, csrf, sessions from django.test import SimpleTestCase from django.test.utils import override_settings class CheckSessionCookieSecureTest(SimpleTestCase): @property def func(self): from django.core.checks.security.sessions i...
bsd-3-clause
-1,509,226,076,406,271,700
33.925852
101
0.665366
false
atalax/linux
tools/perf/util/setup.py
766
1540
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
-2,521,131,374,360,497,000
31.083333
82
0.666234
false
hifly/OpenUpgrade
addons/mrp_repair/__openerp__.py
259
2554
# -*- 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,368,196,609,735,762,000
37.119403
78
0.576351
false
open2c/bioframe
bioframe/io/fileops.py
1
21340
from collections import OrderedDict from contextlib import closing import tempfile import json import io import numpy as np import pandas as pd try: import bbi except ImportError: bbi = None try: import pyBigWig except ImportError: pyBigWig = None from ..core.stringops import parse_region from ..cor...
mit
-2,505,692,911,389,207,000
28.232877
89
0.569306
false
waterdotorg/waterday-2015
project/custom/forms.py
1
1447
from django import forms from django.conf import settings from PIL import Image class ShareImageForm(forms.Form): WORD_CHOICES = ( ('', '2. WATER GIVES ME...'), ('joy', 'joy'), ('friendship', 'friendship'), ('life', 'life'), ('family', 'family'), ('nourishment', 'no...
gpl-3.0
5,807,931,440,857,417,000
30.456522
100
0.555632
false
asbjornu/arana
app/Web/aranalibtest/common/appenginepatch/appenginepatcher/patch.py
2
24059
# -*- coding: utf-8 -*- # Unfortunately, we have to fix a few App Engine bugs here because otherwise # not all of our features will work. Still, we should keep the number of bug # fixes to a minimum and report everything to Google, please: # http://code.google.com/p/googleappengine/issues/list from google.appengine.ex...
gpl-2.0
8,213,497,813,754,152,000
40.056314
141
0.586475
false
jefftriplett/trolley
trolley.py
1
23057
#!/usr/bin/env python """ Trolley syncs issues between CSV, Github, and Buffer with Trello. """ import csv import datetime import os import random import click import click_config import github3 from buffpy.api import API as BufferAPI from buffpy.managers.profiles import Profiles from buffpy.managers.updates import...
bsd-3-clause
1,286,812,142,765,837,800
31.023611
89
0.653945
false
tboyce021/home-assistant
tests/components/gios/test_air_quality.py
7
4211
"""Test air_quality of GIOS integration.""" from datetime import timedelta import json from gios import ApiError from homeassistant.components.air_quality import ( ATTR_AQI, ATTR_CO, ATTR_NO2, ATTR_OZONE, ATTR_PM_2_5, ATTR_PM_10, ATTR_SO2, ) from homeassistant.components.gios.air_quality i...
apache-2.0
2,431,120,610,274,522,000
33.235772
94
0.68891
false
KimNorgaard/ansible-modules-extras
cloud/cloudstack/cs_resourcelimit.py
27
6401
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, 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 Software Foundation, either version 3 of the Lice...
gpl-3.0
6,955,790,791,749,403,000
27.44
114
0.631505
false
leonth/elude
elude/servers/redis.py
1
1616
import asyncio import asyncio_redis from elude import config from elude.servers import BaseServer REDIS_REQUEST_WIP_KEY = '_elude:request_wip' class RedisServer(BaseServer): def __init__(self, proxy_gatherer, serialize_func, deserialize_func): super().__init__(proxy_gatherer) self.serialize = ser...
mit
2,217,042,059,248,282,600
37.5
201
0.638614
false
GustavoHennig/ansible
lib/ansible/modules/database/mongodb/mongodb_user.py
6
16030
#!/usr/bin/python # (c) 2012, Elliott Foster <elliott@fourkitchens.com> # Sponsored by Four Kitchens http://fourkitchens.com. # (c) 2014, Epic Games, 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 publi...
gpl-3.0
-6,496,447,265,765,395,000
33.547414
255
0.626513
false
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/third_party/webdriver/pylib/test/selenium/webdriver/common/utils.py
52
1991
# Copyright 2008-2009 WebDriver committers # Copyright 2008-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 requ...
mit
6,516,502,848,244,710,000
30.603175
81
0.64892
false
eirannejad/pyRevit
extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack/Inspect.pulldown/Find All Attached Constraints.pushbutton/script.py
1
1382
"""Find all constraints attached to the selected element.""" from pyrevit import revit, DB def listconstraints(selected_el): print('THIS OBJECT ID: {0}'.format(selected_el.Id)) clconst = DB.FilteredElementCollector(revit.doc)\ .OfCategory(DB.BuiltInCategory.OST_Constraints)\ ....
gpl-3.0
4,720,913,964,088,484,000
34.435897
76
0.515195
false
xiaozhuchacha/OpenBottle
action_earley_srv/scripts/nltk/classify/weka.py
5
12625
# Natural Language Toolkit: Interface to Weka Classsifiers # # Copyright (C) 2001-2017 NLTK Project # Author: Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Classifiers that make use of the external 'Weka' package. """ from __future__ import print_function imp...
mit
2,149,918,283,074,237,400
35.594203
84
0.565545
false
virneo/opencog
opencog/python/pln_old/examples/context/context_agent.py
32
1282
""" A MindAgent to test the application of the context rules """ from opencog.cogserver import MindAgent from pln.chainers import Chainer from pln.rules import * __author__ = 'Sebastian Ruder' class ContextAgent(MindAgent): def __init__(self): self.chainer = None def create_chainer(self, atomspace)...
agpl-3.0
3,416,695,824,215,700,500
33.648649
71
0.646646
false
jc0n/scrapy
scrapy/commands/__init__.py
38
3532
""" Base class for Scrapy commands """ import os from optparse import OptionGroup from twisted.python import failure from scrapy.utils.conf import arglist_to_dict from scrapy.exceptions import UsageError class ScrapyCommand(object): requires_project = False crawler_process = None # default settings to ...
bsd-3-clause
-1,760,245,323,195,989,800
32.638095
90
0.60504
false
CaptFrank/EsxiController
server/utils/error/taskhandler.py
1
1464
""" task.py ========== This is the task handler for the error handler. :copyright: (c) 2015 by GammaRay. :license: BSD, see LICENSE for more details. Author: GammaRay Version: 1.0 Date: 3/11/2015 """ """ ============================================= Imports...
gpl-2.0
-2,922,137,806,415,029,000
22.253968
68
0.495219
false
kaday/rose
t/rose-config/02-self.py
1
7930
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-6 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
gpl-3.0
7,892,625,655,695,430,000
33.933921
79
0.556494
false
dsfsdgsbngfggb/odoo
addons/stock_invoice_directly/__openerp__.py
260
1618
# -*- 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,356,804,787,729,986,000
36.627907
78
0.602596
false
SEL-Columbia/commcare-hq
corehq/apps/hqadmin/urls.py
1
2341
from django.conf.urls.defaults import * from corehq.apps.reports.dispatcher import AdminReportDispatcher from .views import FlagBrokenBuilds urlpatterns = patterns('corehq.apps.hqadmin.views', url(r'^$', 'default', name="default_admin_report"), url(r'^export/global/$', 'global_report', name="export_global_repo...
bsd-3-clause
-4,880,804,893,646,826,000
65.885714
104
0.680906
false
fedspendingtransparency/data-act-core
dataactcore/aws/s3UrlHandler.py
1
4148
from datetime import datetime import boto from boto import sts import os import inspect import json from dataactcore.config import CONFIG_BROKER class s3UrlHandler: """ This class acts a wrapper for S3 URL Signing """ BASE_URL = "https://s3.amazonaws.com/" ENABLE_S3 = True URL_LIFETIME = 2000 ...
cc0-1.0
-8,919,651,750,506,327,000
33
178
0.62271
false
Chandlercjy/OnePy
OnePy/sys_module/models/calendar.py
1
2501
import arrow from OnePy.sys_module.components.exceptions import BacktestFinished from OnePy.sys_module.metabase_env import OnePyEnvBase from OnePy.utils.easy_func import get_day_ratio class Calendar(OnePyEnvBase): def __init__(self, instrument): if instrument == 'A_shares': self.is_trading_...
mit
-9,184,426,832,852,559,000
30.986842
81
0.552036
false
CFIS-Octarine/octarine
src/ossos_tests/test_ossos/test_tools/test_coding.py
2
1122
__author__ = "David Rusk <drusk@uvic.ca>" import unittest from hamcrest import assert_that, equal_to from ossos import coding class EncodingDecodingTest(unittest.TestCase): def test_base36_encode_decode_1(self): assert_that(coding.base36encode(1), equal_to("1")) assert_that(coding.base36decode(...
gpl-3.0
951,822,194,044,352,100
31.057143
78
0.664884
false
j0057/ansible-1
lib/ansible/module_utils/openstack.py
198
4502
# 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
4,136,783,981,993,633,300
42.288462
104
0.669258
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/PyQt4/uic/port_v2/invoke.py
6
1829
############################################################################# ## ## Copyright (c) 2014 Riverbank Computing Limited <info@riverbankcomputing.com> ## ## This file is part of PyQt. ## ## This file may be used under the terms of the GNU General Public ## License versions 2.0 or 3.0 as published by the Fre...
gpl-3.0
-8,147,695,498,167,810,000
33.509434
79
0.661564
false
AkA84/edx-platform
common/lib/xmodule/xmodule/capa_module.py
10
8851
"""Implements basics of Capa, including class CapaModule.""" import json import logging import sys from lxml import etree from pkg_resources import resource_string import dogstats_wrapper as dog_stats_api from .capa_base import CapaMixin, CapaFields, ComplexEncoder from capa import responsetypes from .progress import...
agpl-3.0
-9,030,626,270,468,043,000
35.27459
100
0.630211
false
longmen21/edx-platform
common/test/acceptance/pages/studio/container.py
3
20916
""" Container page in Studio """ from bok_choy.page_object import PageObject from bok_choy.promise import Promise, EmptyPromise from common.test.acceptance.pages.studio import BASE_URL from common.test.acceptance.pages.common.utils import click_css, confirm_prompt from common.test.acceptance.pages.studio.utils impor...
agpl-3.0
-6,695,402,000,823,752,000
34.692833
152
0.615797
false