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
aplicatii-romanesti/allinclusive-kodi-pi
.kodi/addons/plugin.video.movie4k/plugintools.py
1
19027
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Plugin Tools v1.0.8 #--------------------------------------------------------------------------- # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Based on code from youtube, parsedom and pelisalacarta addon...
apache-2.0
4,476,613,958,263,648,000
31.51453
286
0.594816
false
m-kuhn/QGIS
python/plugins/db_manager/db_plugins/oracle/plugin.py
6
22780
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS (Oracle) Date : Aug 27, 2014 copyright : (C) 2014 by Médéric RIBREUX email : meder...
gpl-2.0
-6,012,125,030,114,924,000
34.187017
125
0.579548
false
miqlar/PyFME
src/pyfme/utils/trimmer.py
5
8158
# -*- coding: utf-8 -*- """ Python Flight Mechanics Engine (PyFME). Copyright (c) AeroPython Development Team. Distributed under the terms of the MIT License. Trimmer ------- This module solves the problem of calculating the values of the state and control vectors that satisfy the state equations of the aircraft at th...
mit
7,314,654,031,948,047,000
33.133891
79
0.617308
false
vericred/vericred-python
test/test_providers_api.py
1
10307
# coding: utf-8 """ Vericred API Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and an...
apache-2.0
-2,225,444,863,731,263,500
37.602996
228
0.649365
false
Yuudachimoe/HikariChun-RedBot
lib/youtube_dl/extractor/abc.py
24
6210
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, js_to_json, int_or_none, parse_iso8601, ) class ABCIE(InfoExtractor): IE_NAME = 'abc.net.au' _VALID_URL = r'https?://(?:www\.)?abc\.net\.au/news/(?:[^/]+/){1,2}(?P<id>\d+...
gpl-3.0
7,543,708,028,692,215,000
39.855263
259
0.561192
false
xianjunzhengbackup/Cloud-Native-Python
env/lib/python3.5/site-packages/pip/_vendor/distlib/metadata.py
335
38833
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Implementation of the Metadata for Python packages PEPs. Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental). """ from __future__ import unicode_literals import codecs from email...
mit
-134,777,574,496,205,780
35.360487
84
0.521489
false
Elettronik/SickRage
lib/hachoir_metadata/metadata.py
54
9258
# -*- coding: utf-8 -*- from hachoir_core.compatibility import any, sorted from hachoir_core.endian import endian_name from hachoir_core.tools import makePrintable, makeUnicode from hachoir_core.dict import Dict from hachoir_core.error import error, HACHOIR_ERRORS from hachoir_core.i18n import _ from hachoir_core.log i...
gpl-3.0
4,867,206,861,105,352,000
30.372881
89
0.559589
false
cloudbase/neutron-virtualbox
neutron/plugins/ml2/plugin.py
1
65394
# Copyright (c) 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 ...
apache-2.0
-4,031,988,639,562,894,300
47.368343
79
0.572423
false
kmarius/qutebrowser
tests/end2end/fixtures/webserver.py
4
6473
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
5,028,778,831,955,920,000
30.730392
79
0.616098
false
xissy/titanium-mobile-sdk
android/run.py
1
1625
import os, subprocess, types, sys, re def check_output_for_error(output, match, error_in_first_match): success = re.findall(match, output) if len(success) > 0: if (error_in_first_match): print "[ERROR] %s" % success[0] sys.exit(1) else: return True else: return False def check_and_print_err(err, war...
apache-2.0
5,110,268,308,287,892,000
26.083333
129
0.68
false
s20121035/rk3288_android5.1_repo
external/clang/bindings/python/tests/cindex/test_cdb.py
38
4306
from clang.cindex import CompilationDatabase from clang.cindex import CompilationDatabaseError from clang.cindex import CompileCommands from clang.cindex import CompileCommand import os import gc kInputsDir = os.path.join(os.path.dirname(__file__), 'INPUTS') def test_create_fail(): """Check we fail loading a data...
gpl-3.0
3,942,392,631,702,334,500
38.145455
79
0.643753
false
dtrip/weevely3
modules/audit/phpconf.py
15
6310
from core.vectors import PhpCode, ShellCmd, ModuleExec, Os from core.module import Module from core import messages from core import modules import re class Phpconf(Module): """Audit PHP configuration.""" def init(self): self.register_info( { 'author': [ ...
gpl-3.0
40,510,162,782,217,810
31.193878
156
0.454834
false
tima/ansible
lib/ansible/modules/network/netvisor/pn_show.py
72
5460
#!/usr/bin/python """ PN CLI show commands """ # # 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 ver...
gpl-3.0
-1,967,902,714,839,049,700
26.437186
80
0.64011
false
webmakin/scrapy
tests/test_utils_signal.py
121
2741
from testfixtures import LogCapture from twisted.trial import unittest from twisted.python.failure import Failure from twisted.internet import defer, reactor from pydispatch import dispatcher from scrapy.utils.signal import send_catch_log, send_catch_log_deferred class SendCatchLogTest(unittest.TestCase): @defe...
bsd-3-clause
-6,279,461,906,484,631,000
33.696203
76
0.660343
false
veger/ansible
test/units/conftest.py
37
1052
"""Monkey patch os._exit when running under coverage so we don't lose coverage data in forks, such as with `pytest --boxed`.""" import gc import os try: import coverage except ImportError: coverage = None try: test = coverage.Coverage except AttributeError: coverage = None def pytest_configure(): ...
gpl-3.0
2,484,419,202,556,002,000
20.469388
127
0.620722
false
nave91/dbt
test/integration/014_hook_tests/test_model_hooks_bq.py
1
4613
from nose.plugins.attrib import attr from test.integration.base import DBTIntegrationTest MODEL_PRE_HOOK = """ insert into {{this.schema}}.on_model_hook ( state, target_name, target_schema, target_type, target_threads, run_started_at, invocation_id ) VALUES...
apache-2.0
5,494,990,036,721,369,000
28.570513
163
0.555821
false
niksolaz/GeoJS
venv/lib/python2.7/site-packages/pip/commands/install.py
61
15982
from __future__ import absolute_import import logging import operator import os import tempfile import shutil import warnings from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.locations import build_prefix, virtualenv_no_global, distutils_scheme from pip.basecommand import Command fr...
mit
2,464,007,097,171,582,000
37.143198
79
0.504005
false
progamer001/Testchat
auth.py
1
9013
# coding=UTF-8 # Tornado modules. import tornado.web import tornado.escape # Import application modules. from base import BaseHandler # General modules. import logging class LoginHandler(BaseHandler, tornado.auth.GoogleMixin): """ Handler for logins with Google Open ID / OAuth http://www.tornadoweb.org...
mit
2,882,877,958,796,473,300
49.629213
151
0.525078
false
kbrebanov/ansible
contrib/inventory/nsot.py
117
9825
#!/usr/bin/env python ''' nsot ==== Ansible Dynamic Inventory to pull hosts from NSoT, a flexible CMDB by Dropbox Features -------- * Define host groups in form of NSoT device attribute criteria * All parameters defined by the spec as of 2015-09-05 are supported. + ``--list``: Returns JSON hash of host groups -...
gpl-3.0
6,341,694,139,145,834,000
27.644315
79
0.575573
false
Andrew-McNab-UK/DIRAC
docs/source/conf.py
4
9724
# -*- coding: utf-8 -*- # # DiracDocs documentation build configuration file, created by # sphinx-quickstart on Sun Apr 25 17:34:37 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
gpl-3.0
-8,202,472,333,667,071,000
32.881533
141
0.686857
false
ganeti/ganeti
lib/hooksmaster.py
1
10785
# # # Copyright (C) 2006, 2007, 2011, 2012 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
bsd-2-clause
1,631,890,072,393,134,000
35.808874
80
0.671025
false
ChanChiChoi/scikit-learn
sklearn/covariance/tests/test_covariance.py
142
11068
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause import numpy as np from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_alm...
bsd-3-clause
-259,602,035,515,206,050
39.542125
79
0.66245
false
rupak0577/ginga
ginga/web/pgw/Plot.py
3
4306
# # Plot.py -- Plotting widget canvas wrapper. # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from io import BytesIO from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from ...
bsd-3-clause
-1,079,178,573,254,554,400
30.896296
75
0.584301
false
arifsetiawan/edx-platform
lms/djangoapps/courseware/tests/test_navigation.py
28
11973
""" This test file will run through some LMS test scenarios regarding access and navigation of the LMS """ import time from mock import patch from nose.plugins.attrib import attr from django.conf import settings from django.core.urlresolvers import reverse from django.test.utils import override_settings from coursewa...
agpl-3.0
8,853,915,571,294,456,000
37.375
98
0.56903
false
pangweishen/rt-thread
tools/keil.py
20
13161
# # File : keil.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team # # 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...
gpl-2.0
-6,143,641,134,354,828,000
32.403553
133
0.583238
false
Scarygami/gae-gcs-push2deploy-secrets
lib/werkzeug/testsuite/urls.py
83
14595
# -*- coding: utf-8 -*- """ werkzeug.testsuite.urls ~~~~~~~~~~~~~~~~~~~~~~~ URL helper tests. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from werkzeug.testsuite import WerkzeugTestCase from werkzeug.datastructures import OrderedMultiD...
apache-2.0
166,456,976,874,650,980
46.243506
128
0.588207
false
bohdan-shramko/learning-python
source/sublime-packages/Packages/mdpopups/st3/mdpopups/mdx/superfences.py
2
21280
""" Superfences. pymdownx.superfences Neseted Fenced Code Blocks This is a modification of the original Fenced Code Extension. Algorithm has been rewritten to allow for fenced blocks in blockquotes, lists, etc. And also , allow for special UML fences like 'flow' for flowcharts and `sequence` for sequence diagrams. ...
mit
-5,264,952,881,420,983,000
34.824916
110
0.524389
false
dneiter/exabgp
lib/exabgp/reactor/api/command/text.py
2
15907
# encoding: utf-8 """ command.py Created by Thomas Mangin on 2015-12-15. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ from exabgp.version import version as _version class Text (object): callback = {} def __new__ (cls,name): def register (function): cls.callback[name] = function return f...
bsd-3-clause
-695,674,210,824,854,500
30.561508
144
0.717797
false
redhat-openstack/django
django/contrib/contenttypes/views.py
115
3383
from __future__ import unicode_literals from django import http from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site, get_current_site from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext as _ def shortcut(request, conte...
bsd-3-clause
-7,892,283,069,216,955,000
40.256098
92
0.593556
false
bdang2012/taiga-back
taiga/projects/attachments/api.py
5
3684
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
agpl-3.0
8,743,416,350,056,382,000
36.958763
92
0.737099
false
bhatfield/titanium_mobile
support/common/markdown/inlinepatterns.py
107
12185
""" INLINE PATTERNS ============================================================================= Inline patterns such as *emphasis* are handled by means of auxiliary objects, one per pattern. Pattern objects must be instances of classes that extend markdown.Pattern. Each pattern object uses a single regular express...
apache-2.0
3,404,557,503,276,708,400
31.843666
81
0.560854
false
lochiiconnectivity/boto
boto/sdb/db/blob.py
57
2398
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # 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,...
mit
-7,452,152,382,092,280,000
30.973333
74
0.638449
false
richardcs/ansible
lib/ansible/modules/network/cloudengine/ce_switchport.py
7
27424
#!/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
-5,700,954,182,553,911,000
33.067081
123
0.553821
false
bradwoo8621/Swift-Study
Instagram/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/lib/TestCommon.py
307
21397
""" TestCommon.py: a testing framework for commands and scripts with commonly useful error handling The TestCommon module provides a simple, high-level interface for writing tests of executable commands and scripts, especially commands and scripts that interact with the file system. All methods throw...
mit
-6,213,192,701,117,661,000
36.538596
85
0.597373
false
ogenstad/ansible
lib/ansible/modules/cloud/amazon/s3_sync.py
44
19602
#!/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,167,043,720,475,284,500
35.033088
155
0.615294
false
yangleo/cloud-github
openstack_dashboard/dashboards/admin/hypervisors/compute/tabs.py
57
1309
# 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 # distributed under th...
apache-2.0
4,367,786,961,389,526,500
36.4
75
0.703591
false
dashpay/electrum-dash
plugins/greenaddress_instant/qt.py
12
3985
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # 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...
mit
-5,453,817,667,949,914,000
38.068627
139
0.640151
false
endorphinl/horizon-fork
openstack_dashboard/enabled/_1000_project.py
21
1201
# Copyright 2015, Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
-4,334,131,623,791,000,000
32.361111
75
0.745212
false
mattesno1/CouchPotatoServer
libs/rtorrent/common.py
88
4050
# 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
9,194,769,490,991,832,000
25.821192
84
0.670864
false
zuck/scribee
scribee.py
1
2854
#!/usr/bin/python # -*- coding: utf-8 -*- """This file is part of the Scribee project. """ __author__ = 'Emanuele Bertoldi <emanuele.bertoldi@gmail.com>' __copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi' __version__ = '0.0.1' import sys import os import fileinput import settings class Scribox(object): def ...
mit
6,355,156,208,067,301,000
32.97619
81
0.522074
false
danieldresser/cortex
python/IECoreHoudini/FnParameterisedHolder.py
12
8982
########################################################################## # # Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), # its affiliates and/or its licensors. # # Copyright (c) 2010-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary ...
bsd-3-clause
931,267,226,262,248,200
38.052174
140
0.709308
false
mateor/pants
tests/python/pants_test/backend/jvm/tasks/test_check_published_deps.py
10
3985
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from textw...
apache-2.0
7,411,157,363,367,676,000
32.208333
93
0.631368
false
reachedu14/traininginstitute
coursebuilder/tests/suite.py
4
10911
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
-4,305,486,130,554,586,000
34.083601
85
0.659335
false
HiSPARC/station-software
user/python/Lib/site-packages/win32/Demos/service/serviceEvents.py
40
4127
# A Demo of a service that takes advantage of the additional notifications # available in later Windows versions. # Note that all output is written as event log entries - so you must install # and start the service, then look at the event log for messages as events # are generated. # Events are generated for USB devi...
gpl-3.0
-7,575,453,376,484,556,000
45.897727
104
0.662951
false
jpshort/odoo
addons/pad/py_etherpad/__init__.py
505
7804
"""Module to talk to EtherpadLite API.""" import json import urllib import urllib2 class EtherpadLiteClient: """Client to talk to EtherpadLite API.""" API_VERSION = 1 # TODO probably 1.1 sometime soon CODE_OK = 0 CODE_INVALID_PARAMETERS = 1 CODE_INTERNAL_ERROR = 2 CODE_INVALID_FUNCTION = 3 ...
agpl-3.0
-3,283,697,430,644,249,600
29.968254
129
0.574193
false
martynovp/edx-platform
lms/djangoapps/shoppingcart/migrations/0023_auto__add_field_coupon_expiration_date.py
110
18437
# -*- 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 'Coupon.expiration_date' db.add_column('shoppingcart_coupon', 'expiration_date', ...
agpl-3.0
-8,133,023,486,222,825,000
83.191781
182
0.55931
false
synicalsyntax/zulip
zerver/webhooks/statuspage/view.py
4
2145
# Webhooks for external integrations. from typing import Any, Dict from django.http import HttpRequest, HttpResponse from zerver.decorator import REQ, api_key_only_webhook_view, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import check_send_webhook_message from ze...
apache-2.0
2,309,238,066,771,343,000
33.596774
95
0.6662
false
ntts-clo/mld-ryu
ryu/tests/mininet/l3/ip_ttl/test_ip_ttl.py
63
2976
# Copyright (C) 2012 Nippon Telegraph and Telephone 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-8,629,637,945,728,682,000
34.428571
78
0.646841
false
kybriainfotech/iSocioCRM
addons/website_forum/models/res_users.py
281
5198
# -*- coding: utf-8 -*- from datetime import datetime from urllib import urlencode import hashlib from openerp import SUPERUSER_ID from openerp.osv import osv, fields class Users(osv.Model): _inherit = 'res.users' def __init__(self, pool, cr): init_res = super(Users, self).__init__(pool, cr) ...
agpl-3.0
3,386,890,195,396,297,700
49.466019
151
0.601
false
tekapo/fabric
tests/test_network.py
3
24848
from __future__ import with_statement from datetime import datetime import copy import getpass import sys from nose.tools import with_setup, ok_, raises from fudge import (Fake, clear_calls, clear_expectations, patch_object, verify, with_patched_object, patched_context, with_fakes) from fabric.context_managers i...
bsd-2-clause
-8,869,130,587,347,242,000
34.547926
92
0.576988
false
Philippe12/external_chromium_org
ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_component_crx_gen.py
48
13105
#!/usr/bin/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. """This script lays out the PNaCl translator files for a normal Chrome installer, for one platform. Once run num-of-arches times, ...
bsd-3-clause
-7,056,966,648,829,842,000
33.396325
79
0.638153
false
maciejkula/glove-python
setup.py
1
4688
import glob import os import platform import subprocess import sys from setuptools import Command, Extension, setup, find_packages from setuptools.command.test import test as TestCommand def define_extensions(cythonize=False): compile_args = ['-fopenmp', '-ffast-math'] # There are probl...
apache-2.0
4,129,608,185,902,129,000
29.051282
81
0.584898
false
xhat/micropython
tests/basics/for_range.py
19
1116
# test for+range, mostly to check optimisation of this pair # apply args using * for x in range(*(1, 3)): print(x) for x in range(1, *(6, 2)): print(x) # apply args using ** try: for x in range(**{'end':1}): print(x) except TypeError: print('TypeError') try: for x in range(0, **{'end':1}):...
mit
-4,837,676,830,301,300,000
18.241379
59
0.578853
false
bennyrowland/pyflo-suspect
tests/test_processing.py
1
5347
from unittest.mock import Mock import numpy import pytest import pyflo_suspect.processing as p import pyflo.ports import suspect @pytest.fixture def simple_data(): source_array = numpy.ones((4, 128), 'complex') source_array[1, :] *= 2 source_array[2, :] *= 4 source_array[3, :] *= 8 data = suspec...
mit
2,592,149,976,706,942,000
29.907514
99
0.657939
false
40223234/40223234
static/Brython3.1.1-20150328-091302/Lib/getopt.py
845
7488
"""Parser for command line options. This module helps scripts to parse the command line arguments in sys.argv. It supports the same conventions as the Unix getopt() function (including the special meanings of arguments of the form `-' and `--'). Long options similar to those supported by GNU software may be used as ...
gpl-3.0
-2,293,394,818,014,773,200
33.823256
80
0.620008
false
bgris/ODL_bgris
lib/python3.5/site-packages/docutils/__init__.py
1
7559
# $Id: __init__.py 7984 2016-12-09 09:48:27Z grubert $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This is the Docutils (Python Documentation Utilities) package. Package Structure ================= Modules: - __init__.py: Contains component base cl...
gpl-3.0
2,540,936,649,337,729,000
33.834101
78
0.694669
false
Jet-Streaming/googletest
googlemock/scripts/generator/cpp/ast.py
384
62773
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions 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...
bsd-3-clause
848,491,998,429,159,300
35.222158
82
0.541507
false
norbertspiess/google-python-exercises
basic/solution/list1.py
209
3656
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic list exercises # Fill in the code for the functions below. main() is already set ...
apache-2.0
-3,504,756,563,686,536,000
29.722689
79
0.612691
false
ZhangXinNan/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/mvn_full_covariance_test.py
14
7349
# 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,034,931,142,505,606,000
35.20197
80
0.626616
false
CodeWingX/yowsup
yowsup/layers/axolotl/protocolentities/receipt_outgoing_retry.py
35
2457
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from yowsup.layers.protocol_receipts.protocolentities import OutgoingReceiptProtocolEntity from yowsup.layers.axolotl.protocolentities.iq_keys_get_result import ResultGetKeysIqProtocolEntity class RetryOutgoingReceiptProtocolEntity(OutgoingReceiptProtocolEntit...
gpl-3.0
-4,562,038,323,375,983,000
38.645161
119
0.672365
false
jspan/Open-Knesset
accounts/migrations/0002_add_valid_email_group.py
11
4805
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from django.contrib.auth.models import User,Group,Permission class Migration(DataMigration): def forwards(self, orm): (g,created) = Group.objects.get_or_create(name='Valid Email') ...
bsd-3-clause
-8,475,411,838,066,501,000
55.529412
163
0.549428
false
vyvojer/ploev
tests/test_calc.py
1
3140
import unittest from ploev import calc from ploev.calc import Calc, GameCalc from ploev.ppt import OddsOracle class CalcModuleTest(unittest.TestCase): def test_close_parenthesis(self): self.assertEqual(calc.close_parenthesis('77,KK'), '(77,KK)') self.assertEqual(calc.close_parenthesis('(77,KK)')...
gpl-3.0
-4,430,519,952,128,349,000
33.888889
99
0.588535
false
SoftwareDefinedBuildings/smap
python/smap/drivers/labjack/labjackpython/u6.py
6
83591
""" Name: u6.py Desc: Defines the U6 class, which makes working with a U6 much easier. All of the low-level functions for the U6 are implemented as functions of the U6 class. There are also a handful additional functions which improve upon the interface provided by the low-level functions. To learn a...
bsd-2-clause
-7,835,564,006,306,339,000
35.359722
305
0.569308
false
vivekpabani/projecteuler
python/058/problem_058.py
1
1812
#!/usr/bin/env python # coding=utf-8 """ Problem Definition : Starting with 1 and spiralling anticlockwise in the following way, a square spiral with side length 7 is formed. 37 36 35 34 33 32 31 38 17 16 15 14 13 30 39 18 5 4 3 12 29 40 19 6 1 2 11 28 41 20 7 8 9 10 27 42 21 22 23 24 25 26 43 44 45 46 47 ...
apache-2.0
-7,594,606,990,625,697,000
23.459459
261
0.577348
false
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/plugins/action/ce_config.py
89
4192
# # Copyright 2015 Peter Sprygada <psprygada@ansible.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) any...
bsd-3-clause
-7,830,596,251,620,386,000
36.097345
85
0.617605
false
firstjob/python-social-auth
social/tests/test_utils.py
73
5018
import sys import unittest2 as unittest from mock import Mock from social.utils import sanitize_redirect, user_is_authenticated, \ user_is_active, slugify, build_absolute_uri, \ partial_pipeline_data PY3 = sys.version_info[0] == 3 class SanitizeRedirectTest(unitte...
bsd-3-clause
3,718,112,198,099,050,000
32.677852
78
0.606218
false
ds-hwang/chromium-crosswalk
tools/perf/benchmarks/gpu_times.py
8
2505
# 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. from core import perf_benchmark from benchmarks import silk_flags from telemetry import benchmark from telemetry.timeline import tracing_category_filter fr...
bsd-3-clause
7,396,021,824,340,821,000
31.960526
78
0.762874
false
bqbn/addons-server
src/olympia/files/utils.py
1
52387
import collections import contextlib import errno import hashlib import json import os import io import re import shutil import signal import stat import struct import tarfile import tempfile import zipfile import fcntl from datetime import datetime from django import forms from django.conf import settings from djang...
bsd-3-clause
2,322,492,546,398,874,000
35.788624
79
0.609369
false
jtara1/RedditImageGrab
redditdownload/plugins/parse_subreddit_list.py
1
2749
# -*- coding: utf-8 -*- """ Created on Tue Aug 30 15:26:13 2016 @author: jtara1 General syntax for subreddits.txt: : (colon character) denotes folder name subreddit url or word denotes subreddit For more examples see https://github.com/jtara1/RedditImageGrab/commit/8e4787ef9ac43ca694fc663be026f69a568bb622 Example o...
gpl-3.0
-7,828,582,792,004,484,000
28.880435
111
0.628592
false
ibethune/lammps
tools/i-pi/ipi/inputs/normalmodes.py
41
3951
"""Deals with creating the normal mode representation arrays. Copyright (C) 2013, Joshua More and Michele Ceriotti 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...
gpl-2.0
5,744,279,130,182,483,000
46.035714
597
0.690205
false
jamslevy/gsoc
thirdparty/google_appengine/google/appengine/tools/appcfg.py
1
74994
#!/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
-337,467,472,029,764,500
33.929669
80
0.631957
false
olea/PyConES-2016
pycones/schedule/migrations/0007_auto_20150930_1149.py
2
4593
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import markupfield.fields class Migration(migrations.Migration): dependencies = [ ('schedule', '0006_slotkind_plenary'), ] operations = [ migrations.AlterField( model_nam...
mit
-2,997,923,581,167,101,400
38.93913
142
0.578489
false
jyotikamboj/container
django/contrib/gis/tests/geoapp/test_sitemaps.py
8
3286
from __future__ import unicode_literals from io import BytesIO from xml.dom import minidom import zipfile from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.sites.models import Site from django.test import ( TestCase, ignore_warnings, modify_settings, override_settin...
mit
-1,752,181,218,168,328,000
43.405405
110
0.630858
false
jhonnyam123/hangoutsbot
hangupsbot/plugins/xkcd.py
3
1350
import aiohttp, asyncio, io, logging, os, re, urllib.request, urllib.error from bs4 import BeautifulSoup import plugins logger = logging.getLogger(__name__) def _initialise(bot): plugins.register_handler(_watch_xkcd_link, type="message") @asyncio.coroutine def _watch_xkcd_link(bot, event, command): if event.user....
agpl-3.0
-8,259,803,688,609,911,000
31.926829
116
0.654074
false
PySCeS/PyscesToolbox
psctb/analyse/_symca/ccobjects.py
1
18252
from __future__ import division, print_function from __future__ import absolute_import from __future__ import unicode_literals import numpy as np from numpy import array, nanmin, nanmax from sympy import Symbol from pysces import ModelMap, Scanner, ParScanner from numpy import NaN, abs from ...utils.model_graph impor...
bsd-3-clause
4,744,020,672,763,269,000
34.1
90
0.526682
false
alexsmx/djangoAppengineSrcTemplate
django/db/backends/postgresql_psycopg2/base.py
239
8346
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import sys from django.db import utils from django.db.backends import * from django.db.backends.signals import connection_created from django.db.backends.postgresql.operations import DatabaseOperations as Postgresq...
bsd-3-clause
278,535,006,342,271,650
40.316832
124
0.6318
false
xiandiancloud/edxplaltfom-xusong
common/lib/extract_tar.py
40
2149
""" Safe version of tarfile.extractall which does not extract any files that would be, or symlink to a file that is, outside of the directory extracted in. Adapted from: http://stackoverflow.com/questions/10060069/safely-extract-zip-or-tar-using-python """ from os.path import abspath, realpath, dirname, join as joinpa...
agpl-3.0
5,506,515,926,232,927,000
33.111111
89
0.65007
false
voussoir/praw
tests/unit/models/reddit/test_subreddit.py
2
3857
import pickle import pytest from praw.models import Subreddit, WikiPage from ... import UnitTest class TestSubreddit(UnitTest): def test_equality(self): subreddit1 = Subreddit(self.reddit, _data={'display_name': 'dummy1', 'n': 1}) subreddit2 = Subreddit(self.reddit...
gpl-3.0
8,130,608,840,796,770,000
39.177083
73
0.574799
false
CXQERP/ODOOERP
openerp/report/render/rml2txt/__init__.py
381
1351
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
-7,856,761,138,642,566,000
39.939394
79
0.638046
false
gmt/portage
pym/_emerge/BinpkgPrefetcher.py
8
1240
# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from _emerge.BinpkgFetcher import BinpkgFetcher from _emerge.CompositeTask import CompositeTask from _emerge.BinpkgVerifier import BinpkgVerifier from portage import os class BinpkgPrefetcher(CompositeTask): _...
gpl-2.0
1,846,980,671,108,573,200
27.837209
66
0.733065
false
seann1/portfolio5
.meteor/dev_bundle/python/Lib/lib-tk/test/test_ttk/test_widgets.py
13
57791
import unittest import Tkinter as tkinter from Tkinter import TclError import ttk from test.test_support import requires, run_unittest import sys from test_functions import MockTclObj from support import (AbstractTkTest, tcl_version, get_tk_patchlevel, simulate_mouse_click) from widget_tests impor...
gpl-2.0
2,572,791,768,090,678,000
34.761757
87
0.589711
false
codesparkle/youtube-dl
youtube_dl/extractor/addanime.py
29
3281
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, compat_urllib_parse_urlencode, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, qualities, ) class AddAnimeIE(InfoExtractor): _VAL...
unlicense
4,205,717,122,326,895,600
33.904255
106
0.502591
false
irees/emdash
emdash/ui/Ui_Wizard.py
1
1634
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Ui_Wizard.ui' # # Created: Tue Jul 31 04:19:55 2012 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attri...
bsd-3-clause
5,817,218,018,311,960,000
36.136364
121
0.69339
false
str4d/i2p-tools
netdb/tests/test_netdb.py
2
1894
# test_netdb.py - Test netdb.py # Author: Chris Barry <chris@barry.im> # License: MIT # Note: this uses py.test. import netdb,os,random ''' def test_inspect(): netdb.inspect() ''' def test_sha256(): assert('d2f4e10adac32aeb600c2f57ba2bac1019a5c76baa65042714ed2678844320d0' == netdb.netdb.sha256('i2p is cool', raw=...
mit
-4,783,902,398,608,048,000
26.852941
179
0.665259
false
kmarius/qutebrowser
tests/unit/utils/test_error.py
4
3334
# Copyright 2015-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # This file is part of qutebrowser. # # qutebrowser 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 Sof...
gpl-3.0
-5,039,534,839,097,219,000
33.729167
78
0.627475
false
deepmind/acme
acme/agents/tf/bcq/discrete_learning.py
1
9377
# python3 # Copyright 2018 DeepMind Technologies Limited. 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 re...
apache-2.0
2,976,378,094,815,298,000
34.927203
80
0.660126
false
gorjuce/odoo
addons/l10n_in_hr_payroll/wizard/__init__.py
430
1110
# -*- 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,130,922,034,773,170,000
43.44
78
0.625225
false
sbuss/voteswap
lib/networkx/linalg/spectrum.py
42
2793
""" Eigenvalue spectrum of graphs. """ # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx __author__ = "\n".join(['Aric Hagberg <aric.hagberg@gmail.com>', ...
mit
-4,305,660,519,431,983,600
24.162162
77
0.613319
false
jumpojoy/neutron
neutron/tests/common/base.py
34
3238
# 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 # d...
apache-2.0
1,768,344,116,201,521,200
35.795455
79
0.683447
false
pkainz/pylearn2
pylearn2/linear/tests/test_conv2d.py
45
5497
import theano from theano import tensor import numpy from pylearn2.linear.conv2d import Conv2D, make_random_conv2D from pylearn2.space import Conv2DSpace from pylearn2.utils import sharedX import unittest try: scipy_available = True import scipy.ndimage except ImportError: scipy_available = False class Te...
bsd-3-clause
7,762,065,973,396,580,000
36.910345
79
0.574313
false
robynbergeron/ansible-modules-extras
cloud/cloudstack/cs_affinitygroup.py
24
7542
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
-5,951,637,710,754,166,000
29.403226
88
0.603714
false
erjohnso/ansible
test/units/modules/packaging/os/test_apk.py
137
1157
from ansible.compat.tests import mock from ansible.compat.tests import unittest from ansible.modules.packaging.os import apk class TestApkQueryLatest(unittest.TestCase): def setUp(self): self.module_names = [ 'bash', 'g++', ] @mock.patch('ansible.modules.packaging.os...
gpl-3.0
511,169,028,152,327,740
36.322581
76
0.628349
false
Javier-Acosta/meran
dev-plugins/node/lib/node/wafadmin/Logs.py
4
4722
#!/usr/bin/env python # Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog, # Circulation and User's Management. It's written in Perl, and uses Apache2 # Web-Server, MySQL database and Sphinx 2 indexing. # Copyright (C) 2009-2013 Grupo de desarrollo de Meran CeSPI-UNLP # # This file is part ...
gpl-3.0
-7,033,342,781,268,120,000
25.988571
90
0.674926
false
amir343/ansible
test/units/parsing/test_data_loader.py
99
3256
# (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
6,124,409,931,130,497,000
35.177778
96
0.695025
false
fujunwei/chromium-crosswalk
chrome/test/ispy/server/rebaseline_handler.py
100
1208
# 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. """Request Handler that updates the Expectation version.""" import webapp2 import ispy_api from common import constants import gs_bucket class Rebaselin...
bsd-3-clause
-1,666,669,309,377,522,400
30.789474
80
0.706954
false
persandstrom/home-assistant
homeassistant/components/switch/orvibo.py
8
3041
""" Support for Orvibo S20 Wifi Smart Switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.orvibo/ """ import logging import voluptuous as vol from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) from homeassistant.con...
apache-2.0
-7,852,088,250,197,382,000
27.688679
77
0.613614
false
bluesabre/melodius
melodius/PreferencesMelodiusDialog.py
1
8596
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2012 Sean Davis <smd.seandavis@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Sof...
gpl-3.0
1,381,353,494,769,310,000
44.005236
221
0.639483
false
corvorepack/REPOIVAN
plugin.video.tv.astra.vip/resources/regex/dinozap.py
3
4487
# -*- coding: utf-8 -*- #------------------------------------------------------------ # TV Ultra 7K Regex de Dinozap # Version 0.1 (17.10.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www.mimedi...
gpl-2.0
-8,906,776,713,287,633,000
42.543689
276
0.610033
false
agentfog/qiime
tests/test_pick_rep_set.py
15
20044
#!/usr/bin/env python """Tests of code for representative set picking""" __author__ = "Rob Knight" __copyright__ = "Copyright 2011, The QIIME Project" # remember to add yourself if you make changes __credits__ = ["Rob Knight", "Kyle Bittinger", "Greg Caporaso"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintain...
gpl-2.0
-4,466,485,514,499,659,000
36.818868
268
0.611355
false
TheoChevalier/bedrock
bedrock/privacy/views.py
5
3689
# 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 re from django.views.decorators.cache import cache_page from commonware.response.decorators import xframe_allow ...
mpl-2.0
-3,313,188,973,490,286,600
30.529915
82
0.665221
false