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
brianparry/elastalert
tests/config_test.py
6
7403
# -*- coding: utf-8 -*- import copy import datetime import mock import pytest import elastalert.alerts import elastalert.ruletypes from elastalert.config import get_file_paths from elastalert.config import load_configuration from elastalert.config import load_options from elastalert.config import load_rules from elas...
apache-2.0
5,506,800,554,365,326,000
40.127778
125
0.576388
false
zbitmanis/cmanager
scalerd/zba.py
1
3189
#!/usr/bin/env python3 """ Copyright 2017 Andris Zbitkovskis 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 a...
apache-2.0
1,338,390,027,882,393,900
33.663043
140
0.652869
false
ovnicraft/openerp-restaurant
account/wizard/account_unreconcile.py
385
2086
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-3,068,389,636,209,430,500
39.901961
97
0.62512
false
iemejia/beam
sdks/python/apache_beam/transforms/util.py
2
45927
# # 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
6,288,927,171,978,648,000
35.220032
89
0.677858
false
sdgdsffdsfff/jumpserver
apps/tickets/views.py
2
1446
from django.views.generic import TemplateView, DetailView from django.utils.translation import ugettext as _ from common.permissions import PermissionsMixin, IsValidUser from .models import Ticket from . import mixins class TicketListView(PermissionsMixin, TemplateView): template_name = 'tickets/ticket_list.html...
gpl-2.0
4,833,304,296,225,836,000
34.268293
77
0.637621
false
jeeftor/alfredToday
src/lib/dateutil/tz/tz.py
41
33867
# -*- coding: utf-8 -*- """ This module offers timezone implementations subclassing the abstract :py:`datetime.tzinfo` type. There are classes to handle tzfile format files (usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`, etc), TZ environment string (in all known formats), given ranges (with help fr...
mit
-6,194,530,299,634,001,000
33.593463
79
0.491836
false
Changaco/oh-mainline
vendor/packages/Django/django/contrib/staticfiles/management/commands/findstatic.py
101
1185
from __future__ import unicode_literals import os from optparse import make_option from django.core.management.base import LabelCommand from django.utils.encoding import smart_text from django.contrib.staticfiles import finders class Command(LabelCommand): help = "Finds the absolute paths for the given static fi...
agpl-3.0
5,134,647,671,258,254,000
37.225806
78
0.608439
false
ipfire/pakfire
src/pakfire/logger.py
1
2606
#!/usr/bin/python3 ############################################################################### # # # Pakfire - The IPFire package management system # # Copyright (C) 2011 Pakfire development team ...
gpl-3.0
-299,454,999,427,719,360
34.69863
79
0.495779
false
armijnhemel/cleanup-for-discogs
cleanup-discogs-continuous.py
1
63272
#!/usr/bin/env python3 # Tool to discover 'smells' in the Discogs data via the API. It downloads # release data and flags releases that need to be fixed. # # The checks are (nearly) identical to cleanup-discogs.py # # The results that are printed by this script are by no means complete # or accurate. # # Licensed unde...
gpl-3.0
-1,553,922,462,280,749,800
49.417863
217
0.490652
false
mrshelly/openerp71313
openerp/addons/marketing/__init__.py
55
1073
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
1,562,533,217,333,534,200
43.708333
79
0.609506
false
nydehi/google-appengine-wx-launcher
launcher/log_console_unittest.py
28
2208
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-5,923,821,960,097,711,000
29.666667
80
0.700181
false
Neural-Network/TicTacToe
pybrain/supervised/evolino/population.py
25
6360
__author__ = 'Michael Isik' from pybrain.supervised.evolino.gpopulation import Population, SimplePopulation from pybrain.supervised.evolino.gfilter import Randomization from pybrain.supervised.evolino.individual import EvolinoIndividual, EvolinoSubIndividual from pybrain.tools.kwargsprocessor import KWArgsProcessor ...
bsd-3-clause
-227,599,376,368,216,480
36.192982
124
0.668711
false
vermouth1992/deep-learning-playground
utils/data_utils.py
2
8781
import cPickle as pickle import numpy as np import os from scipy.misc import imread def load_CIFAR_batch(filename): """ load single batch of cifar """ with open(filename, 'rb') as f: datadict = pickle.load(f) X = datadict['data'] Y = datadict['labels'] X = X.reshape(10000, 3, 3...
apache-2.0
-5,156,003,140,015,504,000
34.550607
120
0.587632
false
suyashphadtare/vestasi-erp-1
erpnext/accounts/doctype/pricing_rule/pricing_rule.py
31
9280
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe import json import copy from frappe import throw, _ from frappe.utils import flt, cint from frappe.model.docume...
agpl-3.0
-3,971,643,799,880,938,500
34.692308
100
0.67931
false
VaishnoReddy/Aminator-
aminator/plugins/provisioner/apt.py
5
7258
# -*- coding: utf-8 -*- # # # Copyright 2013 Netflix, 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 ...
apache-2.0
-6,959,622,724,597,768,000
40.238636
146
0.630477
false
shootsoft/practice
LeetCode/python/061-090/068-text-justification/formatstring.py
1
2595
class Solution: # @param words, a list of strings # @param L, an integer # @return a list of strings def fullJustify(self, words, L): result = [] length = len(words) i = 0 c = 0 sublength =0 sub = [] while i < length: lc = len(words[i...
apache-2.0
6,754,757,423,086,592,000
27.833333
163
0.440462
false
cognitiveclass/edx-platform
common/djangoapps/service_status/views.py
51
1304
""" Django Views for service status app """ import json import time from django.http import HttpResponse from dogapi import dog_stats_api from service_status import tasks from djcelery import celery from celery.exceptions import TimeoutError def index(_): """ An empty view """ return HttpResponse(...
agpl-3.0
3,114,075,842,421,244,000
21.101695
65
0.618865
false
brandond/ansible
lib/ansible/modules/windows/win_pagefile.py
52
3997
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Liran Nisanov <lirannis@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata...
gpl-3.0
-9,022,692,655,967,825,000
27.755396
158
0.685264
false
smx-smx/dsl-n55u-bender
release/src/router/libxml2/doc/index.py
87
32908
#!/usr/bin/python -u # # imports the API description and fills up a database with # name relevance to modules, functions or web pages # # Operation needed: # ================= # # install mysqld, the python wrappers for mysql and libxml2, start mysqld # Change the root passwd of mysql: # mysqladmin -u root password ...
gpl-2.0
-141,079,422,016,632,080
25.158983
149
0.554029
false
sho-h/ruby_env
devkit/mingw/bin/lib/posixfile.py
67
8240
"""Extended file operations available in POSIX. f = posixfile.open(filename, [mode, [bufsize]]) will create a new posixfile object f = posixfile.fileopen(fileobject) will create a posixfile object from a builtin file object f.file() will return the original builtin file object f.dup() ...
mit
-5,025,109,707,771,454,000
32.767932
79
0.51966
false
ch1nh5/tizen_rt
external/iotivity/iotivity_1.2-rel/extlibs/gtest/gtest-1.7.0/test/gtest_test_utils.py
1100
10812
#!/usr/bin/env python # # Copyright 2006, 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...
apache-2.0
4,481,992,020,790,331,000
32.7875
79
0.674251
false
espadrine/opera
chromium/src/chrome/test/chromedriver/archive.py
3
2295
# Copyright (c) 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. """Downloads items from the Chromium continuous archive.""" import os import platform import urllib import util CHROME_27_REVISION = '190466' CHROME_2...
bsd-3-clause
7,960,273,175,273,556,000
28.050633
75
0.678431
false
akashsinghal/Speech-Memorization-App
Python_Backend/env/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py
327
4608
import types import functools from pip._vendor.requests.adapters import HTTPAdapter from .controller import CacheController from .cache import DictCache from .filewrapper import CallbackFileWrapper class CacheControlAdapter(HTTPAdapter): invalidating_methods = set(['PUT', 'DELETE']) def __init__(self, cach...
apache-2.0
-333,008,641,126,962,560
35.864
100
0.557943
false
ekamioka/gpss-research
experiments/2014-01-09-radio.py
4
1466
Experiment(description='Trying to recreate old results using latest code', data_dir='../data/radio/', max_depth=4, random_order=False, k=1, debug=False, local_computation=False, n_rand=9, sd=2, jitter_sd=0.1, ...
mit
-6,479,300,947,087,626,000
44.84375
327
0.544338
false
nadley/Sick-Beard
lib/hachoir_parser/archive/ace.py
90
9964
""" ACE parser From wotsit.org and the SDK header (bitflags) Partial study of a new block type (5) I've called "new_recovery", as its syntax is very close to the former one (of type 2). Status: can only read totally file and header blocks. Author: Christophe Gisquet <christophe.gisquet@free.fr> Creation date: 19 jan...
gpl-3.0
-5,893,879,159,226,286,000
36.318352
106
0.629466
false
ibmdb/db2pythonbuildpack
vendor/pip-1.3.1/pip/basecommand.py
63
7160
"""Base Command class, and related routines""" import os import socket import sys import tempfile import traceback import time import optparse from pip.log import logger from pip.download import urlopen from pip.exceptions import (BadCommand, InstallationError, UninstallationError, Command...
mit
-7,891,972,360,802,815,000
32.773585
92
0.585894
false
dandygithub/kodi
addons/plugin.audio.music.yandex/requests/__init__.py
35
2197
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
gpl-3.0
-2,055,282,848,365,936,400
24.546512
77
0.661812
false
VisheshHanda/production_backup
erpnext/buying/doctype/purchase_order/test_purchase_order.py
19
5835
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe import frappe.defaults from frappe.utils import flt, add_days, nowdate from erpnext.buying.doctype.purchase_order.purchase...
gpl-3.0
8,065,008,627,743,116,000
30.540541
120
0.695458
false
CKehl/pylearn2
pylearn2/models/vae/kl.py
45
5415
""" Classes implementing logic related to the analytical computation of the KL divergence between :math:`q_\\phi(\\mathbf{z} \\mid \\mathbf{x})` and :math:`p_\\theta(\\mathbf{z})` in the VAE framework """ __authors__ = "Vincent Dumoulin" __copyright__ = "Copyright 2014, Universite de Montreal" __credits__ = ["Vincent D...
bsd-3-clause
3,320,651,174,795,452,400
34.392157
79
0.599815
false
Antiun/project
project_categ_issue/__openerp__.py
16
1500
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Daniel Reis # # 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...
agpl-3.0
324,500,766,593,397,250
36.5
78
0.593333
false
ChanderG/scikit-learn
examples/linear_model/plot_sgd_weighted_samples.py
344
1458
""" ===================== SGD: Weighted samples ===================== Plot decision function of a weighted dataset, where the size of points is proportional to its weight. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn import linear_model # we create 20 points np.random.seed(0) X ...
bsd-3-clause
-4,869,745,839,259,232,000
29.375
75
0.654321
false
glove747/liberty-neutron
neutron/tests/unit/agent/l3/test_legacy_router.py
13
3281
# Copyright (c) 2015 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 ...
apache-2.0
-5,252,156,293,084,021,000
38.059524
78
0.620847
false
broferek/ansible
lib/ansible/modules/network/f5/bigip_iapp_service.py
38
31847
#!/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
7,446,176,975,792,487,000
31.039235
91
0.570917
false
vadimtk/chrome4sdp
third_party/cython/src/Cython/Distutils/build_ext.py
94
12955
"""Cython.Distutils.build_ext Implements a version of the Distutils 'build_ext' command, for building Cython extension modules.""" # This module should be kept compatible with Python 2.3. __revision__ = "$Id:$" import sys import os import re from distutils.core import Command from distutils.errors import DistutilsP...
bsd-3-clause
6,216,474,414,139,739,000
38.617737
87
0.570436
false
philipan/paparazzi
sw/ground_segment/python/ivytoredis/ivy_to_redis.py
39
2358
#!/usr/bin/env python from __future__ import print_function import redis import time import signal import argparse import sys import os # if PAPARAZZI_SRC not set, then assume the tree containing this # file is a reasonable substitute PPRZ_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirnam...
gpl-2.0
8,695,753,755,252,679,000
32.211268
111
0.624682
false
ehashman/oh-mainline
vendor/packages/scrapy/scrapy/core/downloader/__init__.py
19
6133
import random import warnings from time import time from collections import deque from functools import partial from twisted.internet import reactor, defer from twisted.python.failure import Failure from scrapy.utils.defer import mustbe_deferred from scrapy.utils.signal import send_catch_log from scrapy.utils.httpobj...
agpl-3.0
8,880,053,173,845,852,000
36.396341
98
0.643405
false
bonitadecker77/python-for-android
python-build/python-libs/gdata/src/gdata/apps/__init__.py
285
21144
#!/usr/bin/python # # Copyright (C) 2007 SIOS Technology, 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 appli...
apache-2.0
3,971,657,637,410,840,000
39.197719
78
0.630202
false
eblume/Tiger-Lily
tigerlily/grc/genome_test.py
1
3280
# genome_test.py - unit tests for genome.py # Authors: # * Erich Blume <blume.erich@gmail.com> # # Copyright 2011 Erich Blume <blume.erich@gmail.com> # # This file is part of Tiger Lily. # # Tiger Lily is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
gpl-3.0
-1,701,541,068,481,204,700
38.518072
80
0.690549
false
0sm0s1z/subterfuge
utilities/notification.py
5
1228
#!/usr/bin/python import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * import time import os import re import sys import datetime sys.path.append('/usr/share/subterfuge') #Ignore Deprication Warnings import warnings warnings.filterwarnings("ignore", category...
gpl-3.0
5,043,915,659,740,679,000
20.740741
121
0.606678
false
mila-udem/fuel
tests/__init__.py
15
1392
from importlib import import_module from unittest.case import SkipTest from fuel.utils import find_in_data_path from fuel import config def skip_if_not_available(modules=None, datasets=None, configurations=None): """Raises a SkipTest exception when requirements are not met. Parameters ---------- mod...
mit
-4,623,335,317,733,028,000
30.636364
76
0.644397
false
iut-ibk/DynaMind-UrbanSim
3rdparty/opus/src/psrc/parcel/number_of_surveyed_households.py
2
2619
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from urbansim.functions import attribute_label from variable_functions import my_attribute_label class number_of_surveyed_households(Variable)...
gpl-2.0
-7,789,972,364,273,133,000
35.442857
102
0.598702
false
MeshCollider/bitcoin
test/functional/p2p_timeouts.py
25
3447
#!/usr/bin/env python3 # Copyright (c) 2016-2020 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 various net timeouts. - Create three bitcoind nodes: no_verack_node - we never send a verack...
mit
-957,269,459,602,357,500
35.670213
122
0.667537
false
xxsergzzxx/python-for-android
python-modules/twisted/twisted/words/test/test_ircsupport.py
49
2302
# Copyright (c) 2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.im.ircsupport}. """ from twisted.trial.unittest import TestCase from twisted.test.proto_helpers import StringTransport from twisted.words.im.basechat import Conversation, ChatUI from twisted.words.im.ircsupport...
apache-2.0
1,933,952,859,393,050,600
28.139241
80
0.619461
false
petricm/DIRAC
AccountingSystem/Service/DataStoreHandler.py
6
8068
""" DataStore is the service for inserting accounting reports (rows) in the Accounting DB This service CAN be duplicated iff the first is a "master" and all the others are slaves. """ import datetime from DIRAC import S_OK, S_ERROR, gConfig, gLogger from DIRAC.AccountingSystem.DB.MultiAccountingDB import MultiA...
gpl-3.0
8,012,035,446,639,056,000
34.078261
106
0.654809
false
40223137/150601
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_loader.py
738
49593
import sys import types import unittest class Test_TestLoader(unittest.TestCase): ### Tests for TestLoader.loadTestsFromTestCase ################################################################ # "Return a suite of all tests cases contained in the TestCase-derived # class testCaseClass" def te...
agpl-3.0
2,533,542,588,000,425,000
37.384675
91
0.627044
false
asobrien/carlae
setup.py
1
2182
#!/usr/bin/env python # -*- coding: utf-8 -*- #---------------------------------------------------------------------- # Setup script for carlae package import sys from setuptools import setup, find_packages ### CONFIGURE BUILD VARIABLES VERSION = "0.0.2" ### END OF CONFIGURATION # Get requirements from file with op...
mit
8,048,717,950,419,052,000
31.58209
75
0.588451
false
sylnsfar/qrcode
amzqr/mylibs/matrix.py
1
6123
# -*- coding: utf-8 -*- from amzqr.mylibs.constant import alig_location, format_info_str, version_info_str, lindex def get_qrmatrix(ver, ecl, bits): num = (ver - 1) * 4 + 21 qrmatrix = [[None] * num for i in range(num)] # [([None] * num * num)[i:i+num] for i in range(num * num) if i % num == 0] ...
gpl-3.0
6,968,505,607,318,785,000
30.405128
97
0.431814
false
oemof/reegis-hp
reegis_hp/de21/configuration.py
3
15297
__copyright__ = "Uwe Krien" __license__ = "GPLv3" import config as cfg import os from oemof.tools import logger class ConfigurationDe21: def __init__(self): self.pattern = dict() self.files = dict() self.general = dict() self.url = dict() self.pv = dict() target_...
gpl-3.0
-3,832,338,891,870,447,000
40.455285
80
0.512976
false
AsimmHirani/ISpyPi
tensorflow/contrib/tensorflow-master/tensorflow/python/training/server_lib_multiple_containers_test.py
133
2414
# Copyright 2017 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,340,370,149,967,769,000
37.935484
80
0.713753
false
legalsylvain/OpenUpgrade
addons/resource/tests/__init__.py
121
1146
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
-58,281,782,446,326,056
39.928571
78
0.624782
false
Eseoghene/bite-project
deps/gdata-python-client/src/gdata/calendar_resource/client.py
49
7210
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
-1,074,007,185,186,317,600
35.231156
80
0.704438
false
timothydmorton/bokeh
bokeh/server/utils/plugins.py
29
2809
""" Utilities for writing plugins. This is different from bokeh.pluginutils because these are ways of patching routes and objects directly into the bokeh server. You would run this type of code using the --script option """ from __future__ import absolute_import import uuid from flask import abort, render_template...
bsd-3-clause
6,483,272,063,635,220,000
35.012821
83
0.592026
false
BT-fgarbely/l10n-switzerland
l10n_ch_states/__openerp__.py
4
1342
# -*- coding: utf-8 -*- ############################################################################## # # Author: Mathias Neef # Copyright 2015 copadoMEDIA UG # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
agpl-3.0
-5,661,845,883,998,822,000
36.277778
78
0.578987
false
liamgh/liamgreenhughes-sl4a-tf101
python/src/Lib/test/test_import.py
48
14273
import unittest import os import random import shutil import sys import py_compile import warnings import marshal from test.test_support import unlink, TESTFN, unload, run_unittest, check_warnings def remove_files(name): for f in (name + os.extsep + "py", name + os.extsep + "pyc", name...
apache-2.0
3,023,274,577,955,276,000
34.952141
84
0.562951
false
alexlib/openptv
liboptv/tests/gen_track_data.py
3
1925
""" Generate a 5-frame trajectory that is pretty degenerates so is good for testing. It starts from (0,0,0) and moves in a straight line on the x axis, at a slow velocity. """ import numpy as np from optv.calibration import Calibration from optv.parameters import ControlParams from optv.imgcoord import image_coordina...
lgpl-3.0
-5,587,367,864,865,379,000
35.320755
90
0.613506
false
DalikarFT/CFVOP
venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py
1777
3764
######################## 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...
gpl-3.0
-50,575,641,249,394,900
40.362637
78
0.604676
false
Intel-tensorflow/tensorflow
tensorflow/python/summary/writer/event_file_writer_v2.py
6
5788
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,844,055,052,825,389,000
40.342857
89
0.690739
false
ddayguerrero/blogme
flask/lib/python3.4/site-packages/sqlalchemy/testing/assertions.py
11
16112
# testing/assertions.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from __future__ import absolute_import from . import util as testutil from sq...
mit
-4,266,558,409,177,780,700
31.814664
78
0.582857
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/gateway_route_py3.py
7
2245
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-694,199,461,915,216,300
33.538462
76
0.561693
false
ShinyROM/android_external_chromium_org
chrome/common/extensions/docs/server2/compiled_file_system_test.py
23
9146
#!/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 functools import os from appengine_wrappers import GetAppVersion from compiled_file_system import CompiledFileSystem from copy ...
bsd-3-clause
4,491,389,475,356,985,000
41.147465
80
0.636781
false
yalp/fiware-orion
test/acceptance/behave/__init__.py
4
1104
# -*- coding: utf-8 -*- """ Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U This file is part of Orion Context Broker. Orion Context Broker 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,...
agpl-3.0
-3,658,206,925,979,651,600
33.4375
75
0.756806
false
RandyLowery/erpnext
erpnext/schools/doctype/course_schedule/course_schedule.py
5
2222
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document class CourseSchedule(Document): def validate(self): self.instruc...
gpl-3.0
-1,036,334,002,028,413,600
33.184615
105
0.726823
false
IptvBrasilGroup/Cleitonleonelcreton.repository
plugin.video.armagedomfilmes/bs4/tests/test_lxml.py
273
2965
"""Tests to ensure that the lxml tree builder generates good trees.""" import re import warnings try: import lxml.etree LXML_PRESENT = True LXML_VERSION = lxml.etree.LXML_VERSION except ImportError, e: LXML_PRESENT = False LXML_VERSION = (0,) if LXML_PRESENT: from bs4.builder import LXMLTreeB...
gpl-2.0
4,687,394,497,048,296,000
31.582418
86
0.650253
false
jeffcharles/Open-Source-at-Laurier-Website
wluopensource/osl_comments/urls.py
1
2435
from django.conf.urls.defaults import * from django.contrib.comments.urls import urlpatterns from osl_comments.models import OslComment urlpatterns += patterns('osl_comments.views', (r'^comment/(?P<comment_id>\d+)/$', 'get_comment'), (r'^delete_comment/(?P<comment_id>\d+)/$', 'delete_comment'), (r'^delete...
bsd-3-clause
5,801,417,389,841,083,000
44.943396
133
0.608214
false
waytai/networkx
networkx/algorithms/cycles.py
30
16789
""" ======================== Cycle finding algorithms ======================== """ # Copyright (C) 2010-2012 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from collections import defaultdict import networ...
bsd-3-clause
266,827,395,461,955,780
35.105376
84
0.571446
false
msabramo/ansible
lib/ansible/modules/network/ovs/openvswitch_port.py
28
8562
#!/usr/bin/python #coding: utf-8 -*- # pylint: disable=C0111 # (c) 2013, David Stygstra <david.stygstra@gmail.com> # # Portions copyright @ 2015 VMware, Inc. # # This file is part of Ansible # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-3.0
-5,070,830,329,924,871,000
28.023729
102
0.553025
false
tombstone/models
research/delf/delf/python/feature_aggregation_extractor_test.py
2
18304
# 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 applicab...
apache-2.0
4,678,364,754,717,272,000
36.052632
80
0.681654
false
brandon-rhodes/numpy
numpy/lib/shape_base.py
3
25218
from __future__ import division, absolute_import, print_function import warnings import numpy.core.numeric as _nx from numpy.core.numeric import ( asarray, zeros, outer, concatenate, isscalar, array, asanyarray ) from numpy.core.fromnumeric import product, reshape from numpy.core import vstack, atleast_3d _...
bsd-3-clause
-5,260,378,352,135,447,000
28.153757
79
0.509676
false
MarkTheF4rth/youtube-dl
youtube_dl/extractor/ooyala.py
101
7982
from __future__ import unicode_literals import re import json import base64 from .common import InfoExtractor from ..utils import ( unescapeHTML, ExtractorError, determine_ext, int_or_none, ) class OoyalaBaseIE(InfoExtractor): def _extract_result(self, info, more_info): embedCode = info[...
unlicense
-8,579,943,750,010,327,000
39.72449
334
0.529692
false
liu602348184/django
django/core/cache/backends/dummy.py
629
1213
"Dummy cache backend" from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache class DummyCache(BaseCache): def __init__(self, host, *args, **kwargs): BaseCache.__init__(self, *args, **kwargs) def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): key = self.make_key...
bsd-3-clause
2,636,910,996,120,891,400
27.209302
70
0.628195
false
idf-reading/cheat
cheat/sheets.py
1
2886
""" A container of sheets No caching. """ from cheat import cheatsheets from cheat.utils import * import os def default_path(): """ Returns the default cheatsheet path """ # determine the default cheatsheet dir default_sheets_dir = os.environ.get('DEFAULT_CHEAT_DIR') or os.path.join(os.path.expanduser('...
gpl-3.0
3,417,098,885,831,857,700
27.019417
111
0.59113
false
helloiloveit/VkxPhoneProject
submodules/externals/antlr3/runtime/Python/tests/t060leftrecursion.py
16
14776
import unittest import re import textwrap import antlr3 import testbase # Left-recursion resolution is not yet enabled in the tool. # class TestLeftRecursion(testbase.ANTLRTest): # def parserClass(self, base): # class TParser(base): # def __init__(self, *args, **kwargs): # bas...
gpl-2.0
-899,251,921,662,052,100
30.57265
116
0.271589
false
ChinaQuants/bokeh
examples/charts/file/bar_multi.py
4
1665
from bokeh.charts import Bar, output_file, show, vplot, hplot, defaults from bokeh.sampledata.autompg import autompg as df df['neg_mpg'] = 0 - df['mpg'] defaults.width = 450 defaults.height = 350 bar_plot = Bar(df, label='cyl', title="label='cyl'") bar_plot2 = Bar(df, label='cyl', bar_width=0.4, title="label='cyl' ...
bsd-3-clause
170,110,309,795,836,300
34.425532
90
0.605405
false
vbannai/neutron
neutron/db/migration/__init__.py
8
2135
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
apache-2.0
5,174,752,056,473,250,000
39.283019
79
0.642155
false
boberfly/gaffer
python/GafferTest/NameValuePlugTest.py
4
14807
########################################################################## # # Copyright (c) 2019, Image Engine Design 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: # # * Redistrib...
bsd-3-clause
3,659,498,383,272,151,600
44.700617
240
0.671439
false
Kallehz/Python
Próf2/3.py
1
2505
# Numbers game # # Hawk and his little brother, Stone, are playing a little game with # the following rules. Initially 8 random integers, from 1 to 100 (inclusive), # are laid on the table for both players to see. The players then have # 2 minutes to construct a sequence of numbers, from the given 8 numbers...
apache-2.0
5,612,056,792,786,234,000
47.192308
138
0.653892
false
splanger/dbmake
dbmake/dbmake.py
1
1926
#!/usr/bin/python import sys from .common import FAILURE, SUCCESS from .dbmake_cli import get_command, print_help, get_command_class_reference from .common import CommandNotExists, BadCommandArguments, DBMAKE_VERSION class App: def __init__(self): self.ide_stop_bothering_with_static_method = "!!!" ...
apache-2.0
-3,011,457,692,243,654,700
28.630769
77
0.545171
false
huongttlan/bokeh
examples/plotting/file/glyphs.py
43
4021
import numpy as np from bokeh.plotting import figure, show, output_file, vplot N = 9 x = np.linspace(-2, 2, N) y = x**2 sizes = np.linspace(10, 20, N) xpts = np.array([-.09, -.12, .0, .12, .09]) ypts = np.array([-.1, .02, .1, .02, -.1]) output_file("glyphs.html", title="glyphs.py example") vplot = vplot() p = fi...
bsd-3-clause
5,854,011,748,366,971,000
28.137681
83
0.669485
false
jacobmetrick/Flexget
flexget/plugins/list/subtitle_list.py
3
13832
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from past.builtins import basestring import logging import os from collections import MutableSet from datetime import datetime, date, time from sqlalchemy import Column, U...
mit
2,923,030,647,165,697,000
41.823529
116
0.582924
false
wevoice/wesub
apps/videos/types/video_google.py
5
1410
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # 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 # License, or (at your ...
agpl-3.0
6,070,526,257,467,340,000
36.105263
75
0.729078
false
ElGatoLoco/DRF-Webpack-ES6-React-SASS---starter-kit
backend/main/settings.py
1
3343
""" Django settings for main project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os #...
mit
-3,712,922,695,208,108,000
24.715385
91
0.686808
false
sondree/Master-thesis
Python EA/ea/progress_drawing.py
1
3860
#!/usr/bin/python from matplotlib.patches import Rectangle, Circle, RegularPolygon, Arrow from fitness import FITNESS_SECTION class BasicDrawing(object): def __init__(self,config): self.config = config self.grid_x = self.config.getint(FITNESS_SECTION,"grid_x") self.grid_y = self....
gpl-3.0
-2,111,542,941,610,308,400
37.6
113
0.523057
false
sandyjmacdonald/dots_for_microarrays
dots_backend/dots_analysis.py
1
12261
# -*- coding: utf-8 -*- #!/usr/bin/env python import warnings import pandas as pd import numpy as np import scipy.cluster.hierarchy as hac from dots_arrays import Experiment from sklearn.decomposition import PCA from itertools import combinations from scipy.stats import ttest_ind, f_oneway from statsmodels.stats.multi...
mit
7,619,031,338,083,889,000
34.433526
187
0.695759
false
rukeon/py_ideapage
lib/werkzeug/__init__.py
296
7210
# -*- coding: utf-8 -*- """ werkzeug ~~~~~~~~ Werkzeug is the Swiss Army knife of Python web development. It provides useful classes and functions for any WSGI application to make the life of a python web developer much easier. All of the provided classes are independent from each other so yo...
apache-2.0
7,172,061,250,624,090,000
45.818182
81
0.552011
false
cypod/arsenalsuite
cpp/apps/absubmit/fusionsubmit/submit.py
10
11573
#!/usr/bin/python from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.uic import * from blur.Stone import * from blur.Classes import * from blur.Classesui import HostSelector from blur.absubmit import Submitter from blur import RedirectOutputToLog import sys import time import os.path import r...
gpl-2.0
5,081,875,374,946,736,000
37.230508
179
0.668625
false
sgerhart/ansible
lib/ansible/plugins/action/cli_config.py
27
1190
# # Copyright 2018 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. # # Ansibl...
mit
6,491,705,354,629,563,000
37.387097
131
0.733613
false
YannickDieter/testbeam_analysis
testbeam_analysis/testing/test_track_analysis.py
1
13492
''' Script to check the correctness of the analysis. The analysis is done on raw data and all results are compared to a recorded analysis. ''' import os import shutil import unittest from testbeam_analysis import track_analysis from testbeam_analysis.tools import analysis_utils, test_tools testing_path = os.path.dirn...
mit
-3,057,428,348,299,058,000
88.350993
237
0.470205
false
natduca/ndbg
ui/overlay.py
1
11736
# Copyright 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
-2,515,164,540,939,714,600
27.211538
133
0.622103
false
codingforentrepreneurs/srvup-rest-framework
src/srvup/urls.py
2
3803
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from rest_framework import routers from comments.serializers import CommentViewSet from comments.views import...
apache-2.0
-5,833,051,992,733,671,000
35.92233
116
0.658953
false
LUTAN/tensorflow
tensorflow/contrib/keras/api/keras/preprocessing/__init__.py
132
1094
# 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
-893,030,527,369,083,400
39.518519
80
0.727605
false
nblock/ofxstatement-austrian
src/ofxstatement/plugins/easybank.py
1
6467
#!/usr/bin/env python3 # This file is part of ofxstatement-austrian. # See README.rst for more information. import csv import re from ofxstatement import statement from ofxstatement.parser import CsvStatementParser from ofxstatement.plugin import Plugin from ofxstatement.statement import generate_transaction_id from o...
gpl-3.0
6,896,517,123,562,095,000
31.497487
78
0.570435
false
winklerand/pandas
pandas/core/computation/expressions.py
4
7066
""" Expressions ----------- Offer fast expression evaluation through numexpr """ import warnings import numpy as np from pandas.core.common import _values_from_object from pandas.core.computation.check import _NUMEXPR_INSTALLED from pandas.core.config import get_option if _NUMEXPR_INSTALLED: import numexpr as n...
bsd-3-clause
1,616,794,277,156,920,000
27.607287
77
0.545004
false
Workday/OpenFrame
chrome/test/chromedriver/test/waterfall_builder_monitor.py
43
8030
#!/usr/bin/env python # 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. """Waterfall monitoring script. This script checks all builders specified in the config file and sends status email about any s...
bsd-3-clause
-4,141,546,812,680,202,000
34.530973
79
0.60934
false
AndroidDeveloperAlliance/platform_external_skia
bench/bench_compare.py
27
4180
''' Created on May 16, 2011 @author: bungeman ''' import sys import getopt import bench_util def usage(): """Prints simple usage information.""" print '-o <file> the old bench output file.' print '-n <file> the new bench output file.' print '-h causes headers to be output.' print '-f <fieldSp...
bsd-3-clause
979,383,099,255,555,000
27.053691
68
0.472488
false
cuauv/software
vision/modules/old/2018/roulette.py
1
16701
#!/usr/bin/env python3 # Written by Chesley Tan. # Tweaked by Will Smith. import traceback import time import sys import math import itertools import cv2 import numpy as np import shm from vision.modules.base import ModuleBase from vision.framework.color import bgr_to_lab, elementwise_color_dist, range_threshold fro...
bsd-3-clause
986,982,532,603,059,800
39.635036
141
0.542003
false
vied12/superdesk
server/apps/rules/rule_sets.py
3
1500
# -*- 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 import loggi...
agpl-3.0
-1,927,235,881,452,708,000
26.272727
112
0.608
false
Theer108/invenio
invenio/modules/pages/views.py
7
4531
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2014, 2015 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 l...
gpl-2.0
-3,572,071,127,736,344,600
31.833333
79
0.672478
false
ndtran/compassion-modules
message_center_compassion/tests/test_messages.py
2
15121
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __opener...
agpl-3.0
-5,565,772,598,100,492,000
41.474719
79
0.542623
false
thekingofkings/focusread
libs/dns/rdataset.py
16
11556
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
mit
7,631,445,619,735,218,000
33.189349
79
0.595708
false
dbrawand/zippy
app/zippylib/primer.py
2
10154
#!/usr/bin/env python import sys, os, re from hashlib import md5 import primer3 import pysam import subprocess from collections import defaultdict, OrderedDict '''just a wrapper for pysam''' class MultiFasta(object): def __init__(self,file): self.file = file def createPrimers(self,db,bowtie='bowtie2'...
mit
2,779,804,258,056,162,000
37.029963
180
0.54481
false