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
AdaptiveApplications/carnegie
tarc_bus_locator_client/quantities-0.10.1/build/lib/quantities/units/radiation.py
4
1072
""" """ from __future__ import absolute_import from ..unitquantity import UnitQuantity from .time import s from .mass import kg from .energy import J from .electromagnetism import coulomb Bq = becquerel = UnitQuantity( 'becquerel', 1/s, symbol='Bq', aliases=['becquerels'] ) Ci = curie = UnitQuantity(...
mit
8,086,113,623,462,072,000
17.807018
51
0.613806
false
rossburton/yocto-autobuilder
lib/python2.7/site-packages/SQLAlchemy-0.7.0-py2.7-linux-x86_64.egg/sqlalchemy/pool.py
8
33408
# sqlalchemy/pool.py # Copyright (C) 2005-2011 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 """Connection pooling for DB-API connections. Provides a number of connection poo...
gpl-2.0
-6,588,580,423,723,602,000
33.872651
84
0.586177
false
GoogleCloudPlatform/python-compat-runtime
appengine-compat/exported_appengine_sdk/google/appengine/ext/vmruntime/initialize.py
1
3059
#!/usr/bin/env python # # Copyright 2007 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,319,909,203,128,097,000
22.898438
77
0.698921
false
mogotest/selenium
selenium/src/py/lib/docutils/readers/pep.py
5
1666
# Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 3892 $ # Date: $Date: 2005-09-20 22:04:53 +0200 (Tue, 20 Sep 2005) $ # Copyright: This module has been placed in the public domain. """ Python Enhancement Proposal (PEP) Reader. """ __docformat__ = 'reStructuredText' ...
apache-2.0
-8,956,217,481,703,280,000
31.32
75
0.654862
false
Timurdov/bionic
bionic/Lib/site-packages/django/contrib/sessions/backends/cache.py
102
2499
from django.conf import settings from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import caches from django.utils.six.moves import xrange KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based session store. """ ...
apache-2.0
-6,142,576,335,898,407,000
32.77027
79
0.593037
false
mushtaqak/edx-platform
cms/djangoapps/contentstore/features/transcripts.py
46
8895
# disable missing docstring # pylint: disable=missing-docstring import os from lettuce import world, step from django.conf import settings from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError from splinter.request_han...
agpl-3.0
-8,272,054,600,443,058,000
33.08046
126
0.659921
false
ioanpocol/superdesk-core
tests/publish/ninjs_formatter_test.py
1
44687
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 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...
agpl-3.0
-6,270,552,180,092,691,000
39.49
120
0.393296
false
zengenti/ansible
lib/ansible/utils/module_docs_fragments/dellos9.py
42
3407
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # Copyright (c) 2016 Dell 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 Licens...
gpl-3.0
8,970,029,089,917,555,000
36.855556
79
0.704726
false
dag/genshi
genshi/filters/transform.py
23
48218
# -*- coding: utf-8 -*- # # Copyright (C) 2007-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://genshi.edgewall.org/wiki/License. # # This software consist...
bsd-3-clause
-5,640,835,119,870,386,000
35.254135
95
0.549774
false
silentfuzzle/calibre
src/chardet/sjisprober.py
190
3549
######################## 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
-748,416,975,761,509,100
40.752941
108
0.633981
false
AOSC-Dev/aosc-os-abbs
extra-libs/nss/autobuild/certdata2pem.py
6
7075
#!/usr/bin/python # vim:set et sw=4: # # certdata2pem.py - splits certdata.txt into multiple files # # Copyright (C) 2009 Philipp Kern <pkern@debian.org> # Copyright (C) 2013 Kai Engert <kaie@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Pub...
gpl-2.0
5,802,270,283,670,229,000
34.199005
198
0.577809
false
frohoff/Empire
lib/listeners/template.py
2
9688
import base64 import random # Empire imports from lib.common import helpers from lib.common import agents from lib.common import encryption from lib.common import packets from lib.common import messages class Listener: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Template...
bsd-3-clause
-1,838,489,458,472,246,300
36.405405
213
0.523637
false
lamastex/scalable-data-science
db/xtraResources/edXBigDataSeries2015/CS100-1x/Module 4: Text Analysis and Entity Resolution Lab Solutions.py
2
73278
# Databricks notebook source exported at Mon, 14 Mar 2016 03:33:29 UTC # MAGIC %md # MAGIC **SOURCE:** This is from the Community Edition of databricks and has been added to this databricks shard at [/#workspace/scalable-data-science/xtraResources/edXBigDataSeries2015/CS100-1x](/#workspace/scalable-data-science/xtraRes...
unlicense
2,912,175,164,576,989,000
48.680678
749
0.703294
false
wilvk/ansible
lib/ansible/modules/cloud/amazon/ecs_service_facts.py
14
8170
#!/usr/bin/python # 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.1', 'status': ['preview'], ...
gpl-3.0
-1,457,576,710,612,867,800
36.136364
326
0.619706
false
Muxi-X/muxi_site
muxiwebsite/api/signup.py
2
1117
# -*- coding: utf-8 -*- """ signup.py ~~~~~~~~~ 木犀官网注册API """ from flask import jsonify, g, request from . import api from muxiwebsite.models import User from .authentication import auth from muxiwebsite import db from werkzeug.security import generate_password_hash import base64 @api.route('/signup/', m...
mit
5,526,761,842,879,015,000
24.511628
74
0.616226
false
mlucchini/electricitymap
parsers/CA_YT.py
1
4487
import arrow from bs4 import BeautifulSoup import requests timezone = 'Canada/Pacific' def fetch_production(country_code='CA-YT', session=None): """Requests the last known production mix (in MW) of a given region Arguments: country_code -- ignored here, only information for CA-YT is returned ...
gpl-3.0
7,202,155,513,057,837,000
34.054688
95
0.657232
false
stamhe/zulip
zproject/test_settings.py
115
1817
from settings import * import os DATABASES["default"] = {"NAME": "zulip_test", "USER": "zulip_test", "PASSWORD": LOCAL_DATABASE_PASSWORD, "HOST": "localhost", "SCHEMA": "zulip", "ENGINE": "django.db....
apache-2.0
6,958,732,118,205,763,000
30.877193
84
0.648872
false
fusionpig/ansible
lib/ansible/plugins/action/win_template.py
117
1168
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
4,400,703,885,525,659,600
40.714286
80
0.778253
false
elkingtonmcb/rethinkdb
external/v8_3.30.33.16/tools/testrunner/local/progress.py
41
10716
# Copyright 2012 the V8 project authors. 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 conditi...
agpl-3.0
1,146,058,452,391,740,200
30.151163
79
0.645857
false
ScienceStacks/SciSheets
mysite/scisheets/core/helpers/block_execution_controller.py
2
7374
""" This class interacts with the code generated for evaluating a scisheet to control the execution of blocks of code. A block of code (hereafter, just block) can be a formulas, prologue, or epilogue. """ from Files.logger import Logger from mysite import settings import inspect import os import sys class BlockExecut...
apache-2.0
6,850,372,470,727,965,000
30.648069
84
0.629916
false
yukim/cassandra-dtest
udtencoding_test.py
2
2105
from dtest import Tester from assertions import assert_invalid from tools import since import os, sys, time from ccmlib.cluster import Cluster @since('2.1') class TestUDTEncoding(Tester): def udt_test(self): """ Test (somewhat indirectly) that user queries involving UDT's are properly encoded (due to dri...
apache-2.0
8,999,324,405,026,003,000
57.472222
235
0.688361
false
lyarwood/bugwarrior
tests/test_config.py
2
3581
# coding: utf-8 from __future__ import unicode_literals import os import configparser from unittest import TestCase import bugwarrior.config as config from .base import ConfigTest class TestGetConfigPath(ConfigTest): def create(self, path): """ Create an empty file in the temporary directory, ...
gpl-3.0
4,037,508,409,989,290,000
29.29661
79
0.612028
false
TangXT/GreatCatMOOC
lms/djangoapps/courseware/tests/test_model_data.py
3
14099
""" Test for lms courseware app, module data (runtime data storage for XBlocks) """ import json from mock import Mock, patch from functools import partial from courseware.model_data import DjangoKeyValueStore from courseware.model_data import InvalidScopeError, FieldDataCache from courseware.models import StudentModul...
agpl-3.0
-996,768,137,892,174,100
44.334405
149
0.691326
false
zero323/spark
python/pyspark/mllib/random.py
22
19517
# # 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
5,471,673,634,723,734,000
31.582638
100
0.550699
false
toolforger/sympy
sympy/plotting/pygletplot/tests/test_plotting.py
109
2653
from sympy.external.importtools import import_module disabled = False # if pyglet.gl fails to import, e.g. opengl is missing, we disable the tests pyglet_gl = import_module("pyglet.gl", catch=(OSError,)) pyglet_window = import_module("pyglet.window", catch=(OSError,)) if not pyglet_gl or not pyglet_window: disabl...
bsd-3-clause
240,842,127,289,674,300
28.477778
76
0.664908
false
dvliman/jaikuengine
.google_appengine/lib/django-1.5/tests/regressiontests/syndication/tests.py
47
13086
from __future__ import absolute_import, unicode_literals from xml.dom import minidom from django.contrib.syndication import views from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.utils import tzinfo from django.utils.feedgenerator import rfc2822_date, rfc3339_date ...
apache-2.0
6,104,464,081,741,133,000
40.021944
151
0.60217
false
AntonKhorev/BudgetSpb
main.py
1
1072
#!/usr/bin/env python3 from linker import Linker import htmlPage import content.index,content.db,content.fincom # TODO put into config spbBudgetXlsPath='../spb-budget-xls' if __name__=='__main__': linker=Linker('filelists',{ 'csv':['csv'], 'xls':['xls'], 'db':['zip','sql','xlsx'], }) htmlPage.HtmlPage('inde...
bsd-2-clause
6,578,248,339,887,820,000
46.157895
189
0.748884
false
postla/e2-gui
lib/python/Plugins/SystemPlugins/WirelessAccessPoint/plugin.py
6
26631
from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen, ConfigList from Components.config import config, ConfigSubsection, getConfigListEntry, ConfigSelection, ConfigIP, ConfigInteger from Components.config import ConfigText, ConfigYesNo, NoSave, ConfigPassword, ConfigNothing, ConfigSequen...
gpl-2.0
6,908,707,807,822,501,000
44.213922
210
0.716608
false
Remper/learningbyreading
src/mappings.py
2
1612
import logging as log import os import re # builds a dictionary of frame names indexed by wordnet synset id offset2bn = dict() bn2offset = dict() offset2wn = dict() wn2offset = dict() wn2bn = dict() bn2wn = dict() wn30wn31 = dict() wn31wn30 = dict() bn2dbpedia = dict() dbpedia2bn = dict() # the mapping is in a tabula...
gpl-2.0
7,844,695,370,471,201,000
33.319149
122
0.615385
false
hofschroeer/gnuradio
gr-filter/examples/resampler.py
7
4489
#!/usr/bin/env python # # Copyright 2009,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your ...
gpl-3.0
8,309,209,222,756,665,000
32.75188
95
0.622633
false
fusionapp/entropy
entropy/ientropy.py
1
3968
""" @copyright: 2007-2014 Quotemaster cc. See LICENSE for details. Interface definitions for Entropy. """ from zope.interface import Interface, Attribute class IContentObject(Interface): """ Immutable content object. """ hash = Attribute("""The hash function used to calculate the content digest.""")...
mit
-8,097,366,782,661,055,000
25.810811
87
0.641129
false
ruibarreira/linuxtrail
usr/lib/python3/dist-packages/orca/scripts/apps/gcalctool/script.py
5
3292
# Orca # # Copyright 2004-2008 Sun Microsystems Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This...
gpl-3.0
7,844,648,670,494,701,000
34.021277
79
0.596902
false
vponomaryov/manila
manila/tests/share/drivers/netapp/dataontap/client/test_client_base.py
1
6337
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Clinton Knight. 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://w...
apache-2.0
7,923,674,527,359,359,000
34.205556
79
0.650939
false
mcardillo55/django
django/contrib/gis/geos/prototypes/topology.py
338
2145
""" This module houses the GEOS ctypes prototype functions for the topological operations on geometries. """ from ctypes import c_double, c_int from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOSFuncFactory from django.contrib.gis.geos.prototypes.errcheck import ( check_geom, check_minus_one, check_string...
bsd-3-clause
584,213,763,458,463,400
40.25
102
0.767832
false
nburn42/tensorflow
tensorflow/python/training/tensorboard_logging_test.py
132
4456
# 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,987,900,248,590,241,000
35.52459
80
0.707585
false
Bourneer/scrapy
scrapy/utils/console.py
70
2754
from functools import wraps from collections import OrderedDict def _embed_ipython_shell(namespace={}, banner=''): """Start an IPython Shell""" try: from IPython.terminal.embed import InteractiveShellEmbed from IPython.terminal.ipapp import load_default_config except ImportError: fr...
bsd-3-clause
-8,722,593,703,790,764,000
33.860759
75
0.658315
false
ptisserand/ansible
hacking/tests/gen_distribution_version_testcase.py
63
1905
#!/usr/bin/env python """ This script generated test_cases for test_distribution_version.py. To do so it outputs the relevant files from /etc/*release, the output of platform.dist() and the current ansible_facts regarding the distribution version. This assumes a working ansible version in the path. """ import platf...
gpl-3.0
8,547,507,749,244,324,000
23.74026
154
0.63832
false
mezz64/home-assistant
homeassistant/components/volkszaehler/sensor.py
19
4129
"""Support for consuming values for the Volkszaehler API.""" from datetime import timedelta import logging from volkszaehler import Volkszaehler from volkszaehler.exceptions import VolkszaehlerApiConnectionError import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.co...
apache-2.0
-8,731,169,241,903,271,000
28.492857
86
0.658029
false
gvnn3/PCS
scripts/ptptimes.py
1
3112
#!/usr/bin/env python # Copyright (c) 2012-2016, Neville-Neil Consulting # 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...
bsd-3-clause
1,206,872,159,495,267,800
35.611765
80
0.674165
false
alex-robbins/micropython
examples/hwapi/soft_pwm.py
43
1367
import utime from hwconfig import LED # Using sleep_ms() gives pretty poor PWM resolution and # brightness control, but we use it in the attempt to # make this demo portable to even more boards (e.g. to # those which don't provide sleep_us(), or provide, but # it's not precise, like would be on non realtime OSes). # ...
mit
-2,090,389,369,248,464,000
34.973684
67
0.673007
false
dentaku65/plugin.video.sod
servers/ultramegabit.py
42
1290
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para ultramegabit # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core ...
gpl-3.0
2,796,540,630,078,556,700
31.225
91
0.581846
false
Celtoys/pycgen
pycgen.py
1
5990
# # Copyright 2014 Celtoys Ltd # # 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 writin...
apache-2.0
21,097,735,267,603,150
24.274262
98
0.711686
false
chromium2014/src
build/android/pylib/base/base_test_result_unittest.py
134
2817
# 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. """Unittests for TestRunResults.""" import unittest from pylib.base.base_test_result import BaseTestResult from pylib.base.base_test_result import Test...
bsd-3-clause
-6,242,539,859,490,549,000
33.353659
72
0.614838
false
skudriashev/incubator-airflow
tests/contrib/hooks/test_jdbc_hook.py
12
1690
# -*- 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
1,580,695,797,843,285,200
32.137255
139
0.669822
false
Lokke/eden
modules/feedparser.py
22
155418
"""Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds Visit https://code.google.com/p/feedparser/ for the latest version Visit http://packages.python.org/feedparser/ for the latest documentation Required: Python 2.4 or later Recommended: iconv_codec <http://cjkpython.i18n.org...
mit
-2,477,190,091,135,409,700
39.931788
208
0.579412
false
xzYue/odoo
addons/account/wizard/account_invoice_state.py
340
2875
# -*- 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
-8,649,328,772,700,792,000
40.666667
149
0.621913
false
CompMusic/essentia
test/src/unittest/standard/test_unaryoperator.py
10
3671
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
agpl-3.0
276,211,603,184,710,430
38.473118
114
0.671479
false
murraymeehan/marsyas
scripts/createMarSystem.py
3
2266
#!/usr/bin/env python ''' Script to generate skeleton files for a new MarSystem. Usage: createMarSystem.py NameOfNewMarSystem This will create the files NameOfNewMarSystem.h and NameOfNewMarSystem.cpp if the current directory. ''' import os import sys def create_from_template(template_file, template_name, tar...
gpl-2.0
1,998,110,069,064,431,900
30.472222
93
0.633716
false
jcoady9/python-for-android
python3-alpha/python3-src/Lib/test/test_os.py
47
46096
# As a test suite for the os module, this is woefully inadequate, but this # does add tests for a few functions which have been determined to be more # portable than they had been thought to be. import os import errno import unittest import warnings import sys import signal import subprocess import time import shutil ...
apache-2.0
-479,835,944,459,586,940
35.995185
94
0.5648
false
h00dy/Diamond
src/collectors/redisstat/redisstat.py
22
10479
# coding=utf-8 """ Collects data from one or more Redis Servers #### Dependencies * redis #### Notes The collector is named an odd redisstat because of an import issue with having the python library called redis and this collector's module being called redis, so we use an odd name for this collector. This doesn't...
mit
6,292,786,305,851,513,000
30.948171
79
0.550052
false
JoachimVandersmissen/CodingSolutions
python/PythonForEveryone/chapter3/22.py
1
1199
month = int(input("Please enter your birthday month")) day = int(input("Please enter your birthday day")) if month == 1: if day < 20: print("Capricorn") else: print("Aquarius") if month == 2: if day < 20: print("Aquarius") else: print("Pisces") if month == 3: if day <...
apache-2.0
-7,925,780,290,893,789,000
18.33871
54
0.486239
false
slohse/ansible
lib/ansible/modules/network/vyos/vyos_facts.py
37
8854
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
8,373,468,952,665,928,000
26.66875
72
0.60899
false
cespare/pastedown
vendor/pygments/pygments/lexers/_luabuiltins.py
26
6863
# -*- coding: utf-8 -*- """ pygments.lexers._luabuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the names and modules of lua functions It is able to re-generate itself, but for adding new functions you probably have to add some callbacks (see function module_callbacks). Do not edit th...
mit
4,584,915,070,635,155,000
26.562249
75
0.471805
false
adsorensen/girder
tests/cases/path_utilities_test.py
3
2095
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
apache-2.0
-4,752,472,402,200,224,000
30.742424
79
0.481146
false
Dreamsolution/django-auth-policy
testsite/views.py
1
2666
import logging from django.conf import settings from django.http import HttpResponseRedirect, HttpResponse from django.template.response import TemplateResponse from django.utils.http import is_safe_url from django.shortcuts import resolve_url from django.views.decorators.debug import sensitive_post_parameters from dj...
bsd-3-clause
-536,018,489,641,723,800
30.364706
76
0.692423
false
vlegoff/tsunami
src/test/secondaires/crafting/test_talent.py
1
2655
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
bsd-3-clause
-2,057,537,649,934,792,200
43.183333
79
0.740098
false
FelixZYY/gyp
pylib/gyp/common.py
34
19170
# 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. from __future__ import with_statement import collections import errno import filecmp import os.path import re import tempfile import sys # A minimal memoizing d...
bsd-3-clause
-6,816,253,646,193,558,000
31.602041
83
0.663485
false
deka108/meas_deka
assessment/utilities/answer_formatter.py
2
3442
""" # Name: check_answer_api/utilities/answer_formatter.py # Description: # Created by: Martinus Alexander # Date Created: Nov 30, 2016 # Last Modified: Dec 21, 2016 # Modified by: Martinus Alexander """ import re ''' Splitting a sequence of character into a list of terms. Used improve trigonometri...
apache-2.0
-8,629,615,851,293,824,000
28.930435
75
0.622022
false
xodus7/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/batch_normalization_test.py
25
9994
# 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
1,465,846,117,281,848,000
41.168776
104
0.644287
false
rallylee/gem5
tests/configs/realview-switcheroo-atomic.py
64
2427
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
-851,378,677,790,431,500
48.530612
72
0.792748
false
Juraci/tempest
tempest/tests/test_list_tests.py
34
1824
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
7,190,439,728,409,217,000
39.533333
78
0.614035
false
vasyarv/edx-platform
lms/djangoapps/shoppingcart/processors/CyberSource.py
142
19828
""" Implementation the CyberSource credit card processor. IMPORTANT: CyberSource will deprecate this version of the API ("Hosted Order Page") in September 2014. We are keeping this implementation in the code-base for now, but we should eventually replace this module with the newer implementation (in `CyberSource2.py`)...
agpl-3.0
-6,651,539,142,418,140,000
42.482456
119
0.623008
false
Gamebasis/3DGamebasisServer
GameData/blender-2.71-windows64/2.71/python/lib/plat-unixware7/STROPTS.py
106
6524
# Generated by h2py from /usr/include/sys/stropts.h # Included from sys/types.h def quad_low(x): return x.val[0] ADT_EMASKSIZE = 8 SHRT_MIN = -32768 SHRT_MAX = 32767 INT_MIN = (-2147483647-1) INT_MAX = 2147483647 LONG_MIN = (-2147483647-1) LONG_MAX = 2147483647 OFF32_MAX = LONG_MAX ISTAT_ASSERTED = 0 ISTAT_ASSUMED = ...
gpl-3.0
-4,002,799,897,796,372,000
18.890244
51
0.669528
false
varunkamra/kuma
vendor/packages/translate/tools/pocount.py
24
12909
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2003-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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; e...
mpl-2.0
-594,759,850,433,515,600
41.186275
133
0.594934
false
kingvuplus/BH-SH4
mytest.py
2
16609
import sys, os if os.path.isfile("/usr/lib/enigma2/python/enigma.zip"): sys.path.append("/usr/lib/enigma2/python/enigma.zip") from Tools.Profile import profile, profile_final profile("PYTHON_START") import Tools.RedirectOutput import enigma import eConsoleImpl import eBaseImpl enigma.eTimer = eBaseImpl.eTimer enigma...
gpl-2.0
6,123,206,204,391,660,000
27.636207
138
0.744054
false
tdtrask/ansible
test/units/modules/cloud/amazon/test_lambda.py
57
11980
# # (c) 2017 Michael De La Rue # # 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...
gpl-3.0
8,253,106,449,008,656,000
41.183099
109
0.696494
false
qwertyezi/Test
text/freeline_core/gradle_inc_build.py
5
43598
# -*- coding:utf8 -*- from __future__ import print_function import os import shutil import android_tools from build_commands import CompileCommand, IncAaptCommand, IncJavacCommand, IncDexCommand from builder import IncrementalBuilder, Builder from gradle_tools import get_project_info, GradleDirectoryFinder, GradleSyn...
apache-2.0
-2,873,127,968,788,922,400
47.658482
126
0.563466
false
davidcox/glumpy
demos/demo-heightmap-2.py
1
3540
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (C) 2009-2010 Nicolas P. Rougier # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #---------------...
bsd-3-clause
6,586,859,430,881,178,000
31.477064
78
0.544633
false
zhuwenping/python-for-android
python-modules/twisted/twisted/words/test/test_jabberxmppstringprep.py
57
4450
# Copyright (c) 2005 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep, resourceprep, nameprep, crippled class XMPPStringPrepTest(unittest.TestCase): """ The nodeprep stringprep profile is similar to...
apache-2.0
-5,012,356,464,337,888,000
51.97619
101
0.686742
false
sumanau7/Ele_CC_Sumanau
lib/IPython/extensions/storemagic.py
9
8183
# -*- coding: utf-8 -*- """ %store magic for lightweight persistence. Stores variables, aliases and macros in IPython's database. To automatically restore stored variables at startup, add this to your :file:`ipython_config.py` file:: c.StoreMagics.autorestore = True """ from __future__ import print_function #-----...
apache-2.0
5,808,235,975,672,443,000
32.954357
100
0.476598
false
h2oai/h2o
py/testdir_release/c3/test_c3_exec_copy.py
9
4111
import unittest, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i, h2o_glm, h2o_common, h2o_exec as h2e import h2o_print DO_GLM = True LOG_MACHINE_STATS = False # fails during exec env push ..second import has to do a key delete (the first) DO_DOUBLE_IMPORT = False print "Ass...
apache-2.0
5,290,331,159,494,751,000
43.204301
116
0.56434
false
marcuskelly/recover
Lib/site-packages/alembic/testing/plugin/bootstrap.py
43
1646
""" Bootstrapper for nose/pytest plugins. The entire rationale for this system is to get the modules in plugin/ imported without importing all of the supporting library, so that we can set up things for testing before coverage starts. The rationale for all of plugin/ being *in* the supporting library in the first pla...
bsd-2-clause
5,062,535,874,411,646,000
36.409091
77
0.735723
false
tgsd96/gargnotes
venv/lib/python2.7/site-packages/django/contrib/admin/utils.py
62
16223
from __future__ import unicode_literals import datetime import decimal from django.contrib.auth import get_permission_codename from django.db import models from django.db.models.constants import LOOKUP_SEP from django.db.models.deletion import Collector from django.forms.forms import pretty_name from django.utils imp...
mit
-4,132,736,029,291,805,000
32.312115
94
0.591198
false
hollabaq86/haikuna-matata
env/lib/python2.7/site-packages/flask/signals.py
123
2209
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ signals_available = False try: from blinker import Nam...
mit
7,958,880,112,585,410,000
38.446429
71
0.665912
false
CoolCloud/aliyun-cli
aliyuncli/advance/userConfigHandler.py
11
1850
__author__ = 'zhaoyang.szy' import os,sys import response parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0,parentdir) import aliyunExtensionCliHandler class ConfigCmd: showConfig = 'showConfig' importConfig = 'importConfig' exportConfig = 'exportConfig' name = '...
apache-2.0
114,488,224,226,711,200
32.636364
122
0.648649
false
ksachs/invenio
modules/bibformat/lib/elements/bfe_url.py
39
1484
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## ...
gpl-2.0
-105,602,046,535,711,300
32.727273
75
0.657008
false
bright-sparks/chromium-spacewalk
build/win/reorder-imports.py
103
1807
#!/usr/bin/env python # 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 glob import optparse import os import shutil import subprocess import sys def reorder_imports(input_dir, output_dir, architectu...
bsd-3-clause
-5,671,701,774,612,172,000
30.701754
78
0.672939
false
ChronoMonochrome/android_external_chromium_org
native_client_sdk/src/build_tools/verify_ppapi.py
62
5922
#!/usr/bin/env python # 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. """Helper script for PPAPI's PRESUBMIT.py to detect if additions or removals of PPAPI interfaces have been propagated to the Native...
bsd-3-clause
8,122,821,297,286,448,000
30.83871
80
0.668693
false
jtimberman/omnibus
source/libxml2-2.7.7/python/generator.py
24
47525
#!/usr/bin/python -u # # generate python wrappers from the XML API description # functions = {} enums = {} # { enumType: { enumConstant: enumValue } } import os import sys import string if __name__ == "__main__": # launched as a script srcPref = os.path.dirname(sys.argv[0]) else: # imported srcPref =...
apache-2.0
-3,586,902,407,920,603,000
39.037911
120
0.489742
false
alexthered/kienhoc-platform
common/lib/xmodule/xmodule/open_ended_grading_classes/peer_grading_service.py
107
6601
import logging import dogstats_wrapper as dog_stats_api from .grading_service_module import GradingService from opaque_keys.edx.keys import UsageKey log = logging.getLogger(__name__) class PeerGradingService(GradingService): """ Interface with the grading controller for peer grading """ METRIC_NAME...
agpl-3.0
5,814,696,213,533,288,000
38.291667
106
0.602636
false
kishikawakatsumi/Mozc-for-iOS
src/third_party/gyp/pylib/gyp/generator/android.py
3
45146
# 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
apache-2.0
1,361,851,607,193,693,200
40.116576
80
0.641452
false
bev-a-tron/pledgeservice
lib/stripe/error.py
17
1339
# Exceptions class StripeError(Exception): def __init__(self, message=None, http_body=None, http_status=None, json_body=None): super(StripeError, self).__init__(message) if http_body and hasattr(http_body, 'decode'): try: http_body = http_body.decode('u...
agpl-3.0
-7,578,329,266,541,436,000
26.326531
74
0.57655
false
d40223223/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/optparse.py
728
60616
"""A powerful, extensible, and easy-to-use option parser. By Greg Ward <gward@python.net> Originally distributed as Optik. For support, use the optik-users@lists.sourceforge.net mailing list (http://lists.sourceforge.net/lists/listinfo/optik-users). Simple usage example: from optparse import OptionParser pa...
gpl-3.0
7,972,951,639,689,818,000
34.973887
79
0.566369
false
Saturn/livestreamer
src/livestreamer/stream/akamaihd.py
37
7880
import base64 import io import hashlib import hmac import random from .stream import Stream from .wrappers import StreamIOThreadWrapper, StreamIOIterWrapper from ..buffers import Buffer from ..compat import str, bytes, urlparse from ..exceptions import StreamError from ..utils import swfdecompress from ..packages.fl...
bsd-2-clause
6,845,928,164,781,481,000
28.513109
108
0.57703
false
mgymrek/lobstr-code
scripts/lobSTR_capillary_comparator.py
1
6675
#!/usr/bin/env python """ Compare capillary vs. lobSTR calls This script is part of lobSTR_validation_suite.sh and is not mean to be called directly. """ import argparse import numpy as np import pandas as pd import sys from scipy.stats import pearsonr def ConvertSample(x): """ Convert HGDP samples numbers t...
gpl-3.0
-6,129,424,915,326,303,000
40.459627
144
0.541573
false
itsjeyd/edx-platform
common/djangoapps/track/views/tests/test_segmentio.py
19
22011
"""Ensure we can parse events sent to us from the Segment webhook integration""" from datetime import datetime import json from ddt import ddt, data, unpack from mock import sentinel from nose.plugins.attrib import attr from django.contrib.auth.models import User from django.test.client import RequestFactory from dj...
agpl-3.0
9,047,553,053,644,725,000
39.685767
149
0.541865
false
DickJC123/mxnet
example/profiler/profiler_matmul.py
7
2449
# 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
3,663,799,963,536,551,000
36.106061
94
0.675378
false
sve-odoo/odoo
addons/sale_mrp/__openerp__.py
61
1935
# -*- 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
7,097,095,248,138,474,000
37.7
84
0.567442
false
BaluDontu/docker-volume-vsphere
esx_service/vsan_policy.py
1
9052
#!/usr/bin/env python # Copyright 2016 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
apache-2.0
-1,053,890,982,789,795,200
30.321799
80
0.642841
false
Ditmar/plugin.video.pelisalacarta
servers/watchfreeinhd.py
44
1983
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para watchfreeinhd # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core...
gpl-3.0
-6,358,708,320,980,787,000
33.736842
91
0.605051
false
adaitche/luigi
test/task_test.py
13
14484
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-3,083,763,735,565,128,700
35.483627
125
0.640569
false
storm-computers/odoo
addons/hw_escpos/escpos/escpos.py
48
31717
# -*- coding: utf-8 -*- import time import copy import io import base64 import math import md5 import re import traceback import xml.etree.ElementTree as ET import xml.dom.minidom as minidom from PIL import Image try: import jcconv except ImportError: jcconv = None try: import qrcode except ImportError...
agpl-3.0
-7,961,076,660,371,493,000
33.512514
146
0.473468
false
uwevil/namebench
nb_third_party/dns/opcode.py
248
2615
# Copyright (C) 2001-2007, 2009, 2010 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 ...
apache-2.0
-595,610,952,276,217,000
24.144231
72
0.659656
false
EdDev/vdsm
lib/vdsm/network/errors.py
1
2525
# # Copyright 2011-2014 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed ...
gpl-2.0
-3,600,168,580,581,480,400
30.5625
78
0.70297
false
seize-the-dave/XlsxWriter
xlsxwriter/test/comparison/test_rich_string07.py
8
1570
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
-3,308,118,224,215,188,000
29.784314
79
0.577707
false
catchmrbharath/servo
tests/wpt/harness/wptrunner/update/update.py
118
5053
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import sys from metadata import MetadataUpdateRunner from sync import SyncFromUpstreamRunner from tree import...
mpl-2.0
6,873,632,084,499,167,000
30.981013
110
0.585791
false
odooindia/odoo
openerp/tools/func.py
49
3346
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010, 2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you c...
agpl-3.0
-837,439,853,119,785,200
31.803922
79
0.570831
false
FlorentChamault/My_sickbeard
lib/requests/packages/oauthlib/oauth1/rfc5849/utils.py
74
3015
# -*- coding: utf-8 -*- """ oauthlib.utils ~~~~~~~~~~~~~~ This module contains utility methods used by various parts of the OAuth spec. """ import string import urllib2 from oauthlib.common import quote, unquote UNICODE_ASCII_CHARACTER_SET = (string.ascii_letters.decode('ascii') + string.digits.decode('ascii')...
gpl-3.0
-1,383,448,766,530,432,500
29.454545
85
0.66733
false
2014c2g8/c2g8
wsgi/static/Brython2.1.0-20140419-113919/Lib/collections/abc.py
739
16026
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. Unit tests are in test_collections. """ from abc import ABCMeta, abstractmethod import sys __all__ = ["Hashable", "Iterable", "Iterator", ...
gpl-2.0
-4,785,695,333,880,706,000
23.281818
77
0.551916
false
simartin/servo
components/script/dom/bindings/codegen/parser/WebIDL.py
4
303096
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ A WebIDL parser. """ from ply import lex, yacc import re import os import traceback import math import string from...
mpl-2.0
1,164,412,686,066,760,000
38.398934
158
0.563396
false