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
SUSE/ceph-deploy
ceph_deploy/tests/test_install.py
8
4368
from mock import Mock from ceph_deploy import install class TestSanitizeArgs(object): def setup(self): self.args = Mock() # set the default behavior we set in cli.py self.args.default_release = False self.args.stable = None def test_args_release_not_specified(self): ...
mit
57,041,408,023,734,660
35.705882
75
0.625687
false
runt18/nupic
src/nupic/frameworks/opf/clamodel_classifier_helper.py
1
20915
import copy import numpy from nupic.support.configuration import Configuration from nupic.frameworks.opf.exceptions import (CLAModelInvalidRangeError, CLAModelInvalidArgument) class _CLAClassificationRecord(object): """ A single record to store data associated with a...
agpl-3.0
-4,878,599,396,477,395,000
31.376161
111
0.674874
false
dankolbman/BCIM
src/post.py
1
7125
import glob import os import sys import re import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np import python.DataIO as DataIO import python.graphics as graphics import python.clusters as clusters import python.counts as counts # Format settings from matplotlib i...
mit
108,337,209,103,030,270
27.051181
91
0.641123
false
streeter/django-cache-stockpile
stockpile/tests/tests.py
1
2618
from stockpile import conf from django.test import TestCase from .models import Account, DummyInfo import logging log = logging.getLogger(__name__) class StockpileTest(TestCase): def setUp(self): # Don't use a fixture for caching reasons a1 = Account.objects.create(id=1, name='dummy_name_1')...
bsd-3-clause
6,477,165,814,310,497,000
33
75
0.590527
false
ptemplier/ansible
lib/ansible/modules/cloud/amazon/_ec2_vpc.py
29
29766
#!/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': ['deprecated']...
gpl-3.0
-2,052,350,663,134,258,000
38.114323
152
0.562555
false
saurabh6790/trufil_app
controllers/stock_controller.py
29
10028
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cint, flt, cstr from webnotes import msgprint, _ import webnotes.defaults from controllers.accounts_contr...
agpl-3.0
4,434,255,788,494,841,300
36.282528
93
0.676207
false
ThePletch/ansible
lib/ansible/modules/cloud/amazon/ec2_lc_find.py
48
7241
#!/usr/bin/python # encoding: utf-8 # (c) 2015, Jose Armesto <jose@armesto.net> # # 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 as published by # the Free Software Foundation, either version 3 of the License...
gpl-3.0
-7,945,059,772,778,954,000
30.620087
121
0.668416
false
NYU-CAL/Disco
Python/remapCheckpoint.py
1
1164
import sys import numpy as np import discopy as dp def remap(d1, d2): z = d2.Z r = d2.R nq = d1.numQ prim = [] for k in range(d2.numZ): sheet = [] for j in range(d2.numR): sheet.append(np.empty((d2.numPhi[k,j], nq),np.float)) prim.append(sheet) for k in ra...
gpl-3.0
-5,906,268,847,742,135,000
23.765957
87
0.533505
false
xaviercobain88/framework-python
openerp/addons/hr_holidays/report/holidays_summary_report.py
16
10550
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-5,984,432,101,258,058,000
39.267176
197
0.502275
false
ic-hep/DIRAC
AccountingSystem/private/FileCoding.py
4
2725
# $HeadURL$ __RCSID__ = "$Id$" import base64 from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.Utilities import DEncode gForceRawEncoding = False try: import zlib gZCompressionEnabled = True except ImportError, x: gZCompressionEnabled = False def codeRequestInFileId( plotRequest, compressIfPossible = T...
gpl-3.0
4,966,008,698,866,071,000
37.928571
103
0.672294
false
NMGRL/pychron
pychron/pyscripts/tests/hop_editor.py
2
3274
from __future__ import absolute_import from pychron.core.ui import set_qt set_qt() from pychron.pyscripts.hops_editor import Position, Hop, HopSequence __author__ = 'ross' import unittest class PositionTestCase(unittest.TestCase): def test_to_string_no_deflection(self): p = Position(detector='H1', iso...
apache-2.0
8,589,218,651,097,320,000
31.098039
109
0.609041
false
acshan/odoo
addons/hw_scanner/__openerp__.py
220
1738
# -*- 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
4,623,029,878,063,497,000
35.208333
78
0.611047
false
XiaosongWei/chromium-crosswalk
build/android/devil/android/apk_helper.py
13
4085
# 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. """Module containing utilities for apk packages.""" import re from devil.android.sdk import aapt _MANIFEST_ATTRIBUTE_RE = re.compile( r'\s*A: ([^...
bsd-3-clause
1,449,227,683,624,758,500
27.971631
80
0.646267
false
mixman/djangodev
tests/modeltests/raw_query/tests.py
43
8492
from __future__ import absolute_import from datetime import date from django.db.models.sql.query import InvalidQuery from django.test import TestCase from .models import Author, Book, Coffee, Reviewer, FriendlyAuthor class RawQueryTests(TestCase): fixtures = ['raw_query_books.json'] def assertSuccessfulRa...
bsd-3-clause
-8,746,806,085,939,638,000
37.252252
190
0.6187
false
thaumos/ansible
lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py
9
8562
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata...
gpl-3.0
2,501,699,721,508,059,000
38.823256
144
0.599743
false
Jajcus/pyxmpp2
pyxmpp2/cert.py
1
21746
# # (C) Copyright 2011 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful...
lgpl-2.1
3,080,114,106,677,381,600
37.971326
80
0.529477
false
allanstone/InteligenciaArtificial
Tarea 3/source/_themes/patchlevel.py
50
1942
# -*- coding: utf-8 -*- """ patchlevel.py ~~~~~~~~~~~~~ Extract version info from Include/patchlevel.h. Adapted from Doc/tools/getversioninfo. :copyright: 2007-2008 by Georg Brandl. :license: Python license. """ import os import re import sys def get_header_version_info(srcdir): patchlev...
mit
3,358,261,146,549,719,000
27.144928
83
0.560762
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/networkx/algorithms/connectivity/kcutsets.py
5
9758
# -*- coding: utf-8 -*- """ Kanevsky all minimum node k cutsets algorithm. """ import copy from collections import defaultdict from itertools import combinations from operator import itemgetter import networkx as nx from .utils import build_auxiliary_node_connectivity from networkx.algorithms.flow import ( build_r...
gpl-3.0
-2,686,172,385,492,308,000
39.828452
80
0.543964
false
Intel-Corporation/tensorflow
tensorflow/contrib/eager/python/examples/linear_regression/linear_regression_graph_test.py
14
2674
# 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,539,765,124,009,665,000
30.458824
88
0.658564
false
geometalab/Vector-Tiles-Reader-QGIS-Plugin
ext-libs/google/protobuf/duration_pb2.py
43
2746
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/duration.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import ref...
gpl-2.0
-7,866,910,986,182,601,000
34.205128
353
0.7378
false
superarts/JekyllMetro
games/rapt/game/jsparser.py
6
39151
#!/usr/bin/python2.5 # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozil...
mit
-3,065,162,347,792,160,000
33.163176
103
0.480371
false
kontais/EFI-MIPS
ToolKit/cmds/python/Modules/unimplemented/cgen.py
7
15247
######################################################################## # Copyright (c) 2000, BeOpen.com. # Copyright (c) 1995-2000, Corporation for National Research Initiatives. # Copyright (c) 1990-1995, Stichting Mathematisch Centrum. # All rights reserved. # # See the file "Misc/COPYRIGHT" for information on usag...
bsd-3-clause
492,383,137,983,009,200
28.321154
77
0.489998
false
JaneliaSciComp/Neuroptikon
Source/network/arborization.py
1
5522
# Copyright (c) 2010 Howard Hughes Medical Institute. # All rights reserved. # Use is subject to Janelia Farm Research Campus Software Copyright 1.1 license terms. # http://license.janelia.org/license/jfrc_copyright_1_1.html import neuroptikon import osgUtil import os from neuro_object import NeuroObject class A...
bsd-3-clause
-4,699,893,886,031,772,000
38.442857
152
0.640891
false
nakagami/reportlab
src/reportlab/pdfbase/_can_cmap_data.py
14
1831
# """ This is a utility to 'can' the widths data for certain CID fonts. Now we're using Unicode, we don't need 20 CMAP files for each Asian language, nor the widths of the non-normal characters encoded in each font. we just want a dictionary of the character widths in a given font which are NOT 1000 ems wide, keyed on...
bsd-3-clause
6,817,238,400,025,275,000
29.516667
95
0.637903
false
DEKHTIARJonathan/BilletterieUTC
badgingServer/Install/swigwin-3.0.7/Examples/test-suite/python/li_std_pair_extra_runme.py
6
1104
import li_std_pair_extra p = (1, 2) p1 = li_std_pair_extra.p_inout(p) p2 = li_std_pair_extra.p_inoutd(p1) d1 = li_std_pair_extra.d_inout(2) i, d2 = li_std_pair_extra.d_inout2(2) i, p = li_std_pair_extra.p_inout2(p) p3, p4 = li_std_pair_extra.p_inout3(p1, p1) psi = li_std_pair_extra.SIPair("hello", 1) pci = li_std_...
apache-2.0
2,246,103,837,448,263,700
18.034483
55
0.649457
false
40123248/2015cd_midterm2
static/Brython3.1.0-20150301-090019/Lib/stat.py
765
4304
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # Indices for stat struct members in the tuple returned by os.stat() ST_MODE = 0 ST_INO = 1 ST_DEV = 2 ST_NLINK = 3 ST_UID = 4 ST_GID = 5 ST_SIZE = 6 ST_ATIME = 7 ST_MTIME = 8 ST_CTIME = 9 ...
gpl-3.0
1,255,273,279,449,440,300
27.885906
82
0.606413
false
bright-sparks/chromium-spacewalk
third_party/cython/src/Cython/Compiler/Tests/TestTreePath.py
133
4274
import unittest from Cython.Compiler.Visitor import PrintTree from Cython.TestUtils import TransformTest from Cython.Compiler.TreePath import find_first, find_all from Cython.Compiler import Nodes, ExprNodes class TestTreePath(TransformTest): _tree = None def _build_tree(self): if self._tree is None: ...
bsd-3-clause
-9,103,416,281,758,287,000
44.468085
114
0.597801
false
Curahelper/Cura
plugins/PluginBrowser/PluginBrowser.py
1
10838
# Copyright (c) 2017 Ultimaker B.V. # PluginBrowser is released under the terms of the AGPLv3 or higher. from UM.Extension import Extension from UM.i18n import i18nCatalog from UM.Logger import Logger from UM.Qt.ListModel import ListModel from UM.PluginRegistry import PluginRegistry from UM.Application import Applicati...
agpl-3.0
-2,183,691,673,150,368,000
42.53012
160
0.639694
false
minzhang28/docker-py
setup.py
1
1768
#!/usr/bin/env python import os import sys from setuptools import setup ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) requirements = [ 'requests >= 2.5.2, < 2.11', 'six >= 1.4.0', 'websocket-client >= 0.32.0', ] if sys.platform == 'win32': requirements.append('pypiwin32 >...
apache-2.0
4,741,771,356,195,539,000
27.516129
69
0.609729
false
rosudrag/Freemium-winner
VirtualEnvironment/Lib/site-packages/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
35
8389
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.grant_types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import unicode_literals, absolute_import import json import logging from .base import GrantTypeBase from .. import errors from ..request_validator import RequestValidator log = logging.getLogger(_...
mit
-4,561,028,750,445,380,600
42.242268
112
0.606747
false
darkryder/django
tests/utils_tests/test_timesince.py
37
5880
from __future__ import unicode_literals import datetime import unittest from django.test.utils import requires_tz_support from django.utils import timezone from django.utils.timesince import timesince, timeuntil class TimesinceTests(unittest.TestCase): def setUp(self): self.t = datetime.datetime(2007, ...
bsd-3-clause
4,221,043,288,672,179,000
48.411765
113
0.65034
false
ruzhytskyi/Koans
python3/koans/about_multiple_inheritance.py
96
3944
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Slightly based on AboutModules in the Ruby Koans # from runner.koan import * class AboutMultipleInheritance(Koan): class Nameable: def __init__(self): self._name = None def set_name(self, new_name): self._name = new_name ...
mit
-3,893,598,944,285,586,400
26.971631
84
0.536511
false
vikingco/gargoyle
tests/tests.py
6
36472
""" :copyright: (c) 2010 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ import datetime import sys from django.conf import settings from django.contrib.auth.models import User, AnonymousUser from django.core.cache import cache from django.core.management.base import CommandError from django.c...
apache-2.0
7,335,281,217,212,806,000
29.317539
108
0.596019
false
kevinlondon/youtube-dl
youtube_dl/extractor/unistra.py
146
2119
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import qualities class UnistraIE(InfoExtractor): _VALID_URL = r'http://utv\.unistra\.fr/(?:index|video)\.php\?id_video\=(?P<id>\d+)' _TESTS = [ { 'url': 'http://utv.unistra.fr/video.php?id_v...
unlicense
7,884,882,395,134,264,000
31.106061
97
0.494101
false
fifengine/fifengine
engine/python/fife/extensions/pychan/internal.py
1
8284
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2019 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
lgpl-2.1
-5,598,247,029,802,314,000
26.339934
105
0.676123
false
kutenai/django
tests/sites_framework/tests.py
117
2693
from django.conf import settings from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.core import checks from django.db import models from django.test import SimpleTestCase, TestCase from django.test.utils import isolate_apps from .models import CustomAr...
bsd-3-clause
8,653,664,186,662,493,000
37.471429
99
0.655403
false
foodszhang/cookiecutter
tests/test_more_cookiecutters.py
25
1959
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_more_cookiecutters ----------------------- Test formerly known from a unittest residing in test_examples.py named TestGitBranch.test_branch TestExamplesRepoArg.test_cookiecutter_pypackage_git """ from __future__ import unicode_literals import os import subproces...
bsd-3-clause
-9,085,825,402,720,422,000
28.238806
77
0.693211
false
lduarte1991/edx-platform
openedx/core/djangolib/js_utils.py
40
3506
""" Utilities for dealing with Javascript and JSON. """ import json from django.utils.html import escapejs from mako.filters import decode from xmodule.modulestore import EdxJSONEncoder def _escape_json_for_js(json_dumps_string): """ Escape output of JSON dumps that is safe to be embedded in a <SCRIPT> tag....
agpl-3.0
-7,473,993,519,231,906,000
31.165138
85
0.661152
false
pjdelport/django
tests/modeltests/unmanaged_models/models.py
115
3688
""" Models can have a ``managed`` attribute, which specifies whether the SQL code is generated for the table on various manage.py operations. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible # All of these models are created in the database by Django. @python_2_unicode_...
bsd-3-clause
7,725,365,347,357,450,000
26.939394
79
0.671909
false
MobileWebApps/backend-python-rest-gae
lib/rest_framework/compat.py
1
21674
""" The `compat` module provides support for backwards compatibility with older versions of django/python, and compatibility wrappers around optional packages. """ # flake8: noqa from __future__ import unicode_literals import django import inspect from django.core.exceptions import ImproperlyConfigured from django.co...
bsd-3-clause
-7,740,944,944,152,246,000
34.765677
99
0.59403
false
krkhan/azure-linux-extensions
CustomScript/azure/servicebus/servicebusservice.py
46
41704
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apac...
apache-2.0
-4,431,198,465,302,643,000
40.250247
106
0.606033
false
zaxliu/scipy
scipy/sparse/csgraph/tests/test_spanning_tree.py
153
2181
"""Test the minimum spanning tree function""" from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_ import numpy.testing as npt from scipy.sparse import csr_matrix from scipy.sparse.csgraph import minimum_spanning_tree def test_minimum_spanning_tree(): ...
bsd-3-clause
6,449,308,643,633,001,000
31.552239
74
0.610729
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Doc/tools/rstlint.py
5
7590
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Check for stylistic and formal issues in .rst and .py # files included in the documentation. # # 01/2009, Georg Brandl # TODO: - wrong versions in versionadded/changed # - wrong markup after versionchanged directive import os import re import sys import getopt f...
apache-2.0
6,281,666,075,707,861,000
32.144105
83
0.548485
false
echodaemon/Empire
lib/modules/powershell/situational_awareness/network/powerview/get_localgroup.py
6
4196
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-NetLocalGroup', 'Author': ['@harmj0y'], 'Description': ('Returns a list of all current users in a specified local group ' 'on ...
bsd-3-clause
4,095,699,934,137,416,000
36.464286
190
0.492135
false
aio-libs/aiobotocore
aiobotocore/args.py
1
3209
import copy from botocore.args import ClientArgsCreator import botocore.serialize import botocore.parsers from .config import AioConfig from .endpoint import AioEndpointCreator from .signers import AioRequestSigner class AioClientArgsCreator(ClientArgsCreator): # NOTE: we override this so we can pull out the cu...
apache-2.0
7,865,963,134,726,609,000
39.620253
79
0.639452
false
ronekko/chainer
chainer/functions/connection/depthwise_convolution_2d.py
3
2905
import chainer def depthwise_convolution_2d(x, W, b=None, stride=1, pad=0): """Two-dimensional depthwise convolution function. This is an implementation of two-dimensional depthwise convolution. It takes two or three variables: the input image ``x``, the filter weight ``W``, and optionally, the bias ...
mit
-2,798,234,393,951,787,500
38.794521
79
0.613769
false
roopali8/keystone
keystone/tests/unit/test_v3.py
1
51689
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
6,186,122,609,789,525,000
36.950808
79
0.567297
false
sunlightlabs/openstates
scrapers/wa/committees.py
2
3148
from .utils import xpath from openstates.scrape import Scraper, Organization import lxml.etree class WACommitteeScraper(Scraper): _base_url = "http://wslwebservices.leg.wa.gov/CommitteeService.asmx" def scrape(self, chamber=None, session=None): if not session: session = self.latest_sess...
gpl-3.0
1,278,249,291,067,411,700
36.927711
82
0.563215
false
hwjworld/xiaodun-platform
common/djangoapps/user_api/migrations/0003_rename_usercoursetags.py
52
4699
# -*- 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): db.rename_table('user_api_usercoursetags', 'user_api_usercoursetag') def backwards(self, orm): db.rena...
agpl-3.0
5,374,979,387,593,905,000
64.277778
182
0.550755
false
eirannejad/pyRevit
pyrevitlib/rpws/__init__.py
1
1361
""" python wrapper for Autodesk Revit Server This is a python module for interacting with Autodesk Revit Server using its RESTful API. This module requires 'requests' module for handling http requests to the Revit Server. Module Files: exceptions.py: Defines module exceptions and custom exceptions for ...
gpl-3.0
823,581,210,426,404,700
33.025
74
0.639971
false
BladeSmithJohn/nixysa
third_party/ply-3.1/test/yacc_literal.py
174
1566
# ----------------------------------------------------------------------------- # yacc_literal.py # # Grammar with bad literal characters # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex imp...
apache-2.0
-302,085,844,420,982,340
21.695652
79
0.478927
false
styxit/CouchPotatoServer
libs/guessit/matchtree.py
102
9116
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2011 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
8,004,601,301,041,844,000
30.763066
79
0.551229
false
kursitet/edx-platform
common/lib/xmodule/xmodule/tests/test_utils_escape_html_characters.py
118
1632
"""Tests for methods defined in util/misc.py""" from xmodule.util.misc import escape_html_characters from unittest import TestCase class UtilHtmlEscapeTests(TestCase): """ Tests for methods exposed in util/misc """ final_content = " This is a paragraph. " def test_escape_html_comments(self): ...
agpl-3.0
-3,911,112,832,811,298,000
26.2
82
0.441789
false
PythonScanClient/PyScanClient
scan/commands/parallel.py
1
3176
''' Parallel Command @author: Kay Kasemir ''' from scan.commands import Command try: import xml.etree.cElementTree as ET except: import xml.etree.ElementTree as ET class Parallel(Command): """Perform multiple commands in parallel. Each of the commands performed in parallel may await callback ...
epl-1.0
6,257,520,863,019,147,000
30.76
84
0.542506
false
charbeljc/OCB
addons/account/wizard/account_report_central_journal.py
378
1697
# -*- 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,478,300,291,995,126,000
43.657895
153
0.638185
false
robertoostenveld/eegsynth-matlab
module/outputaudio/outputaudio.py
2
12980
#!/usr/bin/env python # This module reads data from a FieldTrip buffer and writes it to an audio device # # This software is part of the EEGsynth project, see <https://github.com/eegsynth/eegsynth>. # # Copyright (C) 2018-2020 EEGsynth project # # This program is free software: you can redistribute it and/or modify # ...
gpl-2.0
-9,156,547,892,267,286,000
35.875
280
0.630277
false
jupierce/openshift-tools
ansible/roles/lib_utils/library/oo_ami_copy_to_regions.py
3
4746
#!/usr/bin/python """ansible module for ec2 ami copy to all regions""" # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 DOCUMENTATION = ''' --- module: aos_ami_copy_to_regions short_description: this module copies an ami out to all regions description: - this module accepts an ami id and copies it to al...
apache-2.0
2,362,908,298,496,215,600
28.849057
90
0.54783
false
hiker/stan
AOR/Select.py
1
4232
#!/usr/bin/env python import string from AOR.BasicStatement import BasicNamedStatement, BasicStatement from AOR.DoubleList import DoubleList class Select(BasicNamedStatement): # Stores a select statement # # sLabel -- Label of the select statement (this is NOT the label # used in t...
gpl-3.0
-566,009,555,108,266,100
42.183673
86
0.486059
false
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/reportlab/graphics/samples/runall.py
42
1970
# runs all the GUIedit charts in this directory - # makes a PDF sample for eaxh existing chart type import sys import glob import inspect import types def moduleClasses(mod): def P(obj, m=mod.__name__, CT=type): return (type(obj)==CT and obj.__module__==m) try: return inspect.getmembers(mod, P)...
gpl-3.0
7,938,323,836,817,380,000
32.965517
97
0.498477
false
repotvsupertuga/tvsupertuga.repository
script.module.schism.addon/resources/tools/tumitv.py
62
3085
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para tumi.tv # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re import urllib from core import scrapertools from c...
gpl-2.0
7,914,448,270,266,441,000
34.825581
111
0.555519
false
junhuac/MQUIC
src/tools/bisect-builds.py
1
51675
#!/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. """Snapshot Build Bisect Tool This script bisects a snapshot archive using binary search. It starts at a bad revision (it will try...
mit
3,770,034,962,225,724,000
38.207132
80
0.619274
false
dsqmoore/0install
zeroinstall/0launch-gui/properties.py
4
19112
# Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. import zeroinstall import os from zeroinstall import _ from zeroinstall.support import tasks, unicode from zeroinstall.injector.model import Interface, Feed, stable, testing, developer, stability_levels from zeroinsta...
lgpl-2.1
1,993,739,412,908,582,700
33.939671
178
0.69684
false
beck/django
tests/field_subclassing/fields.py
170
2774
from __future__ import unicode_literals import json import warnings from django.db import models from django.utils import six from django.utils.deconstruct import deconstructible from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_text, python_2_unicode_compatible #...
bsd-3-clause
-7,401,684,044,081,080,000
27.895833
83
0.65429
false
gdgellatly/OCB1
addons/l10n_ch/account_wizard.py
424
2192
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA # Financial contributors: Hasa SA, Open Net SA, # Prisme Solutions Informatique SA, Quod SA # # Translation contributors: brain-te...
agpl-3.0
8,441,720,439,511,212,000
48.818182
121
0.597172
false
tobegit3hub/deep_cnn
java_predict_client/src/main/proto/tensorflow/contrib/tensor_forest/hybrid/python/hybrid_layer.py
45
1575
# 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
4,233,449,708,754,415,000
37.414634
80
0.685714
false
psdh/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_memorizingfile.py
496
4252
#!/usr/bin/env python # # Copyright 2011, 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...
mpl-2.0
-7,558,755,123,139,214,000
39.884615
78
0.664393
false
shgandhi/mase
python101/code/TurtleWorld.py
14
8969
"""This module is part of Swampy, a suite of programs available from allendowney.com/swampy. Copyright 2010 Allen B. Downey Distributed under the GNU General Public License at gnu.org/licenses/gpl.html. """ from Tkinter import TOP, BOTTOM, LEFT, RIGHT, END, LAST, NONE, SUNKEN from Gui import Callable from World impo...
unlicense
5,077,243,270,404,321,000
28.797342
79
0.569852
false
ClovisIRex/Snake-django
env/lib/python3.6/site-packages/django/contrib/messages/storage/session.py
109
1795
import json from django.conf import settings from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import ( MessageDecoder, MessageEncoder, ) from django.utils import six class SessionStorage(BaseStorage): """ Stores messages in the session (that is, dja...
mit
1,636,614,705,912,072,700
35.632653
90
0.649025
false
Asana/boto
tests/integration/gs/test_basic.py
107
17895
# -*- coding: utf-8 -*- # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems, Inc. # Copyright (c) 2012, Google, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of t...
mit
4,360,357,570,212,135,000
40.228111
83
0.607109
false
sodafree/backend
build/ipython/IPython/lib/backgroundjobs.py
3
17542
# -*- coding: utf-8 -*- """Manage background (threaded) jobs conveniently from an interactive shell. This module provides a BackgroundJobManager class. This is the main class meant for public usage, it implements an object which can create and manage new background jobs. It also provides the actual job classes manag...
bsd-3-clause
7,637,841,585,216,452,000
35.243802
88
0.603808
false
kinow-io/kinow-python-sdk
kinow_client/models/platform_access_info.py
1
3466
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 1.4.41 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class PlatformAccessInfo(object): """ NOTE: This class ...
apache-2.0
7,364,028,611,775,912,000
24.485294
77
0.517888
false
pombredanne/MOG
nova/tests/image/test_glance.py
7
38134
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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.apach...
apache-2.0
-3,720,581,062,960,797,000
36.607495
79
0.558111
false
chewable/django
django/contrib/gis/db/models/aggregates.py
1
1043
from django.db.models import Aggregate from django.contrib.gis.db.backend import SpatialBackend from django.contrib.gis.db.models.sql import GeomField class GeoAggregate(Aggregate): def add_to_query(self, query, alias, col, source, is_summary): if hasattr(source, '_geom'): # Doing additional s...
bsd-3-clause
-2,131,715,539,792,626,000
36.25
85
0.659636
false
elventear/ansible
lib/ansible/modules/cloud/amazon/elasticache_snapshot.py
12
8130
#!/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 distributed...
gpl-3.0
3,131,503,359,653,481,500
33.159664
154
0.651046
false
wermon/python_koans
python2/koans/about_sets.py
86
1510
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutSets(Koan): def test_sets_make_keep_lists_unique(self): highlanders = ['MacLeod', 'Ramirez', 'MacLeod', 'Matunas', 'MacLeod', 'Malcolm', 'MacLeod'] there_can_only_be_only_one = set(highlanders) ...
mit
7,688,883,136,376,218,000
34.116279
72
0.539073
false
nharraud/invenio-demosite
invenio_demosite/testsuite/regression/test_bibrank_selfcites.py
7
12705
# -*- coding: utf-8 -*- # # This file is part of Invenio Demosite. # Copyright (C) 2011, 2012 CERN. # # Invenio Demosite 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 (a...
gpl-2.0
-6,955,125,983,724,424,000
43.423077
91
0.659111
false
nino-c/plerp.org
src/mainsite/settings/base.py
1
4367
""" Django settings for mainsite project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from django.core.urlresolvers import reverse_lazy from os.path import dirn...
mit
-8,577,805,628,388,005,000
26.64557
74
0.683994
false
MobinRanjbar/hue
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/Hash/RIPEMD.py
124
3005
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
apache-2.0
2,327,903,496,229,020,000
30.968085
78
0.667887
false
mrtnrdl/.macdots
scripts/bin/platform-tools/systrace/catapult/dependency_manager/dependency_manager/dependency_manager_unittest.py
10
22469
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=unused-argument import mock from pyfakefs import fake_filesystem_unittest from py_utils import cloud_storage import dependency_manager f...
unlicense
1,089,576,451,152,813,700
41.635674
105
0.646446
false
wanghongjuan/crosswalk-test-suite
webapi/tct-csp-w3c-tests/csp-py/csp_img-src_none_blocked_ext-manual.py
30
2514
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) response.headers.set("Content...
bsd-3-clause
1,974,662,099,630,797,600
43.892857
80
0.715195
false
caphrim007/ansible
lib/ansible/modules/cloud/azure/azure_rm_autoscale.py
7
26866
#!/usr/bin/python # # Copyright (c) 2017 Yuwei Zhou, <yuwzho@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-606,303,671,786,470,800
42.26248
160
0.547942
false
raj454raj/eden
modules/webkit_url2png.py
53
2510
#!/usr/bin/env python import sys import signal from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtWebKit import QWebPage def save_webpage_screenshot(url, width, height, file_name = None): """Saves a screenshot of the webpage given in url into filename+".png" width and height, if given, ar...
mit
562,062,569,273,653,950
24.886598
78
0.580478
false
dfdeshom/solrcloudpy
solrcloudpy/collection/stats.py
1
1889
""" Get different statistics about the underlying index in a collection """ from future.utils import iteritems from solrcloudpy.utils import _Request, SolrResult class SolrIndexStats(object): """ Get different statistics about the underlying index in a collection """ def __init__(self, connection, nam...
bsd-3-clause
-5,772,406,887,508,853,000
30.483333
89
0.58973
false
asgardproject/asgard-blog
blog/forms.py
2
2259
from django import forms from django.utils.translation import ugettext_lazy as _ # Stop Words courtesy of: # http://www.dcs.gla.ac.uk/idom/ir_resources/linguistic_utils/stop_words STOP_WORDS = r"""\b(a|about|above|across|after|afterwards|again| against|all|almost|alone|along|already|also|although|always|am| among|am...
bsd-3-clause
5,187,080,610,513,456,000
56.948718
72
0.799911
false
vvuk/servo
tests/wpt/web-platform-tests/2dcontext/tools/gentestutils.py
11
33741
# Copyright (c) 2010 Philip Taylor # Released under the BSD license and W3C Test Suite License: see LICENSE.txt # Current code status: # # This was originally written for use at # http://philip.html5.org/tests/canvas/suite/tests/ # # It has been adapted for use with the Web Platform Test Suite suite at # https://githu...
mpl-2.0
-3,190,507,441,413,313,000
40.45086
165
0.49957
false
Pexego/alimentacion
product_format/__openerp__.py
2
1402
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2012 Pexego Sistemas Informáticos All Rights Reserved # $Marta Vázquez Rodríguez$ <marta@pexego.es> # # This program is free software: you can redistribute it and/or modify # it unde...
agpl-3.0
-5,837,973,186,342,847,000
41.393939
99
0.590422
false
AICP/external_chromium_org
build/mac/tweak_info_plist.py
42
10163
#!/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. # # Xcode supports build variable substitutions and CPP; sadly, that doesn't work # because: # # 1. Xcode wants to do the Info.pli...
bsd-3-clause
5,962,279,861,735,357,000
35.296429
80
0.681
false
akesandgren/easybuild-easyblocks
easybuild/easyblocks/n/nwchem.py
3
26070
## # Copyright 2009-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
811,625,514,292,845,000
46.747253
120
0.573188
false
jgcaaprom/android_external_chromium_org
tools/telemetry/telemetry/core/backends/chrome/ios_browser_backend.py
28
4773
# 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 contextlib import json import logging import re import urllib2 from telemetry.core import util from telemetry.core.backends.chrome import chrome_brow...
bsd-3-clause
2,165,477,490,270,569,500
29.993506
79
0.660381
false
kidig/rrtop100
setup.py
1
1563
""" RadioRecord Top Hits Downloader """ from setuptools import find_packages, setup dependencies = ['click==6.6', 'aiohttp==0.22.5', 'lxml==3.6.1'] setup( name='rrtop100', version='0.1.0', url='https://github.com/kidig/rrtop100', license='BSD', author='Dmitrii Gerasimenko', author_email='kiddi...
apache-2.0
-197,380,918,972,086,560
32.255319
72
0.59373
false
morenopc/edx-platform
common/lib/capa/capa/tests/test_correctmap.py
61
5833
""" Tests to verify that CorrectMap behaves correctly """ import unittest from capa.correctmap import CorrectMap import datetime class CorrectMapTest(unittest.TestCase): """ Tests to verify that CorrectMap behaves correctly """ def setUp(self): self.cmap = CorrectMap() def test_set_inpu...
agpl-3.0
2,346,880,406,002,082,300
31.405556
80
0.570204
false
Subito/ansible-modules-extras
system/pam_limits.py
57
7494
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Sebastien Rohaut <sebastien.rohaut@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 ...
gpl-3.0
7,095,359,390,727,954,000
30.754237
206
0.583133
false
racker/kafka
tests/kafkatest/services/monitor/jmx.py
14
4472
# 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 ...
apache-2.0
6,881,996,406,295,338,000
48.7
139
0.647138
false
deathsec/instagram-py
InstagramPy/InstagramPySession.py
1
10708
# The MIT License. # Copyright (C) 2017 The Future Shell , DeathSec. # # @filename : InstagramPySession.py # @description : creates a new session , checks for configuration and gets critical data # , loads save and saves data too. import json import os import uuid import hashlib import requests from s...
mit
7,463,596,676,160,802,000
33.320513
113
0.543612
false
nguyentu1602/statsmodels
statsmodels/stats/inter_rater.py
34
17035
# -*- coding: utf-8 -*- """Inter Rater Agreement contains -------- fleiss_kappa cohens_kappa aggregate_raters: helper function to get data into fleiss_kappa format to_table: helper function to create contingency table, can be used for cohens_kappa Created on Thu Dec 06 22:57:56 2012 Author: Josef Perktold Li...
bsd-3-clause
-1,816,705,944,004,703,000
33.979466
82
0.583505
false
dfalt974/SickRage
lib/pgi/clib/gir/giregisteredtypeinfo.py
20
1096
# Copyright 2012 Christoph Reiter # # 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. from ..glib import gchar_p...
gpl-3.0
-9,157,574,045,988,289,000
31.235294
68
0.69708
false
cisco-open-source/selenium
py/selenium/webdriver/common/desired_capabilities.py
35
3196
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-1,740,439,316,000,755,000
24.98374
84
0.590426
false
dobermanapp/django-doberman
setup.py
2
1557
#!/usr/bin/env python from setuptools import setup, find_packages requirements = ['Django>=1.7.0', ] try: from unittest import mock except ImportError: requirements.append('mock') setup( name="django-doberman", version="0.5.9", author="Nicolas Mendoza", author_email="niccolasmendoza@gmail.com...
mit
2,045,975,705,987,140,400
32.869565
116
0.64483
false
neumerance/deploy
.venv/lib/python2.7/site-packages/docutils/parsers/rst/languages/gl.py
130
3711
# -*- coding: utf-8 -*- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 4229 $ # Date: $Date: 2005-12-23 00:46:16 +0100 (Fri, 23 Dec 2005) $ # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, pleas...
apache-2.0
5,004,183,099,309,337,000
32.432432
79
0.615198
false
yanheven/glance
glance/tests/unit/test_context.py
18
6208
# Copyright 2010-2011 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...
apache-2.0
-3,653,793,132,970,330,000
34.884393
78
0.616302
false