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
efortuna/AndroidSDKClone
ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/test/test_fileio.py
36
15507
# Adapted from test_file.py by Daniel Stutzbach from __future__ import unicode_literals import sys import os import errno import unittest from array import array from weakref import proxy from functools import wraps from UserList import UserList import _testcapi from test.test_support import TESTFN, check_warnings, ...
apache-2.0
-1,682,964,115,400,003,600
31.373695
83
0.540724
false
stackdio/stackdio
stackdio/api/cloud/apps.py
2
3992
# -*- coding: utf-8 -*- # Copyright 2017, Digital Reasoning # # 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
5,657,574,877,148,016,000
34.327434
95
0.605461
false
caidongyun/pyzmq
examples/poll/pair.py
10
1400
"""A thorough test of polling PAIR sockets.""" #----------------------------------------------------------------------------- # Copyright (c) 2010 Brian Granger # # Distributed under the terms of the New BSD License. The full license is in # the file COPYING.BSD, distributed as part of this software. #------------...
bsd-3-clause
5,877,415,166,944,736,000
24.017857
78
0.639286
false
neoshrew/gelnarBot
gelnar_bot/EXCEPTIONS.py
1
1455
PLURAL_EXCEPTIONS_MAP = { \ 'women' : 'woman', \ 'men' : 'man', \ 'children' : 'child', \ 'teeth' : 'tooth', \ 'feet' : 'foot', \ 'people' : 'person', \ 'leaves' : 'leaf', \ 'mice' : 'mouse', \ 'geese' : 'goose', \ 'halves' : 'half', \ 'knives' : 'knife', \ 'wives' : 'wife',...
mit
-9,063,073,550,103,776,000
16.129412
33
0.461168
false
hryamzik/ansible
lib/ansible/modules/network/cloudengine/ce_vxlan_tunnel.py
39
31157
#!/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,293,765,503,992,909,000
32.829533
114
0.558783
false
victoredwardocallaghan/xen
tools/python/xen/xend/xenstore/xswatch.py
48
2418
# Copyright (C) 2005 Christian Limpach <Christian.Limpach@cl.cam.ac.uk> # Copyright (C) 2005 XenSource Ltd # This file is subject to the terms and conditions of the GNU General # Public License. See the file "COPYING" in the main directory of # this archive for more details. import errno import threading from xen.xe...
gpl-2.0
637,773,967,743,232,900
29.225
78
0.591398
false
Purg/kwiver
vital/bindings/python/vital/tests/test_landmark.py
1
9106
""" ckwg +31 Copyright 2016 by Kitware, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
bsd-3-clause
779,892,227,849,823,400
32.477941
90
0.51834
false
mattjj/pyhsmm-slds
examples/demo.py
2
2399
from __future__ import division import numpy as np np.random.seed(0) import matplotlib # matplotlib.use("macosx") # might be necessary for animation to work import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import autoregressive from pyhsmm.basic.distributions import PoissonDuration from pybasic...
mit
-4,674,770,809,107,474,000
24.521277
71
0.621092
false
CINPLA/expipe-dev
exdir/tests/test_help_functions.py
1
9702
import os import pathlib import six import yaml import quantities as pq import numpy as np import pytest import exdir import exdir.core import exdir.core.exdir_object as exob import exdir.core.quantities_conversion as pqc from exdir.core import filename_validation as fv from conftest import remove def test_convert_...
gpl-3.0
-9,021,986,371,267,263,000
31.34
100
0.633168
false
mail-apps/translate
translate/tools/poconflicts.py
1
8509
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2005-2008,2010 Zuza Software Foundation # # This file is part of translate. # # translate 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 vers...
gpl-2.0
965,180,011,623,867,900
41.333333
139
0.618992
false
shubhdev/edx-platform
lms/djangoapps/notes/tests.py
129
16454
""" Unit tests for the notes app. """ from mock import patch, Mock from opaque_keys.edx.locations import SlashSeparatedCourseKey from django.test import TestCase, RequestFactory from django.test.client import Client from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.c...
agpl-3.0
-7,373,570,378,184,605,000
35.727679
115
0.577853
false
geoscript/geoscript-py
geoscript/workspace/spatialite.py
1
1338
""" The :mod:`workspace.spatialite` module a workspace implementation based on the contents of a SpatiaLite database. """ import os from geoscript.workspace import Workspace from org.geotools.data.spatialite import SpatiaLiteDataStoreFactory class SpatiaLite(Workspace): """ A subclass of :class:`Workspace <geoscr...
mit
4,771,048,021,384,697,000
28.086957
165
0.672646
false
paweljasinski/ironpython3
Src/StdLib/Lib/test/test_colorsys.py
105
3927
import unittest import colorsys def frange(start, stop, step): while start <= stop: yield start start += step class ColorsysTest(unittest.TestCase): def assertTripleEqual(self, tr1, tr2): self.assertEqual(len(tr1), 3) self.assertEqual(len(tr2), 3) self.assertAlmostEqua...
apache-2.0
3,258,212,335,265,389,000
38.27
71
0.409473
false
takeshineshiro/swift
test/unit/container/test_replicator.py
12
46738
# Copyright (c) 2010-2012 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 agree...
apache-2.0
-408,598,893,626,868,100
45.598205
79
0.589499
false
gojira/tensorflow
tensorflow/python/ops/distributions/student_t.py
13
13767
# 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
1,395,084,106,369,502,700
35.228947
80
0.619888
false
gergap/binutils-gdb
gdb/testsuite/gdb.python/py-pp-re-notag.py
32
1208
# Copyright (C) 2013-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
gpl-2.0
-4,303,643,859,695,632,000
32.555556
71
0.721854
false
Philippe12/external_chromium_org
tools/perf/metrics/io.py
24
2489
# Copyright 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. from metrics import Metric class IOMetric(Metric): """IO-related metrics, obtained via telemetry.core.Browser.""" @classmethod def CustomizeBrowserOp...
bsd-3-clause
-1,671,366,812,622,540,800
39.803279
80
0.618321
false
OpenAcademy-OpenStack/nova-scheduler
nova/tests/objects/test_aggregate.py
7
5514
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
3,784,625,642,841,295,000
35.516556
78
0.615887
false
sintrb/pyBaidu
BaiduUser.py
1
2577
# -*- coding: UTF-8 -* ''' Created on 2013-10-14 @author: RobinTang ''' import time from HttpHolder import HttpHolder import sys try: sys.setdefaultencoding("utf-8") except: pass def strbetween(s, ss, es): si = s.index(ss) return s[si:s.index(es, si)] class BaseBaiduUser(): ''' 基础百度用户 ''' def __init__(s...
gpl-2.0
-6,757,542,626,847,686,000
22.693069
152
0.638947
false
offlinehacker/flumotion
flumotion/common/process.py
2
11302
# -*- Mode: Python; test-case-name: flumotion.test.test_common_process -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU Gen...
gpl-2.0
-5,768,049,443,285,534,000
29.711957
79
0.635817
false
SerCeMan/intellij-community
python/helpers/pydev/pydevd_signature.py
19
4907
import inspect import os try: import trace except ImportError: pass else: trace._warn = lambda *args: None # workaround for http://bugs.python.org/issue17143 (PY-8706) import gc from pydevd_comm import CMD_SIGNATURE_CALL_TRACE, NetCommand import pydevd_vars from pydevd_constants import xrange class Sig...
apache-2.0
4,750,154,178,727,847,000
35.080882
159
0.556144
false
eresearchrmit/mavrec
smra/smra_portal/management/commands/bonza.py
2
2454
# -*- coding: utf-8 -*- # # Copyright (c) 2011,2012 RMIT e-Research Office # (RMIT University, Australia) # 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 m...
bsd-3-clause
7,301,953,884,634,681,000
39.916667
79
0.701711
false
2uller/LotF
App/Lib/site-packages/scipy/integrate/tests/test_quadpack.py
4
5503
from __future__ import division, print_function, absolute_import from numpy import sqrt, cos, sin, arctan, exp, log, pi, Inf from numpy.testing import assert_, TestCase, run_module_suite, dec from scipy.integrate import quad, dblquad, tplquad from scipy.lib.six.moves import xrange import sys import math try: impo...
gpl-2.0
5,106,780,434,167,426,000
33.829114
89
0.542431
false
akashlevy/Yaklient
yaklient/objects/user.py
3
19663
# -*- coding: utf-8 -*- """Class for a user on Yik Yak""" from yaklient import helper from yaklient import settings from yaklient.api import notifyapi, parseapi, yikyakapi from yaklient.objects.comment import Comment from yaklient.objects.location import Location from yaklient.objects.message import Message from yakl...
mit
1,934,921,202,076,364,000
41.932314
79
0.635356
false
EUDAT-B2SHARE/invenio-old
modules/bibdocfile/lib/bibdocfilecli.py
6
60464
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2008, 2009, 2010, 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Licens...
gpl-2.0
7,332,484,802,408,423,000
47.025417
455
0.631235
false
tomaszkolonko/ndnSIM-all
ndn-cxx/.waf-1.8.9-849024857bd41c3cf8e87dc01ecf79b0/waflib/extras/compat15.py
10
8876
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import sys from waflib import ConfigSet,Logs,Options,Scripting,Task,Build,Configure,Node,Runner,TaskGen,Utils,Errors,Context sys.modules['Environment']=ConfigSet ConfigSet.Environment=ConfigSet.Confi...
gpl-3.0
195,923,714,606,778,500
30.81362
113
0.728031
false
manipopopo/tensorflow
tensorflow/python/keras/utils/multi_gpu_utils.py
16
9015
# 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
-8,505,650,339,024,488,000
34.77381
97
0.628619
false
joariasl/odoo
addons/mail/mail_mail.py
183
18372
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-7,639,898,448,786,749,000
52.252174
164
0.574897
false
tkaitchuck/nupic
external/linux64/lib/python2.6/site-packages/numpy/polynomial/tests/test_laguerre.py
24
17474
"""Tests for hermendre module. """ from __future__ import division import numpy as np import numpy.polynomial.laguerre as lag import numpy.polynomial.polynomial as poly from numpy.testing import * L0 = np.array([1 ])/1 L1 = np.array([1 , -1 ])/1 L2 = np.array([2 , -4 , 1 ])/2 L3 = np.array([6 , -18 , 9 , -1 ])/6 L4 ...
gpl-3.0
-6,053,487,712,701,745,000
31.969811
74
0.492446
false
prop/titanium_mobile
support/iphone/builder.py
33
60056
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Build and Launch iPhone Application in Simulator or install # the application on the device via iTunes # import os, sys, uuid, subprocess, shutil, signal, string, traceback, imp, filecmp, inspect import platform, time, re, run, glob, codecs, hashlib, datetime, plistli...
apache-2.0
-6,891,940,473,437,367,000
35.37553
224
0.656021
false
fegonda/icon_demo
code/model/unet/g.py
1
44565
import os import sys import skimage.transform import skimage.exposure import time import glob import numpy as np import mahotas import random import matplotlib import matplotlib.pyplot as plt import scipy import scipy.ndimage import json from scipy.ndimage.filters import maximum_filter base_path = os.path.dirname(__fi...
mit
2,411,549,135,835,606,000
38.613333
192
0.613104
false
lootr/netzob
netzob/test/src/test_netzob/test_Common/test_ExecutionContext.py
4
2556
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
gpl-3.0
4,201,751,791,681,357,300
58.348837
78
0.386364
false
houzhenggang/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/distutils/emxccompiler.py
250
11931
"""distutils.emxccompiler Provides the EMXCCompiler class, a subclass of UnixCCompiler that handles the EMX port of the GNU C compiler to OS/2. """ # issues: # # * OS/2 insists that DLLs can have names no longer than 8 characters # We put export_symbols in a def-file, as though the DLL can have # an arbitrary len...
gpl-2.0
-8,394,938,609,846,438,000
36.401254
97
0.558377
false
ahu-odoo/odoo
addons/account_analytic_plans/__openerp__.py
45
3145
# -*- 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
9,137,765,814,569,256,000
36
172
0.585056
false
xyzz/vcmi-build
project/jni/python/src/Lib/encodings/cp861.py
593
34889
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP861.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
lgpl-2.1
-4,217,674,908,628,896,000
48.984241
97
0.607584
false
jgrocha/QGIS
tests/src/python/test_qgsdatumtransforms.py
12
21240
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDatumTransforms. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. "...
gpl-2.0
5,399,041,004,514,880,000
71.739726
539
0.646045
false
jschleic/waymarked-trails-site
maps/riding.py
2
1843
# This file is part of the Waymarked Trails Map Project # Copyright (C) 2015 Sarah Hoffmann # # This 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 any later version. # #...
gpl-3.0
1,056,191,583,815,068,200
34.442308
77
0.677699
false
shaunbrady/boto
boto/sdb/db/manager/xmlmanager.py
153
18612
# Copyright (c) 2006-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, modi...
mit
-6,764,152,523,089,073,000
35
108
0.554696
false
pyblish/pyblish-win
lib/Python27/Lib/test/test_rlcompleter.py
122
2848
from test import test_support as support import unittest import __builtin__ as builtins import rlcompleter class CompleteMe(object): """ Trivial class used in testing rlcompleter.Completer. """ spam = 1 class TestRlcompleter(unittest.TestCase): def setUp(self): self.stdcompleter = rlcompleter.Com...
lgpl-3.0
4,653,388,209,672,797,000
38.013699
80
0.577949
false
robertjpayne/rethinkdb
drivers/python/rethinkdb/twisted_net/net_twisted.py
8
13947
# Copyright 2015 RethinkDB, all rights reserved. import time import struct from twisted.python import log from twisted.internet import reactor, defer from twisted.internet.defer import inlineCallbacks, returnValue, Deferred from twisted.internet.defer import DeferredQueue, CancelledError from twisted.internet.protoco...
apache-2.0
-405,737,264,726,095,800
32.934307
112
0.590665
false
kamalx/edx-platform
common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py
106
11916
import json import logging from lxml import etree from xmodule.capa_module import ComplexEncoder from xmodule.progress import Progress from xmodule.stringify import stringify_children import openendedchild from .combined_open_ended_rubric import CombinedOpenEndedRubric log = logging.getLogger("edx.courseware") cla...
agpl-3.0
-6,253,206,858,558,361,000
34.150442
145
0.591809
false
trishnaguha/ansible
packaging/release/tests/version_helper_test.py
125
2174
from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest from packaging.version import InvalidVersion from versionhelper.version_helper import AnsibleVersionMunger @pytest.mark.parametrize('version,revision,codename,output_propname,expected', [ ('2.5.0.dev1', None, Non...
gpl-3.0
4,530,945,841,759,415,300
45.255319
80
0.580037
false
ntuecon/server
pyenv/Lib/site-packages/twisted/names/test/test_util.py
13
3915
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Utilities for Twisted.names tests. """ from __future__ import division, absolute_import from random import randrange from zope.interface import implementer from zope.interface.verify import verifyClass from twisted.internet.address import ...
bsd-3-clause
953,862,172,362,078,300
27.576642
78
0.642656
false
cevaris/pants
tests/python/pants_test/backend/jvm/tasks/test_jvm_platform_analysis_integration.py
21
4718
# coding=utf-8 # Copyright 2015 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 conte...
apache-2.0
6,187,754,120,475,502,000
35.015267
99
0.658966
false
southpawtech/TACTIC-DEV
src/pyasm/prod/service/base_xmlrpc.py
6
19251
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-1,927,935,535,920,449,500
29.316535
136
0.558205
false
gferguson-gd/sensu-community-plugins
plugins/aws/check_vpc_vpn.py
56
1480
#!/usr/bin/python # #RED import argparse import boto.ec2 from boto.vpc import VPCConnection import sys def main(): try: conn = boto.vpc.VPCConnection(aws_access_key_id=args.aws_access_key_id, aws_secret_access_key=args.aws_secret_access_key, region=boto.ec2.get_region(args.region)) except: pr...
mit
-4,655,969,174,231,604,000
34.238095
178
0.633108
false
wgcv/SWW-Crashphone
lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/_base.py
915
13711
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from ..constants import scopingElements, tableInsertModeElements, namespaces # The scope markers are inserted when entering object elements, # marquees, table cells, and table captions, and are used to prevent for...
apache-2.0
-7,132,342,656,539,242,000
35.3687
90
0.598716
false
Datera/cinder
cinder/backup/driver.py
1
18112
# Copyright (C) 2013 Deutsche Telekom AG # 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 r...
apache-2.0
754,853,065,062,652,000
39.792793
79
0.597118
false
lumig242/Hue-Integration-with-CDAP
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py
131
1777
# -*- coding: utf-8 -*- # # SelfTest/Util/test_winrandom.py: Self-test for the winrandom module # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that d...
apache-2.0
6,129,764,917,024,691,000
36.020833
70
0.658413
false
mandeepdhami/nova
nova/scheduler/filters/num_instances_filter.py
56
2596
# Copyright (c) 2012 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
-7,336,091,375,573,084,000
35.56338
78
0.664099
false
mohamed--abdel-maksoud/chromium.src
third_party/typ/typ/tests/json_results_test.py
74
4342
# Copyright 2014 Dirk Pranke. 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 a...
bsd-3-clause
-7,587,861,223,433,767,000
39.579439
78
0.489406
false
llllllllll/cytoolz
cytoolz/tests/test_functoolz.py
2
12054
import platform from cytoolz.functoolz import (thread_first, thread_last, memoize, curry, compose, pipe, complement, do, juxt) from cytoolz.functoolz import _num_required_args from operator import add, mul, itemgetter from cytoolz.utils import raises from functools import partial from cyt...
bsd-3-clause
9,103,934,804,794,866,000
23.802469
79
0.554837
false
danieljaouen/ansible
test/runner/lib/cloud/openshift.py
46
7381
"""OpenShift plugin for integration tests.""" from __future__ import absolute_import, print_function import json import os import re import time from lib.cloud import ( CloudProvider, CloudEnvironment, ) from lib.util import ( find_executable, ApplicationError, display, SubprocessError, ) fr...
gpl-3.0
3,229,261,150,782,436,400
31.950893
141
0.600325
false
rory/SystemAutopsy
system_autopsy/default_components.py
1
1244
from utils import * class Basics(Component): @bash_command def disk_usage(self): return "df" @bash_command def open_files(self): return 'lsof' @bash_command def memory_usage(self): return "free" class Apache(Component): @bash_command def running_procs(self): ...
gpl-3.0
8,957,726,817,189,373,000
22.471698
96
0.618971
false
AlmostBetterNetwork/podmaster-host
analytics/management/commands/analytics_adjustment.py
3
2353
import json from django.core.management.base import BaseCommand from accounts.models import UserSettings from accounts.payment_plans import PLAN_DEMO from pinecast.email import send_notification_email from podcasts.models import Podcast MESSAGE_INCREASE = ''' We recently performed an audit of our analytics database....
apache-2.0
2,304,196,298,427,233,300
36.349206
91
0.689333
false
Iolaum/MongoDB_CW
myScripts/Question5+7.py
1
1175
from __future__ import division from pymongo import MongoClient """ Question 5: What is the mean length of a message? Question 7: What is the average number of hashtags (#) used within a message? """ # import pymongo client = MongoClient('localhost', 27017) if client is None: print "Couldn't connect!" else: ...
gpl-2.0
-5,212,266,594,836,735,000
12.823529
65
0.649362
false
peguin40/zulip
analytics/management/commands/analyze_mit.py
12
3811
from __future__ import absolute_import from __future__ import print_function from typing import Any from optparse import make_option from django.core.management.base import BaseCommand, CommandParser from zerver.models import Recipient, Message from zerver.lib.timestamp import timestamp_to_datetime import datetime im...
apache-2.0
8,010,023,499,943,694,000
42.804598
99
0.590921
false
foxdog-studios/pyddp
ddp/messages/__init__.py
1
1052
# -*- coding: utf-8 -*- # Copyright 2014 Foxdog Studios # # 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 l...
apache-2.0
1,683,113,532,515,597,300
29.057143
74
0.752852
false
chfoo/warcat
warcat/tool_test.py
1
2743
from warcat.tool import ListTool, VerifyTool, SplitTool, ExtractTool, ConcatTool import glob import os.path import tempfile import unittest class TestTool(unittest.TestCase): test_dir = os.path.join('example') def test_list(self): tool = ListTool([os.path.join(self.test_dir, 'at.warc')]) tool...
gpl-3.0
9,019,450,472,809,886,000
33.721519
94
0.576376
false
jnovinger/django
django/contrib/gis/shortcuts.py
388
1209
import zipfile from io import BytesIO from django.conf import settings from django.http import HttpResponse from django.template import loader # NumPy supported? try: import numpy except ImportError: numpy = False def compress_kml(kml): "Returns compressed KMZ from the given KML string." kmz = Bytes...
bsd-3-clause
-5,975,147,495,092,160,000
27.116279
79
0.694789
false
DIRACGrid/DIRAC
src/DIRAC/Resources/Storage/test/FIXME_Test_StoragePlugIn.py
2
34041
#! /usr/bin/env python # FIXME: if it requires a dirac.cfg it is not a unit test and should be moved to tests directory from __future__ import print_function from __future__ import absolute_import from __future__ import division import unittest import time import os import shutil import sys import six from DIRAC.Co...
gpl-3.0
5,860,784,221,350,681,000
47.909483
113
0.689228
false
GbalsaC/bitnamiP
cms/djangoapps/contentstore/migrations/0001_initial.py
110
5287
# -*- 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 model 'VideoUploadConfig' db.create_table('contentstore_videouploadconfig', ( ('id', se...
agpl-3.0
-7,493,343,262,471,521,000
65.0875
182
0.57613
false
Anonymous-X6/django
django/core/servers/basehttp.py
274
7319
""" HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21). Based on wsgiref.simple_server which is part of the standard library since 2.5. This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE! """ from __f...
bsd-3-clause
3,282,688,148,908,907,000
35.964646
90
0.631234
false
amitsela/incubator-beam
sdks/python/apache_beam/tests/test_utils.py
8
2331
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
2,966,990,860,677,744,000
32.782609
75
0.737881
false
CivicKnowledge/rowgenerators
rowgenerators/rowpipe/test/test_basic.py
1
8010
from __future__ import print_function import unittest import warnings warnings.resetwarnings() warnings.simplefilter("ignore") class TestBasic(unittest.TestCase): def setUp(self): import warnings super().setUp() warnings.simplefilter('ignore') def test_table(self): from r...
mit
4,792,853,128,667,642,000
27.204225
99
0.525094
false
OpenLinkedSocialData/twitter1
SnapDetremura_tw/scripts/rdfTwitter2.py
4
1441
# read both pickle data that starts with the defined string # write packs of < 50MB pickle data # write triples in packs of < 50MB import social as S, percolation as P, os, re import importlib, datetime importlib.reload(S.tw) importlib.reload(P.utils) ddir="../data/tw/" #a=P.utils.pRead2(ddir+ "{}.pickle".format(sid)...
cc0-1.0
6,281,545,703,121,067,000
26.711538
110
0.689105
false
chillpop/Vokoder
Paging Data Source Example/Pods/xUnique/xUnique.py
22
26477
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This software is licensed under the Apache 2 license, quoted below. Copyright 2014 Xiao Wang <wangxiao8611@gmail.com, http://fclef.wordpress.com/about> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with ...
mit
4,446,460,290,156,589,600
48.031481
259
0.574159
false
wwj718/murp-edx
common/djangoapps/terrain/browser.py
2
9872
""" Browser set up for acceptance tests. """ # pylint: disable=E1101 # pylint: disable=W0613 from lettuce import before, after, world from splinter.browser import Browser from logging import getLogger from django.core.management import call_command from django.conf import settings from selenium.common.exceptions impo...
agpl-3.0
-1,646,588,984,808,907,000
34.638989
114
0.686892
false
samvidmistry/PyMaterial
demo/ripple_test_demo.py
2
1187
__author__ = "Samvid Mistry" import sys from PySide.QtGui import * from PySide.QtCore import * from MUtilities import MColors from MBase.MAnimationThread import MAnimationThread from MComponents.MTestComponent import MTestComponent class MainWindow(QWidget): def __init__(self): QWidget.__init__(self) ...
mit
271,232,439,637,532,580
27.261905
66
0.655434
false
mvitr/titanium_mobile
support/common/markdown/html4.py
133
9672
# markdown/html4.py # # Add html4 serialization to older versions of Elementree # Taken from ElementTree 1.3 preview with slight modifications # # Copyright (c) 1999-2007 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware.com # # --------------------------------------------------...
apache-2.0
-7,092,401,625,762,217,000
34.29927
70
0.547353
false
slyphon/pants
src/python/pants/option/option_value_container.py
4
6789
# 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) from pants.option.ra...
apache-2.0
-7,508,571,785,615,585,000
38.935294
100
0.696863
false
alfred82santa/aio-service-client
tests/tests_utils.py
1
8530
from textwrap import dedent from typing import Optional, Union from unittest.case import TestCase from service_client.utils import IncompleteFormatter, random_token, build_parameter_object class TestIncompleteFormatter(TestCase): def setUp(self): self.formatter = IncompleteFormatter() def test_all_...
lgpl-3.0
3,325,332,306,316,843,000
38.490741
110
0.626495
false
importsfromgooglecode/pychess
lib/pychess/widgets/SetupBoard.py
21
2655
from gi.repository import Gtk, Gtk.Gdk from gi.repository import GObject from math import floor from BoardView import BoardView from pychess.Utils.const import * from pychess.Utils.Cord import Cord ALL = 0 class SetupBoard (Gtk.EventBox): __gsignals__ = { 'cord_clicked' : (SIGNAL_RUN_FIRST, TYPE_N...
gpl-3.0
5,402,889,160,392,251,000
29.517241
90
0.563842
false
anryko/ansible
lib/ansible/modules/packaging/os/pulp_repo.py
11
27318
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Joe Adams <@sysadmind> # # 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
6,883,569,809,231,903,000
35.424
158
0.579398
false
ProfessionalIT/maxigenios-website
sdk/google_appengine/google/appengine/api/images/images_stub.py
2
25284
#!/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...
mit
108,155,983,724,686,830
29.610169
80
0.662514
false
detiber/lib_openshift
lib_openshift/models/v1_deployment_cause_image_trigger.py
2
3631
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
apache-2.0
3,720,666,072,089,885,700
26.930769
158
0.581933
false
ywcui1990/nupic.research
projects/l2_pooling/noise_tolerance_l2.py
9
19188
# Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016 - 2017, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This program is free software: you can redistribute it and/or modify # it und...
agpl-3.0
7,989,783,989,908,724,000
37.071429
133
0.667657
false
a-doumoulakis/tensorflow
tensorflow/contrib/rnn/python/kernel_tests/core_rnn_cell_test.py
9
36478
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
6,806,504,549,057,247,000
42.58184
80
0.612122
false
juju-solutions/bigtop
bigtop-packages/src/charm/spark/layer-spark/lib/charms/layer/bigtop_spark.py
8
19414
# 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
4,470,451,991,455,056,000
45.780723
92
0.583909
false
nurmd2/nurmd
addons/sale_mrp/tests/test_sale_mrp_flow.py
23
19151
# -*- coding: utf-8 -*- from openerp.tests import common from datetime import datetime class TestSaleMrpFlow(common.TransactionCase): def setUp(self): super(TestSaleMrpFlow, self).setUp() # Useful models self.SaleOrderLine = self.env['sale.order.line'] self.SaleOrder = self.env['...
gpl-3.0
-7,407,840,185,649,300,000
49.002611
195
0.53475
false
wwaites/swipy
tests/test_30_entail.py
1
1424
from rdflib.graph import Graph from rdflib.term import URIRef from swipy.store import SWIStore from os import path, stat owl_test = path.join(path.dirname(__file__), "owl.rdf") skos_test = path.join(path.dirname(__file__), "skos.rdf") cofog_test = path.join(path.dirname(__file__), "cofog-1999.rdf") entail_test = path....
gpl-3.0
4,383,438,497,168,416,300
30.644444
75
0.661517
false
lhilt/scipy
scipy/interpolate/interpolate.py
4
97600
from __future__ import division, print_function, absolute_import __all__ = ['interp1d', 'interp2d', 'lagrange', 'PPoly', 'BPoly', 'NdPPoly', 'RegularGridInterpolator', 'interpn'] import itertools import warnings import functools import operator import numpy as np from numpy import (array, transpose, searc...
bsd-3-clause
8,165,717,201,591,647,000
34.829662
112
0.545266
false
rvianello/rdkit
Contrib/fraggle/atomcontrib.py
5
5091
# Copyright (c) 2013, GlaxoSmithKline Research & Development Ltd. # 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 # ...
bsd-3-clause
-658,960,533,497,763,300
37.568182
123
0.697309
false
acecheese/CloudBot
plugins/locate.py
31
2234
import requests from cloudbot import hook from cloudbot.util import web # Define some constants base_url = 'https://maps.googleapis.com/maps/api/' geocode_api = base_url + 'geocode/json' # Change this to a ccTLD code (eg. uk, nz) to make results more targeted towards that specific country. # <https://developers.goog...
gpl-3.0
5,898,332,319,510,943,000
30.041667
103
0.639212
false
PagerDuty/pagerduty-api-python-client
pypd/models/note.py
1
1425
# Copyright (c) PagerDuty. # See LICENSE for details. from .entity import Entity from ..errors import (InvalidEndpointOperation, InvalidEndpoint, InvalidArguments) class Note(Entity): """PagerDuty note entity.""" @classmethod def fetch(*args, **kwargs): """Disable this endpo...
mit
-2,678,975,129,517,278,000
31.386364
78
0.613333
false
tagliateller/openshift-ansible
roles/lib_openshift/src/class/oc_adm_policy_user.py
17
8279
# pylint: skip-file # flake8: noqa class PolicyUserException(Exception): ''' PolicyUser exception''' pass class PolicyUserConfig(OpenShiftCLIConfig): ''' PolicyUserConfig is a DTO for user related policy. ''' def __init__(self, namespace, kubeconfig, policy_options): super(PolicyUserConfig,...
apache-2.0
-571,801,979,495,174,660
35.471366
114
0.555623
false
andela-ifageyinbo/django
tests/gis_tests/geoapp/test_functions.py
262
21654
from __future__ import unicode_literals import re from decimal import Decimal from django.contrib.gis.db.models import functions from django.contrib.gis.geos import ( LineString, Point, Polygon, fromstr, geos_version_info, ) from django.db import connection from django.test import TestCase, skipUnlessDBFeature fr...
bsd-3-clause
2,096,908,935,209,352,700
45.87013
118
0.608017
false
jriehl/numba
numba/cuda/kernels/transpose.py
2
2040
from numba import cuda from numba.cuda.cudadrv.driver import driver from numba import numpy_support as nps import math def transpose(a, b=None): """Compute the transpose of 'a' and store it into 'b', if given, and return it. If 'b' is not given, allocate a new array and return that. This implements th...
bsd-2-clause
-6,331,306,190,199,663,000
30.384615
81
0.616667
false
gcodetogit/depot_tools
third_party/boto/services/sonofmmm.py
98
3481
# Copyright (c) 2006,2007 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, modi...
bsd-3-clause
-6,538,721,031,675,678,000
41.975309
80
0.641195
false
c0defreak/python-for-android
python3-alpha/python3-src/Lib/test/test_copyreg.py
173
4217
import copyreg import unittest from test import support from test.pickletester import ExtensionSaver class C: pass class WithoutSlots(object): pass class WithWeakref(object): __slots__ = ('__weakref__',) class WithPrivate(object): __slots__ = ('__spam',) class WithSingleString(object): __slot...
apache-2.0
8,191,404,933,889,197,000
33.85124
76
0.569836
false
aminert/scikit-learn
sklearn/preprocessing/tests/test_data.py
113
38432
import warnings import numpy as np import numpy.linalg as la from scipy import sparse from distutils.version import LooseVersion from sklearn.utils.testing import assert_almost_equal, clean_warning_registry from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_array_equal...
bsd-3-clause
3,210,420,173,689,901,000
34.917757
79
0.623777
false
evamwangi/bc-7-Todo_List
venv/Lib/posixpath.py
62
14088
"""Common operations on Posix pathnames. Instead of importing this module directly, import os and refer to this module as os.path. The "os.path" name is an alias for this module on Posix systems; on other systems (e.g. Mac, Windows), os.path provides the same operations in a manner specific to that platform, and is a...
mit
-8,170,525,413,639,084,000
30.587444
78
0.613785
false
dfdx2/django
django/core/management/commands/migrate.py
16
14047
import time from collections import OrderedDict from importlib import import_module from django.apps import apps from django.core.checks import Tags, run_checks from django.core.management.base import BaseCommand, CommandError from django.core.management.sql import ( emit_post_migrate_signal, emit_pre_migrate_sign...
bsd-3-clause
6,454,585,124,428,605,000
44.7557
103
0.56076
false
ax003d/openerp
openerp/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py
53
2205
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
6,977,010,499,055,847,000
39.018182
103
0.606997
false
cuviper/binutils-gdb
gdb/python/lib/gdb/FrameDecorator.py
26
10392
# Copyright (C) 2013-2016 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
gpl-2.0
-625,530,284,425,217,500
33.410596
71
0.621536
false
danielbair/aeneas
run_all_unit_tests.py
5
5094
#!/usr/bin/env python # coding=utf-8 # aeneas is a Python/C library and a set of tools # to automagically synchronize audio and text (aka forced alignment) # # Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it) # Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it) # Copyright (C) 2015-2017, A...
agpl-3.0
387,545,329,395,520,400
31.653846
122
0.606792
false
Yukarumya/Yukarum-Redfoxes
media/webrtc/trunk/tools/gyp/test/compiler-override/gyptest-compiler-env-toolchain.py
100
2877
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the user can override the compiler and linker using CC/CXX/NM/READELF environment variables. """ import TestGyp import os i...
mpl-2.0
8,435,515,639,958,114,000
35.884615
79
0.698297
false
lewisc/spark-tk
python/sparktk/frame/ops/export_to_jdbc.py
11
2944
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 require...
apache-2.0
-8,114,460,895,028,659,000
33.963415
115
0.664341
false
mdj2/django
tests/model_inheritance/tests.py
18
12214
from __future__ import absolute_import, unicode_literals from operator import attrgetter from django.core.exceptions import FieldError from django.db import connection from django.test import TestCase from django.test.utils import CaptureQueriesContext from django.utils import six from .models import (Chef, CommonIn...
bsd-3-clause
-2,868,093,785,277,694,500
37.16875
140
0.597102
false
jchodera/bhmm
bhmm/hmm/generic_sampled_hmm.py
2
9741
# This file is part of BHMM (Bayesian Hidden Markov Models). # # Copyright (c) 2016 Frank Noe (Freie Universitaet Berlin) # and John D. Chodera (Memorial Sloan-Kettering Cancer Center, New York) # # BHMM is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public Licen...
lgpl-3.0
-7,201,066,160,061,389,000
37.808765
97
0.667693
false