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
ZhenxingWu/luigi
test/s3_test.py
42
12104
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Mortar Data # # 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
3,960,303,139,015,000,000
38.171521
95
0.634666
false
mgracer48/panda3d
direct/src/gui/OnscreenImage.py
9
5704
"""OnscreenImage module: contains the OnscreenImage class""" __all__ = ['OnscreenImage'] from panda3d.core import * from direct.showbase.DirectObject import DirectObject import types class OnscreenImage(DirectObject, NodePath): def __init__(self, image = None, pos = None, hpr = ...
bsd-3-clause
-5,390,319,586,700,250,000
35.101266
78
0.53892
false
Maistho/CouchPotatoServer
couchpotato/core/media/_base/search/main.py
80
2211
from couchpotato.api import addApiView from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.helpers.variable import mergeDicts, getImdb from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin log = CPLog(__name__) class Search(Plugin): def __init__(self...
gpl-3.0
8,564,888,233,024,013,000
31.514706
104
0.565355
false
Beauhurst/django
django/utils/translation/trans_real.py
17
18459
"""Translation helper functions.""" import functools import gettext as gettext_module import os import re import sys import warnings from collections import OrderedDict from threading import local from django.apps import apps from django.conf import settings from django.conf.locale import LANG_INFO from django.core.ex...
bsd-3-clause
5,126,096,683,518,662,000
33.697368
107
0.641367
false
Rhaseven7h/hellanzb
Hellanzb/NZBLeecher/NZBModel.py
4
35912
""" NZBModel - Representations of the NZB file format in memory (c) Copyright 2005 Philip Jenvey [See end of file] """ import os, re, Hellanzb try: set except NameError: from sets import Set as set from shutil import move from threading import Lock, RLock from Hellanzb.Log import * from Hellanzb.NZBQueue impo...
bsd-3-clause
6,892,366,424,331,591,000
42.319662
98
0.626309
false
mx3L/enigma2
lib/python/Screens/LanguageSelection.py
37
2948
import gettext from Screen import Screen from Components.ActionMap import ActionMap from Components.Language import language from Components.config import config from Components.Sources.List import List from Components.Label import Label from Components.Pixmap import Pixmap from Screens.InfoBar import InfoBar from Scre...
gpl-2.0
-5,633,826,898,741,007,000
28.777778
117
0.722524
false
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/bsddb/test/test_dbenv.py
68
19274
import unittest import os, glob from test_all import db, test_support, get_new_environment_path, \ get_new_database_path #---------------------------------------------------------------------- class DBEnv(unittest.TestCase): def setUp(self): self.homeDir = get_new_environment_path() self....
gpl-2.0
6,483,997,960,247,699,000
35.712381
85
0.548511
false
Werkov/PyQt4
examples/network/threadedfortuneserver.py
20
5283
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
5,926,304,874,707,295,000
34.938776
82
0.647927
false
Lyleo/nupic
examples/opf/experiments/opfrunexperiment_test/simpleOPF/hotgym_no_agg/description.py
8
14990
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
-1,810,694,539,530,462,000
37.337596
170
0.621815
false
israelcoin/isracoin-p2pool
p2pool/work.py
5
24245
from __future__ import division import base64 import random import re import sys import time from twisted.internet import defer from twisted.python import log import bitcoin.getwork as bitcoin_getwork, bitcoin.data as bitcoin_data from bitcoin import helper, script, worker_interface from util import forest, jsonrpc,...
gpl-3.0
-4,348,684,915,787,480,000
54.735632
223
0.57649
false
somenice/Pablo
web/session.py
52
10767
""" Session Management (from web.py) """ import os, time, datetime, random, base64 import os.path from copy import deepcopy try: import cPickle as pickle except ImportError: import pickle try: import hashlib sha1 = hashlib.sha1 except ImportError: import sha sha1 = sha.new import utils import ...
mit
369,857,665,120,473,150
29.075419
137
0.557444
false
apache/bloodhound
trac/trac/admin/api.py
3
7003
# -*- coding: utf-8 -*- # # Copyright (C)2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consis...
apache-2.0
4,560,362,549,940,186,600
35.097938
79
0.581465
false
nkgilley/home-assistant
homeassistant/components/thinkingcleaner/sensor.py
6
3836
"""Support for ThinkingCleaner sensors.""" from datetime import timedelta import logging from pythinkingcleaner import Discovery, ThinkingCleaner import voluptuous as vol from homeassistant import util from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_HOST, UNIT_PERCENTA...
apache-2.0
2,309,891,429,707,617,300
30.966667
80
0.643639
false
nullx002/pychess
lib/pychess/widgets/pydock/ArrowButton.py
20
4242
from __future__ import absolute_import import cairo from gi.repository import Gtk from gi.repository import GObject from gi.repository import Gdk from .OverlayWindow import OverlayWindow from .__init__ import NORTH, EAST, SOUTH, WEST class ArrowButton (OverlayWindow): """ Leafs will connect to the drag-drop sig...
gpl-3.0
1,185,035,994,620,556,300
36.539823
95
0.589345
false
goliate/sarakha63-persomov
libs/rtorrent/tracker.py
173
5212
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com> # 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, ...
gpl-3.0
-5,169,463,962,490,705,000
36.768116
90
0.603799
false
benreynwar/plover
plover/machine/stentura.py
1
22596
# Copyright (c) 2011 Hesky Fisher # See LICENSE.txt for details. # Many thanks to a steno geek for help with the protocol. # TODO: Come up with a mechanism to communicate back to the engine when there # is a connection error. # TODO: Address any generic exceptions still left. """Thread-based monitoring of a stenotype...
gpl-2.0
3,677,000,887,111,992,000
33.816641
102
0.664365
false
fhaoquan/kbengine
kbe/res/scripts/common/Lib/test/test_getopt.py
173
6968
# test_getopt.py # David Goodger <dgoodger@bigfoot.com> 2000-08-19 from test.support import verbose, run_doctest, run_unittest, EnvironmentVarGuard import unittest import getopt sentinel = object() class GetoptTests(unittest.TestCase): def setUp(self): self.env = EnvironmentVarGuard() if "POSIXL...
lgpl-3.0
-2,572,470,421,126,457,300
36.262032
93
0.502583
false
GuillaumeSeren/alot
tests/commands/test_envelope.py
2
14242
# encoding=utf-8 # Copyright © 2017-2018 Dylan Baker # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is...
gpl-3.0
1,472,685,448,595,715,300
35.98961
79
0.614493
false
operepo/ope
client_tools/svc/build_mgmt.py
1
1171
import os import sys import shutil project_name = "mgmt" main_file = "mgmt.py" # If you get corrupted errors, use this clean = " " # " --clean " remove_spec_file = False spec_file = project_name + ".spec" # Don't wan't old spec files right now. if remove_spec_file and os.path.exists(spec_file): os.unlink(spec_...
mit
-6,105,235,636,988,295,000
29.842105
90
0.64731
false
ysekky/chainer
chainer/functions/math/sum.py
3
2814
from chainer import cuda from chainer import function from chainer.utils import type_check class Sum(function.Function): """Sum of array elements over a given axis.""" keepdims = False def __init__(self, axis=None, keepdims=False): if axis is None: self.axis = None elif isins...
mit
-3,255,200,369,714,144,000
30.617978
79
0.514925
false
heplesser/nest-simulator
pynest/nest/tests/test_connect_pairwise_bernoulli.py
10
3533
# -*- coding: utf-8 -*- # # test_connect_pairwise_bernoulli.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version ...
gpl-2.0
-4,208,281,130,939,417,600
32.647619
79
0.612511
false
smishenk/blink-crosswalk
Tools/Scripts/webkitpy/tool/commands/prettydiff.py
186
1857
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
334,709,396,970,190,200
46.615385
84
0.774906
false
zentralopensource/zentral
zentral/contrib/mdm/views/mdm.py
1
12922
import logging import plistlib from django.db import transaction from django.http import HttpResponse from django.views.generic import View from zentral.contrib.inventory.models import MetaBusinessUnit from zentral.contrib.inventory.utils import commit_machine_snapshot_and_trigger_events from zentral.contrib.mdm.comman...
apache-2.0
-8,630,732,801,877,188,000
41.646865
109
0.571196
false
google-research/pddm
pddm/utils/convert_to_parser_args.py
1
4673
# Copyright 2019 Google LLC # # 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,518,718,551,554,083,300
43.504762
112
0.670233
false
AlanLaughter/huehuehue
ver2/find_words.py
2
1377
#found this solution on http://stackoverflow.com/questions/8870261/how-to-split-text-without-spaces-into-list-of-words def find_words(instring, prefix = '', words = None): if not instring: return [] if words is None: words = set() with open('/usr/share/dict/words') as f: for ...
gpl-3.0
2,216,638,136,196,021,500
31.785714
118
0.59695
false
Callwoola/tornado
tornado/escape.py
120
14441
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
apache-2.0
5,857,235,288,426,557,000
35.192982
182
0.622533
false
erlang/otp
lib/asn1/test/asn1_SUITE_data/Constraints.py
92
4620
Constraints DEFINITIONS ::= BEGIN -- Single Value SingleValue ::= INTEGER (1) SingleValue2 ::= INTEGER (1..20) predefined INTEGER ::= 1 SingleValue3 ::= INTEGER (predefined | 5 | 10) Range2to19 ::= INTEGER (1<..<20) Range10to20 ::= INTEGER (10..20) ContainedSubtype ::= INTEGER (INCLUDES Range10to20) -- Some ranges for...
apache-2.0
6,568,721,145,081,938,000
23.315789
123
0.669481
false
asimshankar/tensorflow
tensorflow/compiler/tests/variable_ops_test.py
5
21654
# 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
6,817,272,650,089,843,000
42.657258
80
0.611388
false
mattseymour/django
django/template/loaders/cached.py
2
3743
""" Wrapper class that takes a list of template loaders as an argument and attempts to load templates from them in order, caching the result. """ import hashlib from django.template import TemplateDoesNotExist from django.template.backends.django import copy_exception from django.utils.encoding import force_bytes, fo...
bsd-3-clause
3,135,017,786,317,244,000
37.587629
107
0.651082
false
auferack08/edx-platform
common/lib/xmodule/xmodule/tests/test_conditional.py
37
12428
import json import unittest from fs.memoryfs import MemoryFS from mock import Mock, patch from xblock.field_data import DictFieldData from xblock.fields import ScopeIds from xmodule.error_module import NonStaffErrorDescriptor from opaque_keys.edx.locations import SlashSeparatedCourseKey, Location from xmodule.modules...
agpl-3.0
-4,594,136,549,332,795,400
40.704698
133
0.634133
false
abhi11/tanglu-dak
daklib/daksubprocess.py
7
2601
"""subprocess management for dak @copyright: 2013, Ansgar Burchardt <ansgar@debian.org> @license: GPL-2+ """ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or...
gpl-2.0
37,729,048,246,499,140
36.157143
75
0.702422
false
eliasdesousa/indico
indico/modules/events/registration/placeholders/registrations.py
2
3930
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
-6,816,591,418,972,336,000
33.473684
114
0.672265
false
Liyier/learning_log
env/Lib/site-packages/django/test/client.py
44
28212
from __future__ import unicode_literals import json import mimetypes import os import re import sys from copy import copy from importlib import import_module from io import BytesIO from django.conf import settings from django.core.handlers.base import BaseHandler from django.core.handlers.wsgi import ISO_8859_1, UTF_...
mit
1,803,554,741,986,349,300
37.227642
112
0.59301
false
Perferom/android_external_chromium_org
native_client_sdk/src/tools/tests/chrome_mock.py
107
1498
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import sys import time import urllib2 def PrintAndFlush(s): print s sys.stdout.flush() def main(args): pars...
bsd-3-clause
9,105,085,210,868,886,000
30.208333
80
0.628171
false
renzon/scripts3tarde
backend/appengine/manager.py
31
37077
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import importlib import sys import os import shutil if 'GAE_SDK' in os.environ: SDK_PATH = os.environ['GAE_SDK'] sys.path.insert(0, SDK_PATH) import dev_appserver dev_appserver.fix_sys_path() else: print "GAE_SDK en...
mit
-4,972,523,759,543,929,000
35.385672
195
0.631038
false
joedursun/.emacs.d
elpa/elpy-20150226.1148/elpy/tests/support.py
1
26998
# coding: utf-8 """Support classes and functions for the elpy test code. Elpy uses a bit of a peculiar test setup to avoid redundancy. For the tests of the two backends, we provide generic test cases for generic tests and for specific callback tests. These mixins can be included in the actual test classes. We can't ...
gpl-3.0
-864,603,837,614,749,600
35.481081
104
0.504075
false
gnmiller/craig-bot
craig-bot/lib/python3.6/site-packages/urllib3/util/wait.py
63
5403
import errno from functools import partial import select import sys try: from time import monotonic except ImportError: from time import time as monotonic __all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"] class NoWayToWaitForSocketError(Exception): pass # How should we wait on ...
mit
2,898,697,313,693,107,700
35.02
81
0.655192
false
EeOneDown/spbu4u
telebot_login/__init__.py
1
4022
from functools import wraps from flask import g from app.constants import ( ask_to_register_answer, student_required_answer, educator_required_answer ) from app.models import User from tg_bot import bot def login_required_message(func): @wraps(func) def wrapper(message): user = User.query.filter...
apache-2.0
-7,583,553,841,568,528,000
26.930556
77
0.562655
false
stuntman723/rap-analyzer
rap_analyzer/lib/python2.7/site-packages/psycopg2/extras.py
25
31956
"""Miscellaneous goodies for psycopg2 This module is a generic place used to hold little helper functions and classes until a better place in the distribution is found. """ # psycopg/extras.py - miscellaneous extra goodies for psycopg # # Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is f...
mit
92,056,140,980,305,200
31.775385
90
0.607836
false
cudeso/AIL-framework
bin/indexer_lookup.py
2
2895
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of AIL framework - Analysis Information Leak framework # # 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...
agpl-3.0
-2,644,736,683,958,359,000
31.166667
120
0.68532
false
IllusionRom-deprecated/android_platform_external_chromium_org_tools_grit
grit/tool/android2grd.py
7
19811
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The 'grit android2grd' tool.""" import getopt import os.path import StringIO from xml.dom import Node import xml.dom.minidom ...
bsd-2-clause
8,897,291,990,213,287,000
38.701403
80
0.634446
false
miyouzi/ch-docker-ssr
shadowsocks/manager.py
19
9889
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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 b...
apache-2.0
-3,408,312,563,077,931,000
32.982818
79
0.531904
false
madan96/sympy
sympy/series/order.py
16
16906
from __future__ import print_function, division from sympy.core import S, sympify, Expr, Rational, Symbol, Dummy from sympy.core import Add, Mul, expand_power_base, expand_log from sympy.core.cache import cacheit from sympy.core.compatibility import default_sort_key, is_sequence from sympy.core.containers import Tuple...
bsd-3-clause
2,307,532,202,026,398,000
34.591579
95
0.474743
false
luiseduardohdbackup/odoo
addons/l10n_be_intrastat/l10n_be_intrastat.py
258
7828
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (C) 2014-2015 Odoo S.A. <http://www.odoo.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
-2,490,234,141,211,666,400
37.561576
96
0.589806
false
tumbl3w33d/ansible
lib/ansible/modules/network/fortios/fortios_firewall_profile_group.py
13
14468
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
-4,282,838,398,650,706,400
34.031477
114
0.583287
false
valentin-krasontovitsch/ansible
test/units/modules/network/f5/test_bigip_profile_http_compression.py
21
3949
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, 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 import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
-1,822,441,225,063,003,400
29.612403
91
0.65333
false
cbertinato/pandas
pandas/tests/frame/test_combine_concat.py
1
34741
from datetime import datetime import numpy as np import pytest import pandas as pd from pandas import DataFrame, Index, Series, Timestamp, date_range import pandas.util.testing as tm from pandas.util.testing import assert_frame_equal, assert_series_equal class TestDataFrameConcatCommon: def test_concat_multipl...
bsd-3-clause
-3,950,714,869,964,276,000
38.122748
79
0.499467
false
nilsbore/aaf_deployment
info_terminal/approach_person_of_interest/scripts/go_to_person_server.py
4
6954
#! /usr/bin/env python import roslib import rospy import actionlib from geometry_msgs.msg import PoseStamped, PointStamped from approach_person_of_interest.msg import * from sensor_msgs.msg import JointState from std_msgs.msg import String, Float32, Bool, Int32 from strands_navigation_msgs.msg import MonitoredNavigat...
mit
3,511,466,571,426,872,000
35.6
160
0.699166
false
luci/luci-py
appengine/auth_service/realms/config_test.py
2
11855
#!/usr/bin/env vpython # Copyright 2020 The LUCI 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. # pylint: disable=no-value-for-parameter import logging import os import sys import unittest import test_env test_env.set...
apache-2.0
3,039,949,825,477,426,000
31.568681
77
0.610797
false
mbjadhav/AliPhysics
PWGJE/EMCALJetTasks/Tracks/analysis/base/struct/JetTHnSparse.py
41
7138
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
bsd-3-clause
-7,049,058,447,727,804,000
32.359813
128
0.551275
false
efortuna/AndroidSDKClone
ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/email/quoprimime.py
246
10848
# Copyright (C) 2001-2006 Python Software Foundation # Author: Ben Gertzfield # Contact: email-sig@python.org """Quoted-printable content transfer encoding per RFCs 2045-2047. This module handles the content transfer encoding method defined in RFC 2045 to encode US ASCII-like 8-bit data called `quoted-printable'. It...
apache-2.0
756,441,391,227,998,300
30.812317
79
0.612647
false
40223246/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/unittest/main.py
739
10385
"""Unittest main program""" import sys import optparse import os from . import loader, runner from .signals import installHandler __unittest = True FAILFAST = " -f, --failfast Stop on first failure\n" CATCHBREAK = " -c, --catch Catch control-C and display results\n" BUFFEROUTPUT = " -b, --buffer ...
agpl-3.0
-8,960,870,641,396,471,000
37.605948
97
0.573038
false
Alwnikrotikz/sulley
requests/trend.py
6
5080
from sulley import * import struct # crap ass trend xor "encryption" routine for control manager (20901) def trend_xor_encode (str): ''' Simple bidirectional XOR "encryption" routine used by this service. ''' key = 0xA8534344 ret = "" # pad to 4 byte boundary. pad = 4 - (len(...
gpl-2.0
4,786,998,721,776,708,000
30.151899
120
0.531299
false
kernevil/samba
python/samba/tests/process_limits.py
1
3057
# Tests for limiting processes forked on accept by the standard process model # # Copyright (C) Andrew Bartlett <abartlet@samba.org> 2018 # # 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...
gpl-3.0
-3,796,221,196,269,468,700
38.192308
79
0.64246
false
Jay-Jay-D/LeanSTP
Algorithm.Python/G10CurrencySelectionModelFrameworkAlgorithm.py
1
3703
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lice...
apache-2.0
-974,299,155,031,268,000
48.36
152
0.689003
false
alexryndin/ambari
ambari-server/src/main/resources/stacks/ADH/1.5/services/TEZ/package/scripts/service_check.py
4
3606
""" 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 use this ...
apache-2.0
369,850,757,112,421,300
32.082569
128
0.721852
false
mrtnrdl/.macdots
scripts/bin/platform-tools/systrace/catapult/third_party/pyserial/serial/win32.py
155
10120
from ctypes import * from ctypes.wintypes import HANDLE from ctypes.wintypes import BOOL from ctypes.wintypes import LPCWSTR _stdcall_libraries = {} _stdcall_libraries['kernel32'] = WinDLL('kernel32') from ctypes.wintypes import DWORD from ctypes.wintypes import WORD from ctypes.wintypes import BYTE INVALID_HANDLE_VAL...
unlicense
6,257,671,678,654,504,000
30.625
95
0.694466
false
dgrat/Book
Tools/autotest/arducopter.py
39
44394
# fly ArduCopter in SITL # Flight mode switch positions are set-up in arducopter.param to be # switch 1 = Circle # switch 2 = Land # switch 3 = RTL # switch 4 = Auto # switch 5 = Loiter # switch 6 = Stabilize import util, pexpect, sys, time, math, shutil, os from common import * from pymavlink import mavut...
gpl-3.0
-534,872,594,714,872,600
31.618663
130
0.606095
false
kevinpt/hdlparse
hdlparse/verilog_parser.py
1
7107
# -*- coding: utf-8 -*- # Copyright © 2017 Kevin Thibedeau # Distributed under the terms of the MIT license from __future__ import print_function import re, os, io, ast, pprint, collections from minilexer import MiniLexer '''Verilog documentation parser''' verilog_tokens = { 'root': [ (r'\bmodule\s+(\w+)\s*', ...
mit
7,533,925,254,409,514,000
24.84
159
0.592457
false
malin1993ml/h-store
third_party/python/fabric/tasks.py
9
1652
from functools import wraps class Task(object): """ Abstract base class for objects wishing to be picked up as Fabric tasks. Instances of subclasses will be treated as valid tasks when present in fabfiles loaded by the :doc:`fab </usage/fab>` tool. For details on how to implement and use `~fabric...
gpl-3.0
-3,368,555,628,521,795,000
29.036364
76
0.622276
false
arielalmendral/ert
python/python/ert/config/config_content.py
2
7090
# Copyright (C) 2015 Statoil ASA, Norway. # # The file 'config_content.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 ...
gpl-3.0
8,455,337,035,728,481,000
33.754902
111
0.626657
false
SteveG/tracks-queue
src/widgetActionEditor.py
1
27462
#!/usr/bin/env python """ Copyright (C) 2010 Stephen Georg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version....
gpl-2.0
2,297,558,224,132,961,800
44.77
184
0.638191
false
sesuncedu/sdhash
sdhash-ui/jinja2/testsuite/regression.py
90
7583
# -*- coding: utf-8 -*- """ jinja2.testsuite.regression ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests corner cases and bugs. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Template, Enviro...
apache-2.0
-2,430,602,955,813,126,000
28.737255
109
0.44191
false
jemucino/pybilliards
src/billiards/settings.py
2
1523
# -*- coding: utf-8 -*- import logging import os import settings_default # TODO: replace platform specific paths class Settings(object): def __init__(self): self._settings = {} #self.add_from_file(os.path.join('settings_default.py')) self._settings.update(settings_default.settings) ...
gpl-3.0
5,032,440,967,181,737,000
27.735849
86
0.536441
false
theodoregoetz/clas12-dc-wiremap
clas12_wiremap/ui/main_window.py
1
5268
from __future__ import print_function, division import sys import os import numpy as np from clas12_wiremap.ui import QtGui, uic from clas12_wiremap.ui import Sidebar, CrateTab, DBTab, TBTab, DCWireStack, SetRunDialogue from clas12_wiremap.ui.dcrb_tab import DCRB from clas12_wiremap.ui.stb_tab import STBTab from clas1...
gpl-3.0
-6,509,669,168,945,342,000
31.518519
100
0.635915
false
noelbk/neutron-juniper
neutron/plugins/hyperv/rpc_callbacks.py
18
3977
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions SRL # 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
7,722,301,826,622,793,000
37.990196
79
0.60347
false
PyMySQL/mysqlclient-python
setup_windows.py
1
1765
import os import sys from distutils.msvccompiler import get_build_version def get_config(): from setup_common import get_metadata_and_options, create_release_file metadata, options = get_metadata_and_options() connector = options["connector"] extra_objects = [] # client = "mysqlclient" cli...
gpl-2.0
6,749,102,223,729,797,000
25.742424
77
0.568272
false
alexandrucoman/vbox-nova-driver
nova/tests/unit/virt/xenapi/image/test_bittorrent.py
21
5714
# Copyright 2013 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
5,961,333,681,014,964,000
34.271605
78
0.601505
false
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Fitbit/Statistics/GetActivityStats.py
5
4462
# -*- coding: utf-8 -*- ############################################################################### # # GetActivityStats # Gets user's activity statistics. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
gpl-2.0
335,626,411,671,314,100
40.700935
209
0.680636
false
marco-lancini/Showcase
social_auth/backends/contrib/live.py
4
2698
""" MSN Live Connect oAuth 2.0 Settings: LIVE_CLIENT_ID LIVE_CLIENT_SECRET LIVE_EXTENDED_PERMISSIONS (defaults are: wl.basic, wl.emails) References: * oAuth http://msdn.microsoft.com/en-us/library/live/hh243649.aspx * Scopes http://msdn.microsoft.com/en-us/library/live/hh243646.aspx * REST http://msdn.microsoft.co...
mit
4,378,911,412,471,387,000
29.314607
71
0.638992
false
Stanford-Online/edx-platform
openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py
9
12157
"""Tests for the backpopulate_program_credentials management command.""" import ddt import mock from django.core.management import call_command from django.test import TestCase from lms.djangoapps.certificates.models import CertificateStatuses # pylint: disable=import-error from course_modes.models import CourseMode ...
agpl-3.0
-1,345,017,164,464,041,000
34.135838
114
0.581887
false
0359xiaodong/fb-adb
mk-fingerprint.py
5
2543
#!/usr/bin/env python3 # -*- python-indent-offset: 2 -*- # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in # the LICENSE file in the root directory of this source tree. An # additional grant of patent rights can be found in the PATENTS file...
bsd-3-clause
-6,414,914,881,233,007,000
32.460526
70
0.664176
false
andrewleech/SickRage
lib/tvdb_api/tvdb_ui.py
92
5494
#!/usr/bin/env python2 #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:unlicense (http://unlicense.org/) """Contains included user interfaces for Tvdb show selection. A UI is a callback. A class, it's __init__ function takes two arguments: - config, which is the ...
gpl-3.0
5,346,500,453,012,092,000
34.908497
99
0.560066
false
Bulochkin/tensorflow_pack
tensorflow/contrib/makefile/downloads/protobuf/python/google/protobuf/internal/service_reflection_test.py
75
5170
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
apache-2.0
673,266,872,896,777,700
35.928571
80
0.724178
false
liuyang1/vimwiki_utils
dfsvw.py
1
2418
#! /usr/bin/env python # -*- coding: utf-8 -*- """dfsvw.py Create site map for vimwiki. Must run script under vimwiki directory. Example: output readable site map to stdout dfsvw.py output vimwiki-format sitemap to file dfsvw.py > map.wiki Python version: 2""" import sys import re linkRE = r...
mit
8,321,120,684,928,126,000
24.284211
70
0.516236
false
JumpLink/jade2html2jade
ThirdParty/js-beautify/python/jsbeautifier/tests/test-perf-jsbeautifier.py
7
1142
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import copy import jsbeautifier options = jsbeautifier.default_options() options.wrap_line_length = 80 data = '' data_min = '' def beautifier_test_underscore(): jsbeautifier.beautify(data, options) def beautifier_test_underscore_min(): jsbeautifier....
mit
-7,777,329,918,641,128,000
30.722222
102
0.642732
false
PearsonIOKI/compose-forum
askbot/migrations/0121_auto__add_field_groupprofile_is_open__add_field_groupprofile_preapprov.py
17
29105
# -*- 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 field 'GroupProfile.is_open' db.add_column('askbot_groupprofile', 'is_open', ...
gpl-3.0
-758,300,437,124,458,600
84.605882
226
0.558186
false
wrouesnel/ansible
test/units/modules/network/f5/test_bigip_irule.py
24
8316
# -*- 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 import os import json import sys from nose.plugins.skip import SkipTest i...
gpl-3.0
463,815,980,023,312,000
31.740157
100
0.610149
false
jhg/django
django/views/generic/edit.py
19
11221
import inspect import re import warnings from django.core.exceptions import ImproperlyConfigured from django.forms import models as model_forms from django.http import HttpResponseRedirect from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force...
bsd-3-clause
9,100,803,561,882,209,000
32.002941
85
0.59353
false
code-wukong/lolcomp
ws/views.py
1
14685
# ws/views.py from django.http import HttpResponse from django.http import HttpResponseRedirect import json from lolcomp.helpers import * import os import requests from ws.models import * # retrieve constants for app sitedown def cst_sitedown(request): if request.method == 'POST': post = json.loads(reque...
gpl-2.0
-1,308,073,793,527,462,100
36.850515
106
0.475111
false
jungla/ICOM-fluidity-toolbox
2D/RST/plot_T_spec_res.py
1
8498
import os, sys import myfun import numpy as np import matplotlib as mpl mpl.use('ps') import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy import interpolate import lagrangian_stats import scipy.fftpack ## READ archive (too many points... somehow) # args: name, dayi, dayf, days label = ...
gpl-2.0
-1,758,197,545,336,539,000
35.008475
137
0.607672
false
halvertoluke/edx-platform
common/lib/xmodule/xmodule/tests/test_import.py
27
26954
# -*- coding: utf-8 -*- import datetime import ddt import unittest from fs.memoryfs import MemoryFS from lxml import etree from mock import Mock, patch from django.utils.timezone import UTC from xmodule.xml_module import is_pointer_tag from opaque_keys.edx.locations import Location from xmodule.modulestore import o...
agpl-3.0
2,294,400,490,604,865,000
38.93037
118
0.621712
false
joachimmetz/dfvfs
dfvfs/path/encoded_stream_path_spec.py
2
1389
# -*- coding: utf-8 -*- """The encoded stream path specification implementation.""" from dfvfs.lib import definitions from dfvfs.path import factory from dfvfs.path import path_spec class EncodedStreamPathSpec(path_spec.PathSpec): """Encoded stream path specification. Attributes: encoding_method (str): meth...
apache-2.0
-4,161,659,611,289,342,500
30.568182
75
0.724982
false
tectronics/amselections
pr.py
1
4584
import sys, os, math, random class party: def __init__(self, names, votess, seat=0): self.name = names self.votes = votess self.readyseats = seat if self.readyseats == None: self.readyseats = int(0) self.seats = self.readyseats if self.seats == None: self.seats = int(0...
mit
7,708,027,836,122,905,000
27.025316
112
0.602312
false
maiklos-mirrors/jfx78
modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/path.py
191
5046
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
gpl-2.0
6,936,244,114,612,281,000
36.377778
80
0.668054
false
mathspace/django
tests/gis_tests/geo3d/tests.py
26
17237
from __future__ import unicode_literals import os import re from unittest import skipUnless from django.contrib.gis.db.models import Extent3D, Union from django.contrib.gis.db.models.functions import ( AsGeoJSON, AsKML, Length, Perimeter, Scale, Translate, ) from django.contrib.gis.gdal import HAS_GDAL from djang...
bsd-3-clause
-4,064,545,392,850,387,000
42.0925
107
0.627313
false
philipforget/python-oauth2
example/server.py
375
7669
""" The MIT License Copyright (c) 2007 Leah Culver 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, publis...
mit
-5,191,936,662,788,997,000
38.333333
183
0.625766
false
trankmichael/scikit-learn
sklearn/neighbors/approximate.py
128
22351
"""Approximate nearest neighbor search""" # Author: Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk> # Joel Nothman <joel.nothman@gmail.com> import numpy as np import warnings from scipy import sparse from .base import KNeighborsMixin, RadiusNeighborsMixin from ..base import BaseEstimator from ..utils.va...
bsd-3-clause
2,786,237,809,041,581,600
39.786496
79
0.579527
false
singlebrook/AWS-ElasticBeanstalk-CLI
eb/macosx/python2.7/lib/aws/requests/packages/urllib3/exceptions.py
245
2258
# urllib3/exceptions.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php ## Base Exceptions class HTTPError(Exception): "Base exception used by this module." ...
apache-2.0
-7,466,858,197,793,562,000
24.954023
75
0.654119
false
Tithen-Firion/youtube-dl
youtube_dl/extractor/coub.py
13
4712
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, int_or_none, parse_iso8601, qualities, ) class CoubIE(InfoExtractor): _VALID_URL = r'(?:coub:|https?://(?:coub\.com/(?:view|embed|coubs)/|c-cdn\.coub\...
unlicense
-3,828,633,867,974,524,400
31.839161
142
0.499574
false
heynemann/splitsecond
splitsecond/importer.py
1
2461
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of splitsecond. # https://github.com/globocom/splitsecond # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2015, Bernardo Heynemann <heynemann@gmail.com> from splitsecond.utils import logger from funct...
mit
-6,170,998,591,116,116,000
34.157143
117
0.557903
false
suncycheng/intellij-community
python/helpers/coveragepy/coverage/results.py
44
9597
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Results of coverage measurement.""" import collections from coverage.backward import iitems from coverage.misc import format_lines, SimpleRepr class Analysis...
apache-2.0
-7,620,017,014,219,057,000
34.413284
92
0.588413
false
wangming28/syzygy
third_party/numpy/files/numpy/lib/shape_base.py
76
24380
__all__ = ['column_stack','row_stack', 'dstack','array_split','split','hsplit', 'vsplit','dsplit','apply_over_axes','expand_dims', 'apply_along_axis', 'kron', 'tile', 'get_array_wrap'] import numpy.core.numeric as _nx from numpy.core.numeric import asarray, zeros, newaxis, outer, \ concatena...
apache-2.0
6,072,582,309,478,851,000
28.058403
80
0.50845
false
adoosii/edx-platform
lms/djangoapps/certificates/migrations/0020_certificatehtmlviewconfiguration_data.py
10
11317
# -*- coding: utf-8 -*- import json from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): """ Bootstraps the HTML view template with some default configura...
agpl-3.0
3,640,435,316,321,865,000
71.544872
182
0.563842
false
ryfeus/lambda-packs
Tensorflow_Pandas_Numpy/source3.6/tensorflow/python/estimator/export/export.py
5
12265
# 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...
mit
-1,733,009,428,964,374,300
41.293103
80
0.687729
false
ThiagoGarciaAlves/intellij-community
python/lib/Lib/site-packages/django/forms/models.py
73
44249
""" Helper functions for creating Form classes from Django models and database field objects. """ from django.db import connections from django.utils.encoding import smart_unicode, force_unicode from django.utils.datastructures import SortedDict from django.utils.text import get_text_list, capfirst from django.utils.t...
apache-2.0
6,004,597,093,357,339,000
40.902462
121
0.592624
false
mzdb/pwiz-mzdb
libraries/freetype-2.4.7/src/tools/docmaker/docbeauty.py
877
2642
#!/usr/bin/env python # # DocBeauty (c) 2003, 2004, 2008 David Turner <david@freetype.org> # # This program is used to beautify the documentation comments used # in the FreeType 2 public headers. # from sources import * from content import * from utils import * import utils import sys, os, time, string, getopt ...
apache-2.0
5,869,482,777,322,111,000
22.380531
95
0.514005
false
maohongyuan/kbengine
kbe/res/scripts/common/Lib/email/_parseaddr.py
125
17199
# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig@python.org """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ __all__ = [ 'mktime_tz', 'parsedate', 'parsedate_tz', 'quote', ] import time, calendar SPACE = ' ' EMPTYS...
lgpl-3.0
-8,049,878,099,617,588,000
30.85
79
0.529159
false
rbian/tp-libvirt
libvirt/tests/src/virtual_network/iface_options.py
7
26385
import os import re import ast import time import logging from autotest.client.shared import error from autotest.client import utils from virttest import aexpect from virttest import remote from virttest import virt_vm from virttest import virsh from virttest import utils_net from virttest import utils_misc from virtte...
gpl-2.0
-7,567,907,151,526,302,000
42.61157
83
0.52022
false
yatinag/selfcure
lib/jinja2/ext.py
357
25072
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2 import nod...
apache-2.0
-6,834,075,659,035,986,000
38.421384
81
0.606693
false