repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
xmendez/wfuzz
src/wfuzz/plugins/iterators/iterations.py
1
2348
from wfuzz.externals.moduleman.plugin import moduleman_plugin from wfuzz.dictionaries import BaseIterator import itertools from functools import reduce from builtins import zip as builtinzip @moduleman_plugin class zip(BaseIterator): name = "zip" author = ("Xavi Mendez (@xmendez)",) version = "0.1" ...
gpl-2.0
2,810,538,965,305,001,500
22.717172
177
0.598382
false
atilag/qiskit-sdk-py
qiskit/extensions/standard/cu3.py
1
2732
# -*- coding: utf-8 -*- # Copyright 2017 IBM RESEARCH. 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
-1,422,202,652,029,573,600
34.480519
92
0.591874
false
aspiers/migrationpaths
src/demo.py
1
1177
#!/usr/bin/python import unittest import sys import random import time import traceback import testcases from vmpoolstate import VMPoolState from dijkstra import VMPoolShortestPathFinder from aspiers import VMPoolAdamPathFinder STRATEGY = VMPoolAdamPathFinder clear = True sleep = 0.2 start_sleep = 1.0 end_sleep = 2...
apache-2.0
-7,960,667,546,607,489,000
24.042553
79
0.674596
false
jgrelet/datagui
python/olga/plot3D_apex_profile.py
1
8683
#!/usr/bin/env python # -*- coding: utf-8 -*- from numpy import arange, dtype # array module from http:/ #from matplotlib.toolkits.basemap import Basemap, shiftgrid from mpl_toolkits.basemap import Basemap, shiftgrid from pylab import * import matplotlib.colors as colors from optparse import OptionParser import sys, o...
gpl-2.0
-8,929,339,537,796,756,000
33.871486
132
0.549119
false
Lao-liu/mist.io
bootstrap.py
1
6576
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
agpl-3.0
-4,476,784,174,497,188,000
33.429319
79
0.620742
false
cmsdaq/hltd
lib/elasticsearch-py-7.0.0/elasticsearch/client/cluster.py
2
8629
from .utils import NamespacedClient, query_params, _make_path class ClusterClient(NamespacedClient): @query_params('level', 'local', 'master_timeout', 'timeout', 'wait_for_active_shards', 'wait_for_events', 'wait_for_no_relocating_shards', 'wait_for_nodes', 'wait_for_status', 'wait_for_no_i...
lgpl-3.0
4,016,461,996,434,603,500
49.758824
107
0.651756
false
hknyldz/pisitools
pisilinux/pisilinux/cli/addrepo.py
1
2773
# -*- coding:utf-8 -*- # # Copyright (C) 2005-2011, TUBITAK/UEKAE # # 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-3.0
-5,695,955,514,989,681,000
35.012987
155
0.59322
false
lama7/blogtool
setup.py
1
2131
import re import os from setuptools import setup m = re.search("^__version__ = [\"](.*?)[\"]", open("blogtool/__version__.py").read()) if m: version_str = m.group(1) else: raise RuntimeError("Unable to find version string in blogtool/__version__.py") long_description = \ ''' This is an XMLRPC client for Word...
mit
695,318,824,113,598,800
38.462963
107
0.651337
false
maxamillion/anaconda
pyanaconda/nm.py
1
42353
# Network configuration proxy to NetworkManager # # Copyright (C) 2013 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 pr...
gpl-2.0
1,601,227,311,295,398,400
35.354506
136
0.612212
false
willu47/SALib
src/SALib/sample/ff.py
1
3970
"""The sampling implementation of fractional factorial method This implementation is based on the formulation put forward in [`Saltelli et al. 2008 <http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470059974.html>`_] """ from scipy.linalg import hadamard import numpy as np from . import common_args from ..util im...
mit
8,591,350,726,541,655,000
25.644295
98
0.632242
false
kernsuite-debian/lofar
CEP/Pipeline/recipes/sip/nodes/deprecated/make_flaggable.py
1
1744
# LOFAR IMAGING PIPELINE # # make_flaggable node # John Swinbank, 2010 # swinbank@transientsk...
gpl-3.0
-2,573,417,393,640,024,600
37.755556
81
0.456995
false
fparrel/vigicrues_tools
arpapiemonte_get_stations.py
1
1952
#!/usr/bin/env python import requests import re import json import utm from riverfromdb import findRiver from arpapiemonte_scrap import getData def main(): url = 'http://www.arpa.piemonte.it/rischinaturali/tematismi/meteo/osservazioni/rete-meteoidrografica/rete-meteo-idrografica.html' print(url) r = reque...
gpl-3.0
2,174,984,070,384,979,200
42.377778
330
0.57582
false
indautgrp/frappe
frappe/auth.py
1
9613
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import datetime from frappe import _ import frappe import frappe.database import frappe.utils from frappe.utils import cint import frappe.utils.user from frappe import conf from ...
mit
-2,437,479,313,879,011,300
29.51746
123
0.699157
false
wavefrontHQ/python-client
test/test_conversion.py
1
1248
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
apache-2.0
-7,151,870,891,438,198,000
30.2
409
0.711538
false
raphael-ritz/pcp.rctsync
src/pcp/rctsync/people.py
1
7060
# # content.py # # script to be invoked via # # cd <your-buildout-root-dir> # bin/instance run src/pcp.rctsync/src/pcp/rctsync/people.py # # run with --help to see available options # This is very specific as it includes the logic according # to which the rct.contactdata and auth.user models of the # RCT are merged...
gpl-2.0
-4,039,270,963,373,974,500
31.837209
88
0.548159
false
vcorreze/agendaEteAccoord
agenda/events/utils.py
1
1537
# -*- encoding:utf-8 -*- # # Copyright (C) 2014 Mathieu Leduc-Hamel # # Author: Mathieu Leduc-Hamel <mlhamel@mlhamel.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version ...
agpl-3.0
9,189,140,526,032,994,000
34.744186
75
0.728692
false
Azure/azure-sdk-for-python
sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sql_vulnerability_assessment_scans_operations.py
1
7289
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
1,081,860,725,131,508,200
42.130178
139
0.643847
false
abstractfactory/about
about/view.py
1
1063
import pigui.pyqt5.widgets.list.view import pigui.pyqt5.widgets.miller.view import about.editor import about.delegate DefaultList = pigui.pyqt5.widgets.list.view.DefaultList def create_delegate(self, index): typ = self.model.data(index, 'type') if typ == 'editor': suffix = self.model.data(index, '...
gpl-3.0
-2,889,435,786,129,156,600
27.72973
75
0.664158
false
paradiseOffice/sandbox_API_v1.0
paradise_office_site/sandbox_v1.0/cygnet_maker/cy_tests/test_datetime.py
1
2485
#!/usr/bin/python3.3 import unittest import sys sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation") from datetime import datetime from date_time import DateTime class DateTimeTestCase(unittest.TestCase): ''' Tests with numbered degrees of bad...
gpl-2.0
-121,189,576,839,802,240
32.567568
125
0.684783
false
rhyolight/nupic.son
app/soc/models/user_submission.py
1
2250
#!/usr/bin/env python # # Copyright 2012 the Melange 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 applicabl...
apache-2.0
3,886,167,252,127,120,400
33.090909
74
0.742222
false
snawara/TensorKart
play.py
1
2737
#!/usr/bin/env python from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from utils import take_screenshot, prepare_image from utils import XboxController import tensorflow as tf import model from termcolor import cprint import numpy as np PORT_NUMBER = 8082 # Start session sess = tf.InteractiveSession() ...
mit
-8,154,409,334,428,485,000
28.430108
84
0.578005
false
parenthetical-e/wheelerdata
preprocess/archive/rfroinii_butterfly.py
1
6278
"""Apply the mask to the nifiti data Usage: rfroinii_butterfly roifile """ import re import os import sys import nibabel as nb from roi.pre import join_time from fmrilearn.load import load_roifile from fmrilearn.preprocess.nii import findallnii from fmrilearn.preprocess.nii import masknii def create(args): """C...
bsd-2-clause
-4,911,462,401,619,603,000
29.038278
77
0.562918
false
knightmare2600/d4rkc0de
misc/subcollect2.py
1
1433
#!usr/bin/python #Sub-domain collector from ip range #that also can check for an open port. #http://www.darkc0de.com #d3hydr8[at]gmail[dot]com import sys, socket def pcheck(ip): try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(7) s.connect((ip, int(sys.argv[2]))) s.close() return "...
gpl-2.0
4,666,838,853,680,910,000
22.491803
89
0.609211
false
jamespcole/home-assistant
homeassistant/components/aws_lambda/notify.py
1
3084
""" AWS Lambda platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.aws_lambda/ """ import base64 import json import logging import voluptuous as vol from homeassistant.const import CONF_NAME, CONF_PLATFORM import homeas...
apache-2.0
-8,705,729,846,774,483,000
31.808511
79
0.672179
false
lizardsystem/lizard-efcis
lizard_efcis/migrations/0053_auto_20150706_1209.py
1
6380
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('lizard_efcis', '0052_opname_validation_state'), ] operations = [ migrations.AddField( model_name='locatie', ...
gpl-3.0
-9,061,670,086,687,710,000
36.529412
168
0.560502
false
fondazionebordoni/nemesys-speedtest
mist/httpclient.py
1
6868
# httpclient.py # -*- coding: utf-8 -*- # Copyright (c) 2016 Fondazione Ugo Bordoni. # # 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 ...
gpl-3.0
-553,235,379,383,307,800
33.686869
103
0.524316
false
EduPepperPDTesting/pepper2013-testing
lms/djangoapps/reportlab/graphics/widgets/signsandsymbols.py
1
31156
#Copyright ReportLab Europe Ltd. 2000-2016 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgets/signsandsymbols.py # signsandsymbols.py # A collection of new widgets # author: John Precedo (johnp@reportlab.com) __version__...
agpl-3.0
-245,828,136,364,395,300
31.393355
181
0.49586
false
harej/requestoid
migrations/0001_initial.py
1
3883
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-07 02:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateMode...
mit
-5,993,102,307,791,974,000
36.699029
68
0.475921
false
wirrja/rcc
rcc.py
1
5949
#!/usr/bin/env python """RCC router copy config""" import os import hashlib from datetime import datetime from telnetlib import Telnet from device_settings import cisco, huawei, juniper # remove after tests #from CONFIGCISCO import TEXT class Device: """It is work like an Expect scripts: - connect to a networ...
apache-2.0
-2,266,731,811,722,240,000
37.882353
79
0.500925
false
mrgreenh/latipics
latipics.py
1
6273
#! /usr/bin/env python # """Latipics gathers pictures taken at a particular venue using FOursquare and Instagram""" __author__ = "Carlo Andrea Conte" __copyright__ = "Copyright 2013, Mahaya, inc." __email__ = "carloandreaconte@icloud.com" import json import urllib import sys import argparse import time i...
mit
-8,724,275,562,683,075,000
41.385135
245
0.619161
false
gotcha/testcounter
counterpartylib/lib/messages/rps.py
1
16702
#! /usr/bin/python3 """ Transaction 1: rps (Open the game) source: address used to play the game wager: amount to bet move_random_hash: sha256(sha256(move + random)) (stored as bytes, 16 bytes random) possible_moves: arbitrary odd number >= 3 expiration: how many blocks the game is valid Matching conditions: - tx0_po...
mit
3,516,279,704,785,897,500
39.926471
164
0.568272
false
ORGAN-IZE/register
cobrand/models.py
1
1439
from __future__ import unicode_literals import logging import django.db.models import django.core.cache import django.template.defaultfilters import django.urls import shortuuidfield logger = logging.getLogger(__name__) class CobrandCompany(django.db.models.Model): created_on = django.db.models.DateTimeField...
gpl-3.0
5,350,701,609,548,746,000
30.977778
101
0.706741
false
quantumlib/OpenFermion
src/openfermion/circuits/gates/four_qubit_gates.py
1
5215
# 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 # distribu...
apache-2.0
-5,987,235,680,898,713,000
35.640845
79
0.557563
false
kpounot/nPDyn
nPDyn/dataManipulation/binData.py
1
2855
import numpy as np def binData(data, binS, axis): """This method takes a dataset, and return the binned one. This cannot be used with FWS data processed from hdf5 files with axis being set to 'energies'. Parameters ---------- data : :class:`BaseType` or any nPDyn dataType d...
gpl-3.0
810,630,753,264,639,000
31.988095
79
0.496322
false
brianjimenez/lightdock
bin/simulation/docking_multiprocessing.py
1
7250
"""LightDock simulation using the multiprocessing library for parallelization""" import os import importlib import glob from lightdock.util.logger import LoggingManager from lightdock.util.parser import CommandLineParser from lightdock.prep.simulation import get_setup_from_file, create_simulation_info_file, read_inpu...
gpl-3.0
7,581,858,135,633,761,000
41.899408
111
0.643724
false
deepmind/pycolab
pycolab/human_ui.py
1
21762
# Copyright 2017 the pycolab 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
8,519,199,042,961,534,000
46.00216
80
0.682015
false
spuriousdata/logrok
logrok/lexer.py
1
2128
import ast from ply import lex from util import sqlerror DEBUG = False _keywords = { 'select':'SELECT', 'from':'FROM', 'where':'WHERE', 'between':'BETWEEN', 'group':'GROUP', 'order':'ORDER', 'by' : 'BY', 'as' : 'AS', 'limit':'LIMIT', 'and':'AND', 'or' : 'OR', 'in' : '...
mit
7,110,200,789,994,899,000
17.831858
49
0.431391
false
cagatayyildiz/boun-sim
monitor/monitor/monitor.py
1
11384
''' This study is a Bogazici University - NETAS Nova V-Gate collaboration and funded by TEYDEB project "Realization of Anomaly Detection and Prevention with Learning System Architectures, Quality Improvement, High Rate Service Availability and Rich Services in a VoIP Firewall Product'', by the Scientific and Technolog...
gpl-2.0
-3,021,538,105,685,403,600
37.329966
357
0.60383
false
JElchison/Numberjack
examples/CostasArray.py
1
1446
from Numberjack import * # Costas Array # The costas array problem is to place N points on an N * N board such that each # row and column contains only one point, and the pairwise distances between # points is also distinct. i.e. such that each row of the triangular distance # matrix constains no repeat distances. ...
lgpl-2.1
-7,560,668,622,952,578,000
25.777778
102
0.613416
false
Wyn10/Cnchi
cnchi/misc/run_cmd.py
1
6979
#!/usr/bin/env python # -*- coding: utf-8 -*- # # run_cmd.py # # Copyright © 2013-2016 Antergos # # This file is part of Cnchi. # # Cnchi 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
-1,333,705,286,327,367,400
30.718182
88
0.603898
false
lewer/gensim
gensim/corpora/textcorpus.py
1
4453
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Text corpora usually reside on disk, as text files in one format or another In a common scenario, we need to build a dictionary (a `word->integer id` mapping), which is then used to construct ...
gpl-3.0
-5,281,603,622,493,017,000
36.108333
90
0.678419
false
ideascf/data-packer
example/demo/demo_multi.py
1
3223
# coding=utf-8 """ 复合字段的样例 """ from __future__ import print_function from data_packer import OptionalField from data_packer import SelectorField, CompositedField from data_packer import err, container from common import demo_run #### 多选字段 #### # 最多选一个字段 fields = [ SelectorField( fields = [ Op...
mit
-4,620,189,268,463,111,000
23.752066
66
0.512187
false
tknapstad/dontpanic-web
server/dontpanic.py
1
1221
import bottle from bottle import route, get, post, request, run, template, static_file, error from pprint import pprint bottle.debug(True) # Static Routes @get("/css/<filepath:re:.*\.css>") def css(filepath): return static_file(filepath, root="../client/static/css") @get("/font/<filepath:re:.*\.(eot|otf|svg|ttf...
mit
506,814,045,385,529,100
25.543478
79
0.670762
false
hlef/juliet
juliet/__init__.py
1
11017
import shutil, zipfile, argparse, yaml, logging, os, slugify, datetime, dateutil.parser, sys from juliet import configurator, loader, paths, defaults, version from juliet.builder import Builder from pkg_resources import resource_filename from string import Template def main(): """ Parse command line arguments and ...
mit
6,442,184,514,949,640,000
37.38676
107
0.625851
false
njncalub/pct-infosys
teacher_profiling/models.py
1
2119
import datetime from django.db import models from django.core.exceptions import ValidationError from django.utils.timezone import utc from django.utils.translation import ugettext_lazy as _ SEX_CHOICES = ( ('M', 'Male'), ('F', 'Female'), ) optional = { 'blank': True, 'null': True, } class Teacher(...
mit
721,376,669,592,421,400
34.316667
95
0.571968
false
akintolga/superdesk-core
superdesk/macros/rename_genre_value.py
1
1638
# -*- 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 import superd...
agpl-3.0
5,965,733,107,124,036,000
32.428571
98
0.56044
false
JT5D/Alfred-Popclip-Sublime
Sublime Text 2/Nettuts+ Fetch/fetch/commands/fetch_get_command.py
1
2208
import sublime import sublime_plugin import threading from ..downloader import Downloader class FetchNewFileCommand(sublime_plugin.TextCommand): def run(self, edit, txt): for sel in self.view.sel(): self.view.replace(edit, sel, txt) class FetchGetCommand(sublime_plugin.TextCommand): resu...
gpl-2.0
722,803,591,706,180,200
29.246575
76
0.539402
false
veikman/cbg
cbg/misc.py
1
4160
# -*- coding: utf-8 -*- '''Miscellania.''' # This file is part of CBG. # # CBG 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. # # CBG...
gpl-3.0
-2,510,519,582,472,518,700
26.006494
79
0.605915
false
joshuamckenty/yolo-octo-wookie
nova/compute/network.py
1
22177
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
-7,904,641,391,657,892,000
36.715986
95
0.605988
false
atmtools/typhon
typhon/geodesy.py
1
35158
# -*- coding: utf-8 -*- """Functions for handling geographical coordinate systems and reference ellipsoids. Unless otherwise stated functions are ported from atmlab-2-3-181. """ import numpy as np from typhon import constants __all__ = [ 'ellipsoidmodels', 'ellipsoid_r_geodetic', 'ellipsoid_r_geocentri...
mit
-4,276,321,986,453,133,300
30.135518
79
0.587847
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/troubleshooting_result_py3.py
1
1603
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
7,211,548,836,779,730,000
38.097561
106
0.601996
false
Azure/azure-sdk-for-python
sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/operations/_peering_management_client_operations.py
1
4352
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
6,567,651,109,831,964,000
52.728395
170
0.680607
false
HPPTECH/hpp_IOSTressTest
Refer/IOST_OLD_SRC/IOST_0.08/IOST_LoadConfigFileDialog.py
1
2106
#!/usr/bin/python #====================================================================== # # Project : hpp_IOStressTest # File : IOST_LoadConfigFileDialog.py # Version : 1.01 # Date : Sep 21, 2016 # Author : HuuHoang Nguyen # Contact : hhnguyen@apm.com # : hoangnh.hpp@gmail.com # License : MIT...
mit
6,655,062,542,834,206,000
35.310345
145
0.660494
false
CGATOxford/Optic
scripts/mysql_clone_database.py
1
3782
''' mysql_clone_database.py - clone a mysql database ================================================ :Author: Andreas Heger :Release: $Id$ :Date: |today| :Tags: Python Purpose ------- This script clones a mysql database. Usage ----- Example:: python mysql_clone_database.py src dest will clone the database ``...
mit
-6,598,696,197,029,424,000
22.6375
126
0.561608
false
asorici/cq3
framework/automated_tests/scripts/create_reports_one_on_one.py
1
7140
#!/usr/bin/python import sys, os, string, time ROOT = os.path.abspath(os.getcwd() + "/../") SCRIPTS = ROOT + "/scripts" RESULTS_DUMP_FILE_PREFIX = "result_dump_one_on_one" # RESULTS_DUMP_FILE = ROOT + "/result_dump.txt" TEAM_REPORT_TEMPLATE = SCRIPTS + "/report_tex_q.tpl" ## TODO: get it from sysargs GROUP_FOLDER ...
lgpl-3.0
648,887,332,694,937,200
34.7
98
0.529832
false
p5a0u9l/clamm
clamm/streams/to_tracks.py
1
12884
""" streams module contains classes, programs, tools for creating and processing audio streams. """ import os import wave from glob import glob import sys import matplotlib.pyplot as plt from tqdm import trange import numpy as np import taglib from nltk import distance import itunespy from clamm import config from c...
mit
8,724,370,438,111,671,000
29.386792
79
0.574511
false
crawfordsm/pyspectrograph
docs/conf.py
2
6849
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # # Astropy documentation build configuration file. # # 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 file. # # All configurati...
bsd-3-clause
5,358,262,673,382,442,000
36.839779
88
0.68594
false
squeaky-pl/pystacia
pystacia/tests/lazyenum_tests.py
1
2388
# coding: utf-8 # pystacia/tests/lazyenum_tests.py # Copyright (C) 2011-2012 by Paweł Piotr Przeradowski # This module is part of Pystacia and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from pystacia.tests.common import TestCase class Enum(TestCase): def name_test(s...
mit
4,409,767,766,065,027,000
33.1
76
0.621701
false
taedori81/shoop
shoop_tests/xtheme/test_layout.py
1
4451
# -*- coding: utf-8 -*- import six from shoop.xtheme.layout import Layout, LayoutCell from shoop.xtheme.plugins.text import TextPlugin from shoop.xtheme.rendering import get_view_config, render_placeholder from shoop.xtheme.theme import override_current_theme_class from shoop_tests.utils import printable_gibberish fro...
agpl-3.0
7,295,683,358,232,774,000
34.325397
89
0.60009
false
Craig-PT/pywrds
pywrds/__init__.py
1
1077
""" For detailed usage instructions, see the readme.txt file included with the pywrds distribution. For the reading-averse, do the following: The first time you run pywrds, put your WRDS username and institution in quotes in the user_info.txt file. Then set up a key-based login with the WRDS server by running: p...
bsd-3-clause
-474,903,151,053,090,100
32.6875
100
0.755803
false
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractItsametranslationWordpressCom.py
1
1125
def extractItsametranslationWordpressCom(item): ''' Parser for 'itsametranslation.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('person with an inferior ability', 'person w...
bsd-3-clause
3,368,592,728,654,373,400
45.916667
158
0.625778
false
breunigs/livestreamer
src/livestreamer/session.py
1
4803
import imp import pkgutil import sys import traceback from . import plugins, __version__ from .compat import urlparse, is_win32 from .exceptions import NoPluginError from .logger import Logger from .options import Options def print_small_exception(start_after): type, value, traceback_ = sys.exc_info() tb = ...
bsd-2-clause
9,102,432,398,218,744,000
25.103261
71
0.576931
false
twitter/heron
heron/instance/tests/python/network/heron_client_unittest.py
2
3261
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apach...
apache-2.0
8,702,622,302,691,325,000
39.259259
96
0.74241
false
kervinck/floyd
Tools/epdtest.py
1
3246
import chessmoves # Source: https://github.com/kervinck/chessmoves.git import floyd as engine import multiprocessing import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) if len(line) < 5: line.append('') ...
bsd-2-clause
8,993,348,846,672,359,000
39.575
118
0.499692
false
gbarandiaran/ticksys
Ticketing_System/Ticketing_System/middleware.py
1
1325
from django.conf import settings from django.shortcuts import redirect import re from django.contrib.auth import logout from django.urls import reverse from ticksys import views EXEMPT_URLS = [re.compile(settings.LOGIN_URL.lstrip('/'))] if hasattr(settings, 'LOGIN_EXEMPT_URLS'): EXEMPT_URLS += [re.compile(url) for...
apache-2.0
7,775,867,741,623,357,000
32.15
74
0.653585
false
stankovski/AutoRest
ClientRuntimes/Python/msrest/msrest/pipeline.py
1
15181
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""),...
mit
-1,016,324,618,996,828,700
33.341629
78
0.608011
false
Kriechi/mitmproxy
mitmproxy/addons/save.py
1
3690
import os.path import typing from mitmproxy import command from mitmproxy import exceptions from mitmproxy import flowfilter from mitmproxy import io from mitmproxy import ctx from mitmproxy import flow import mitmproxy.types class Save: def __init__(self): self.stream = None self.filt = None ...
mit
-884,787,461,752,193,800
29.495868
91
0.565854
false
protocol7/python-koans
python 2/koans/about_none.py
1
1497
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(True, isinstance(None, object)) def test_none_is_universal(self)...
mit
-3,437,634,541,413,859,300
31.543478
117
0.602538
false
mlavin/video-examples
domainchecks/tests/factories.py
1
3362
import random import string from django.contrib.auth import get_user_model from django.utils.timezone import now from .. import models def create_user(**kwargs): """Create sample user.""" username = ''.join(random.choice(string.ascii_letters) for x in range(30)) values = { 'username': username, ...
bsd-2-clause
-5,285,568,094,331,578,000
30.716981
85
0.555027
false
rsouflaki/Python_SeaBattle
TestBoard.py
1
1554
import unittest from SeaBattle import Position, User, Utils class TestBoard(unittest.TestCase): def setUp(self): pass def testPositive(self): self.assertTrue(True, "What?") #def testNegative(self): # self.assertTrue(False, "Failed as expected") def testGet...
mit
-8,373,284,204,442,977,000
28.903846
98
0.583012
false
jensreeder/scikit-bio
skbio/util/_decorator.py
1
2517
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
bsd-3-clause
2,141,552,275,238,237,400
28.964286
79
0.589591
false
thomnico/fortiosapi
fortiosapi/fortiosapi.py
1
22693
#!/usr/bin/env python # Copyright 2015 Fortinet, Inc. # # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
-6,883,514,290,745,502,000
39.307282
130
0.575552
false
noahbenson/neuropythy
neuropythy/test/__init__.py
1
8581
#################################################################################################### # neuropythy/test/__init__.py # Tests for the neuropythy library. # By Noah C. Benson import unittest, os, sys, six, warnings, logging, pimms import numpy as np import pyrsistent as pyr import neuropythy as ny if...
agpl-3.0
-5,047,679,853,567,521,000
47.480226
100
0.579303
false
gmr/pamqp
pamqp/commands.py
1
109387
""" The classes inside :mod:`pamqp.commands` allow for the automatic marshaling and unmarshaling of AMQP method frames and :class:`Basic.Properties <pamqp.commands.Basic.Properties>`. In addition the command classes contain information that designates if they are synchronous commands and if so, what the expected respon...
bsd-3-clause
6,218,454,262,305,037,000
36.32071
79
0.573779
false
alexandre/flask-rest-template
tests/integration/__init__.py
1
1464
import json def get_jwt_auth_header(username, password, client): """Executes the process to create a jwt header. It's just a way to avoid repeated code in tests. :returns: a dict with the header 'Authorization' and a valid value. """ payload = {'username': username, 'password': password} aut...
unlicense
5,145,145,898,769,789,000
30.826087
76
0.644809
false
baigk/compass-core
compass/db/api/host.py
1
29167
# Copyright 2014 Huawei Technologies Co. Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
-6,486,206,994,931,408,000
27.935516
79
0.642747
false
shuhaowu/firegtask
manage.py
1
4926
#!/usr/bin/python import argparse import os import logging import subprocess import re from jinja2 import Template logging.basicConfig(level=logging.DEBUG) IGNORED = [ r"^\./\.git", r"^\./packages", r".+\.py", r"^./vendors/fonts", r"^./index-template.html" ] def get_all_script_paths(build=False): if buil...
mpl-2.0
-9,136,917,467,097,957,000
27.982353
127
0.630329
false
jhamrick/original-nbgrader
nbgrader/nbgrader_extension.py
1
1530
from __future__ import print_function import sys from IPython.core.inputtransformer import InputTransformer from . import util class SolutionInputTransformer(InputTransformer): """IPython input transformer that renders jinja templates in cells, allowing them to be run while the instructor is developing the ...
mit
-5,209,477,391,170,942,000
29
77
0.660784
false
cprogrammer1994/ModernGL
moderngl/texture_array.py
1
9856
from typing import Tuple from .buffer import Buffer __all__ = ['TextureArray'] class TextureArray: ''' An Array Texture is a Texture where each mipmap level contains an array of images of the same size. Array textures may have Mipmaps, but each mipmap in the texture has the same number o...
mit
8,871,094,195,506,417,000
28.597598
104
0.540077
false
chiubaka/actionizer
actionizer_sentences.py
1
10510
#! /usr/bin/python import math import numpy as np import os import random import re from scipy.sparse import * from sklearn import datasets, cross_validation from sklearn.base import BaseEstimator, TransformerMixin from sklearn.feature_extraction.text import CountVectorizer, VectorizerMixin from sklearn.feature_extrac...
mit
-3,611,365,149,739,717,000
39.423077
171
0.647383
false
abusse/cinder
cinder/tests/test_backup.py
1
32705
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
apache-2.0
4,468,336,768,905,951,700
44.550139
79
0.54114
false
neuroo/equip
equip/analysis/block.py
1
3757
# -*- coding: utf-8 -*- """ equip.analysis.block ~~~~~~~~~~~~~~~~~~~~ Basic block for the bytecode. :copyright: (c) 2014 by Romain Gaucher (@rgaucher) :license: Apache 2, see LICENSE for more details. """ from .ast import Statement class BasicBlock(object): """ Represents a basic block from the byte...
apache-2.0
-4,350,078,725,071,095,300
22.48125
88
0.611392
false
owlin/owlin-query-validator
queryvalidator.py
1
4630
import re def validate(query): if (query != None) and (len(query) > 0): # remove escapes query = removeEscapes(query) # check ~ is used properly if isinstance(checkSquiggle(query), basestring): return checkSquiggle(query) # check ! is used properly if ...
apache-2.0
4,901,922,528,669,295,000
34.615385
170
0.589849
false
ubc/ubcpi
ubcpi/test/test_lms.py
1
11649
from __future__ import absolute_import import json import os from ddt import ddt, file_data from django.core.exceptions import PermissionDenied from django.test import TestCase from mock import patch, Mock from workbench.test_utils import scenario, XBlockHandlerTestCaseMixin from ubcpi.persistence import Answers, VOT...
agpl-3.0
2,272,928,683,813,281,500
45.410359
155
0.635076
false
asmateus/flight-stone
fstone/director/interface/minimal_qt.py
1
2036
from interface.QtAutogen.minimal_autogen import Ui_MainWindow from PyQt5.QtGui import QPixmap, QImage from PyQt5.QtWidgets import QMainWindow, QApplication from collections import namedtuple import sys import cv2 Point = namedtuple('Point', ['x', 'y']) class MinimalApplication(QMainWindow): instance = None ...
mit
6,753,031,243,368,868,000
28.085714
77
0.595776
false
peterhinch/micropython-async
v2/benchmarks/latency.py
1
4478
# latency.py Benchmark for uasyncio. Author Peter Hinch July 2018. # This measures the scheduling latency of a notional device driver running in the # presence of other coros. This can test asyncio_priority.py which incorporates # the priority mechanism. (In the home directory of this repo). # When running the test t...
mit
-5,567,420,652,038,130,000
35.406504
100
0.650514
false
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/startup/bl_operators/image.py
1
8025
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 program is distrib...
gpl-3.0
-1,167,094,893,613,229,600
30.849206
108
0.550779
false
rven/odoo
addons/website_livechat/models/website_visitor.py
1
6494
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta import json from odoo import models, api, fields, _ from odoo.exceptions import UserError from odoo.http import request class WebsiteVisitor(models.Model): _inherit = 'webs...
agpl-3.0
5,515,337,552,768,424,000
53.116667
149
0.620573
false
w1z2g3/crossbar
crossbar/twisted/processutil.py
2
4660
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
agpl-3.0
983,757,269,808,923,800
37.512397
104
0.619528
false
huyng/tensorflow-vgg
tools.py
1
2185
import numpy as np import tensorflow as tf def save_weights(graph, fpath): sess = tf.get_default_session() variables = graph.get_collection("variables") variable_names = [v.name for v in variables] kwargs = dict(zip(variable_names, sess.run(variables))) np.savez(fpath, **kwargs) def load_weights(g...
mit
2,976,072,146,849,019,000
31.132353
97
0.599085
false
ros-planning/moveit
moveit_commander/bin/moveit_commander_cmdline.py
1
5657
#!/usr/bin/env python from __future__ import print_function import roslib import rospy try: import readline except ImportError: import pyreadline as readline # for Windows import sys import os import signal import argparse from moveit_commander import ( MoveGroupCommandInterpreter, MoveGroupInfoLev...
bsd-3-clause
-1,787,732,623,423,018,000
25.069124
85
0.565848
false
hofschroeer/shinysdr
shinysdr/plugins/dsd.py
1
3086
# -*- coding: utf-8 -*- # Copyright 2015 Kevin Reid <kpreid@switchb.org> # # This file is part of ShinySDR. # # ShinySDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (...
gpl-3.0
-1,993,739,182,994,872,800
31.808511
195
0.662776
false
Stvad/CrowdAnki
test/history/anki_deck_archiver_spec.py
1
1528
from mamba import description, it, _it from pathlib import Path from unittest.mock import MagicMock from crowd_anki.anki.adapters.anki_deck import AnkiDeck from crowd_anki.history.anki_deck_archiver import AnkiDeckArchiver with description(AnkiDeckArchiver) as self: with it("inits repo, archives the deck there an...
mit
1,952,371,636,300,470,300
40.297297
114
0.689136
false
fnp/django-migdal
example_project/core/settings.py
1
4452
""" Django settings for core project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impor...
agpl-3.0
-8,513,829,939,629,562,000
28.289474
96
0.683513
false
lym/allura-git
Allura/allura/tests/unit/spam/test_mollom.py
1
4099
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apach...
apache-2.0
9,050,317,172,039,676,000
41.65625
79
0.634676
false
google-research/google-research
smurf/multiframe_training/smurf_multi_frame_fusion.py
1
5406
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
7,665,492,301,391,260,000
32.57764
80
0.678135
false
sserkez/ocelot
demos/ebeam/multipoles.py
1
1792
__author__ = 'Sergey Tomin' from copy import copy from ocelot import * from ocelot.gui import * import numpy as np C = 1000. Ncells = 16 Nbends = 32 D = Drift(l=C/Ncells/4, eid="D") Qf = Multipole(kn=[0., 0.021/2.], eid="Qf") Qd = Multipole(kn=[0., -0.02], eid="Qd") B = Multipole(kn=2.*pi/Nbends) Sf = Multipole(kn=(0...
gpl-3.0
-8,803,161,188,557,927,000
25.746269
67
0.610491
false
Wyliodrin/pybass
pybass/pybass.py
1
67118
# Copyright(c) Maxim Kolosov 2009-2013 pyirrlicht@gmail.com # http://pybass.sf.net # BSD license __version__ = '0.5.5' __versionTime__ = '2013-11-29' __author__ = 'Maxim Kolosov <pyirrlicht@gmail.com>' __doc__ = ''' pybass.py - is ctypes python module for BASS (http://www.un4seen.com). BASS is an audio libr...
apache-2.0
2,277,253,196,404,755,700
49.989156
308
0.717006
false
snyderr/robotframework
src/robot/version.py
1
1503
# Copyright 2008-2015 Nokia Solutions and Networks # # 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
3,380,009,366,737,051,000
32.4
77
0.622754
false
1tush/reviewboard
reviewboard/webapi/resources/hosting_service_account.py
1
7844
from __future__ import unicode_literals from django.utils import six from djblets.util.decorators import augment_method_from from djblets.webapi.decorators import (webapi_login_required, webapi_response_errors, webapi_request_fields) from dj...
mit
-2,598,027,700,097,482,000
35.483721
79
0.551122
false