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
rantonmattei/garcon
tests/test_decider.py
1
1045
from unittest.mock import MagicMock import boto.swf.layer2 as swf from boto.swf import layer1 import pytest from garcon import activity from garcon import decider def mock(monkeypatch): for base in [swf.Decider, swf.WorkflowType, swf.ActivityType, swf.Domain]: monkeypatch.setattr(base, '__init__', MagicM...
mit
-4,788,066,268,114,450,000
28.857143
78
0.722488
false
jferreir/mbed
workspace_tools/host_tests/mbedrpc.py
111
7047
# mbedRPC.py - mbed RPC interface for Python # ##Copyright (c) 2010 ARM Ltd ## ##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 ##t...
apache-2.0
6,615,524,994,291,949,000
30.32
181
0.617426
false
moio/spacewalk
backend/upload_server/handlers/package_push/package_push.py
1
5519
# # Code that drops files on the filesystem (/PKG-UPLOAD) # # # Copyright (c) 2008--2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITN...
gpl-2.0
-5,673,835,696,014,753,000
33.93038
90
0.603914
false
bert9bert/statsmodels
statsmodels/sandbox/distributions/tests/__init__.py
219
6354
''' Econometrics for a Datarich Environment ======================================= Introduction ------------ In many cases we are performing statistical analysis when many observed variables are available, when we are in a data rich environment. Machine learning has a wide variety of tools for dimension reduction an...
bsd-3-clause
-1,135,308,256,399,465,300
37.509091
99
0.748033
false
crayzeewulf/android-quill
jni/libhpdf-2.3.0RC2/if/python/demo/outline_demo_jp.py
32
3955
### ## * << Haru Free PDF Library 2.0.0 >> -- outline_demo_jp.c ## * ## * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that...
gpl-3.0
-1,698,629,336,440,422,400
25.866197
80
0.623009
false
mjfarmer/scada_py
env/lib/python2.7/site-packages/pip/download.py
45
22491
import cgi import email.utils import hashlib import getpass import mimetypes import os import platform import re import shutil import sys import tempfile import pip from pip.backwardcompat import urllib, urlparse, raw_input from pip.exceptions import InstallationError, HashMismatch from pip.util import (splitext, rmt...
gpl-3.0
5,409,750,584,593,155,000
33.923913
114
0.586813
false
fjbatresv/odoo
addons/account/wizard/account_fiscalyear_close.py
222
15660
# -*- 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
2,104,959,318,338,358,800
54.907143
373
0.570333
false
AgrAlert/AgrAlert_Backend
lib/python2.7/site-packages/pip/_vendor/requests/models.py
151
28156
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
mit
8,626,519,625,544,754,000
32.43943
119
0.568689
false
tiagoantao/virtual-core
docker/file_router/copy/usr/bin/change_password.py
1
1624
#!/usr/bin/python2 import getpass import sys import pexpect boot = False if len(sys.argv) > 1 and sys.argv[1] == 'boot': print "Boot mode" boot = True def get_passes(): old = getpass.getpass('Old password: ') new1 = 'a' new2 = 'b' while new1 != new2: new1 = getpass.getpass('New pass...
agpl-3.0
-7,338,901,903,040,035,000
23.606061
65
0.598522
false
scivey/mockthink
mockthink/test/functional/test_logic.py
2
2727
import rethinkdb as r from mockthink.test.common import as_db_and_table, assertEqUnordered, assertEqual from mockthink.test.functional.common import MockTest from pprint import pprint class TestLogic1(MockTest): @staticmethod def get_data(): data = [ {'id': 'joe', 'has_eyes': True, 'age': 2...
mit
6,086,577,349,711,847,000
30.709302
83
0.482948
false
fenglu-g/incubator-airflow
airflow/contrib/sensors/weekday_sensor.py
4
4291
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
-6,501,315,078,532,189,000
39.866667
90
0.635982
false
SRabbelier/Melange
thirdparty/google_appengine/lib/django_1_2/django/utils/encoding.py
44
7087
import types import urllib import locale import datetime import codecs from decimal import Decimal from django.utils.functional import Promise class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(self, *args) def __str_...
apache-2.0
-109,524,060,624,590,860
38.372222
79
0.61126
false
mgit-at/ansible
test/units/modules/network/onyx/test_onyx_config.py
16
4592
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
gpl-3.0
-1,624,468,403,671,203,800
39.637168
95
0.668118
false
monopole/test-infra
gubernator/view_logs.py
22
11302
# Copyright 2016 The Kubernetes Authors. # # 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 ...
apache-2.0
7,584,143,211,763,042,000
37.972414
95
0.617501
false
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/django-1.5/django/http/multipartparser.py
82
22856
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ from __future__ import unicode_literals import base64 import cgi from django.conf import settings from django.core.exceptions import SuspiciousOperation fro...
lgpl-3.0
757,544,916,095,764,500
34.993701
109
0.545459
false
KohlsTechnology/ansible
lib/ansible/modules/inventory/group_by.py
67
1457
# -*- mode: python -*- # # Copyright: Ansible Team # 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': ['stablein...
gpl-3.0
1,556,366,349,473,486,800
25.490909
92
0.668497
false
DavidHerzogTU-Berlin/cassandraToRun
test/system/test_thrift_server.py
1
103505
# 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
-9,103,701,712,682,797,000
50.189416
623
0.622211
false
EliAndrewC/ensconce
ensconce/util/cpjsonrpc.py
1
11059
# coding: utf-8 """ From http://code.google.com/p/cherrypy-jsonrpc (LGPL) Some modifications: - Content-Type (application/json) """ import sys import httplib import cherrypy import traceback try: import jsonlib2 as json _ParseError = json.ReadError except ImportError: import json _ParseError = ValueEr...
bsd-3-clause
-1,376,914,994,594,325,800
31.422287
90
0.498643
false
guewen/odoo
addons/portal_project_issue/tests/__init__.py
167
1124
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
-8,277,419,654,075,290,000
39.142857
78
0.618327
false
github-account-because-they-want-it/django
tests/db_functions/models.py
245
1332
""" Tests for built in Function expressions. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=50) alias = models.CharField(max_leng...
bsd-3-clause
-7,803,506,424,035,411,000
29.976744
75
0.718468
false
suyashdb/hcp2bids
setup.py
1
2182
from setuptools import setup import os, glob, shutil import re, json, numpy import nibabel as ni here = os.path.abspath(os.path.dirname(__file__)) setup( name="hcp2bids", # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see ...
mit
-5,058,204,562,386,402,000
32.060606
98
0.636114
false
Endika/mitmproxy
libmproxy/contrib/jsbeautifier/__init__.py
50
41216
import sys import getopt import re import string # # Originally written by Einar Lielmanis et al., # Conversion to python by Einar Lielmanis, einar@jsbeautifier.org, # MIT licence, enjoy. # # Python is not my native language, feel free to push things around. # # Use either from command line (script displays its usage ...
mit
-1,422,547,196,316,502,300
34.746748
138
0.495997
false
detiber/ansible
test/sanity/validate-modules/utils.py
33
3443
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of ...
gpl-3.0
8,063,852,628,333,132,000
32.105769
74
0.598606
false
captiosus/treadmill
treadmill/infra/setup/ldap.py
2
1481
from treadmill.infra.setup import base_provision from treadmill.infra import configuration, connection, constants, instances from treadmill.api import ipa import time class LDAP(base_provision.BaseProvision): def setup( self, image, count, key, cidr_bloc...
apache-2.0
5,280,554,688,259,472,000
28.62
75
0.538825
false
dethos/cloudroutes-service
src/actions/actions/saltstack-generic/__init__.py
6
1476
#!/usr/bin/python ###################################################################### # Cloud Routes Bridge # ------------------------------------------------------------------- # Actions Module ###################################################################### import requests import time def action(**kwargs)...
agpl-3.0
-2,527,293,623,996,610,600
27.941176
104
0.51084
false
nextgis/NextGIS_QGIS_open
python/plugins/processing/script/WrongScriptException.py
46
1234
# -*- coding: utf-8 -*- """ *************************************************************************** WrongScriptException.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************...
gpl-2.0
90,593,856,719,839,950
36.393939
75
0.394652
false
raiabril/arduino_logger
py2app-0.9-py2.7.egg/py2app/script_py2applet.py
9
5469
""" Create an applet from a Python script. You can drag in packages, Info.plist files, icons, etc. It's expected that only one Python script is dragged in. """ from __future__ import print_function import os, sys from distutils.core import setup from plistlib import Plist import py2app import tempfile import shutil ...
gpl-2.0
-5,001,728,375,581,034,000
25.548544
74
0.536113
false
goddino/libjingle
trunk/third_party/yasm/source/patched-yasm/tools/python-yasm/tests/test_symrec.py
32
2976
from tests import TestCase, add from yasm import SymbolTable, Expression, YasmError class TSymbolTable(TestCase): def setUp(self): self.symtab = SymbolTable() def test_keys(self): self.assertEquals(len(self.symtab.keys()), 0) self.symtab.declare("foo", None, 0) keys = self.symt...
bsd-3-clause
5,083,966,370,018,586,000
36.2
79
0.622312
false
stanlyxiang/incubator-hawq
tools/bin/gppylib/gpMgmttest/__init__.py
12
3044
# 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,238,256,107,897,755,000
39.052632
128
0.667871
false
frioux/offlineimap
offlineimap/mbnames.py
10
3676
# Mailbox name generator # # Copyright (C) 2002-2015 John Goerzen & contributors # # 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 opti...
apache-2.0
-6,548,077,246,584,218,000
37.694737
83
0.630849
false
llonchj/sentry
tests/sentry/utils/auth/tests.py
30
1779
from __future__ import absolute_import from django.core.urlresolvers import reverse from django.http import HttpRequest from sentry.models import User from sentry.testutils import TestCase from sentry.utils.auth import EmailAuthBackend, get_login_redirect class EmailAuthBackendTest(TestCase): def setUp(self): ...
bsd-3-clause
-3,169,021,232,812,707,300
32.566038
86
0.677909
false
jburger424/MediaQueueHCI
m-q-env/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py
982
19608
######################## 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...
mit
-1,982,911,184,683,219,700
33.10087
93
0.492095
false
sporksmith/polygraph
experiments/workloads/generate_workloads.py
2
2794
#!/usr/bin/env python # Polygraph (release 0.1) # Signature generation algorithms for polymorphic worms # # Copyright (c) 2004-2005, Intel Corporation # All Rights Reserved # # This software is distributed under the terms of the Eclipse Public # License, Version 1.0 which can be found in the file ...
epl-1.0
-5,987,088,197,071,701,000
30.393258
80
0.671797
false
iychoi/syndicate
old/ms/django_lib/gatewayforms.py
2
4283
''' John Whelchel Summer 2013 Forms used just for gateways (AG, RG, and UG). ''' from django import forms from django_lib.forms import LONGEST_CHAR_FIELD, LONGEST_PASS_FIELD, LONGEST_JSON_FIELD, ReadOnlyWidget LARGEST_PORT = 65535 class ModifyGatewayConfig(forms.Form): json_config = forms.FileField(required...
apache-2.0
-6,452,875,492,919,408,000
35.931034
175
0.564791
false
OmnesRes/onco_lnc
mrna/cox/LGG/patient_info.py
1
7037
## A script for extracting info about the patients used in the analysis ## Load necessary modules from rpy2 import robjects as ro import numpy as np import os ro.r('library(survival)') import re ##This call will only work if you are running python from the command line. ##If you are not running from the command lin...
mit
2,317,178,385,927,912,000
30.275556
132
0.669177
false
shootstar/ctest
ceilometer/compute/manager.py
2
3043
# -*- encoding: utf-8 -*- # # Copyright © 2012-2013 eNovance <licensing@enovance.com> # # Author: Julien Danjou <julien@danjou.info> # # 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 # # h...
apache-2.0
4,091,869,632,406,898,700
35.214286
77
0.615713
false
sshleifer/object_detection_kitti
inception/inception/slim/variables.py
23
10358
# Copyright 2016 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 agree...
apache-2.0
6,873,595,435,408,468,000
34.84083
86
0.682564
false
PingaxAnalytics/koob_auth
testproject/ptvs_virtualenv_proxy.py
1
4166
# ############################################################################ # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of this distribution. If # you can...
mit
5,324,697,217,613,740,000
31.053846
96
0.597936
false
MiniSEC/GRR_clone
client/client_actions/linux/ko_patcher.py
6
7766
#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. """A kernel module rewriter. This is a hack that rewrites kernel modules such that they can be loaded on kernels they were not compiled for. """ import os import platform import struct import sys import logging from grr.lib import flags c...
apache-2.0
-3,743,840,520,247,342,000
33.362832
80
0.626577
false
airbnb/streamalert
streamalert/apps/_apps/aliyun.py
1
8258
""" Copyright 2018-present Airbnb, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
apache-2.0
4,422,241,922,752,377,300
38.89372
100
0.609712
false
agaffney/ansible
test/support/windows-integration/plugins/modules/win_acl.py
85
4112
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Phil Schwartz <schwartzmx@gmail.com> # Copyright: (c) 2015, Trond Hindenes # Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'m...
gpl-3.0
-681,842,064,157,582,800
30.151515
119
0.6982
false
fiunchinho/ansible-modules-extras
notification/telegram.py
42
2670
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Artem Feofanov <artem.feofanov@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...
gpl-3.0
-8,792,582,396,599,395,000
24.92233
98
0.679401
false
saurabh6790/pow-app
accounts/doctype/sales_invoice/pos.py
29
1618
# 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 @webnotes.whitelist() def get_items(price_list, sales_or_purchase, item=None, item_group=None): condition = "" args = {"price_list...
agpl-3.0
7,127,084,398,929,267,000
30.134615
83
0.677998
false
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/third_party/webdriver/pylib/test/selenium/webdriver/common/webserver.py
20
4133
# 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 # # Un...
mit
-793,751,500,942,008,200
29.549618
92
0.587467
false
adalekin/django-balancer
docs/conf.py
4
7200
# -*- coding: utf-8 -*- # # django-balancer documentation build configuration file, created by # sphinx-quickstart on Mon Oct 18 10:17:32 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....
bsd-3-clause
3,372,376,978,223,580,000
31.579186
80
0.710139
false
htygithub/bokeh
bokeh/state.py
2
8592
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2015, Continuum Analytics, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #----------------------------------------...
bsd-3-clause
3,575,956,497,072,917,000
33.785425
103
0.573673
false
sysadmin75/ansible-modules-core
cloud/rackspace/rax_dns_record.py
16
11455
#!/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
7,042,761,870,120,024,000
31.916667
94
0.571715
false
sebalix/OpenUpgrade
addons/base_action_rule/__init__.py
438
1098
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
2,471,106,183,912,570,400
42.92
79
0.614754
false
ghostsquad/pytest
testing/test_assertinterpret.py
30
8937
"PYTEST_DONT_REWRITE" import pytest, py from _pytest.assertion import util def exvalue(): return py.std.sys.exc_info()[1] def f(): return 2 def test_not_being_rewritten(): assert "@py_builtins" not in globals() def test_assert(): try: assert f() == 3 except AssertionError: e = e...
mit
-899,875,551,464,553,100
24.461538
80
0.522771
false
sparklyballs/XBMC-Headless
xbmcdata/addons/service.xbmc.versioncheck/lib/common.py
82
7008
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
mit
-2,460,494,774,005,998,600
39.988304
155
0.570205
false
apurvbhartia/gnuradio-routing
gr-wxgui/src/python/forms/__init__.py
16
4222
# # Copyright 2009 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 option) # any later version. # #...
gpl-3.0
-5,243,434,561,082,318,000
39.990291
112
0.658219
false
oasiswork/odoo
openerp/addons/base/tests/test_qweb.py
289
4814
# -*- coding: utf-8 -*- import cgi import json import os.path import glob import re import collections from lxml import etree import openerp.addons.base.ir.ir_qweb import openerp.modules from openerp.tests import common from openerp.addons.base.ir import ir_qweb class TestQWebTField(common.TransactionCase): def ...
agpl-3.0
-1,273,173,836,015,956,700
33.568345
111
0.56129
false
carsongee/edx-platform
cms/djangoapps/contentstore/management/commands/course_id_clash.py
18
2127
""" Script for finding all courses whose org/name pairs == other courses when ignoring case """ from django.core.management.base import BaseCommand from xmodule.modulestore.django import modulestore from xmodule.modulestore import ModuleStoreEnum # # To run from command line: ./manage.py cms --settings dev course_id_...
agpl-3.0
-1,696,778,886,284,812,500
39.903846
120
0.526093
false
codingcommando/tmtp
standalone/New_Jeans2.py
1
23537
#!/usr/bin/env python # New_Jeans2.py # PatternMaker: Susan Spencer Conklin # pants shell pattern from tmtpl.constants import * from tmtpl.pattern import * from tmtpl.client import Client from math import sqrt class PatternDesign(): def __init__(self): self.styledefs={} self.markerdefs={} ...
gpl-3.0
-956,837,025,002,564,000
55.174224
191
0.59808
false
twinaphex/pcsx2
3rdparty/portaudio/doc/utils/checkfiledocs.py
70
2415
import os import os.path import string paRootDirectory = '../../' paHtmlDocDirectory = os.path.join( paRootDirectory, "doc", "html" ) ## Script to check documentation status ## this script assumes that html doxygen documentation has been generated ## ## it then walks the entire portaudio source tree and check that ##...
lgpl-3.0
8,399,591,121,217,035,000
30.363636
86
0.633954
false
Asana/boto
tests/unit/vpc/test_vpc.py
100
13752
# -*- coding: UTF-8 -*- from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, VPC from boto.ec2.securitygroup import SecurityGroup DESCRIBE_VPCS = b'''<?xml version="1.0" encoding="UTF-8"?> <DescribeVpcsResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-0...
mit
-8,327,067,811,609,021,000
36.47139
93
0.568935
false
Parrot-Developers/ardupilot
mk/PX4/Tools/gencpp/src/gencpp/__init__.py
214
9473
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, 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 ...
gpl-3.0
-5,045,322,676,413,847,000
36.295276
140
0.611527
false
analyseuc3m/ANALYSE-v1
openedx/core/djangolib/markup.py
5
1091
""" Utilities for use in Mako markup. """ import markupsafe # Text() can be used to declare a string as plain text, as HTML() is used # for HTML. It simply wraps markupsafe's escape, which will HTML-escape if # it isn't already escaped. Text = markupsafe.escape # pylint: disable=invalid-name ...
agpl-3.0
-2,623,674,539,528,092,700
31.088235
78
0.5967
false
dagwieers/ansible
test/units/modules/network/aireos/test_aireos_command.py
52
4292
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
-754,908,003,244,684,400
39.11215
100
0.65261
false
felliott/osf.io
osf_tests/test_registration_moderation_notifications.py
4
24500
import pytest import mock from mock import call from django.utils import timezone from osf.management.commands.add_notification_subscription import add_reviews_notification_setting from osf.management.commands.populate_registration_provider_notification_subscriptions import populate_registration_provider_notification_...
apache-2.0
-8,267,121,595,218,933,000
40.107383
151
0.643592
false
SSSD/sssd
src/tests/multihost/adsites/test_adsites.py
1
13157
from __future__ import print_function import time import pytest from sssd.testlib.common.utils import sssdTools @pytest.mark.adsites class Testadsites(object): """ @Title: IDM-SSSD-TC: ad_provider: adsites: Improve AD site discovery process Test cases for BZ: 1819012 @Steps: 1. Join client to...
gpl-3.0
133,369,113,282,755,090
49.217557
79
0.512959
false
Solanar/CMPUT410-Project
DisSoNet/front/views/author.py
1
4859
from django.http import HttpResponse import json import socket from data.models import Comment def processRequestFromOtherServer(obj, dict_type): json_dict = {} json_dict_list = [] if dict_type is "author": json_dict_list.append(getAuthorDict(obj)) elif dict_type is "posts": for posts...
apache-2.0
2,352,532,585,635,758,600
32.979021
79
0.571928
false
apache/incubator-mxnet
tests/python/unittest/test_gluon_control_flow.py
2
25390
# 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
-8,095,221,295,236,106,000
35.585014
104
0.55321
false
KaelChen/numpy
numpy/ma/tests/test_mrecords.py
64
20867
# pylint: disable-msg=W0611, W0612, W0511,R0201 """Tests suite for mrecords. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function import warnings import pickle import numpy as np import numpy.ma as ma from numpy import recarray from n...
bsd-3-clause
-6,518,383,574,758,834,000
39.128846
78
0.511573
false
geopython/pywps-demo
docs/conf.py
3
10208
# -*- coding: utf-8 -*- # # PyWPS-Flask documentation build configuration file, created by # sphinx-quickstart on Thu Aug 11 21:27:33 2016. # # 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. #...
mit
7,300,156,629,562,849,000
30.800623
81
0.698374
false
sam-m888/gprime
gprime/db/dbconst.py
1
4144
# # gPrime - A web-based genealogy program # # Copyright (C) 2004-2007 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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 versi...
gpl-2.0
-3,658,467,685,649,608,000
38.466667
82
0.539575
false
mmnelemane/neutron
neutron/plugins/embrane/plugins/embrane_fake_plugin.py
59
1274
# Copyright 2013 Embrane, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
8,017,312,217,118,693,000
41.466667
78
0.71821
false
andyraib/data-storage
python_scripts/env/lib/python3.6/site-packages/pandas/tseries/plotting.py
7
9969
""" Period formatters and locators adapted from scikits.timeseries by Pierre GF Gerard-Marchant & Matt Knox """ # TODO: Use the fact that axis can have units to simplify the process import numpy as np from matplotlib import pylab from pandas.tseries.period import Period from pandas.tseries.offsets import DateOffset ...
apache-2.0
-2,089,008,490,088,386,800
30.84984
79
0.597251
false
tjsavage/full_nonrel_starter
django/core/exceptions.py
292
2767
""" Global Django exception and warning classes. """ class DjangoRuntimeWarning(RuntimeWarning): pass class ObjectDoesNotExist(Exception): "The requested object does not exist" silent_variable_failure = True class MultipleObjectsReturned(Exception): "The query returned multiple objects when only one w...
bsd-3-clause
-3,585,812,805,993,127,400
30.804598
77
0.639321
false
RUedx/configuration
tests/test_mongodb_replica_set.py
25
5499
# Tests for mongodb_replica_set ansible module # # How to run these tests: # 1. move this file to playbooks/library # 2. rename mongodb_replica_set to mongodb_replica_set.py # 3. python test_mongodb_replica_set.py import mongodb_replica_set as mrs import unittest, mock from urllib import quote_plus from copy import de...
gpl-2.0
-6,217,086,046,112,699,000
32.126506
116
0.643753
false
huguesv/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/_bootlocale.py
40
1801
"""A minimal subset of the locale module used at interpreter startup (imported by the _io module), in order to reduce startup time. Don't import directly from third-party code; use the `locale` module instead! """ import sys import _locale if sys.platform.startswith("win"): def getpreferredencoding(do_setlocale=...
apache-2.0
6,849,969,450,716,602,000
38.152174
77
0.588007
false
mixja/eap-sim-lab
lib/pyscard-1.6.16/build/lib.macosx-10.10-x86_64-2.7/smartcard/CardConnection.py
2
7754
"""The CardConnection abstract class manages connections with a card and apdu transmission. __author__ = "http://www.gemalto.com" Copyright 2001-2012 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you can redistribute it and/or modif...
mit
-4,269,073,220,857,971,700
35.92381
76
0.630513
false
mcepl/youtube-dl
youtube_dl/extractor/charlierose.py
12
1709
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import remove_end class CharlieRoseIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?charlierose\.com/video(?:s|/player)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://charlierose.com/videos/27996', 'md5': 'fd...
unlicense
2,609,851,148,422,163,000
32.509804
125
0.547689
false
ttfseiko/openerp-trunk
openerp/addons/resource/faces/observer.py
433
2328
#@+leo-ver=4 #@+node:@file observer.py #@@language python #@<< Copyright >> #@+node:<< Copyright >> ############################################################################ # Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # ...
agpl-3.0
-3,827,398,224,180,213,000
27.740741
76
0.588058
false
qmagico/sampleappqm
src/django/db/backends/postgresql_psycopg2/introspection.py
82
4121
from django.db.backends import BaseDatabaseIntrospection class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type codes to Django Field types. data_types_reverse = { 16: 'BooleanField', 20: 'BigIntegerField', 21: 'SmallIntegerField', 23: 'IntegerField', 25: '...
mit
-7,720,499,757,029,289,000
42.840426
95
0.581655
false
MattDevo/edk2
AppPkg/Applications/Python/Python-2.7.2/Lib/multifile.py
67
4982
"""A readline()-style interface to the parts of a multipart message. The MultiFile class makes each part of a multipart message "feel" like an ordinary file, as long as you use fp.readline(). Allows recursive use, for nested multipart messages. Probably best used together with module mimetools. Suggested use...
bsd-2-clause
-6,837,340,273,322,319,000
28.753086
76
0.530711
false
kbdick/RecycleTracker
recyclecollector/scrap/gdata-2.0.18/samples/apps/marketplace_sample/gdata/tlslite/BaseDB.py
238
3508
"""Base class for SharedKeyDB and VerifierDB.""" import anydbm import thread class BaseDB: def __init__(self, filename, type): self.type = type self.filename = filename if self.filename: self.db = None else: self.db = {} self.lock = thre...
gpl-3.0
6,861,533,148,632,504,000
27.25
78
0.527081
false
dunkhong/grr
grr/server/grr_response_server/gui/api_plugins/artifact_test.py
2
4766
#!/usr/bin/env python """This modules contains tests for artifact API handler.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import io import os from absl import app from grr_response_core import config from grr_response_core.lib.rdfvalues import ar...
apache-2.0
9,059,644,636,355,025,000
34.044118
78
0.727235
false
ngageoint/voxel-globe
voxel_globe/tiepoint_registration/views.py
2
2848
from django.shortcuts import render from django.http import HttpResponse from django.template import RequestContext, loader def tiepoint_registration_1(request): from voxel_globe.meta import models image_set_list = models.ImageSet.objects.all() return render(request, 'tiepoint_registration/html/tiepoint_registra...
mit
-6,116,839,462,472,354,000
40.289855
99
0.655548
false
freeflightsim/fg-flying-club
google_appengine/lib/webob/tests/test_response.py
32
1407
from webob import * def simple_app(environ, start_response): start_response('200 OK', [ ('Content-Type', 'text/html; charset=utf8'), ]) return ['OK'] def test_response(): req = Request.blank('/') res = req.get_response(simple_app) assert res.status == '200 OK' assert res.status...
gpl-2.0
2,741,876,406,248,880,000
37.027027
111
0.622601
false
wreckJ/intellij-community
python/helpers/pydev/pydevd_console.py
42
7593
'''An helper file for the pydev debugger (REPL) console ''' from code import InteractiveConsole import sys import traceback import _pydev_completer from pydevd_tracing import GetExceptionTracebackStr from pydevd_vars import makeValidXmlValue from pydev_imports import Exec from pydevd_io import IOBuf from pydev_console...
apache-2.0
4,058,554,590,669,140,000
34.816038
120
0.582905
false
aringh/odl
odl/contrib/solvers/spdhg/misc.py
1
22813
# Copyright 2014-2018 The ODL contributors # # This file is part of ODL. # # 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 https://mozilla.org/MPL/2.0/. """Functions for folders and files.""" from...
mpl-2.0
-6,678,552,785,341,398,000
29.621477
81
0.528383
false
Jeff-Tian/mybnb
Python27/Lib/lib-tk/test/test_ttk/test_functions.py
2
17810
# -*- encoding: utf-8 -*- import sys import unittest import ttk class MockTkApp: def splitlist(self, arg): if isinstance(arg, tuple): return arg return arg.split(':') def wantobjects(self): return True class MockTclObj(object): typename = 'test' ...
apache-2.0
-6,791,793,834,562,789,000
36.094421
80
0.504619
false
laurentb/weboob
modules/journaldesfemmes/module.py
1
2124
# -*- coding: utf-8 -*- # Copyright(C) 2018 Phyks (Lucas Verney) # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 o...
lgpl-3.0
1,661,880,022,513,466,600
28.915493
77
0.675612
false
RT-Thread/rt-thread
bsp/tm4c129x/rtconfig.py
12
3663
# BSP Note: For TI EK-TM4C1294XL Tiva C Series Connected LancuhPad (REV D) import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') #device options PART_TYPE = 'PART_TM4C129XNCZAD' # cross_tool provides the cross compiler # EXEC_...
apache-2.0
-1,989,079,979,853,010,700
26.548872
141
0.548185
false
nhr/openshift-ansible
roles/lib_openshift/src/lib/project.py
82
2503
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class ProjectConfig(OpenShiftCLIConfig): ''' project config object ''' def __init__(self, rname, namespace, kubeconfig, project_options): super(ProjectConfig, self).__init__(rname, None, kubeconfig, project_options) cl...
apache-2.0
-6,775,963,328,135,646,000
28.447059
85
0.584499
false
nicobot/electron
tools/mac/apply_locales.py
202
1454
#!/usr/bin/env python # Copyright (c) 2009 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. # TODO: remove this script when GYP has for loops import sys import optparse def main(argv): parser = optparse.OptionParser() ...
mit
7,979,353,858,805,241,000
31.333333
78
0.634801
false
klen/peewee_migrate
tests/test_cli.py
1
3157
from click.testing import CliRunner import pytest from peewee_migrate.cli import cli, get_router runner = CliRunner() @pytest.fixture def dir_option(tmpdir): return '--directory=%s' % tmpdir @pytest.fixture def db_url(tmpdir): db_path = '%s/test_sqlite.db' % tmpdir open(db_path, 'a').close() retur...
bsd-3-clause
3,618,773,772,246,275,000
28.783019
99
0.670573
false
akretion/bank-statement-reconcile-simple
account_statement_completion_label_simple/wizard/account_statement_label_create.py
1
1772
# Copyright 2018-2019 Akretion France (http://www.akretion.com/) # @author: Alexis de Lattre <alexis.delattre@akretion.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models class AccountStatementLabelCreate(models.TransientModel): _name = 'account.statement.lab...
agpl-3.0
-3,214,800,522,493,972,500
37.521739
77
0.630361
false
jumpserver/jumpserver
apps/ops/inventory.py
2
5220
# -*- coding: utf-8 -*- # from django.conf import settings from .ansible.inventory import BaseInventory from common.utils import get_logger __all__ = [ 'JMSInventory', 'JMSCustomInventory', ] logger = get_logger(__file__) class JMSBaseInventory(BaseInventory): windows_ssh_default_shell = settings.WINDOWS...
gpl-2.0
8,093,723,619,407,908,000
30.875
100
0.563922
false
Logan213/is210-week-05-warmup
tests/test_task_04.py
28
1434
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests Task 04.""" # Import Python libs import unittest import task_04 class Task04TestCase(unittest.TestCase): """Test cases for Task 04.""" testmap = { 'not_enough_litterboxes': [2, 1, True, True], 'plenty_of_litterboxes': [1, 2, True, False...
mpl-2.0
8,147,212,527,192,394,000
30.173913
78
0.536262
false
tudorvio/nova
nova/cmd/dhcpbridge.py
41
4778
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
-5,825,263,893,857,775,000
31.951724
78
0.650481
false
ragnarstroberg/ragnar_imsrg
src/pybind11/tests/test_modules.py
4
2208
def test_nested_modules(): import pybind11_tests from pybind11_tests.submodule import submodule_func assert pybind11_tests.__name__ == "pybind11_tests" assert pybind11_tests.submodule.__name__ == "pybind11_tests.submodule" assert submodule_func() == "submodule_func()" def test_reference_interna...
gpl-2.0
5,341,537,252,236,190,000
30.098592
90
0.641757
false
brunobergher/dotfiles
sublime/pygments/all/pygments/lexers/textedit.py
47
6057
# -*- coding: utf-8 -*- """ pygments.lexers.textedit ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for languages related to text processing. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from bisect import bisect from pygments.lexer im...
mit
828,015,412,117,578,400
34.840237
84
0.482252
false
tliber/scrapy
setup.py
83
1605
from os.path import dirname, join from setuptools import setup, find_packages with open(join(dirname(__file__), 'scrapy/VERSION'), 'rb') as f: version = f.read().decode('ascii').strip() setup( name='Scrapy', version=version, url='http://scrapy.org', description='A high-level Web Crawling and Web...
bsd-3-clause
-827,700,076,703,634,400
30.470588
79
0.588785
false
oVirt/ovirt-hosted-engine-setup
src/plugins/gr-he-common/sanlock/lockspace.py
1
2295
# # ovirt-hosted-engine-setup -- ovirt hosted engine setup # Copyright (C) 2013-2017 Red Hat, 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, o...
lgpl-2.1
7,988,931,822,207,785,000
28.423077
78
0.681917
false
emd/boutanalysis
varyped.py
1
4568
'''Tools for interacting with VARYPED model equilibria''' import numpy as np from sys import argv import string import copy def create_db(file_path): '''Create a dictionary from a VARYPED results text file. Parameters: file_path -- string, path to the text file containing VARYPED results. The fi...
lgpl-3.0
-6,014,521,447,447,135,000
31.863309
79
0.607268
false
valexandersaulys/airbnb_kaggle_contest
venv/lib/python3.4/site-packages/pandas/tseries/tests/test_base.py
9
82416
from __future__ import print_function import re from datetime import datetime, timedelta import numpy as np import pandas as pd from pandas.tseries.base import DatetimeIndexOpsMixin from pandas.util.testing import assertRaisesRegexp, assertIsInstance from pandas.tseries.common import is_datetimelike from pandas import ...
gpl-2.0
5,401,510,452,408,450,000
42.9552
174
0.548267
false
maistrovas/My-Courses-Solutions
Coursera Algorithmic Thinking (Part 1)/Module 2/Application/Application2.py
1
7494
""" Provided code for Application portion of Module 2 Answers 4/6 Application Grade is 13 out of 15 Text Answers -Question 2: All three graphs are resilient in this case. Question5: -UPA and ER graphs are steel resilient (UPA is very close to overcoming 25% roughnes) in this type of attack. """ # general imports...
mit
4,006,435,012,310,974,500
25.387324
86
0.60822
false
blink1073/scikit-image
skimage/color/tests/test_adapt_rgb.py
19
2591
from functools import partial import numpy as np from skimage import img_as_float, img_as_uint from skimage import color, data, filters from skimage.color.adapt_rgb import adapt_rgb, each_channel, hsv_value from skimage._shared._warnings import expected_warnings # Down-sample image for quicker testing. COLOR_IMAGE =...
bsd-3-clause
7,656,706,217,985,837,000
29.845238
79
0.700502
false