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
daveti/sarp
run/perf.py
1
1108
#!/usr/bin/python # Perf.py # Accept a file (time.perf) with a number at each line # Compute the min/avg/max/mdev then # Nov 10, 2013 # daveti@cs.uoregon.edu # http://davejingtian.org import sys def readPerfFile(filePath): ''' Read a perf file into a list ''' data = [] try: fnObj = open(filePath, 'r') for l...
gpl-2.0
-8,832,709,386,577,751,000
15.057971
64
0.630866
false
tanmaykm/JuliaBox
engine/src/juliabox/plugins/api_admin/api.py
8
6105
__author__ = 'tan' import os from juliabox.handlers import JBPluginHandler, JBPluginUI from juliabox.jbox_util import JBoxCfg from juliabox.db import JBoxUserV2, JBoxAPISpec, JBoxDBItemNotFound class APIAdminUIModule(JBPluginUI): provides = [JBPluginUI.JBP_UI_CONFIG_SECTION] TEMPLATE_PATH = os.path.dirname(_...
mit
-6,546,364,685,952,526,000
33.693182
105
0.575594
false
Schamnad/cclib
test/data/testvib.py
1
7511
# -*- coding: utf-8 -*- # # Copyright (c) 2016, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Test logfiles with vibration output in cclib""" import os import unittest from skip import skipForParser ...
bsd-3-clause
-7,288,958,256,935,820,000
33.429245
108
0.642524
false
nickbp/bbusb
scripts/bbrss.py
1
3476
#!/usr/bin/python # -*- coding: utf-8 -*- ''' bbrss.py - Prints a single random article from a specified RSS feed Copyright (C) 2009 Nicholas Parker <nickbp@gmail.com> 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 t...
gpl-3.0
-5,275,057,104,576,273,000
34.835052
79
0.662543
false
SerialShadow/SickRage
sickbeard/providers/fnt.py
3
7034
# -*- coding: latin-1 -*- # Author: raver2046 <raver2046@gmail.com> from djoole <bobby.djoole@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
gpl-3.0
6,732,549,903,188,624,000
38.740113
199
0.507819
false
nextgis/nextgisweb_helper_scripts
kml2geojson/kml2geojson.py
1
3989
#!/usr/bin/env python # -*- coding: utf-8 -*- # kml2geojson.py # --------------------------------------------------------- # Convert from KML to GeoJSON and keep colors. Points only yet. # More: https://github.com/nextgis/nextgisweb_helper_scripts # # Usage: # kml2geojson.py [-h] [-c] input output # where: ...
gpl-2.0
8,337,087,196,105,098,000
35.59633
94
0.601404
false
ggravlingen/pytradfri
tests/test_util.py
2
2259
from pytradfri.error import PytradfriError from pytradfri.util import load_json, save_json, BitChoices import shutil import tempfile from os import path import unittest from unittest.mock import patch import json import pytest class UtilTestsBitChoices(unittest.TestCase): def test_bitchoices(self): WEEKDA...
mit
8,701,882,857,752,581,000
32.220588
83
0.625498
false
bunburya/bunbot
plugins/goodreads.py
1
2351
from os.path import join import xml.etree.ElementTree as ET from urllib.request import urlopen from urllib.parse import urlencode class Plugin: SEARCH_URL = 'https://www.goodreads.com/search/index.html?' BOOK_URL = 'https://www.goodreads.com/book/show/' def __init__(self, bot, handler): self.bo...
mit
-1,645,255,331,127,668,700
33.072464
86
0.544875
false
atantet/transferLorenz
plot/plotFloquetVector.py
1
5683
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import pylibconfig2 def field(x, p): rho, sigma, beta = p f = np.array([sigma * (x[1] - x[0]), x[0] * (rho - x[2]) - x[1], x[0] * x[1] - beta * x[2]]) return f def Jacobian(x, p):...
gpl-3.0
-251,475,994,320,488,420
30.572222
78
0.606018
false
ayeowch/bitnodes-hardware
poll.py
1
4396
#!/usr/bin/env python # # Copyright (c) Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the right...
mit
-6,233,792,599,498,255,000
30.4
80
0.664468
false
wangbokun/ec2instances.info
fabfile.py
7
2877
# To use this script you must have the following environment variables set: # AWS_ACCESS_KEY_ID # AWS_SECRET_ACCESS_KEY # as explained in: http://boto.s3.amazonaws.com/s3_tut.html import os import webbrowser import traceback from boto import connect_s3 from boto.s3.connection import OrdinaryCallingFormat from bot...
mit
4,661,005,102,698,009,000
31.325843
83
0.646507
false
DNFcode/edx-platform
lms/djangoapps/courseware/tests/test_tabs.py
5
4364
""" Test cases for tabs. """ from django.core.urlresolvers import reverse from django.http import Http404 from django.test.utils import override_settings from mock import MagicMock, Mock, patch from opaque_keys.edx.locations import SlashSeparatedCourseKey from courseware.courses import get_course_by_id from courseware...
agpl-3.0
4,186,757,118,036,417,000
43.080808
100
0.700046
false
preo/dnspython
dns/rdtypes/ANY/HINFO.py
8
2512
# 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 "...
isc
-4,654,875,766,697,699,000
31.623377
79
0.61664
false
renatopp/liac-arff
docs/source/conf.py
2
7856
# -*- coding: utf-8 -*- # # liac-arff documentation build configuration file, created by # sphinx-quickstart on Wed Feb 12 21:11:24 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
mit
-6,007,727,522,957,781,000
31.46281
80
0.703411
false
StackStorm/st2contrib
archive/packs/rackspace/actions/lib/formatters.py
12
1500
from netaddr import IPAddress __all__ = [ 'to_server_dict', 'to_dns_zone_dict', 'to_dns_record_dict' ] def to_server_dict(server): public_ips = [ip['addr'] for ip in server.addresses['public']] private_ips = [ip['addr'] for ip in server.addresses['private']] # Pick out first public IPv4 and ...
apache-2.0
-5,305,802,822,224,335,000
22.4375
68
0.532667
false
xzturn/tensorflow
tensorflow/python/debug/cli/readline_ui_test.py
7
6843
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-4,536,263,132,437,445,600
33.215
80
0.680842
false
openmips/stbgui
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
4
13947
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.Console import Console from Screens.Standby import TryQuitMainloop from Components.ActionMap import ActionMap, NumberActionMap from Components.Pixmap import Pixmap from Tools.LoadPixmap import LoadPixmap from Components.Label impor...
gpl-2.0
-7,068,509,428,050,927,000
38.176966
291
0.708396
false
ryokbys/nap
fitpot/util/mike/parallel_run_smd.py
1
2292
#!/usr/local/bin/python import os,sys,glob,subprocess usage=""" Usage: python parallel_run_smd.py in.params.NN python parallel_run_smd.py in.params.NN smpl_Mg1 smpl_Mg2 ... """ if len(sys.argv) < 2: print '[Error] Number of arguments was wrong.' print usage sys.exit() elif len(sys.argv) == 2: ...
mit
-4,321,052,109,137,205,000
24.752809
89
0.593368
false
RedHatQE/cfme_tests
cfme/tests/configure/test_logs.py
1
4293
# -*- coding: utf-8 -*- import pytest from cfme.cloud.provider.azure import AzureProvider from cfme.cloud.provider.ec2 import EC2Provider from cfme.infrastructure.provider.rhevm import RHEVMProvider from cfme.infrastructure.provider.scvmm import SCVMMProvider from cfme.utils.blockers import BZ from cfme.utils.wait imp...
gpl-2.0
316,357,081,176,917,200
29.232394
100
0.642674
false
mediafactory/tryton_client_desktop
tryton/gui/window/view_board/parser.py
2
7099
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. 'Parser' import gtk import gettext from tryton.gui.window.view_form.view.form_gtk.parser import _container, VBox import tryton.common as common from action import Action from try...
gpl-3.0
-5,123,612,658,021,064,000
43.093168
79
0.499084
false
simongoffin/website_version
addons/edi/models/edi.py
12
31987
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2014 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
5,419,222,489,371,158,000
51.783828
139
0.557914
false
rhinstaller/anaconda
pyanaconda/modules/boss/module_manager/module_observer.py
6
2634
# # Copyright (C) 2019 Red Hat, Inc. All rights reserved. # # 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. # # This p...
gpl-2.0
6,155,446,154,967,560,000
34.12
73
0.615034
false
m-entrup/EFTEMj
EFTEMj-pyScripts/src/main/resources/scripts/Plugins/EFTEMj/Tools/Gatan_Renamer.py
1
4615
""" @ImagePlus IMP file: Gatan_Renamer.py author: Michael Entrup b. Epping (michael.entrup@wwu.de) version: 20170306 info: A script to rename dm3 files using metadata. """ # pylint: disable-msg=C0103 # pylint: enable-msg=C0103 from __future__ import division # pylint: disable-msg=E0401 from java.l...
bsd-2-clause
5,575,381,343,705,638,000
34.5
84
0.645287
false
paxapy/zulip
zerver/lib/test_fixtures.py
4
4225
# -*- coding: utf-8 -*- import os import re import hashlib from typing import Any, Optional from importlib import import_module from six import text_type from six.moves import cStringIO as StringIO from django.db import connections, DEFAULT_DB_ALIAS from django.db.utils import OperationalError from django.apps import ...
apache-2.0
2,799,866,729,595,887,600
33.631148
104
0.652781
false
ladybug-analysis-tools/honeybee-core
honeybee/radiance/geometry/source.py
3
3444
"""Radiance Source. http://radsite.lbl.gov/radiance/refer/ray.html#Source """ from .geometrybase import RadianceGeometry from ..datatype import RadianceNumber, RadianceTuple class Source(RadianceGeometry): """Radiance Source. A source is not really a surface, but a solid angle. It is used for specifying lig...
gpl-3.0
-2,118,213,671,687,488,000
33.44
88
0.558653
false
matthieuheitz/VesselView
Modules/Scripted/Workflow/Widgets/WorkflowStep.py
4
9259
import imp, sys, os from __main__ import qt, ctk, vtk, slicer from Workflow import * class WorkflowStep( ctk.ctkWorkflowWidgetStep ) : def __init__( self ): self.Observations = [] def createUserInterface( self ): # if the user interface has already be created, quit # \todo: f) have an option to setup...
apache-2.0
-7,871,073,238,978,426,000
34.749035
94
0.692947
false
Arafatk/sympy
sympy/physics/quantum/boson.py
59
6134
"""Bosonic quantum operators.""" from sympy.core.compatibility import u from sympy import Mul, Integer, exp, sqrt, conjugate from sympy.physics.quantum import Operator from sympy.physics.quantum import HilbertSpace, FockSpace, Ket, Bra, IdentityOperator from sympy.functions.special.tensor_functions import KroneckerDel...
bsd-3-clause
-7,905,876,544,738,666,000
23.054902
107
0.573199
false
ChronoMonochrome/android_external_chromium_org
native_client_sdk/src/build_tools/update_nacl_manifest.py
27
34849
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Script that reads omahaproxy and gsutil to determine version of SDK to put in manifest. """ # pylint is convinced the email mod...
bsd-3-clause
-393,354,323,993,834,200
35.799366
80
0.669689
false
Alecto3-D/testable-greeter
bb-master/sandbox/lib/python3.5/site-packages/buildbot/plugins/db.py
5
16093
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
mit
-9,122,794,810,420,944,000
30.867327
79
0.557758
false
UnrememberMe/pants
tests/python/pants_test/backend/jvm/tasks/test_jar_dependency_management_setup.py
4
20871
# coding=utf-8 # Copyright 2016 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.backend.j...
apache-2.0
-4,616,595,992,423,954,000
42.938947
97
0.55637
false
janpipek/physt
physt/compat/dask.py
1
4502
"""Dask-based and dask oriented variants of physt histogram facade functions.""" from typing import TYPE_CHECKING import dask from physt import h1 as original_h1 from physt import histogramdd as original_hdd if TYPE_CHECKING: import dask.array options = {"chunk_split": 16} def _run_dask( *, name: str,...
mit
-448,636,275,839,962,500
29.013333
94
0.61817
false
shparutask/poker-player-wise-kaa-2
player.py
1
2157
import json import requests import sys class Player: VERSION = "Default Python folding player" def rank_request(self, cards): url = "http://rainman.leanpoker.org/rank" myResponse = requests.post(url, data='cards=' + json.dumps(cards)) print(myResponse.status_code) if (myResp...
mit
176,093,094,359,867,000
27.773333
74
0.515994
false
chapmanb/bcbio-nextgen-vm
tests/conftest.py
1
4182
import collections import contextlib from datetime import datetime import io import os import shutil import subprocess import tarfile import pytest import requests import yaml TEST_DIR = '/tmp/bcbio' def test_data_dir(): return os.path.join(os.path.dirname(__file__), "data") def data_dir(): return os.path...
mit
-297,118,055,162,965,900
34.142857
109
0.63056
false
jcrist/pydy
examples/Kane1985/Chapter5/Ex10.6.py
7
1376
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercise 10.6 from Kane 1985.""" from __future__ import division from sympy import symbols from sympy.physics.mechanics import ReferenceFrame, RigidBody, Point from sympy.physics.mechanics import dot, dynamicsymbols, inertia, msprint q1, q2, q3 = dynamicsymbols('q1, q...
bsd-3-clause
-2,349,516,675,173,920,000
30.045455
75
0.644949
false
itucsdb1611/itucsdb1611
classes/operations/information_operations.py
1
2663
import psycopg2 as dbapi2 from classes.model_config import dsn class information_operations: def __init__(self): self.last_key = None def add_information(self, informationCVId, information_type_id, description): with dbapi2.connect(dsn) as connection: cursor = connection.cursor() ...
gpl-3.0
1,730,767,064,806,212,400
49.245283
285
0.612843
false
davidcox/glumpy
demos/solver.py
1
5085
import scipy.weave as weave from scipy.weave import converters """ Real-Time Fluid Dynamics for Games by Jos Stam (2003). Parts of author's work are also protected under U. S. patent #6,266,071 B1 [Patent]. """ def set_bnd(N, b, x): """ We assume that the fluid is contained in a box with solid walls: no flow ...
bsd-3-clause
2,303,759,792,909,406,000
31.388535
78
0.45939
false
argivaitv/argivaitv
plugin.video.SportsDevil/lib/customReplacements.py
10
6368
# -*- coding: utf-8 -*- import os.path import re from string import lower import common import utils.fileUtils as fu from utils.regexUtils import findall class CustomReplacements(object): def __init__(self): self.simpleScheme = {'(@PLATFORM@)': os.environ.get('OS'), '(...
gpl-2.0
1,464,656,541,639,811,800
38.552795
179
0.461683
false
Acidity/PyPermissions
pypermissions/factory.py
1
2758
from pypermissions.permission import Permission class PermissionFactory(object): """General factory for creating permissions. Will select the correct permission type for the provided string and return that.""" def __init__(self, delimiter=".", wildcard="*", prefix="", templates=None): """Allo...
mit
5,641,672,599,840,932,000
40.787879
120
0.65591
false
Beauhurst/django
django/core/management/base.py
16
20294
""" Base classes for writing management commands (named commands which can be executed through ``django-admin`` or ``manage.py``). """ import os import sys from argparse import ArgumentParser from io import TextIOBase import django from django.core import checks from django.core.exceptions import ImproperlyConfigured ...
bsd-3-clause
7,132,677,243,514,835,000
38.102119
114
0.608899
false
Changaco/oh-mainline
vendor/packages/whoosh/src/whoosh/lang/dmetaphone.py
21
18640
# coding= utf-8 # This script implements the Double Metaphone algorythm (c) 1998, 1999 by # Lawrence Philips. It was translated to Python from the C source written by # Kevin Atkinson (http://aspell.net/metaphone/) By Andrew Collins - January 12, # 2007 who claims no rights to this work. # http://atomboy.isa-geek.com:...
agpl-3.0
-4,152,823,970,094,223,400
42.551402
148
0.359227
false
nvoron23/arangodb
3rdParty/V8-4.3.61/tools/try_perf.py
19
1075
#!/usr/bin/env python # Copyright 2014 the V8 project 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 find_depot_tools import sys find_depot_tools.add_depot_tools_to_path() from git_cl import Changelist BOTS = [ 'v8_linux32...
apache-2.0
-827,118,711,520,392,600
23.431818
72
0.676279
false
vladikoff/fxa-mochitest
tests/mozbase/mozdevice/tests/sut_fileMethods.py
3
2481
#!/usr/bin/env python import hashlib import mozdevice import mozlog import shutil import tempfile import unittest from sut import MockAgent class TestFileMethods(unittest.TestCase): """ Class to test misc file methods """ content = "What is the answer to the life, universe and everything? 42" h = hashli...
mpl-2.0
623,408,842,041,311,600
33.458333
96
0.574768
false
harshilasu/LinkurApp
y/google-cloud-sdk/lib/googlecloudsdk/dns/lib/util.py
2
1158
# Copyright 2013 Google Inc. All Rights Reserved. """Common utility functions for the dns tool.""" import json def GetError(error, verbose=False): """Returns a ready-to-print string representation from the http response. Args: error: A string representing the raw json of the Http error response. verbos...
gpl-3.0
-4,674,655,921,802,708,000
27.95
76
0.674439
false
mfraezz/osf.io
api_tests/users/views/test_user_nodes_list.py
4
14721
import pytest from django.utils.timezone import now from api.base.settings.defaults import API_BASE from api_tests.nodes.filters.test_filters import NodesListFilteringMixin, NodesListDateFilteringMixin from osf_tests.factories import ( AuthUserFactory, CollectionFactory, OSFGroupFactory, PreprintFacto...
apache-2.0
-1,142,894,514,728,001,300
34.817518
138
0.615379
false
buildbot/buildbot
master/buildbot/secrets/providers/passwordstore.py
2
2478
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
-4,792,404,961,214,427,000
35.441176
97
0.649314
false
youfoh/webkit-efl
Tools/Scripts/webkitpy/style/checkers/text_unittest.py
18
3671
#!/usr/bin/python # Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of c...
lgpl-2.1
5,091,315,396,920,996,000
38.053191
89
0.684282
false
Learn-Android-app/buck
third-party/py/twitter-commons/src/python/twitter/common/python/interpreter.py
18
13136
""" twitter.common.python support for interpreter environments. """ from __future__ import absolute_import try: from numbers import Integral except ImportError: Integral = (int, long) from collections import defaultdict import os import re import subprocess import sys from .base import maybe_requirement, maybe_r...
apache-2.0
-4,083,062,231,172,067,000
29.337182
99
0.657811
false
lebrice/SimpleParsing
examples/ugly/ugly_example_after.py
1
10566
"""Parameters module.""" import argparse import simple_parsing import os import random # import getpass # import torch # import torch.nn.parallel # import torch.backends.cudnn as cudnn # import torch.utils.data from dataclasses import dataclass, field from typing import * from simple_parsing import choice...
mit
2,088,566,076,051,556,600
43.748918
129
0.616506
false
google/oss-fuzz
infra/cifuzz/filestore/github_actions/__init__.py
1
3437
# Copyright 2021 Google LLC # # 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, ...
apache-2.0
5,008,271,780,587,500,000
40.409639
96
0.71254
false
dmitriz/zipline
tests/utils/test_events.py
1
12988
# # Copyright 2014 Quantopian, 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 wr...
apache-2.0
1,256,628,842,927,454,000
31.069136
78
0.589621
false
benmoran56/FightstickDisplay
pyglet/lib.py
3
12708
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
gpl-3.0
-6,575,638,694,990,342,000
33.912088
139
0.573182
false
pymedusa/SickRage
ext/jwt/__main__.py
13
4162
#!/usr/bin/env python from __future__ import absolute_import, print_function import argparse import json import sys import time from . import DecodeError, __version__, decode, encode def encode_payload(args): # Try to encode if args.key is None: raise ValueError('Key is required when encoding. See ...
gpl-3.0
-6,980,530,937,878,810
23.77381
99
0.582172
false
repotvsupertuga/tvsupertuga.repository
script.vodextende/scrapers/local_scraper.py
7
7621
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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. T...
gpl-2.0
4,173,299,171,746,068,500
51.19863
215
0.594279
false
petrutlucian94/nova
nova/tests/unit/api/openstack/compute/test_plugin_framework.py
46
1306
# Copyright 2014 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 agreed t...
apache-2.0
-5,830,842,402,062,778,000
35.277778
78
0.714395
false
Fireblend/chromium-crosswalk
tools/perf/benchmarks/sunspider.py
6
6151
# 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. import collections import json import os from telemetry import benchmark from telemetry import page as page_module from telemetry.page import page_set from t...
bsd-3-clause
-2,310,679,917,354,462,000
41.130137
80
0.682491
false
aapa/pyfibot
pyfibot/modules/module_rss.py
1
11257
from __future__ import unicode_literals, print_function, division import feedparser import dataset from twisted.internet.reactor import callLater from threading import Thread import twisted.internet.error import logging logger = logging.getLogger('module_rss') DATABASE = None updater = None botref = None config = {} ...
bsd-3-clause
4,514,868,805,792,006,700
31.915205
111
0.574665
false
Ms2ger/presto-testo
wpt/websockets/mod_pywebsocket/handshake/__init__.py
4
3895
# Copyright 2010, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
-8,050,349,000,817,394,000
40
78
0.721951
false
EinsteinsWorkshop/openscad
tests/export_import_pngtest.py
4
5342
#!/usr/bin/env python # Export-import test # # # Usage: <script> <inputfile> --openscad=<executable-path> --format=<format> --require-manifold [<openscad args>] file.png # # # step 1. If the input file is _not_ an .scad file, create a temporary .scad file importing the input file. # step 2. Run OpenSCAD on the .scad f...
gpl-2.0
-2,458,336,742,504,938,500
40.092308
163
0.691127
false
ggreer/django-guardian
guardian/forms.py
85
6401
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext as _ from guardian.shortcuts import assign_perm from guardian.shortcuts import remove_perm from guardian.shortcuts import get_perms from guardian.shortcuts import get_perms_for_model class BaseObjectPermis...
bsd-2-clause
1,494,128,873,302,491,600
31.994845
80
0.618028
false
shsingh/ansible
lib/ansible/module_utils/network/ios/config/static_routes/static_routes.py
2
24560
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The ios_static_routes class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necessary...
gpl-3.0
6,495,762,339,019,188,000
45.165414
127
0.473331
false
JGulic/empathy
tools/make-version-script.py
14
6034
#!/usr/bin/python """Construct a GNU ld or Debian dpkg version-script from a set of RFC822-style symbol lists. Usage: make-version-script.py [--symbols SYMBOLS] [--unreleased-version VER] [--dpkg "LIBRARY.so.0 LIBRARY0 #MINVER#"] [--dpkg-build-depends-package LIBRARY-dev] [FILES...] Each ...
gpl-2.0
3,171,748,179,843,922,400
28.434146
79
0.547895
false
celiafish/VisTrails
vistrails/gui/paramexplore/pe_tab.py
2
17319
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
bsd-3-clause
4,047,246,579,297,903,000
49.938235
184
0.58739
false
bwalks/pymemcache
pymemcache/test/test_integration.py
2
8843
# Copyright 2012 Pinterest.com # -*- 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 ...
apache-2.0
-6,648,300,440,692,477,000
27.947541
78
0.658285
false
KNMI/VERCE
verce-hpc-pe/src/dispel4py/examples/graph_testing/parallel_pipeline.py
4
3516
# Copyright (c) The University of Edinburgh 2014 # # 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 agr...
mit
-4,423,050,062,839,139,000
38.505618
214
0.717577
false
aerwin3/swift
swift/cli/form_signature.py
33
5340
# 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 agreed ...
apache-2.0
3,678,419,794,358,147,000
40.71875
79
0.568539
false
regular/pyglet-avbin-optimizations
pyglet/clock.py
1
34509
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
bsd-3-clause
-591,734,193,958,127,000
33.787298
80
0.598337
false
boada/photometrypipeline
setup/vatt4k.py
2
4155
""" Photometry Pipeline Configuation File for VATT/VATT4k 2017-02-05, mommermiscience@gmail.com """ # Photometry Pipeline # Copyright (C) 2016-2018 Michael Mommert, mommermiscience@gmail.com # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-3.0
2,590,249,210,455,076,000
46.215909
88
0.519134
false
ibmsoe/tensorflow
tensorflow/contrib/distributions/python/ops/deterministic.py
12
13223
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-6,023,606,606,424,454,000
33.524804
80
0.63261
false
frutik/formunculous
formunculous/forms.py
1
12701
# This file is part of formunculous. # # formunculous 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. # # formu...
gpl-3.0
-4,646,825,230,478,952,000
39.193038
141
0.559484
false
gajim/gajim
gajim/common/logging_helpers.py
1
6664
# Copyright (C) 2009 Bruno Tarquini <btarquini AT gmail.com> # # This file is part of Gajim. # # Gajim 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; version 3 only. # # Gajim is distributed in the hope that ...
gpl-3.0
4,624,066,474,891,536,000
27.848485
73
0.594688
false
0x46616c6b/ansible
lib/ansible/modules/files/ini_file.py
10
11036
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # (c) 2015, Ales Nosek <anosek.nosek () 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 ...
gpl-3.0
-6,633,318,924,062,548,000
34.146497
135
0.560982
false
ujfjhz/vnpy
vnpy/trader/gateway/ksotpGateway/ksotpGateway.py
2
67488
# encoding: UTF-8 ''' vn.ksotp的gateway接入 ''' import os import json from vnpy.api.ksotp import MdApi, TdApi, defineDict from vnpy.trader.vtFunction import getTempPath from vnpy.trader.vtGateway import * # 以下为一些VT类型和CTP类型的映射字典 # 价格类型映射 priceTypeMap = {} priceTypeMap[PRICETYPE_LIMITPRICE] = defineDict["KS_OTP_OPT_Lim...
mit
-1,158,835,770,407,496,200
34.239359
110
0.405597
false
ycq90/my_qap
qap/viz/plotting.py
3
9937
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import math import os.path as op import numpy as np import nibabel as nb import pandas as pd import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.gr...
bsd-3-clause
3,455,253,553,791,108,600
29.764706
78
0.565462
false
moble/sympy
sympy/interactive/tests/test_ipythonprinting.py
27
5891
"""Tests that the IPython printing module is properly loaded. """ from sympy.core.compatibility import u from sympy.interactive.session import init_ipython_session from sympy.external import import_module from sympy.utilities.pytest import raises # run_cell was added in IPython 0.11 ipython = import_module("IPython",...
bsd-3-clause
-1,629,738,584,008,438,500
45.385827
102
0.607028
false
quanganh2627/fMBT
utils/fmbtuinput.py
2
41533
# fMBT, free Model Based Testing tool # 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 Lesser General Public License, # version 2.1, as published by the Free Software Foundation. # # This program is distribut...
lgpl-2.1
-7,900,114,834,811,422,000
32.440419
83
0.48376
false
skywalka/splunk-for-nagios
bin/liveserviceokstatus.py
1
1878
# Script to request services with OK status and total services by accessing MK Livestatus # Required field to be passed to this script from Splunk: n/a import socket,string,sys,re,splunk.Intersplunk,mklivestatus results = [] try: results,dummyresults,settings = splunk.Intersplunk.getOrganizedResults() for r...
gpl-3.0
-7,778,708,250,402,182,000
32.535714
93
0.636315
false
cernops/neutron
neutron/tests/unit/midonet/mock_lib.py
11
8658
# Copyright (C) 2013 Midokura PTE LTD # 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...
apache-2.0
-6,933,128,995,830,897,000
32.172414
79
0.58651
false
matteoalessiocarrara/lib-figafind
src/lib/fbfilter/src/lib/htmlfbapi/src/lib/fbwrapper/src/lib/bot_virtualbrowser/src/lib/human/src/virtualbrowser_obj.py
6
8091
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016 Matteo Alessio Carrara <sw.matteoac@gmail.com> # # 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 Lice...
gpl-3.0
-661,679,853,957,830,900
29.91954
79
0.71425
false
yarbelk/pgu
pgu/gui/widget.py
1
11433
"""This modules defines the Widget class, which is the base of the PGU widget hierarchy.""" import pygame from . import pguglobals from . import style from .errors import PguError class SignalCallback(object): # The function to call func = None # The parameters to pass to the function (as a list) par...
lgpl-2.1
-5,533,679,612,545,960,000
31.480114
92
0.560308
false
stanta/darfchain
darfchain_docker/bigchaindb/common/schema/__init__.py
3
2870
""" Schema validation related functions and data """ import os.path import logging import jsonschema import yaml import rapidjson import rapidjson_schema from bigchaindb.common.exceptions import SchemaValidationError logger = logging.getLogger(__name__) def drop_schema_descriptions(node): """ Drop description...
gpl-3.0
6,655,123,799,264,698,000
32.764706
110
0.689895
false
NovaSyst/chocolate
chocolate/space.py
1
36188
"""This module provides common building blocks to define a search space. Search spaces are defined using dictionaries, where the keys are the parameter names and the values their distribution. For example, defining a two parameter search space is done as follow :: space = {"x": uniform(-5, 5), "y": q...
bsd-3-clause
7,803,660,800,139,668,000
37.621131
120
0.52219
false
shekkizh/WassersteinGAN.tensorflow
Dataset_Reader/read_celebADataset.py
1
3200
__author__ = 'charlie' import numpy as np import os, sys, inspect import random from six.moves import cPickle as pickle from tensorflow.python.platform import gfile import glob utils_path = os.path.abspath( os.path.realpath(os.path.join(os.path.split(inspect.getfile(inspect.currentframe()))[0], ".."))) if utils_pa...
mit
5,706,518,505,224,522,000
34.555556
106
0.644688
false
broferek/ansible
lib/ansible/modules/network/icx/icx_lldp.py
19
5318
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
3,230,196,780,891,398,700
27.902174
127
0.604739
false
mantidproject/mantid
Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PolDiffILLReductionTest.py
3
7295
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
gpl-3.0
-7,090,283,701,678,494,000
55.550388
122
0.644277
false
Unidata/netcdf4-python
test/tst_compression.py
1
5024
from numpy.random.mtrand import uniform from netCDF4 import Dataset from netCDF4.utils import _quantize from numpy.testing import assert_almost_equal import os, tempfile, unittest ndim = 100000 ndim2 = 100 chunk1 = 10; chunk2 = ndim2 nfiles = 7 files = [tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name for ...
mit
3,729,668,542,138,617,300
41.940171
114
0.648686
false
thaim/ansible
lib/ansible/plugins/cliconf/edgeswitch.py
31
4643
# # (c) 2018 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...
mit
8,739,103,710,368,553,000
31.697183
136
0.626104
false
spcui/tp-qemu
qemu/tests/timedrift_check_with_syscall.py
3
1688
import os import logging from autotest.client.shared import error from virttest import aexpect from virttest import data_dir @error.context_aware def run(test, params, env): """ Time clock offset check test (only for Linux guest): 1) boot guest with '-rtc base=utc,clock=host,driftfix=slew' 2) build b...
gpl-2.0
-5,827,452,009,124,347,000
34.166667
72
0.659953
false
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/openstackclient/tests/common/test_commandmanager.py
2
3460
# Copyright 2012-2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
mit
5,924,673,340,771,548,000
31.952381
77
0.631792
false
alaski/nova
nova/tests/unit/virt/xenapi/image/test_vdi_through_dev.py
3
6926
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
6,704,188,136,323,142,000
36.846995
78
0.644528
false
jhuttner/dx-toolkit
src/python/dxpy/bindings/download_all_inputs.py
1
7615
# Copyright (C) 2014-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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.a...
apache-2.0
1,200,526,464,182,079,200
37.266332
99
0.653447
false
meejah/crossbarexamples
iotcookbook/device/edison/tutorial/tutorial2/bridge.py
3
2971
import sys import mraa from twisted.internet.defer import inlineCallbacks from twisted.internet.task import LoopingCall from autobahn.twisted.wamp import ApplicationSession from autobahn import wamp # adjust this for your setup: LED1_PIN = 11 # O0 (used as digital) on Arduino Tinkershield BTN1_PIN = 14 # I0 (used ...
apache-2.0
-1,817,776,500,002,434,600
27.295238
74
0.556378
false
CrystallineEntity/bulbs
bulbs/components/reply.py
2
1065
from slugify import slugify from bulbs.components import db from bulbs.components.post import format_post def reply_to_topic(subject, content, topic_id, ip, username): """Creates a reply in the specified topic.""" formatted_post = format_post(content) cursor = db.con.cursor() cursor.execute("SELECT ...
mit
-2,187,456,846,092,222,000
29.457143
110
0.589671
false
jserv/codezero
scripts/kernel/generate_kernel_cinfo.py
3
6239
#! /usr/bin/env python2.7 # -*- mode: python; coding: utf-8; -*- # # Codezero -- a microkernel for embedded systems. # # Copyright © 2009 B Labs Ltd # import os, sys, shelve, glob from os.path import join from string import Template PROJRELROOT = '../..' sys.path.append(os.path.abspath(os.path.join(os.path.dirname(...
gpl-3.0
-7,498,331,285,217,517,000
29.429268
105
0.584162
false
ptitdoc/Archive-qubes-core
dom0/qvm-core/qubes.py
1
117287
#!/usr/bin/python2 # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2010 Joanna Rutkowska <joanna@invisiblethingslab.com> # # 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; ei...
gpl-2.0
6,587,904,509,160,187,000
36.293164
222
0.560292
false
SimenB/thefuck
tests/rules/test_yarn_command_replaced.py
5
1026
import pytest from thefuck.types import Command from thefuck.rules.yarn_command_replaced import match, get_new_command output = ('error `install` has been replaced with `add` to add new ' 'dependencies. Run "yarn add {}" instead.').format @pytest.mark.parametrize('command', [ Command('yarn install red...
mit
-5,044,299,526,262,103,000
31.0625
70
0.680312
false
altf4/cpu-level-11
Tactics/infinite.py
1
6247
import melee import Chains from melee.enums import Action from Tactics.tactic import Tactic from Chains.smashattack import SMASH_DIRECTION from Tactics.punish import Punish from melee.enums import Character class Infinite(Tactic): def __init__(self, logger, controller, framedata, difficulty): Tactic.__init...
gpl-3.0
-267,456,652,151,708,000
42.685315
124
0.622859
false
HieronymusCH/RedNotebook
win/cross-compile-exe.py
2
1801
#! /usr/bin/env python import argparse import logging import os import shutil import sys from utils import run logging.basicConfig(level=logging.INFO) def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('wine_tarball') parser.add_argument('build_dir') return parser.parse_args() ...
gpl-2.0
8,815,186,155,191,652,000
32.351852
77
0.686841
false
alangenfeld/cloud-nfs
pyCloud/cloudnfs.py
1
3369
import boto import os import tempfile import pickle #bucketName = "cloudnfs" bucketName = "cs699wisc_samanas" def download(srcName, dstName) : "Download the files." src_uri = boto.storage_uri(bucketName + "/" + srcName, "gs") dst_uri = boto.storage_uri(dstName, "file") "Append the object name to ...
lgpl-3.0
-6,613,355,761,184,902,000
28.814159
81
0.627189
false
whn09/tensorflow
tensorflow/python/util/nest_test.py
34
14870
# 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
-609,341,527,215,267,500
43.520958
80
0.637929
false
nitzmahone/ansible
lib/ansible/modules/network/f5/bigiq_application_fastl4_udp.py
8
21580
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks 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', ...
gpl-3.0
2,328,987,658,050,901,000
30.457726
146
0.582762
false