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
AlanZatarain/urssus
urssus/postmodel.py
4
11489
# -*- coding: utf-8 -*- # uRSSus, a multiplatform GUI news agregator # Copyright (C) 2008 Roberto Alsina # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program is distribu...
lgpl-2.1
3,359,384,131,478,996,500
35.128931
106
0.635129
false
eahneahn/free
lib/python2.7/site-packages/pip-1.5-py2.7.egg/pip/_vendor/colorama/ansi.py
171
1089
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. ''' This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code ''' CSI = '\033[' def code_to_chars(code): return CSI + str(code) + 'm' class AnsiCodes(object):...
agpl-3.0
6,242,571,155,322,366,000
19.78
75
0.536272
false
CiscoSystems/nova
nova/compute/power_state.py
47
2019
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
apache-2.0
563,727,214,690,360,900
37.826923
78
0.743437
false
ricardoquesada/cocoslive
cocoslive/util.py
2
2311
#!/usr/bin/env python # # cocos live - (c) 2009 Ricardo Quesada # http://www.cocoslive.net # # License: GNU GPL v3 # See the LICENSE file # __docformat__ = 'restructuredtext' # GAE imports from google.appengine.api import urlfetch from google.appengine.api import memcache # IMPORTNAT: # geoutil contains the an URL w...
gpl-3.0
4,516,694,023,983,238,000
26.511905
99
0.611856
false
betaY/crawler
you-get-master/src/you_get/extractor.py
3
8692
#!/usr/bin/env python from .common import match1, maybe_print, download_urls, get_filename, parse_host, set_proxy, unset_proxy from .util import log from . import json_output import os class Extractor(): def __init__(self, *args): self.url = None self.title = None self.vid = None s...
mit
-5,313,310,402,367,870,000
37.977578
209
0.512885
false
willbarton/observation-conditions
observation/conditions/map.py
1
21998
# -*- coding: utf-8 -*- # # Copyright 2010-2014 Will Barton. # 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 # n...
bsd-3-clause
463,824,196,800,426,560
31.58963
104
0.540549
false
cognitiveclass/edx-platform
lms/djangoapps/commerce/tests/__init__.py
41
3664
# -*- coding: utf-8 -*- """ Commerce app tests package. """ import datetime import json from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from freezegun import freeze_time import httpretty import jwt import mock from edx_rest_api_client import auth from ...
agpl-3.0
201,160,273,923,315,400
35.257426
116
0.639814
false
salilab/mdt
constr2005/bonds/asgl.py
1
1074
from modeller import * import os import mdt import mdt.features env = Environ() mlib = mdt.Library(env) mlib.bond_classes.read('${LIB}/bndgrp.lib') xray = mdt.features.XRayResolution(mlib, bins=[(0.51, 2.001, 'High res(2.0A)')]) bond_type = mdt.features.BondType(mlib) bond_length = mdt.features.BondLength(mlib, ...
gpl-2.0
660,499,253,062,537,700
31.545455
80
0.647114
false
racmariano/skidom
backend/resorts/migrations/0006_auto_20171008_1416.py
1
1078
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-10-08 18:16 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dynamic_scraper', '0025_new_follow_pages_page_xpath_paginat...
mit
-3,305,551,535,365,045,000
32.6875
144
0.620594
false
kmee/l10n-brazil
sped_imposto/models/sped_cest.py
2
2851
# -*- coding: utf-8 -*- # # Copyright 2016 Taŭga Tecnologia # Aristides Caldeira <aristides.caldeira@tauga.com.br> # License AGPL-3 or later (http://www.gnu.org/licenses/agpl) # from __future__ import division, print_function, unicode_literals import logging from odoo import api, fields, models, _ from odoo.except...
agpl-3.0
5,447,421,342,454,212,000
27.45
77
0.502988
false
richard-willowit/odoo
odoo/tools/mimetypes.py
16
6661
# -*- coding: utf-8 -*- """ Mimetypes-related utilities # TODO: reexport stdlib mimetypes? """ import collections import io import logging import re import zipfile __all__ = ['guess_mimetype'] _logger = logging.getLogger(__name__) # We define our own guess_mimetype implementation and if magic is available we # use ...
gpl-3.0
-1,767,756,833,159,276,800
38.642857
115
0.635886
false
toymachine/concurrence
lib/concurrence/xmpp/sasl.py
2
1493
# Copyright (C) 2009, Hyves (Startphone Ltd.) # # This module is part of the Concurrence Framework and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php import binascii import base64 import md5 import random def H(s): return md5.new(s).digest() def KD(k, s): return H...
bsd-3-clause
-6,286,508,686,325,421,000
29.489796
135
0.568654
false
mzadel/libmapper-sc
editors/sced/scedwin/py/Settings.py
37
2412
# sced (SuperCollider mode for gedit) # # Copyright 2012 Jakob Leben # Copyright 2009 Artem Popov and other contributors (see AUTHORS) # # sced 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, ei...
gpl-3.0
-2,212,369,761,934,754,300
26.409091
74
0.604478
false
cetic/ansible
lib/ansible/modules/network/avi/avi_gslb.py
7
5653
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
-7,588,021,769,680,653,000
33.469512
129
0.631346
false
TinLe/Diamond
src/collectors/ipvs/test/testipvs.py
32
1828
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from ipvs import IPV...
mit
3,702,452,401,452,153,000
31.070175
80
0.518053
false
hendrikx-itc/python-minerva
src/minerva/storage/outputdescriptor.py
1
1040
# -*- coding: utf-8 -*- from minerva.storage.valuedescriptor import ValueDescriptor from minerva.storage import datatype class OutputDescriptor: """ Combines a value descriptor with configuration for serializing values. """ def __init__( self, value_descriptor: ValueDescriptor, ...
gpl-3.0
8,553,105,050,989,826,000
29.588235
74
0.604808
false
mahendra-r/home-assistant
config/custom_components/mqtt_example.py
19
1763
""" custom_components.mqtt_example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shows how to communicate with MQTT. Follows a topic on MQTT and updates the state of an entity to the last message received on that topic. Also offers a service 'set_state' that will publish a message on the topic that will be passed via MQTT to our mes...
mit
5,674,864,123,755,882,000
28.881356
79
0.705048
false
jruben/jruben.github.io
node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/default.py
364
2532
# -*- coding: utf-8 -*- """ pygments.styles.default ~~~~~~~~~~~~~~~~~~~~~~~ The default highlighting style. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Com...
mit
6,079,632,297,375,860,000
33.684932
70
0.442338
false
petrjasek/superdesk-core
superdesk/media/image.py
2
4149
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license """Utilities...
agpl-3.0
7,222,154,397,879,951,000
27.22449
119
0.611714
false
tpltnt/scapy
scapy/layers/llmnr.py
4
2391
from scapy.fields import * from scapy.packet import * from scapy.layers.inet import UDP from scapy.layers.dns import DNSQRField, DNSRRField, DNSRRCountField """ LLMNR (Link Local Multicast Node Resolution). [RFC 4795] """ ############################################################################# ### ...
gpl-2.0
4,598,852,182,376,160,000
35.784615
77
0.49519
false
scikit-nano/scikit-nano
sknano/core/atoms/_poav_atoms.py
2
20712
# -*- coding: utf-8 -*- """ =============================================================================== Mixin Atom classes for POAV analysis (:mod:`sknano.core.atoms._poav_atoms`) =============================================================================== .. currentmodule:: sknano.core.atoms._poav_atoms """ f...
bsd-2-clause
-5,726,889,673,496,191,000
31.87619
79
0.524913
false
xinwu/horizon
openstack_dashboard/test/integration_tests/tests/test_sahara_job_binaries.py
50
3397
# 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
-7,900,808,309,031,664,000
46.180556
79
0.682072
false
freenas/samba
third_party/dnspython/dns/resolver.py
47
43033
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0
-1,572,020,486,543,878,100
36.065461
80
0.549276
false
sergei-maertens/discord-bot
bot/plugins/remindme/tests/test_plugin.py
1
3392
from datetime import datetime from unittest import TestCase, mock from dateutil.relativedelta import relativedelta from django.utils import timezone from ..plugin import Plugin class PluginTests(TestCase): def test_parse_time(self): plugin = Plugin(mock.MagicMock(), {}) def expected(**kwargs):...
mit
-2,519,951,502,753,981,000
37.988506
118
0.633844
false
nelmiux/CarnotKE
jyhton/lib-python/2.7/idlelib/ClassBrowser.py
91
6369
"""Class browser. XXX TO DO: - reparse when source changed (maybe just a button would be OK?) (or recheck on window popup) - add popup menu with more options (e.g. doc strings, base classes, imports) - show function argument list? (have to do pattern matching on source) - should the classes and methods lists also...
apache-2.0
-8,553,669,999,324,753,000
27.819005
82
0.545141
false
sergiopasra/megaradrp
megaradrp/instrument/components/lamps.py
2
1718
# # Copyright 2016-2019 Universidad Complutense de Madrid # # This file is part of Megara DRP # # SPDX-License-Identifier: GPL-3.0+ # License-Filename: LICENSE.txt # import numpy as np from astropy import units as u from astropy.modeling.blackbody import blackbody_lambda from numina.instrument.hwdevice import HWDevice...
gpl-3.0
-6,229,515,339,888,335,000
28.62069
72
0.606519
false
racemidev/RegAdminForLinux
python/rregadmin/hive/key_cell_wrapper.py
1
19637
# generated by 'xml2py' # flags '-c -d -v -k defst -lrregadmin -m rregadmin.util.glib_wrapper -m rregadmin.util.icu_wrapper -m rregadmin.util.path_wrapper -m rregadmin.util.icu_wrapper -m rregadmin.util.path_info_wrapper -m rregadmin.util.ustring_wrapper -m rregadmin.util.offset_wrapper -m rregadmin.util.value_wrapper ...
gpl-2.0
6,420,542,799,493,553,000
51.365333
427
0.702857
false
jonathonwalz/ansible
lib/ansible/modules/network/cloudengine/ce_bgp_neighbor_af.py
26
109137
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
-8,750,219,269,188,011,000
40.090738
120
0.538103
false
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/networkx/algorithms/vitality.py
72
2488
""" Vitality measures. """ # Copyright (C) 2012 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 (hagberg@lanl.gov)', 'Renato...
agpl-3.0
-9,043,597,219,763,480,000
28.619048
75
0.592042
false
pawaranand/phrerp
erpnext/home/doctype/feed/feed.py
37
1545
# 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 frappe import frappe.defaults import frappe.permissions from frappe.model.document import Document class Feed(Document): pass def on_doctyp...
agpl-3.0
3,858,143,898,645,019,600
29.9
89
0.699029
false
kamyu104/django
tests/aggregation_regress/tests.py
102
55724
from __future__ import unicode_literals import datetime import pickle from decimal import Decimal from operator import attrgetter from django.contrib.contenttypes.models import ContentType from django.core.exceptions import FieldError from django.db import connection from django.db.models import ( F, Q, Avg, Coun...
bsd-3-clause
877,297,011,598,942,200
37.913408
116
0.556672
false
mick-d/nipype
doc/sphinxext/numpy_ext/docscrape.py
10
15677
# -*- coding: utf-8 -*- """Extract reference documentation from the NumPy source tree. """ from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import object import inspect import textwrap import re import pydoc from warnings import warn from io i...
bsd-3-clause
9,024,024,202,413,312,000
29.148077
80
0.475091
false
gundalow/ansible
lib/ansible/utils/vars.py
10
10215
# (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
-1,306,392,480,884,407,800
33.627119
152
0.627704
false
raymondnijssen/QGIS
tests/src/python/test_authmanager_pki_postgres.py
11
9727
# -*- coding: utf-8 -*- """ Tests for auth manager PKI access to postgres. This is an integration test for QGIS Desktop Auth Manager postgres provider that checks if QGIS can use a stored auth manager auth configuration to access a PKI protected postgres. Configuration from the environment: * QGIS_POSTGRES_SERVE...
gpl-2.0
2,744,791,448,922,895,000
35.961977
193
0.623187
false
csmanjuvijay/usb-next
Documentation/target/tcm_mod_builder.py
497
22865
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
2,970,192,325,124,325,400
33.435241
162
0.584649
false
rpavlik/chromium
progs/packertest/packertest.py
4
45218
#!/usr/bin/python # Copyright (c) 2004, Red Hat. # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. # This script generates the packertest*.c files from the APIspec.txt file. import sys, string, re import copy sys.path.append( "../../glapi_parser" ) import apiutil ...
bsd-3-clause
-887,223,205,402,275,600
25.259001
388
0.607678
false
sachintyagi22/spark
examples/src/main/python/streaming/flume_wordcount.py
83
2032
# # 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
1,906,486,949,927,470,800
35.285714
90
0.718504
false
Petr-Kovalev/nupic-win32
py/regions/KNNClassifierRegion.py
2
42330
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditi...
gpl-3.0
8,501,691,755,400,868,000
34.453099
117
0.558871
false
yghannam/teuthology
teuthology/beanstalk.py
5
5121
import beanstalkc import yaml import logging import pprint import sys from collections import OrderedDict from .config import config from . import report log = logging.getLogger(__name__) def connect(): host = config.queue_host port = config.queue_port if host is None or port is None: raise Runt...
mit
-6,594,242,612,813,813,000
27.608939
79
0.579379
false
TeamEOS/external_skia
tools/gen_bench_expectations_from_codereview.py
67
5806
#!/usr/bin/python # Copyright (c) 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. """Generate new bench expectations from results of trybots on a code review.""" import collections import compare_codereview import...
bsd-3-clause
2,294,606,037,716,440,300
30.726776
79
0.658457
false
ZdenekM/artable
art_fake_nodes/src/grasping.py
6
6629
#!/usr/bin/env python import rospy from actionlib import SimpleActionServer from art_msgs.msg import PickPlaceAction, PickPlaceGoal, PickPlaceResult, PickPlaceFeedback import random class FakeGrasping: ALWAYS = 0 NEVER = 1 RANDOM = 2 def __init__(self): self.left_server = SimpleActionServer(...
lgpl-2.1
-402,955,450,308,968,960
36.241573
110
0.531
false
faizan-barmawer/openstack_ironic
ironic/openstack/common/apiclient/client.py
8
12937
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2013 Alessio Ababilov # Copyright 2013 Grid Dynamics # Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you ...
apache-2.0
-8,597,647,260,219,695,000
34.541209
78
0.587772
false
petewarden/tensorflow
tensorflow/python/training/checkpoint_utils_test.py
12
19687
# 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
-705,128,220,831,064,600
39.095723
80
0.643572
false
Rfam/rfam-production
scripts/release/genome_download_engine.py
1
1660
import os import sys import subprocess from config import gen_config as gc from config import rfam_local as rl # ---------------------------------------------------------------------- def launch_genome_download(project_dir, upid_list): fp = open(upid_list, 'r') upids = [x.strip() for x in fp] fp.close(...
apache-2.0
-3,507,271,938,438,808,600
26.683333
72
0.456627
false
Factr/maya
test_maya.py
1
2080
import pytest from datetime import datetime import maya def test_rfc2822(): r = maya.now().rfc2822() d = maya.MayaDT.from_rfc2822(r) assert r == d.rfc2822() def test_iso8601(): r = maya.now().iso8601() d = maya.MayaDT.from_iso8601(r) assert r == d.iso8601() def test_human_when(): r1 =...
mit
8,859,376,132,918,267,000
20.666667
67
0.610096
false
karyon/django
tests/admin_filters/models.py
39
2298
from __future__ import unicode_literals from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compa...
bsd-3-clause
2,462,972,080,006,686,700
28.088608
94
0.690601
false
heracek/django-nonrel
django/contrib/localflavor/ie/ie_counties.py
503
1127
""" Sources: Irish Counties: http://en.wikipedia.org/wiki/Counties_of_Ireland """ from django.utils.translation import ugettext_lazy as _ IE_COUNTY_CHOICES = ( ('antrim', _('Antrim')), ('armagh', _('Armagh')), ('carlow', _('Carlow')), ('cavan', _('Cavan')), ('clare', _('Clare')), ('cork...
bsd-3-clause
5,515,004,300,703,546,000
27.175
72
0.47205
false
jeanpaul/bitbot
jsonrpc/serviceHandler.py
61
3239
""" Copyright (c) 2007 Jan-Klaas Kollhof This file is part of jsonrpc. jsonrpc is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later...
mit
8,723,219,060,023,526,000
27.672566
93
0.595863
false
akiellor/selenium
py/test/selenium/webdriver/common/alerts_tests.py
4
3318
#Copyright 2007-2009 WebDriver committers #Copyright 2007-2009 Google Inc. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required b...
apache-2.0
-6,133,124,394,133,969,000
37.137931
96
0.674503
false
pombredanne/dxr
dxr/plugins/clang/tests/test_operator_call.py
7
2060
from dxr.plugins.clang.tests import CSingleFileTestCase class OperatorCallTests(CSingleFileTestCase): source = """ struct Foo { void operator()(int) { } void operator[](int) { } }; int ...
mit
-4,052,543,026,386,533,000
24.432099
64
0.455825
false
harisibrahimkv/django
django/utils/crypto.py
44
3092
""" Django's standard crypto functions and utilities. """ import hashlib import hmac import random import time from django.conf import settings from django.utils.encoding import force_bytes # Use the system PRNG if possible try: random = random.SystemRandom() using_sysrandom = True except NotImplementedError:...
bsd-3-clause
1,349,153,973,143,289,600
35.376471
91
0.669146
false
rhinstaller/anaconda
tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_flatpak_manager.py
2
14244
# # Copyright (C) 2021 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be...
gpl-2.0
-8,159,295,296,842,127,000
43.792453
97
0.662595
false
vbelakov/h2o
py/testdir_multi_jvm/notest_exec2_multi_node.py
9
4457
import unittest, sys, random, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_jobs, h2o_exec as h2e import h2o_util import multiprocessing, os, signal, time from multiprocessing import Process, Queue print "single writer, single reader flows (after sequenti...
apache-2.0
-6,372,801,804,453,357,000
37.094017
122
0.568993
false
AndreasHeger/alignlib
python/bench/bench_Alignment.py
1
2148
import timeit import alignlib NUM_SAMPLES=1000 ALISIZE=2000 alignlib_vector = alignlib.makeAlignmentVector() alignlib_vector.addDiagonal( 0, ALISIZE, 0) python_vector = [] for x in xrange(ALISIZE): python_vector.append(x) def pythonBuildVector(): """build vector alignment in python.""" vector = [] ...
gpl-2.0
874,321,233,006,974,200
27.276316
85
0.592644
false
kenrachynski/powerline
tests/test_shells/postproc.py
19
3660
#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os import socket import sys import codecs import platform import re test_type = sys.argv[1] test_client = sys.argv[2] shell = sys.argv[3] fname = os.path.join('tests', 'shel...
mit
7,226,477,646,192,998,000
27.372093
93
0.569945
false
mayblue9/bokeh
examples/glyphs/daylight.py
43
2889
from __future__ import print_function import numpy as np import datetime as dt from bokeh.browserlib import view from bokeh.document import Document from bokeh.embed import file_html from bokeh.models.glyphs import Patch, Line, Text from bokeh.models import ( ColumnDataSource, DataRange1d, DatetimeAxis, Datet...
bsd-3-clause
5,492,451,038,303,769,000
27.60396
80
0.69055
false
jnerin/ansible
test/units/modules/network/onyx/test_onyx_config.py
50
4600
# # (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,224,620,000,252,571,600
39.707965
95
0.668478
false
BAGAsss/mrmc
tools/EventClients/lib/python/xbmcclient.py
164
22913
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008-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 2 of the License, or # (at your option) ...
gpl-2.0
283,151,682,065,166,700
34.913793
119
0.567887
false
vishnugonela/boto
tests/integration/dynamodb/test_table.py
136
3553
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
6,330,164,178,782,890,000
41.297619
88
0.663946
false
exowanderer/Charge-Carrier-Trapping-Comparison
Charge Carrier Trapping Experiment.py
1
37127
# coding: utf-8 # # Charge Carrier Trapping Experiment # # CCT = Charge Carrier Trapping - This is a test of comparing the Zhou et al 2017 results with a data driven analysis using multinest # In[ ]: get_ipython().magic('matplotlib inline') from pylab import *;ion() from pandas import read_csv, DataFrame, concat ...
gpl-3.0
7,434,803,185,106,250,000
33.218433
256
0.650739
false
juangj/selenium
py/test/selenium/webdriver/common/frame_switching_tests.py
2
17536
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-9,186,007,534,266,295,000
38.854545
108
0.711337
false
arista-eosplus/ansible
lib/ansible/modules/messaging/rabbitmq_binding.py
69
7328
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <manuel.sousa@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...
gpl-3.0
-3,038,659,515,954,271,000
30.316239
127
0.566184
false
jmighion/ansible
lib/ansible/utils/module_docs_fragments/nxos.py
87
4041
# # (c) 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 late...
gpl-3.0
-6,045,798,294,735,925,000
39.818182
88
0.703539
false
jinnykoo/wuyisj.com
src/oscar/apps/customer/notifications/views.py
8
3485
from django.utils.html import strip_tags from django.utils.translation import ugettext_lazy as _, ungettext from django.utils.timezone import now from django.contrib import messages from django.views import generic from oscar.core.loading import get_model from oscar.core.utils import redirect_to_referrer from oscar.ap...
bsd-3-clause
2,918,650,131,941,947,000
32.190476
74
0.660832
false
maartenq/ansible
lib/ansible/modules/database/misc/elasticsearch_plugin.py
24
9640
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Mathew Davies <thepixeldeveloper@googlemail.com> # (c) 2017, Sam Doran <sdoran@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = ...
gpl-3.0
6,888,771,156,189,124,000
30.92053
153
0.631017
false
gg7/sentry
src/sentry/migrations/0146_auto__add_field_auditlogentry_ip_address.py
36
29197
# -*- 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 'AuditLogEntry.ip_address' db.add_column('sentry_auditlogentry', 'ip_address', ...
bsd-3-clause
-9,090,966,981,973,148,000
83.14121
223
0.557009
false
c-bit/c-bit
qa/rpc-tests/listtransactions.py
1
10721
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The C-Bit Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from te...
mit
-496,209,758,509,871,900
48.40553
112
0.57905
false
mspark93/VTK
Rendering/Tk/Testing/Python/cursor3D.py
5
9545
#!/usr/bin/env python ''' This little example shows how a cursor can be created in image viewers, and renderers. The standard TkImageViewerWidget and TkRenderWidget bindings are used. There is a new binding: middle button in the image viewer sets the position of the cursor. ''' import sys from functools import p...
bsd-3-clause
-7,699,876,876,975,845,000
33.089286
94
0.63363
false
mvidalgarcia/indico
indico/modules/users/models/users_test.py
2
5467
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import itertools import pytest from speaklater import is_lazy_string from sqlalchemy.exc import Integrity...
mit
-6,108,396,916,726,941,000
35.205298
106
0.65118
false
soellman/copernicus
cpc/dataflow/connection.py
2
20714
# This file is part of Copernicus # http://www.copernicus-computing.org/ # # Copyright (C) 2011, Sander Pronk, Iman Pouya, Erik Lindahl, and others. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as published # by the Free Softwa...
gpl-2.0
801,111,568,524,257,000
41.533881
85
0.608622
false
Scille/parsec-cloud
parsec/core/mountpoint/thread_fs_access.py
1
2647
# Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS import trio class ThreadFSAccess: def __init__(self, trio_token, workspace_fs): self.workspace_fs = workspace_fs self._trio_token = trio_token def _run(self, fn, *args): return trio.from_thread.run(fn, *a...
agpl-3.0
5,007,733,925,499,260,000
34.293333
96
0.677371
false
hotzenklotz/Flask-React-Webpack-Server
server.py
1
7310
# System imports import subprocess import time from os import path import shutil import numpy as np from flask.ext.cors import CORS from flask import * from werkzeug import secure_filename from flask_extensions import * import math # Local predicition modules # find modules in parent_folder/predictions # sys.path.app...
mit
2,843,704,366,427,842,000
30.508621
177
0.635705
false
ToontownUprising/src
otp/chat/ChatInputNormal.py
3
4076
from direct.gui.DirectGui import * from direct.showbase import DirectObject from pandac.PandaModules import * import sys from otp.otpbase import OTPGlobals from otp.otpbase import OTPLocalizer from toontown.chat.ChatGlobals import * class ChatInputNormal(DirectObject.DirectObject): def __init__(self, chatMgr): ...
mit
-7,051,873,491,849,119,000
32.409836
101
0.613346
false
bitcraze/toolbelt
src/toolbelt/test/utils/test_git.py
1
2105
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Toolbelt - a utility tu run tools in do...
gpl-3.0
-6,142,544,452,161,083,000
30.893939
71
0.563895
false
meabsence/python-for-android
python3-alpha/python3-src/Lib/test/test_dummy_threading.py
182
1807
from test import support import unittest import dummy_threading as _threading import time class DummyThreadingTestCase(unittest.TestCase): class TestThread(_threading.Thread): def run(self): global running global sema global mutex # Uncomment if testing ano...
apache-2.0
3,419,141,929,758,722,600
27.234375
79
0.533481
false
moomou/heron
heron/tools/ui/src/python/args.py
2
3283
# Copyright 2016 Twitter. 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
-793,251,779,259,609,500
27.547826
90
0.686567
false
lyndsysimon/osf.io
scripts/tests/test_email_registration_contributors.py
60
2231
import mock from nose.tools import * # noqa from tests.base import OsfTestCase from tests.factories import RegistrationFactory, UserFactory from website import models from scripts.email_registration_contributors import ( get_registration_contributors, send_retraction_and_embargo_addition_message, main, MAIL...
apache-2.0
-6,764,848,546,995,163,000
39.563636
103
0.719408
false
alexvanboxel/airflow
tests/contrib/operators/ecs_operator.py
8
7382
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-3,861,961,050,139,687,400
34.661836
154
0.586426
false
jamesblunt/sympy
sympy/functions/elementary/hyperbolic.py
4
31649
from __future__ import print_function, division from sympy.core import S, C, sympify, cacheit from sympy.core.function import Function, ArgumentIndexError, _coeff_isneg from sympy.functions.elementary.miscellaneous import sqrt ############################################################################### ##########...
bsd-3-clause
3,424,649,165,119,053,000
27.512613
82
0.498752
false
hansonrobotics/perception
test/test_perception.py
1
7152
#!/usr/bin/env python # Copyright (c) 2013-2018 Hanson Robotics, Ltd. import unittest import os import yaml import roslaunch import rostopic from roslaunch import core from testing_tools.misc import wait_for, wait_for_message from genpy.message import fill_message_args from sensor_msgs.msg import JointState from tf...
lgpl-2.1
4,237,343,632,164,464,000
25.587361
78
0.538171
false
theoryno3/pygr
tests/annotation_hg18_megatest.py
4
63613
import unittest from testlib import testutil, PygrTestProgram import ConfigParser import os import string import sys from pygr.mapping import Collection import pygr.Data try: import hashlib except ImportError: import md5 as hashlib config = ConfigParser.ConfigParser({'testOutputBaseDir': '.', ...
bsd-3-clause
-7,033,982,444,829,748,000
53.603433
79
0.43128
false
codelv/enaml-native
src/enamlnative/android/android_toggle_button.py
1
1623
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on June 7, 2017 @author: jrm """ from atom.api import Typed, set_default from enamlnative.widgets.toggle_button import ProxyToggleButton from .and...
mit
7,497,481,965,918,355,000
30.823529
79
0.563155
false
LeartS/odoo
addons/stock/res_config.py
61
8107
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
268,040,673,932,348,600
58.175182
227
0.658073
false
MyAOSP/external_chromium_org
chrome/test/pyautolib/pyauto.py
27
194924
#!/usr/bin/env python # 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. """PyAuto: Python Interface to Chromium's Automation Proxy. PyAuto uses swig to expose Automation Proxy interfaces to Python. For comp...
bsd-3-clause
-9,217,279,710,303,352,000
34.924069
80
0.638131
false
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/rest_framework/tests/test_renderers.py
6
24350
# -*- coding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal from django.core.cache import cache from django.db import models from django.test import TestCase from django.utils import unittest from django.utils.translation import ugettext_lazy as _ from rest_framework import status, perm...
agpl-3.0
-6,914,239,441,236,495,000
35.554054
119
0.615609
false
HackBulgaria/Odin
courses/views.py
1
4037
from datetime import date from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import HttpResponseForbidden, JsonResponse from django.shortcuts import render, get_object_or_404 from django.conf import settings from django.views.decorators.csrf import csrf_exempt fro...
agpl-3.0
3,710,884,604,885,219,000
36.036697
142
0.707704
false
douban/pygit2
pygit2/settings.py
3
2226
# -*- coding: utf-8 -*- # # Copyright 2010-2014 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public Li...
gpl-2.0
-1,634,622,943,300,288,500
33.78125
70
0.714286
false
midnighteuler/BioBayesGraph
BioBayesGraph/examples/sifter/test_sifter_deaminase.py
1
7202
""" Created on Jul 1, 2012 @author: msouza """ import unittest import os import sys import sifter import FunctionModels.Sifter2 from pprint import pprint class Test_Sifter_Deaminase(unittest.TestCase): """ Tests SIFTER inference and leave one out on a toy family. """ def setUp(self): """ ...
gpl-3.0
3,188,707,304,002,077,700
44.0125
104
0.551513
false
wallrj/kubernetes
hack/boilerplate/boilerplate.py
300
6214
#!/usr/bin/env python # Copyright 2015 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 appli...
apache-2.0
7,935,733,603,627,794,000
30.383838
92
0.620212
false
simonsdave/cloudfeaster-services
cloudfeaster_services/main.py
2
9992
"""This module contains an extensible mainline that's used by all Cloudfeaster services. """ import logging import optparse import signal import sys import time import tor_async_util import tornado.httpclient import tornado.httpserver import tornado.web from cloudfeaster_services import __version__ from config impor...
mit
-3,128,023,357,023,991,000
34.183099
110
0.613991
false
loli10K/linux-hardkernel
scripts/analyze_suspend.py
1537
120394
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
gpl-2.0
-8,384,520,547,530,385,000
32.526594
438
0.621983
false
t794104/ansible
lib/ansible/plugins/doc_fragments/opennebula.py
44
1422
# -*- coding: utf-8 -*- # Copyright: (c) 2018, www.privaz.io Valletech AB # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # OpenNebula common documentation DOCUMENTATION = r''' options: api_url: description: ...
gpl-3.0
-3,508,496,658,931,576,000
33.682927
104
0.616737
false
luizcieslak/AlGDock
Example/test_python.py
2
1452
import AlGDock.BindingPMF_plots import os, shutil, glob for run_type in ['cool','dock','postprocess','free_energies']: self = AlGDock.BindingPMF_plots.BPMF_plots(\ dir_dock='dock', dir_cool='cool',\ ligand_tarball='prmtopcrd/ligand.tar.gz', \ ligand_database='ligand.db', \ forcefield='prmtopcrd/gaff....
mit
3,185,277,841,811,701,000
38.27027
78
0.65978
false
windskyer/nova
nova/api/openstack/compute/hide_server_addresses.py
32
2998
# Copyright 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 requ...
gpl-2.0
-8,157,177,616,009,714,000
33.068182
78
0.638759
false
atsnyder/ITK
Wrapping/Generators/Python/Tests/notYetUsable/itkCurvatureFlowTestPython2.py
11
3693
#========================================================================== # # Copyright Insight Software Consortium # # 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...
apache-2.0
-1,267,843,095,862,747,600
27.851563
78
0.658272
false
GraysonP/codecombat-1
scripts/devSetup/which.py
79
2385
__author__ = 'root' #copied from python3 import os import sys def which(cmd, mode=os.F_OK | os.X_OK, path=None): """Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file. `mode` defaults to os.F_OK | os.X_OK. `path` def...
mit
5,395,724,607,900,488,000
35.151515
80
0.610063
false
writefaruq/lionface-app
django/contrib/gis/gdal/layer.py
12
8701
# Needed ctypes routines from ctypes import c_double, byref # Other GDAL imports. from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope from django.contrib.gis.gdal.error import OGRException, OGRIndexError, SRSException from django.contrib.gis.gdal....
bsd-3-clause
5,899,938,821,575,265,000
39.042453
105
0.614642
false
OptiPop/external_chromium_org
tools/findit/match_set.py
26
4358
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re from threading import Lock import crash_utils REVIEW_URL_PATTERN = re.compile(r'Review URL:( *)(.*?)/(\d+)') class Match(object): """Re...
bsd-3-clause
7,014,609,257,518,531,000
33.587302
77
0.659936
false
alikins/ansible
lib/ansible/modules/cloud/openstack/os_keystone_endpoint.py
25
6710
#!/usr/bin/python # Copyright: (c) 2017, VEXXHOST, Inc. # 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': ['pr...
gpl-3.0
7,279,684,182,225,420,000
29.225225
98
0.58927
false
notsambeck/siftsite
siftsite/skeleton.py
1
3619
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following line in the entry_points section in setup.cfg: console_scripts = fibonacci = siftsite.skeleton:run Then run `python setup.py ins...
mit
-3,538,116,300,525,530,000
27.496063
77
0.623377
false