text
stringlengths
0
1.05M
meta
dict
#!/bin/env python """ This script will return the paths that distutils will use for installing a package. To use this script, execute it the same way that you would execute setup.py, but instead of providing 'install' or 'build' as the command, specify 'purelib' or 'platlib' and the corresponding path will be printed...
{ "repo_name": "collects/VTK", "path": "Wrapping/Python/setup_install_paths.py", "copies": "1", "size": "3915", "license": "bsd-3-clause", "hash": 980881764341381500, "line_mean": 27.5766423358, "line_max": 74, "alpha_frac": 0.5867177522, "autogenerated": false, "ratio": 4.090909090909091, "conf...
#! /bin/env python """ This script will return the paths that distutils will use for installing a package. To use this script, execute it the same way that you would execute setup.py, but instead of providing 'install' or 'build' as the command, specify 'purelib' or 'platlib' and the corresponding path will be printe...
{ "repo_name": "berendkleinhaneveld/VTK", "path": "ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py", "copies": "24", "size": "3940", "license": "bsd-3-clause", "hash": -8407663144401989000, "line_mean": 27.5507246377, "line_max": 74, "alpha_frac": 0.5837563452, "autogenerated": false, "rati...
""" This unwraps phase author: Joshua Albert albert@strw.leidenuniv.nl """ import numpy as np def phase_unwrapp1d(theta,axis=None): '''The difference between two timesteps is unaliased by assumption so theta_i+1 - theta_i < pi. So Wrap(theta_i+1 - theta_i) is the real gradient and we can integrate them. ...
{ "repo_name": "Joshuaalbert/RadioAstronomyThings", "path": "src/rathings/phase_unwrap.py", "copies": "1", "size": "1131", "license": "apache-2.0", "hash": -1653900466863701000, "line_mean": 33.2727272727, "line_max": 99, "alpha_frac": 0.6251105217, "autogenerated": false, "ratio": 3.1680672268907...
#!/bin/env python ''' This was from an interview I did. The Question ------------ > Given a set of characters, produce all combinations of subsets from > the characters in the set including the empty set and the set itself. > > Examples: > > ab -> ('', a , b, ab) > abc -> ('', a, b, c, ab, ac, bc, abc) > abc...
{ "repo_name": "ianchesal/careercup.com", "path": "otherstuff/combinations.py", "copies": "1", "size": "3278", "license": "mit", "hash": 3207789910523697000, "line_mean": 27.2586206897, "line_max": 97, "alpha_frac": 0.6510067114, "autogenerated": false, "ratio": 3.251984126984127, "config_test":...
#!/bin/env python ''' This was from an interview I did. The Question ------------ > Implement a memcached class. Where the class takes a key/value pair > for addition and can return a key for a value. It should have a limit > on the key/value pairs it can store in the cache and an LRU algorithm > for purging old val...
{ "repo_name": "ianchesal/careercup.com", "path": "otherstuff/memcached.py", "copies": "1", "size": "4402", "license": "mit", "hash": 4176002845561716700, "line_mean": 24.0113636364, "line_max": 74, "alpha_frac": 0.6565197637, "autogenerated": false, "ratio": 2.960322797579018, "config_test": fa...
#!/bin/env python """ Trivial example for using the Qubole SDK to run a Hadoop Streaming Command. See: http://www.qubole.com/documentation/en/latest/quick-start-guide/running-hadoop-job.html """ from qds_sdk.qubole import Qubole from qds_sdk.commands import HadoopCommand import qds_sdk.exception import sys import t...
{ "repo_name": "tanishgupta1/qds-sdk-py", "path": "example/mr_1.py", "copies": "10", "size": "1963", "license": "apache-2.0", "hash": -4814014100317574000, "line_mean": 27.8676470588, "line_max": 321, "alpha_frac": 0.6413652573, "autogenerated": false, "ratio": 3.1011058451816744, "config_test":...
#!/bin/env python ################################################################################ # Trivial version of SimplePilot to be used with pilotWrapper # # The purpose of this version is to have a wrapper/pilot set # as less verbose as possible, just for fast tests. # #######################################...
{ "repo_name": "RRCKI/pilot", "path": "dataPilot.py", "copies": "1", "size": "34155", "license": "apache-2.0", "hash": -728788847277677200, "line_mean": 31.2521246459, "line_max": 168, "alpha_frac": 0.5784511785, "autogenerated": false, "ratio": 3.8575784955952113, "config_test": false, "has_n...
#!/bin/env python # { # "type": "FeatureCollection", # "features": [ # { # "type": "Feature", # "id": 1, # "properties": { # "CASE_ENQUIRY_ID": 101000833162.0, # "OPEN_DT": "05/03/2013 11:12:12 AM", # "Location": "83-85 Cresthill Rd Brighton MA 02135", # "LA...
{ "repo_name": "stuckeyr/sharkmap", "path": "csv2geojson.py", "copies": "1", "size": "3009", "license": "mit", "hash": 8607031005462660000, "line_mean": 34.4, "line_max": 181, "alpha_frac": 0.5320704553, "autogenerated": false, "ratio": 3.3029637760702526, "config_test": false, "has_no_keyword...
#!/bin/env python """ Usage: convert.py <input> <output> (--xml | --midi) Arguments: <input> Path to the **kern directory <output> Path to the xml/midi output directory Options: -h --help Show this screen. --xml Convert from **kern to xml --midi Convert from **kern to midi...
{ "repo_name": "freakimkaefig/musicjson-evaluation", "path": "bin/convert.py", "copies": "1", "size": "2144", "license": "mit", "hash": 1996157956683979000, "line_mean": 33.0317460317, "line_max": 78, "alpha_frac": 0.5527052239, "autogenerated": false, "ratio": 3.754816112084063, "config_test": ...
#!/bin/env python """ Usage: similarity.py <algorithm> <collection> <queries> <output> [-c <cutoff>] Arguments: <algorithm> The algorithm used to calculate similarity: - 2010-domain, 2010-pitchderiv, 2010-shape - 2011-shape, 2011-pitch, 2011-time - 2012-shapeh, ...
{ "repo_name": "freakimkaefig/musicjson-evaluation", "path": "bin/similarity.py", "copies": "1", "size": "1976", "license": "mit", "hash": 2423597077106322000, "line_mean": 36.2830188679, "line_max": 82, "alpha_frac": 0.5905870445, "autogenerated": false, "ratio": 3.8146718146718146, "config_tes...
#!/bin/env python """ Verify HTCondor-CE configuration before service startup """ import re import sys # Verify that the HTCondor Python bindings are in the PYTHONPATH try: import classad import htcondor except ImportError: sys.exit("ERROR: Could not load HTCondor Python bindings. " + \ "Ple...
{ "repo_name": "bbockelm/htcondor-ce", "path": "src/verify_ce_config.py", "copies": "1", "size": "3196", "license": "apache-2.0", "hash": 2040590630730961000, "line_mean": 48.1692307692, "line_max": 118, "alpha_frac": 0.6836670839, "autogenerated": false, "ratio": 3.6031567080045095, "config_tes...
__version__ = '''0.1.09''' __sub_version__ = '''20120908235504''' __copyright__ = '''(c) Alex A. Naanou 2011''' #----------------------------------------------------------------------- import shutil, sys, os, os.path from itertools import chain, imap, islice import json from pli.functional import curry from pli.lo...
{ "repo_name": "flynx/XMPGen", "path": "xmpgen.py", "copies": "1", "size": "28093", "license": "bsd-3-clause", "hash": -7533120956390193000, "line_mean": 29.2400430571, "line_max": 134, "alpha_frac": 0.5974442032, "autogenerated": false, "ratio": 3.364431137724551, "config_test": true, "has_no...
#!/bin/env python """ WSGI handler for mogrifying images. """ import os from hashlib import sha1 from contextlib import contextmanager from .core import Transmogrify from .network import Http404, do_404, handle_purge, do_redirect, get_path @contextmanager def lock_file(lock): open(lock, "w") try: y...
{ "repo_name": "callowayproject/Transmogrify", "path": "transmogrify/wsgi.py", "copies": "1", "size": "1895", "license": "apache-2.0", "hash": -3604724004959139300, "line_mean": 29.0793650794, "line_max": 90, "alpha_frac": 0.654353562, "autogenerated": false, "ratio": 3.496309963099631, "config_...
#!/bin/env python # # Objects to be used with AutoFillTreeProducer # # the variable declaration contains both the booking information and a function to fill the variable # # TODO: more documentation needed here! class NTupleVariable: def __init__(self, name, function, type=float, help="", default=-99, mcOnly=False...
{ "repo_name": "rovere/utilities", "path": "autovars.py", "copies": "1", "size": "6811", "license": "mit", "hash": -6672482308302339000, "line_mean": 46.6293706294, "line_max": 151, "alpha_frac": 0.6093084716, "autogenerated": false, "ratio": 3.558516196447231, "config_test": false, "has_no_ke...
#!/bin/env python # OpenSceneGraph example program "osgpdf" # Translated from file 'osgpdf.cpp' import sys from osgpypp import osg from osgpypp import osgViewer from osgpypp import osgWidget def main(argv): arguments = osg.ArgumentParser(argv) viewer = osgViewer.Viewer(arguments) hints = osgWidget.Geome...
{ "repo_name": "JaneliaSciComp/osgpyplusplus", "path": "examples/debugging2/osgpdf.py", "copies": "1", "size": "1067", "license": "bsd-3-clause", "hash": 4240630253959021600, "line_mean": 32.34375, "line_max": 100, "alpha_frac": 0.5773195876, "autogenerated": false, "ratio": 3.3980891719745223, ...
#!/bin/env python """opt2cli. Convert options to a valid command with respective options. Usage: opt2cli.py [ --info | --sinfo | --cinfo | --xinfo ] opt2cli.py [ --resize=<WxH> ] [ --lossy=<STRENGTH> ] [ --optimize=<LEVEL> ] [ --interlace ] opt2cli.py [ --resize-fit=<WxH> ] [ --lossy=<STRENGTH> ] [ --opti...
{ "repo_name": "dylanninin/giflossy", "path": "opt2cli.py", "copies": "1", "size": "2393", "license": "mit", "hash": -2738416051558631000, "line_mean": 39.5593220339, "line_max": 106, "alpha_frac": 0.5206853322, "autogenerated": false, "ratio": 3.3052486187845305, "config_test": false, "has_no...
# Orbital Comics new releases email tool # Author: Bradley Abrahams # Available on GitHub: https://github.com/mrkipling/orbital-comics-releases # # Requirements: BeautifulSoup (pip install beautifulsoup4) # # This script scrapes the new comic releases from the Orbital comics website # (http://www.orbitalcomics.com) an...
{ "repo_name": "mrkipling/orbital-comics-releases", "path": "orbital.py", "copies": "1", "size": "6396", "license": "mit", "hash": -5198389198434618000, "line_mean": 30.3529411765, "line_max": 83, "alpha_frac": 0.626641651, "autogenerated": false, "ratio": 3.4817637452367993, "config_test": fals...
""" output.py Functions for outputing analysis results """ from . import distances from .Peaks import Peak import io import tempfile ####################################################################### # Constants ####################################################################### MULTI_LINE=0 SINGLE_LINE=1 ...
{ "repo_name": "fls-bioinformatics-core/RnaChipIntegrator", "path": "rnachipintegrator/output.py", "copies": "1", "size": "25921", "license": "artistic-2.0", "hash": -6214362041738436000, "line_mean": 35.9771754636, "line_max": 132, "alpha_frac": 0.5392924656, "autogenerated": false, "ratio": 4.65...
#!/bin/env python """Package responsible for browsing the content of a DQM file produced with the DQMIO I/O framework of CMSSW. The internal format of the DQMIO file is the following: it has one TTree for each kind of object that can be handled by the DQM Framework. Each entry in these TTree has a pointer to t...
{ "repo_name": "rovere/utilities", "path": "DQMIO.py", "copies": "1", "size": "5427", "license": "mit", "hash": 3810247794597166000, "line_mean": 40.1136363636, "line_max": 98, "alpha_frac": 0.556292611, "autogenerated": false, "ratio": 3.8681397006414824, "config_test": false, "has_no_keyword...
#!/bin/env python # Paginate a text file, adding a header and footer import sys, time, string # If no arguments were given, print a helpful message if len(sys.argv)!=2: print 'Usage: pyprint filename' sys.exit(0) class PrinterFormatter: def __init__(self, filename, page_len=58): # Save the time of cr...
{ "repo_name": "chrisjowen/nLess", "path": "lib/PEG_GrammarExplorer/PEG_GrammarExplorer/PegSamples/python_2_5_2/input/simple_pyprint.py", "copies": "6", "size": "2082", "license": "apache-2.0", "hash": -8381739777560471000, "line_mean": 25.6923076923, "line_max": 69, "alpha_frac": 0.6954851105, "aut...
#!/bin/env python """ partial sort of a file. Useful when some columns are known to be sorted, but within a group defined by those column, some other columns are out of order. e.g., if you have a bed file and you know it's already sorted by (or even just grouped by) chromosome, you can sort by start, stop w...
{ "repo_name": "shashidhar22/bio-playground", "path": "utils/partsort.py", "copies": "2", "size": "4025", "license": "mit", "hash": 8621851458085085000, "line_mean": 39.25, "line_max": 91, "alpha_frac": 0.6236024845, "autogenerated": false, "ratio": 3.8813886210221793, "config_test": false, "h...
#!/bin/env python """path2opt. Convert a valid path of a URI to options of any command. Usage: path2opt.py [-h | --path=<p>] Options: -p --path=<p> Input path [default: /optimize/3/lossy/80/interlace]. -h --help Show this screen. Example: path2opt.py -p /optimize/3/lossy/80/interlace pat...
{ "repo_name": "dylanninin/giflossy", "path": "path2opt.py", "copies": "1", "size": "1425", "license": "mit", "hash": -3172009855788242400, "line_mean": 27.5, "line_max": 73, "alpha_frac": 0.5845614035, "autogenerated": false, "ratio": 2.9022403258655802, "config_test": false, "has_no_keywords...
#! /bin/env python # # PDR data tools. # import argparse # pylint: disable=superfluous-parens # pylint: disable=broad-except import logging import math import os import sys from werkzeug.exceptions import NotFound from rdr_service.cloud_utils.gcp_cloud_tasks import GCPCloudTask from rdr_service.dao.bigquery_sync_dao...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/resource_tool.py", "copies": "1", "size": "40942", "license": "bsd-3-clause", "hash": -1268279711113741600, "line_mean": 39.3369458128, "line_max": 119, "alpha_frac": 0.5685848273, "autogenerated": false, "ratio":...
""" Peaks.py Classes for handling peak data """ import logging import io from .utils import make_errline class PeakSet(object): """Class for storing a set of peaks ChIP-seq data consists of ChIP peak information, each of which are stored individually in Peak objects. This class is a container for a...
{ "repo_name": "fls-bioinformatics-core/RnaChipIntegrator", "path": "rnachipintegrator/Peaks.py", "copies": "1", "size": "12290", "license": "artistic-2.0", "hash": -2186935892800950500, "line_mean": 34.8309037901, "line_max": 80, "alpha_frac": 0.5386493084, "autogenerated": false, "ratio": 4.6447...
#!/bin/env python """ Perform global alignment between all WGAC pairs and find single base mismatches between each pair. Approach: 1. Create a sequence file containing all sequences involved in WGAC pairwise alignments. The first sequence in any alignment with "+" in the strand column will be assigned the standard ge...
{ "repo_name": "huddlej/suns", "path": "find_suns.py", "copies": "1", "size": "14658", "license": "mit", "hash": 1895762621277203000, "line_mean": 37.5736842105, "line_max": 144, "alpha_frac": 0.6384227043, "autogenerated": false, "ratio": 3.8152004164497657, "config_test": false, "has_no_keyw...
""" pipeline_quickstart.py -One line description of the pipeline. ============================================================================= Authors: Goal of the pipeline: This program implements a <<type of pipeline e.g. QC, association testing, etc>> workflow for human GWAS analysis using <<name_of_pro...
{ "repo_name": "magosil86/witsGWAS", "path": "pipeline_quickstart.py", "copies": "1", "size": "3976", "license": "mit", "hash": -1361286304853844500, "line_mean": 24.3248407643, "line_max": 129, "alpha_frac": 0.6780684105, "autogenerated": false, "ratio": 3.736842105263158, "config_test": false,...
#!/bin/env python # # Plot dimuon mass distribution for SWC HEP 2015 # from ROOT import TFile, TH1D, TLorentzVector from math import cos, sin, tan, sqrt, copysign class Particle: def __init__(self, energy, qpt, phi, theta): self.q = int(copysign(1,qpt)) # get charge (+1 or -1) from sign of pt pt = ...
{ "repo_name": "benwaugh/dimuon", "path": "dimuon.py", "copies": "1", "size": "1865", "license": "mit", "hash": 471605242505566900, "line_mean": 31.1551724138, "line_max": 102, "alpha_frac": 0.5957104558, "autogenerated": false, "ratio": 3.1135225375626043, "config_test": false, "has_no_keywor...
#!/bin/env python print("------------------------ running flock tests") # TODO actual tests, rather than smoketest import numpy as np import matplotlib.pyplot as plt from scipy.ndimage import filters import dig import dig.datasets as ds from dig import viz import flock # python impl that works import feature as fea...
{ "repo_name": "dblalock/dig", "path": "tests/test_flock.py", "copies": "1", "size": "7683", "license": "mit", "hash": 2205119480744956000, "line_mean": 26.2446808511, "line_max": 89, "alpha_frac": 0.6662761942, "autogenerated": false, "ratio": 2.6723478260869564, "config_test": false, "has_no...
#!/bin/env python print("------------------------ running tree tests") import time import numpy as np import dig def all_eq(x, y): if (len(x) == 0) and (len(y) == 0): return True return np.max(np.abs(x - y)) < .001 def main(): # N = 100 N = 100 * 1000 # D = 10 D = 100 P = 8 r2 = 1. * D # ---------------...
{ "repo_name": "dblalock/dig", "path": "tests/test_tree.py", "copies": "1", "size": "1796", "license": "mit", "hash": 8514521664022921000, "line_mean": 22.3246753247, "line_max": 58, "alpha_frac": 0.5974387528, "autogenerated": false, "ratio": 2.633431085043988, "config_test": false, "has_no_k...
#!/bin/env python """ Probability forecasts ===================== This example script shows how to forecast the probability of exceeding an intensity threshold. The method is based on the local Lagrangian approach described in Germann and Zawadzki (2004). """ import matplotlib.pyplot as plt import numpy as np from ...
{ "repo_name": "pySTEPS/pysteps", "path": "examples/probability_forecast.py", "copies": "1", "size": "3850", "license": "bsd-3-clause", "hash": -1872306483971070000, "line_mean": 28.6153846154, "line_max": 81, "alpha_frac": 0.6280519481, "autogenerated": false, "ratio": 3.327571305099395, "confi...
""" Program to manage and run ATS regression tests. With inspiration, and in some places just stolen, from Ben Andre's PFloTran regression test suite. Author: Ethan Coon (ecoon@lanl.gov) """ from __future__ import print_function from __future__ import division import argparse import sys,os import textwrap import ti...
{ "repo_name": "amanzi/ats-dev", "path": "tools/testing/regression_tests.py", "copies": "2", "size": "7604", "license": "bsd-3-clause", "hash": -1720398483654724400, "line_mean": 36.6435643564, "line_max": 84, "alpha_frac": 0.5453708574, "autogenerated": false, "ratio": 4.577965081276339, "confi...
#!/bin/env python """ prompt - multiline prompt """ # Simple embedded multiline python interpreter built around raw_input(). # Interrupts the control flow at any given location with 'exec prompt' # and gives control to the user. # Allways runs in the current scope and can even be started from the # pdb prompt in debu...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/285214_prompt__simple_multiline_interactive/recipe-285214.py", "copies": "1", "size": "2843", "license": "mit", "hash": -2217609323322992400, "line_mean": 29.902173913, "line_max": 85, "alpha_frac": 0.4794231446, "autogenerated": false, "r...
#!/bin/env python """ ProofPDF.py. A wrapper for the fontPDF.py module. This script verifies the existence of the specified font files, creates a font class object with the call-backs required by fontPDF, and translates the command line options to arguments for the fontPDF module; the latter produces a proof file using...
{ "repo_name": "shannpersand/cooper-type", "path": "_resources/FDK Adobe/Tools/SharedData/FDKScripts/ProofPDF.py", "copies": "1", "size": "37478", "license": "cc0-1.0", "hash": 1639299315205132800, "line_mean": 36.894843276, "line_max": 174, "alpha_frac": 0.6865361012, "autogenerated": false, "rat...
# ratorade: Everyone's a critic # # Copyright (c) 2012 Erik Erlandson # # Author: Erik Erlandson <erikerlandson@yahoo.com> # # 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://ww...
{ "repo_name": "erikerlandson/ratorade", "path": "bin/dbutils.py", "copies": "1", "size": "2589", "license": "apache-2.0", "hash": -7778207284466107000, "line_mean": 30.962962963, "line_max": 104, "alpha_frac": 0.6396292005, "autogenerated": false, "ratio": 3.302295918367347, "config_test": fals...
#!/bin/env python """ Reads the status of the checks from a file and writes it back to the file asynchronously. Used to keep state across restarts of uptester. """ from threading import Thread, Timer from datetime import timedelta from six.moves import queue import yaml import traceback import copy import time STATE...
{ "repo_name": "NoUsername/uptester", "path": "persistence.py", "copies": "1", "size": "2219", "license": "mit", "hash": -8852416254156797000, "line_mean": 23.9325842697, "line_max": 69, "alpha_frac": 0.7048219919, "autogenerated": false, "ratio": 3.1928057553956832, "config_test": false, "has...
# Read the CMU pronounciation dictionary, count syllables (throwing away # phoneme and stress information), and pickle the result. # # # Copyright (c) 2009, Jonathan Feinberg <jdf@pobox.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted prov...
{ "repo_name": "jdf/haikufinder", "path": "haikufinder/cmudict/PickleCMUDict.py", "copies": "2", "size": "2104", "license": "bsd-3-clause", "hash": -6878541221879249000, "line_mean": 45.7777777778, "line_max": 86, "alpha_frac": 0.7485741445, "autogenerated": false, "ratio": 3.969811320754717, "c...
#!/bin/env python """ Reduces the number of NN bases using the information from out.NN_analysis. INPUT: * in.const.NN * in.params.NN * out.NN_analysis OUTPUT: * in.const.NN.new * in.params.NN.new """ from __future__ import print_function import optparse import NN_io incnst="in.const.NN" inprms="in.params....
{ "repo_name": "ryokbys/nap", "path": "nappy/nn/reduce_NN_bases.py", "copies": "1", "size": "2964", "license": "mit", "hash": -9157559780977068000, "line_mean": 27.2285714286, "line_max": 83, "alpha_frac": 0.5425101215, "autogenerated": false, "ratio": 2.809478672985782, "config_test": false, ...
#!/bin/env python """ remote storage web service authentication (oauth2) module. should implement https://tools.ietf.org/id/draft-dejong-remotestorage-00.txt and [OAUTH2] To be run behind an nginx server, and supervised by daemontools.""" from flup.server.fcgi import WSGIServer import datetime, time, os, sys, re impo...
{ "repo_name": "relet/python-remotestorage", "path": "auth.py", "copies": "1", "size": "7388", "license": "mit", "hash": 9047631065091692000, "line_mean": 32.8899082569, "line_max": 180, "alpha_frac": 0.5940714672, "autogenerated": false, "ratio": 3.4669169404035665, "config_test": false, "has...
#!/bin/env python """ remote storage web service. should implement https://tools.ietf.org/id/draft-dejong-remotestorage-00.txt """ from flup.server.fcgi import WSGIServer import datetime, time, os, sys, re import optparse import urllib import traceback import simplejson as json from dulwich.repo import Repo from dulw...
{ "repo_name": "relet/python-remotestorage", "path": "rs.py", "copies": "1", "size": "11030", "license": "mit", "hash": 847551229076206800, "line_mean": 36.9037800687, "line_max": 195, "alpha_frac": 0.5967361741, "autogenerated": false, "ratio": 3.7568119891008176, "config_test": false, "has_n...
#!/bin/env python """ remove all undo files in ~/.vim/undo/ where corresponding file does not exist anymore """ import os UNDO_PATH = os.path.join(os.environ['HOME'], '.vim/undo/') def lsfile(path=None, filetype='all'): """ list files in path. Default is search for both file and dir in cwd """ if path is None: ...
{ "repo_name": "NearHuscarl/dotfiles", "path": "script/python/clean_vim_undo.py", "copies": "1", "size": "1436", "license": "bsd-3-clause", "hash": -6160396974798208000, "line_mean": 23.3389830508, "line_max": 88, "alpha_frac": 0.6706128134, "autogenerated": false, "ratio": 2.7992202729044835, "...
#! /bin/env python # # Remove an approved deceased report from a given participant # import argparse import logging import sys from rdr_service.dao.api_user_dao import ApiUserDao from rdr_service.model.api_user import ApiUser from rdr_service.model.deceased_report import DeceasedReport from rdr_service.model.particip...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/resurrect.py", "copies": "1", "size": "4412", "license": "bsd-3-clause", "hash": -4104451434222632000, "line_mean": 37.0344827586, "line_max": 114, "alpha_frac": 0.6797370807, "autogenerated": false, "ratio": 3.80...
#!/bin/env python # reports variants only in a gene panel using csv report on rare variants as input import csv import sys import re original_report = sys.argv[1] panel_report = original_report.replace("csv","panel.csv") gene_panel_file_name = sys.argv[2] with open(gene_panel_file_name,'rb') as f_gene_panel: ge...
{ "repo_name": "naumenko-sa/cre", "path": "cre.filter_by_ensembl_gene_id.py", "copies": "1", "size": "1165", "license": "mit", "hash": 7586148893173567000, "line_mean": 27.4146341463, "line_max": 82, "alpha_frac": 0.6635193133, "autogenerated": false, "ratio": 3.0259740259740258, "config_test": ...
#!/bin/env python """ Report the positions of all gaps (N bases) in the given FASTA sequence(s). """ import argparse from Bio import SeqIO def _range(n): # range in python2 takes too much memory when iterating over a large set of integers. range() in python3 does what # xrange() did in python2, and xrange() i...
{ "repo_name": "huddlej/snake-cnv", "path": "scripts/find_fasta_gaps.py", "copies": "1", "size": "1312", "license": "mit", "hash": 6778322324386184000, "line_mean": 27.5217391304, "line_max": 118, "alpha_frac": 0.5823170732, "autogenerated": false, "ratio": 3.71671388101983, "config_test": false...
#! /bin/env python # # Routine to daemonize a process on unix # # DAEMON_HOME = '/' class NullDevice: def write(self, s): pass def daemonize(homeDir = DAEMON_HOME): import os import sys if os.fork() != 0: # Parent os._exit(0) # Kill parent ...
{ "repo_name": "MultiRRomero/manhattan-map", "path": "lib/geopy-1.4.0-py2.6.egg/test/daemon.py", "copies": "2", "size": "2243", "license": "mit", "hash": -15016620144977624, "line_mean": 24.7816091954, "line_max": 81, "alpha_frac": 0.5149353544, "autogenerated": false, "ratio": 3.9699115044247786,...
#! /bin/env python # # Routine to daemonize a process on unix # # DAEMON_HOME = '/' class NullDevice(object): def write(self, s): pass def daemonize(homeDir=DAEMON_HOME): import os import sys if os.fork() != 0: # Parent os._exit(0) # Kill parent os.chdir(homeDir) # Detach...
{ "repo_name": "RDXT/geopy", "path": "test/daemon.py", "copies": "11", "size": "1926", "license": "mit", "hash": -231207196610979070, "line_mean": 20.6404494382, "line_max": 71, "alpha_frac": 0.6053997923, "autogenerated": false, "ratio": 3.4148936170212765, "config_test": false, "has_no_keywo...
#!/bin/env python # # Script to help, eg, recount crimes by ward based on police district crime numbers and estimates # of how much of each police station's crimes should be attributed to ward. # # $ head data/contact-crimes.csv # PoliceStation,year,contact,property # albertinia,2004,159,93 # albertinia,2005,110,59 # a...
{ "repo_name": "Code4SA/wazimap-za", "path": "bin/recompose.py", "copies": "1", "size": "2601", "license": "mit", "hash": -6748515687946635000, "line_mean": 38.4090909091, "line_max": 189, "alpha_frac": 0.7212610534, "autogenerated": false, "ratio": 3.126201923076923, "config_test": false, "ha...
#!/bin/env python """ Script to load CSV dump of data. Run from django shell with "%run". Expects the followin columns: 1. date 2. description 3. category 4. amount 5. accountname """ import argparse import pandas as pd from ctrack.models import Transaction, Category, Account def load_data(dat...
{ "repo_name": "dmkent/cattrack", "path": "load_data.py", "copies": "1", "size": "1399", "license": "mit", "hash": 1532825555624470800, "line_mean": 23.9821428571, "line_max": 70, "alpha_frac": 0.5718370264, "autogenerated": false, "ratio": 4.008595988538682, "config_test": false, "has_no_keyw...
#!/bin/env python """SegmentColons Segment the colons from a csv database -d file.csv specifies the file -m (optional) mrn to process """ import sys import getopt import csv import os def process(db, mrn, study, series): if os.getenv("CTC_IMG_DIR") == None: return False if os.getenv("CTC_DIR") == N...
{ "repo_name": "clwyatt/CTC", "path": "Scripts/SegmentColons.py", "copies": "1", "size": "2347", "license": "bsd-3-clause", "hash": -574789231816492500, "line_mean": 25.3707865169, "line_max": 94, "alpha_frac": 0.4755006391, "autogenerated": false, "ratio": 3.1931972789115646, "config_test": fal...
#!/bin/env python # Seperate evaluation script import sys import csv import requests from sklearn.metrics import classification_report, accuracy_score, confusion_matrix from collections import Counter tag_dict = {} inv_tag_dict = {} all_tags_ref = [] all_tags_resp = [] wrong_dict = Counter() documents_received = 0 ...
{ "repo_name": "Sentimentron/Dracula", "path": "eval.py", "copies": "1", "size": "3386", "license": "bsd-3-clause", "hash": 4478153556068508700, "line_mean": 30.9433962264, "line_max": 121, "alpha_frac": 0.5652687537, "autogenerated": false, "ratio": 3.5642105263157893, "config_test": false, "...
#! /bin/env python # # Simple program to query table schemas from Curation EHR BigQuery tables and # output SQL Create and scheduled query statements for use in PDR BigQuery. # import argparse import json import logging import sys from rdr_service.model.bq_base import BQException from rdr_service.services.gcp_utils i...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/curation_ehr.py", "copies": "1", "size": "7997", "license": "bsd-3-clause", "hash": -3542783060413017600, "line_mean": 30.4842519685, "line_max": 119, "alpha_frac": 0.5953482556, "autogenerated": false, "ratio": 3...
#! /bin/env python # # Simply verify the environment is valid for running the client apps. # import argparse # pylint: disable=superfluous-parens # pylint: disable=broad-except import importlib import logging import sys from rdr_service.services.gcp_utils import gcp_get_app_access_token, gcp_get_app_host_name from r...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/verify_environment.py", "copies": "1", "size": "4011", "license": "bsd-3-clause", "hash": -6443714973209592000, "line_mean": 33.2820512821, "line_max": 116, "alpha_frac": 0.6153079033, "autogenerated": false, "rat...
#!/bin/env python """ Smear 1D data of equidistance intervals with Gaussians. Usage: gaussian_smear.py [options] INFILE Options: -h, --help Show this help messange and exit. -s, --sigma=SIGMA Width of Gaussian (sigma) in the unit of dx. [default: 2.0] -x=<x> Position of x data (s...
{ "repo_name": "ryokbys/nap", "path": "nappy/gaussian_smear.py", "copies": "1", "size": "2297", "license": "mit", "hash": 1437566471525782800, "line_mean": 25.4022988506, "line_max": 75, "alpha_frac": 0.5537657815, "autogenerated": false, "ratio": 2.853416149068323, "config_test": false, "has_...
#/bin/env python """Smooting tools.""" import scipy as S import numpy as N import pylab as P # generic functions for the prediction def B_matrix_from_A(A, W): """ Compute the smooting matrix. B matrix is the smoothing matrix, I.E Y(reconstructed)=B Y(predicted) A matrix is such that AX=Y W is...
{ "repo_name": "nicolaschotard/snspin", "path": "snspin/spectrum/smoothing.py", "copies": "1", "size": "19213", "license": "mit", "hash": 8930623653542558000, "line_mean": 32.4139130435, "line_max": 104, "alpha_frac": 0.5321917452, "autogenerated": false, "ratio": 3.039550704002531, "config_test...
#!/bin/env python # : # : spamdrill.py # : Written by Les Cordell # : # : This script will run through the /proc directory, # : it will open up any directory matching a number, # : it will then simply display requested output ####################### _VERSION = "0.0.1" _AUTHOR = "Les Cordell" # : Imports : # import sys...
{ "repo_name": "nonapod/spamdriller", "path": "spamdriller.py", "copies": "1", "size": "10562", "license": "mit", "hash": -6289881892866119000, "line_mean": 34.4429530201, "line_max": 126, "alpha_frac": 0.6433440636, "autogenerated": false, "ratio": 3.3392349035725575, "config_test": false, "h...
#! /bin/env python # Standard library imports import os.path import wave import numpy # Enthought library imports from traits.util.resource import find_resource def wav_to_numeric( fname, max_frames=-1 ): f = wave.open( fname, 'rb' ) sampleRate = f.getframerate() channels = f.getnchannels() if max_frames < ...
{ "repo_name": "tommy-u/chaco", "path": "examples/demo/zoomed_plot/wav_to_numeric.py", "copies": "3", "size": "1111", "license": "bsd-3-clause", "hash": 8361380810914074000, "line_mean": 22.6382978723, "line_max": 89, "alpha_frac": 0.6381638164, "autogenerated": false, "ratio": 3.15625, "config_...
#!/bin/env python # standard library import os import sys import argparse import ast # dependencies import numpy as np from skimage import img_as_ubyte import toolz as tz from sklearn import neighbors from sklearn.preprocessing import StandardScaler # local imports from . import io from . import screens from .screen...
{ "repo_name": "Don86/microscopium", "path": "microscopium/main.py", "copies": "1", "size": "13311", "license": "bsd-3-clause", "hash": 3238050387526608000, "line_mean": 43.37, "line_max": 80, "alpha_frac": 0.5793704455, "autogenerated": false, "ratio": 3.8875584112149535, "config_test": false, ...
#!/bin/env python """ STEPS nowcast ============= This tutorial shows how to compute and plot an ensemble nowcast using Swiss radar data. """ import matplotlib.pyplot as plt import numpy as np from datetime import datetime from pprint import pprint from pysteps import io, nowcasts, rcparams from pysteps.motion.luca...
{ "repo_name": "pySTEPS/pysteps", "path": "examples/plot_steps_nowcast.py", "copies": "1", "size": "6248", "license": "bsd-3-clause", "hash": -7450433426838214000, "line_mean": 30.7157360406, "line_max": 86, "alpha_frac": 0.6461267606, "autogenerated": false, "ratio": 3.5219842164599773, "config...
#!/bin/env python # Take a directory of zipped or unzipped files # and generate a set of sgRNAs import sys, string, argparse import gzip, re import MySQLdb import Config import Database from os import listdir from os.path import isfile, join from classes import FastaParser DB_COMMIT_COUNT = 25000 fileFormats = ['F...
{ "repo_name": "BioGRID/BioGRID-sgRNACut", "path": "Cut.py", "copies": "1", "size": "3510", "license": "mit", "hash": 3052780419667013000, "line_mean": 34.11, "line_max": 291, "alpha_frac": 0.6655270655, "autogenerated": false, "ratio": 3.2025547445255476, "config_test": false, "has_no_keyword...
#!/bin/env python """Take the ZINC subset here and make a smaller subset of it for testing purposes.""" from openeye.oechem import * nmols = 500 #Number of molecules to retain out of full ~7500 # Currently the above are taken as the first 500. We could also take randomly. # Read set with tripos types, write subse...
{ "repo_name": "open-forcefield-group/smarty", "path": "examples/parm@frosst/make_subset.py", "copies": "1", "size": "1096", "license": "mit", "hash": 3742177406985493000, "line_mean": 31.2352941176, "line_max": 87, "alpha_frac": 0.7408759124, "autogenerated": false, "ratio": 2.8030690537084397, ...
#! /bin/env python # # Template for RDR tool python program. # import argparse import json import logging import os import sys from sqlalchemy.orm.attributes import flag_modified from rdr_service.dao.physical_measurements_dao import PhysicalMeasurementsDao from rdr_service.model.measurements import PhysicalMeasuremen...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/fast_pm_fix.py", "copies": "1", "size": "8343", "license": "bsd-3-clause", "hash": -5195233977390604000, "line_mean": 32.372, "line_max": 116, "alpha_frac": 0.5922330097, "autogenerated": false, "ratio": 4.4401277...
#! /bin/env python # # Template for RDR tool python program. # import argparse from datetime import datetime # pylint: disable=superfluous-parens # pylint: disable=broad-except import logging import os import sys from rdr_service.services.system_utils import setup_logging, setup_i18n, which, run_external_program fro...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/alembic.py", "copies": "1", "size": "3949", "license": "bsd-3-clause", "hash": -1630291568612204800, "line_mean": 33.6403508772, "line_max": 117, "alpha_frac": 0.6323119777, "autogenerated": false, "ratio": 3.6975...
#! /bin/env python # # Template for RDR tool python program. # import argparse # pylint: disable=superfluous-parens # pylint: disable=broad-except import csv import logging import os import sys from collections import namedtuple import dateutil from rdr_service.dao.participant_dao import ParticipantDao from rdr_ser...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/dup_participant_fix.py", "copies": "1", "size": "19732", "license": "bsd-3-clause", "hash": 6815669460325187000, "line_mean": 42.8488888889, "line_max": 118, "alpha_frac": 0.5864078654, "autogenerated": false, "ra...
#! /bin/env python # # Template for RDR tool python program. # import argparse # pylint: disable=superfluous-parens # pylint: disable=broad-except import logging import signal import sys import time from rdr_service.services.gcp_utils import gcp_get_app_access_token, gcp_get_iam_service_key_info from rdr_service.ser...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/oauth_token.py", "copies": "1", "size": "3099", "license": "bsd-3-clause", "hash": 1613517481877731800, "line_mean": 29.99, "line_max": 116, "alpha_frac": 0.6640851888, "autogenerated": false, "ratio": 3.582658959...
#! /bin/env python # # Template for RDR tool python program. # import argparse # pylint: disable=superfluous-parens # pylint: disable=broad-except import logging import sys import textwrap from rdr_service.services.system_utils import setup_logging, setup_i18n, make_api_request from rdr_service.tools.tool_libs impor...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/mysql_utils.py", "copies": "1", "size": "5747", "license": "bsd-3-clause", "hash": 2627204137358188000, "line_mean": 37.3133333333, "line_max": 117, "alpha_frac": 0.6013572299, "autogenerated": false, "ratio": 3.9...
#! /bin/env python # # Template for RDR tool python program. # import argparse # pylint: disable=superfluous-parens # pylint: disable=broad-except import logging import sys from rdr_service.services.system_utils import setup_logging, setup_i18n from rdr_service.tools.tool_libs import GCPProcessContext _logger = log...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/client/client_libs/_program_template.py", "copies": "1", "size": "2194", "license": "bsd-3-clause", "hash": 8080581663665504000, "line_mean": 32.2424242424, "line_max": 116, "alpha_frac": 0.6668185962, "autogenerated": false, "ra...
#! /bin/env python # # Template for RDR tool python program. # # pylint: disable=superfluous-parens # pylint: disable=broad-except import importlib import json import logging import os import sys import tempfile import argparse from rdr_service.model import BQ_TABLES, BQ_VIEWS from rdr_service.model.bq_base import B...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/bq_migrate.py", "copies": "1", "size": "18783", "license": "bsd-3-clause", "hash": -5330010514421619000, "line_mean": 43.1952941176, "line_max": 119, "alpha_frac": 0.5391045094, "autogenerated": false, "ratio": 4....
#!/bin/env python # # tests requiring Atompaw calls. # # will not run if Atopmaw not installed import os import sys sys.path.append('.') import shutil #import numpy as np import tools_for_tests import analysis_driver # directory of test input files test_inputs_dir = os.path.join(tools_for_tests.test_dir, 'test_inputs...
{ "repo_name": "caseynbrock/opal2", "path": "tests/test_atompaw.py", "copies": "1", "size": "2766", "license": "mit", "hash": 7227303300043857000, "line_mean": 39.6764705882, "line_max": 88, "alpha_frac": 0.6695589299, "autogenerated": false, "ratio": 3.2350877192982455, "config_test": true, "...
#!/bin/env python # # tests requiring dprepro calls. # # will not run if dprepro not installed or not in path import os import sys sys.path.append('.') import shutil import tools_for_tests import analysis_driver # directory of test input files test_inputs_dir = os.path.join(tools_for_tests.test_dir, 'test_inputs_dprep...
{ "repo_name": "caseynbrock/opal2", "path": "tests/test_dprepro.py", "copies": "1", "size": "1230", "license": "mit", "hash": 4680722895400316000, "line_mean": 36.2727272727, "line_max": 93, "alpha_frac": 0.6609756098, "autogenerated": false, "ratio": 3.379120879120879, "config_test": true, "h...
#! /bin/env python # # Test the heymodule. from BeOS.hey import Hey from time import sleep x = Hey( "text/plain" ) f = x.Specifier( "Frame of Window 0" ) t = x.Specifier( "Title of Window 0" ) old_rect = x.Get( f ) print "x.Get( f ) returned '%s'" % ( old_rect, ) a = x.Get( t ) print "x.Get( t ) returned '%s'" % (...
{ "repo_name": "Taffer/BeOS", "path": "heymodule/testhey.py", "copies": "1", "size": "1128", "license": "mit", "hash": -2149453904563144000, "line_mean": 21.1176470588, "line_max": 85, "alpha_frac": 0.5744680851, "autogenerated": false, "ratio": 2.4521739130434783, "config_test": false, "has_n...
#!/bin/env python """Tftp common utility module. This module defines constant and utility functions for tftp client and tftp server. """ import socket import struct # Protocol type RRQ, WRQ, DATA, ACK, ERROR, OACK = range(1,7) DEFAULT_BLOCK_SIZE = 512 MAX_BLOCK_SIZE = 1428 def default_port(): return socket.get...
{ "repo_name": "cizixs/tftp", "path": "tftp/tftp.py", "copies": "1", "size": "1560", "license": "mit", "hash": 6492541873344285000, "line_mean": 25, "line_max": 73, "alpha_frac": 0.6461538462, "autogenerated": false, "ratio": 3.5697940503432495, "config_test": false, "has_no_keywords": false, ...
# The MIT License (MIT) # # Copyright (c) 2014 The Badmin # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modif...
{ "repo_name": "thebadmin/dnssec-stat", "path": "dnssec-stat.py", "copies": "1", "size": "6383", "license": "mit", "hash": 6754868309562889000, "line_mean": 31.9020618557, "line_max": 79, "alpha_frac": 0.5556948144, "autogenerated": false, "ratio": 3.522626931567329, "config_test": false, "has...
from email.mime.text import MIMEText from jinja2 import Environment, FileSystemLoader from datetime import datetime as dt import os import six import smtplib # Get the directory for this file. SECRET_SANTA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') j2en...
{ "repo_name": "wolsen/secret-santa", "path": "secretsanta/mail.py", "copies": "1", "size": "4308", "license": "mit", "hash": 1988515071256009000, "line_mean": 36.7894736842, "line_max": 79, "alpha_frac": 0.6538997214, "autogenerated": false, "ratio": 4.095057034220532, "config_test": false, "...
import copy import random def create_pairings(participants): """ Determines the pairings and returns the set of tuples (giver, receiver) for this secret santa game. Start with all participants are both givers and receivers. In order to provide some randomness, start by shuffling the list of part...
{ "repo_name": "wolsen/secret-santa", "path": "secretsanta/matcher.py", "copies": "1", "size": "3225", "license": "mit", "hash": 8236493513921858000, "line_mean": 32.2474226804, "line_max": 79, "alpha_frac": 0.6927131783, "autogenerated": false, "ratio": 4.1505791505791505, "config_test": false,...
import sys import secretsanta.common import secretsanta.matcher import secretsanta.mail def __main__(): """ This is the main function for the secret santa program. """ # TODO(wolsen) args parsing, it'd be nice if this had proper arguments # that could be passed. config = secretsanta.common.Co...
{ "repo_name": "wolsen/secret-santa", "path": "secretsanta/__init__.py", "copies": "1", "size": "1687", "license": "mit", "hash": -5954278041711331000, "line_mean": 35.6739130435, "line_max": 79, "alpha_frac": 0.7397747481, "autogenerated": false, "ratio": 4.065060240963855, "config_test": false...
# The MIT License (MIT) # # Copyright (c) 2019 Looker Data Sciences, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
{ "repo_name": "looker-open-source/embed-sdk", "path": "demo/demo.py", "copies": "1", "size": "3407", "license": "mit", "hash": 5852923697249895000, "line_mean": 27.6302521008, "line_max": 97, "alpha_frac": 0.6912239507, "autogenerated": false, "ratio": 3.586315789473684, "config_test": false, ...
#!/bin/env python """ This file defines a set of system_info classes for getting information about various resources (libraries, library directories, include directories, etc.) in the system. Currently, the following classes are available: atlas_info atlas_threads_info atlas_blas_info atlas_blas_threads_info ...
{ "repo_name": "google/syzygy", "path": "third_party/numpy/files/numpy/distutils/system_info.py", "copies": "12", "size": "72064", "license": "apache-2.0", "hash": -5202065333065525000, "line_mean": 34.4296951819, "line_max": 98, "alpha_frac": 0.5383964254, "autogenerated": false, "ratio": 3.52460...
"""Table and labbook testing""" import os, random, string from PEATDB.Labbook import LabbookTableModel def simulate_sequence(length): """simulate a dna seq""" dna = ['A', 'C', 'G', 'T'] sequence = '' for i in range(length): sequence += random.choice(dna) return sequence def createTable()...
{ "repo_name": "dmnfarrell/peat", "path": "PEATDB/Testing/tablestest.py", "copies": "1", "size": "1225", "license": "mit", "hash": 4287379398751035000, "line_mean": 22.1132075472, "line_max": 66, "alpha_frac": 0.587755102, "autogenerated": false, "ratio": 3.5302593659942363, "config_test": false...
#! /bin/env python # # This file is subject to the terms and conditions defined in the # file 'LICENSE', which is part of this source code package. # # Template for RDR tool python program. # import argparse import importlib import logging import os import shutil import sys import tempfile from pathlib import Path f...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/deploy_func.py", "copies": "1", "size": "6364", "license": "bsd-3-clause", "hash": 1714034574463291600, "line_mean": 36.4352941176, "line_max": 116, "alpha_frac": 0.6187932118, "autogenerated": false, "ratio": 3.7...
#!/bin/env python # # This is a basic test of the learning switch. import sys sys.path.append('.') from sim.api import * from sim.basics import * from rip_router import RIPRouter from learning_switch import LearningSwitch as switch import sim.topo as topo import os import time class ReceiveEntity (Entity): def ...
{ "repo_name": "zhaoyan1117/RoutingProtocols", "path": "tests/learning_switch_learns.py", "copies": "1", "size": "1706", "license": "bsd-3-clause", "hash": -6046627128548619000, "line_mean": 25.2461538462, "line_max": 111, "alpha_frac": 0.6951934349, "autogenerated": false, "ratio": 3.280769230769...
#!/bin/env python # # This is a script to generate a series of input files from a template # and a table of variable values. The template file can have any number # of variables of the for ${varname} for replacement. The data file # should then have the following structure: # filename V id lattice # file40...
{ "repo_name": "habanero-rice/hcpp", "path": "test/performance-regression/full-apps/qmcpack/utils/generate.py", "copies": "2", "size": "1201", "license": "bsd-3-clause", "hash": -979189022579984000, "line_mean": 29.025, "line_max": 72, "alpha_frac": 0.6336386345, "autogenerated": false, "ratio": 3...
#!/bin/env python ''' This script downloads and repacks official rust language builds with the necessary tool and target support for the Firefox build environment. ''' import os.path import sys import requests import subprocess import toml def fetch_file(url): '''Download a file from the given url if it's not a...
{ "repo_name": "Yukarumya/Yukarum-Redfoxes", "path": "taskcluster/docker/rust-build/repack_rust.py", "copies": "1", "size": "6624", "license": "mpl-2.0", "hash": 3639322748937405400, "line_mean": 31.9552238806, "line_max": 92, "alpha_frac": 0.6017512077, "autogenerated": false, "ratio": 3.42857142...
#!/bin/env python # This script fetches the dependencies listed in the file # "projectdata/dependencies.json" from ci_build import default_platform from optparse import OptionParser import dependencies import getpass import sys import traceback import os description = "Fetch ohWidget dependencies from the Internet."...
{ "repo_name": "broonie89/loadify-1", "path": "lib/ohdevtools/commands/fetch_dependencies.py", "copies": "1", "size": "4072", "license": "mit", "hash": -5679040403450270000, "line_mean": 41.8631578947, "line_max": 147, "alpha_frac": 0.653978389, "autogenerated": false, "ratio": 3.9765625, "confi...
#!/bin/env python # This script reads a COPASI file, as well as a tab delimited file, and creates optimization items (that is # parameters that COPASI might vary during an optimization / parameter estimation task) for the entries contained # therein. The resulting file will be written into an output file that is provi...
{ "repo_name": "jonasfoe/COPASI", "path": "copasi/bindings/python/examples/add_optitems.py", "copies": "2", "size": "3275", "license": "artistic-2.0", "hash": -4091368261842654000, "line_mean": 37.0813953488, "line_max": 119, "alpha_frac": 0.6830534351, "autogenerated": false, "ratio": 3.579234972...
#!/bin/env python """ This script removes duplicated dist-info directories of setuptools, which happen to exist on the Travis CI in their Ubuntu 14.04 (trusty) distro: site-packages/setuptools <- contains 36.3.0 site-packages/setuptools-36.0.1.dist-info <- duplicate to be removed site-packages/se...
{ "repo_name": "andy-maier/ownmoviedb", "path": "remove_duplicate_setuptools.py", "copies": "2", "size": "1857", "license": "apache-2.0", "hash": -8960871743032433000, "line_mean": 29.95, "line_max": 78, "alpha_frac": 0.6424340334, "autogenerated": false, "ratio": 3.805327868852459, "config_test...
#!/bin/env python ''' This script triggers a taskcluster task, waits for it to finish, fetches the artifacts, uploads them to tooltool, and updates the in-tree tooltool manifests. ''' from __future__ import print_function import requests.packages.urllib3 import argparse import datetime import json import os import s...
{ "repo_name": "Yukarumya/Yukarum-Redfoxes", "path": "taskcluster/docker/rust-build/tcbuild.py", "copies": "1", "size": "7647", "license": "mpl-2.0", "hash": 3986560689040673300, "line_mean": 32.247826087, "line_max": 87, "alpha_frac": 0.5927814829, "autogenerated": false, "ratio": 3.9035222052067...
#!/bin/env python # This script will need to be setup as a cron job # it will watch periodically for new files to appear # in the file table, and begin to process them # recording their results in the table for status # updates import sys, string import Config import Database import argparse import atexit, os, time...
{ "repo_name": "BioGRID/ORCA", "path": "operations/DataProcessing/DataProcessingCRON.py", "copies": "1", "size": "4796", "license": "mit", "hash": 7430842498039528000, "line_mean": 30.5592105263, "line_max": 302, "alpha_frac": 0.6657631359, "autogenerated": false, "ratio": 3.3053066850447967, "c...
#!/bin/env python #This software is licensed as described in the file LICENSE.md, which # you should have received as part of this distribution. from kaira.data_containers.abstract_data_container import AbstractDataContainer class AbstractLoader(object): """Class that handles loading for different objects. ...
{ "repo_name": "Joshuaalbert/KAIRApy", "path": "src/kaira/loaders/abstract_loader.py", "copies": "1", "size": "2210", "license": "apache-2.0", "hash": -7112353343101034000, "line_mean": 42.3333333333, "line_max": 174, "alpha_frac": 0.6850678733, "autogenerated": false, "ratio": 4.537987679671458, ...
#!/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import logging from optparse import OptionParser import os import os.path import re from subprocess i...
{ "repo_name": "wilebeast/FireFox-OS", "path": "B2G/gecko/tools/l10n/l10n.py", "copies": "2", "size": "3682", "license": "apache-2.0", "hash": -6305674070894290000, "line_mean": 29.4297520661, "line_max": 69, "alpha_frac": 0.6298207496, "autogenerated": false, "ratio": 3.6098039215686275, "confi...
#!/bin/env python """ Tool demonstrating how to convert from Python Dictionaries to XML""" from xmltools import * try : from cxmltools import * # Use CXMLtools if possible except : pass import sys if __name__ == "__main__" : input_stdin = False output_stdout = False if (len(sys.argv)==1) : ...
{ "repo_name": "RichIsMyName/PicklingToolsRepo", "path": "Python/dict2xml.py", "copies": "2", "size": "1366", "license": "bsd-3-clause", "hash": 461183983511397400, "line_mean": 28.6956521739, "line_max": 119, "alpha_frac": 0.5922401171, "autogenerated": false, "ratio": 3.3398533007334965, "conf...
#!/bin/env python # Tool for debugging clang translator import sys import clang.cindex def cursors_with_token(cursor, token): for t in cursor.get_tokens(): if token in t.spelling: yield cursor break for child in cursor.get_children(): for c in cursors_with_token(child...
{ "repo_name": "JaneliaSciComp/osgpyplusplus", "path": "examples/rough_translated1/cursor_for_token.py", "copies": "1", "size": "1178", "license": "bsd-3-clause", "hash": 1884300144981326800, "line_mean": 31.7222222222, "line_max": 82, "alpha_frac": 0.6162988115, "autogenerated": false, "ratio": 3...
#!/bin/env python """Tool to continuously capture fincore stats from Cassandra data files related to stress""" import subprocess import shlex import time import argparse from daemonize import Daemonize import logging def capture_stats(): while True: proc = subprocess.Popen("/usr/local/bin/linux-fincore ...
{ "repo_name": "mambocab/cstar_perf", "path": "tool/cstar_perf/tool/fincore_capture.py", "copies": "2", "size": "1575", "license": "apache-2.0", "hash": -5146706380013534000, "line_mean": 35.6279069767, "line_max": 118, "alpha_frac": 0.6533333333, "autogenerated": false, "ratio": 3.813559322033898...
#!/bin/env python # Translated into python from C++ tutorial at # http:#trac.openscenegraph.org/projects/osg/wiki/Support/Tutorials/BasicGeometry from osgpypp import osg, osgViewer # The following section of code sets up a viewer to see the scene we create, a 'group' instance to serve as the root of the scene graph,...
{ "repo_name": "JaneliaSciComp/osgpyplusplus", "path": "examples/osg-tutorial/tut1_basic_geometry.py", "copies": "1", "size": "5213", "license": "bsd-3-clause", "hash": 915908773346263400, "line_mean": 58.2386363636, "line_max": 551, "alpha_frac": 0.7853443315, "autogenerated": false, "ratio": 3.3...
#!/bin/env python # Translated into python from C++ tutorial at # http:#trac.openscenegraph.org/projects/osg/wiki/Support/Tutorials/Textures from osgpypp import osg, osgDB, osgViewer def createPyramid(): pyramidGeode = osg.Geode() pyramidGeometry = osg.Geometry() pyramidGeode.addDrawable(pyramidGeometry) ...
{ "repo_name": "JaneliaSciComp/osgpyplusplus", "path": "examples/debugging2/tut3_transforms_and_states.py", "copies": "1", "size": "6100", "license": "bsd-3-clause", "hash": 3657806419145073000, "line_mean": 33.8571428571, "line_max": 86, "alpha_frac": 0.7380327869, "autogenerated": false, "ratio"...
#!/bin/env python # try importing the modules that do not come with Python by default # check if it is installed by importing the modules try: from google.cloud import texttospeech import PySimpleGUI as sg import babel #print('\nAll modules installed successfully, have fun! d^o^b') except Exception as ...
{ "repo_name": "Pyroseza/Random", "path": "Google TTS/tts_form.py", "copies": "1", "size": "19932", "license": "mit", "hash": -1156495943554036000, "line_mean": 52.8486486486, "line_max": 164, "alpha_frac": 0.584972897, "autogenerated": false, "ratio": 4.147377185678601, "config_test": false, ...
#!/bin/env python # u""" Get mean square displacements (MSDs) of given atoms (see ids below) from the akr files in the arguments. This utility assumes that the cell is fixed during the simulation. Staggered measuring of MSD for for the statistical purpose. """ from __future__ import print_function import os,sys,glob...
{ "repo_name": "ryokbys/nap", "path": "nappy/get_msd_from_akr.py", "copies": "1", "size": "4196", "license": "mit", "hash": -3528318276305278500, "line_mean": 28.1388888889, "line_max": 106, "alpha_frac": 0.5502859867, "autogenerated": false, "ratio": 2.917941585535466, "config_test": false, "...
#! /bin/env python """" Usage: $ python queue_image_harvest.py user-email url_collection_api """ import sys import os from harvester.config import config as config_harvest from harvester.collection_registry_client import Collection import logbook from redis import Redis from rq import Queue EMAIL_RETURN_ADDRESS = ...
{ "repo_name": "barbarahui/harvester", "path": "scripts/queue_image_harvest.py", "copies": "2", "size": "5025", "license": "bsd-3-clause", "hash": 562397674925728060, "line_mean": 32.0592105263, "line_max": 76, "alpha_frac": 0.5832835821, "autogenerated": false, "ratio": 4.0264423076923075, "con...
#!/bin/env python """ Utility functions """ import requests import logging import os from theano import config import numpy def download_file(url, outpath): """ Download a file to a given location over HTTP :param url: The HTTP location to fetch. :param outpath: The location to save it to "...
{ "repo_name": "Sentimentron/Dracula", "path": "util.py", "copies": "1", "size": "1891", "license": "bsd-3-clause", "hash": 5440059468273810000, "line_mean": 27.223880597, "line_max": 72, "alpha_frac": 0.639873083, "autogenerated": false, "ratio": 3.82020202020202, "config_test": false, "has_n...
""" utils.py Utility functions for RnaChipIntegrator: - make_errline: highlight problem fields in a string - truncate_text: truncate a text string to a specified length """ def make_errline(line,bad_fields=[]): """Return an 'error line' indicating problem fields in a string Given a tab-delimited line and a...
{ "repo_name": "fls-bioinformatics-core/RnaChipIntegrator", "path": "rnachipintegrator/utils.py", "copies": "1", "size": "1894", "license": "artistic-2.0", "hash": -4691815580973784000, "line_mean": 29.5483870968, "line_max": 75, "alpha_frac": 0.6436114044, "autogenerated": false, "ratio": 3.81854...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Mellanox Technologies, 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 # ...
{ "repo_name": "mellanox-openstack/vsa", "path": "src/scripts/tgt_mon.py", "copies": "1", "size": "3796", "license": "apache-2.0", "hash": 7552989203463078000, "line_mean": 29.6129032258, "line_max": 124, "alpha_frac": 0.5171232877, "autogenerated": false, "ratio": 3.2472198460222415, "config_te...
""" /*- * Copyright (c) 1997 by Tracy Camp campt@hurrah.com * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and that * both that copyright notice and this pe...
{ "repo_name": "r-lyeh/scriptorium", "path": "python/tinypy-panda/examples/vines.py", "copies": "1", "size": "5527", "license": "unlicense", "hash": 2733201980489690000, "line_mean": 31.5176470588, "line_max": 93, "alpha_frac": 0.5234304324, "autogenerated": false, "ratio": 3.323511725796753, "c...