text stringlengths 0 1.05M | meta dict |
|---|---|
#! /bin/env python
#
# Michael Gibson 23 April 2015
import sys, struct
from .qstring import read_qstring
def read_header(fid):
"""Reads the Intan File Format header from the given file."""
# Check 'magic number' at beginning of file to make sure this is an Intan
# Technologies RHD2000 data file.
magi... | {
"repo_name": "britodasilva/pyspike",
"path": "pyspike/intanutil/read_header.py",
"copies": "1",
"size": "6226",
"license": "mit",
"hash": -1627989771508633900,
"line_mean": 47.2635658915,
"line_max": 236,
"alpha_frac": 0.6219081272,
"autogenerated": false,
"ratio": 3.653755868544601,
"config_t... |
#! /bin/env python
#
# Michael Gibson 23 April 2015
import sys, struct
import numpy as np
def read_one_data_block(data, header, indices, fid):
"""Reads one 60-sample data block from fid into data, at the location indicated by indices."""
# In version 1.2, we moved from saving timestamps as unsigned
# int... | {
"repo_name": "britodasilva/pyhfo",
"path": "pyhfo/io/intanutil/read_one_data_block.py",
"copies": "2",
"size": "2795",
"license": "mit",
"hash": -4574827353191439400,
"line_mean": 62.5227272727,
"line_max": 194,
"alpha_frac": 0.6554561717,
"autogenerated": false,
"ratio": 3.227482678983834,
"c... |
#! /bin/env python
#
# Michael Gibson 23 April 2015
def get_bytes_per_data_block(header):
"""Calculates the number of bytes in each 60-sample datablock."""
# Each data block contains 60 amplifier samples.
bytes_per_block = 60 * 4 # timestamp data
bytes_per_block = bytes_per_block + 60 * 2 * header['... | {
"repo_name": "britodasilva/pyspike",
"path": "pyspike/intanutil/get_bytes_per_data_block.py",
"copies": "2",
"size": "1338",
"license": "mit",
"hash": -8565994067639960000,
"line_mean": 37.2571428571,
"line_max": 86,
"alpha_frac": 0.6801195815,
"autogenerated": false,
"ratio": 3.448453608247423,... |
#! /bin/env python
#
# Michael Gibson 27 April 2015
def data_to_result(header, data, data_present):
"""Moves the header and data (if present) into a common object."""
result = {}
result['notes'] = header['notes']
result['frequency_parameters'] = header['frequency_parameters']
if header['num_ampli... | {
"repo_name": "britodasilva/pyspike",
"path": "pyspike/intanutil/data_to_result.py",
"copies": "2",
"size": "2165",
"license": "mit",
"hash": 5004347183577376000,
"line_mean": 39.0925925926,
"line_max": 77,
"alpha_frac": 0.5953810624,
"autogenerated": false,
"ratio": 3.469551282051282,
"config_... |
#! /bin/env python
#
# Michael Gibson 27 April 2015
import math
import numpy as np
def notch_filter(input, fSample, fNotch, Bandwidth):
"""Implements a notch filter (e.g., for 50 or 60 Hz) on vector 'input'.
fSample = sample rate of data (input Hz or Samples/sec)
fNotch = filter notch frequency (input Hz... | {
"repo_name": "britodasilva/pyspike",
"path": "pyspike/intanutil/notch_filter.py",
"copies": "2",
"size": "1417",
"license": "mit",
"hash": 458820583796197400,
"line_mean": 27.34,
"line_max": 99,
"alpha_frac": 0.6189131969,
"autogenerated": false,
"ratio": 2.800395256916996,
"config_test": fals... |
#!/bin/env python
""" Module to display weather info on polybar """
# -*- coding: utf-8 -*-
import argparse
import datetime
import logging
import os
import time
import requests
import importlib
# pylint: disable=redefined-builtin
from requests import ConnectionError
from requests.exceptions import HTTPError, Timeou... | {
"repo_name": "NearHuscarl/dotfiles",
"path": ".config/polybar/weather/weather.py",
"copies": "1",
"size": "5497",
"license": "bsd-3-clause",
"hash": -7006943903578723000,
"line_mean": 26.1940298507,
"line_max": 94,
"alpha_frac": 0.6384924991,
"autogenerated": false,
"ratio": 2.9167556029882604,
... |
#!/bin/env python
# Module to help convert OpenSceneGraph C++ examples to python
import clang.cindex
from clang.cindex import CursorKind, TokenKind
INDENT_SIZE = 4
# Conversion from C++ to python
punctuation_translator = {
'->': '.',
'::': '.',
'{': '',
'}': '',
',': ', ',
'&': '',
';': ... | {
"repo_name": "JaneliaSciComp/osgpyplusplus",
"path": "examples/rough_translated1/translate_clang2.py",
"copies": "1",
"size": "13852",
"license": "bsd-3-clause",
"hash": -2463955196675368000,
"line_mean": 30.6255707763,
"line_max": 119,
"alpha_frac": 0.5861247473,
"autogenerated": false,
"ratio"... |
#!/bin/env python
# Module to help convert OpenSceneGraph C++ examples to python
import os
import re
import clang.cindex
from clang.cindex import CursorKind, TokenKind
INDENT_SIZE = 4
# Conversion from C++ to python
punctuation_dict = {
'->': '.',
'::': '.',
'{': '',
'}': '',
}
# Conversion from C... | {
"repo_name": "JaneliaSciComp/osgpyplusplus",
"path": "examples/rough_translated1/translate_clang.py",
"copies": "1",
"size": "12864",
"license": "bsd-3-clause",
"hash": 6228471104059251000,
"line_mean": 32.412987013,
"line_max": 104,
"alpha_frac": 0.5842661692,
"autogenerated": false,
"ratio": 3... |
#!/bin/env python
# Module to help convert OpenSceneGraph C++ examples to python
import re
import textwrap
from collections import OrderedDict
import clang.cindex
from clang.cindex import CursorKind, TokenKind
INDENT_SIZE = 4
CURRENT_INDENT = 0
# Conversion from C++ to python
punctuation_translator = {
'->': ... | {
"repo_name": "JaneliaSciComp/osgpyplusplus",
"path": "examples/rough_translated1/translate_clang3.py",
"copies": "1",
"size": "26184",
"license": "bsd-3-clause",
"hash": -6482862582589855000,
"line_mean": 30.815309842,
"line_max": 105,
"alpha_frac": 0.5527039413,
"autogenerated": false,
"ratio":... |
#!/bin/env python
#
# module to wrap bosco_cluster and related functionality
# .bosco/clusterlist
# .bosco/.pass
# entry=griddev03.racf.bnl.gov max_queued=-1 cluster_type=slurm
#
import logging
import os
import subprocess
import shutil
import threading
import time
# Added to support running module as script from arbi... | {
"repo_name": "btovar/autopyfactory",
"path": "autopyfactory/bosco.py",
"copies": "1",
"size": "11953",
"license": "apache-2.0",
"hash": -8597877345731734000,
"line_mean": 36.0061919505,
"line_max": 111,
"alpha_frac": 0.5492345018,
"autogenerated": false,
"ratio": 3.829862223646267,
"config_tes... |
#!/bin/env python
"""
A client represents a user with an eye tracker. It sends its eye tracking data
to the server, and receives data of all the other clients from the server.
Each Client has a Connection that maintains the networking to the server.
"""
"""
Copyright 2016 Meng Du
Licensed under th... | {
"repo_name": "Haaaaaank/Dual-Eye-Tracking",
"path": "client.py",
"copies": "1",
"size": "4116",
"license": "apache-2.0",
"hash": -6439340787974955000,
"line_mean": 31.15625,
"line_max": 108,
"alpha_frac": 0.610058309,
"autogenerated": false,
"ratio": 4.047197640117994,
"config_test": false,
... |
#!/bin/env python
"""
A client represents a user with an eye tracker. It sends its eye tracking data
to the server, and receives data of all the other clients from the server.
"""
"""
Copyright 2016 Meng Du
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file e... | {
"repo_name": "Haaaaaank/Dual-Eye-Tracking",
"path": "files for presentation/client.py",
"copies": "1",
"size": "3490",
"license": "apache-2.0",
"hash": 994543529931623300,
"line_mean": 29.0862068966,
"line_max": 107,
"alpha_frac": 0.6137535817,
"autogenerated": false,
"ratio": 4.0534262485482,
... |
# FIXME List:
# * Problems with flickering related to ERASE_BACKGROUND
# and the splitters. Might be a problem with this 2.5 beta...?
# UPDATE: can't see on 2.5.2 GTK - maybe just a faster machine :)
# * Demo Code menu?
# * Annoying switching between tabs and resulting flicker
# how to replace a page in th... | {
"repo_name": "dnxbjyj/python-basic",
"path": "gui/wxpython/wxPython-demo-4.0.1/demo/Main.py",
"copies": "1",
"size": "94659",
"license": "mit",
"hash": 10166653438181732,
"line_mean": 33.4841530055,
"line_max": 128,
"alpha_frac": 0.5659683707,
"autogenerated": false,
"ratio": 3.982456140350877,
... |
'''
Annokey: a NCBI Gene Database Keyword Search Tool
------------------------------------------------
Authors: Daniel Park, Sori Kang, Bernie Pope, Tu Nguyen-Dumont.
Copyright: 2013, 2014
Website: https://github.com/bjpop/annokey
License: BSD, see LICENCE file in source distribution.
Searches the NCBI gene da... | {
"repo_name": "bjpop/annokey",
"path": "annokey/annokey.py",
"copies": "1",
"size": "7121",
"license": "bsd-3-clause",
"hash": -1896573910817640700,
"line_mean": 35.1472081218,
"line_max": 78,
"alpha_frac": 0.5490801854,
"autogenerated": false,
"ratio": 4.576478149100257,
"config_test": false,
... |
#!/bin/env python
"""
Apache 404 handler for mogrifying images.
"""
import os
from settings import DEBUG
from utils import process_url, Http404
from transmogrify import Transmogrify
from hashlib import sha1
from contextlib import contextmanager
import time
@contextmanager
def lock_file(lock):
open(lock, "w")
... | {
"repo_name": "callowayproject/Transmogrify",
"path": "doc_src/bin/apache_404_handler.py",
"copies": "1",
"size": "1791",
"license": "apache-2.0",
"hash": 2056684368168107800,
"line_mean": 19.8255813953,
"line_max": 81,
"alpha_frac": 0.5996649916,
"autogenerated": false,
"ratio": 3.30442804428044... |
#!/bin/env python
"""
array.py -- Simple utilities for arrays: slice, compress by mask, bundle up, etc.
"""
import sys, os
import numpy as N
#import pynio as NC
def sliceArrays(i, j, *arrays):
"""Slice all input arrays using the supplied indices, a[i:j], and return them in the
same order as input.
"""
... | {
"repo_name": "dataplumber/nexus",
"path": "climatology/clim/util/array.py",
"copies": "1",
"size": "6654",
"license": "apache-2.0",
"hash": 5441228181101407000,
"line_mean": 35.9666666667,
"line_max": 98,
"alpha_frac": 0.5937781785,
"autogenerated": false,
"ratio": 3.941943127962085,
"config_t... |
'''
Authors: Bernie Pope, Gayle Philip, Clare Sloggett
Description:
Simple pipeline to demonstrate how to use the base tools.
Counts the number of lines in a set of files and then sums
them up.
'''
import sys
from ruffus import *
from utils import (runStageCheck, getOptions, initLog)
from cmdline_args import get_c... | {
"repo_name": "jessicachung/rna_seq_pipeline",
"path": "pipeline_base/example_pipeline.py",
"copies": "1",
"size": "2064",
"license": "mit",
"hash": 351274557251155700,
"line_mean": 32.2903225806,
"line_max": 96,
"alpha_frac": 0.710755814,
"autogenerated": false,
"ratio": 3.504244482173175,
"co... |
#!/bin/env python
"""
# Automatically translated python version of
# OpenSceneGraph example program "osganimate"
# Translated from file 'osganimate.cpp'
# OpenSceneGraph example, osganimate.
#*
#* Permission is hereby granted, free of charge, to any person obtaining a copy
#* of this software and associated docum... | {
"repo_name": "JaneliaSciComp/osgpyplusplus",
"path": "examples/debugging2/osganimate.py",
"copies": "1",
"size": "7471",
"license": "bsd-3-clause",
"hash": -6345994782289929000,
"line_mean": 38.1151832461,
"line_max": 114,
"alpha_frac": 0.6786240128,
"autogenerated": false,
"ratio": 3.4539990753... |
#!/bin/env python
####
## build node for hudson
## used to build nightly os images
## and upload to upstream package repository
## will only work on hudson and our network - not supposed to be called externally
###
## usage: set env arg NODE_VERSION with a version number and set env arg REPOSITORY as unstable
## e.g.... | {
"repo_name": "broonie89/loadify-1",
"path": "lib/ohdevtools/commands/build_node.py",
"copies": "1",
"size": "3942",
"license": "mit",
"hash": -1015223600647688200,
"line_mean": 38.0297029703,
"line_max": 202,
"alpha_frac": 0.6182141045,
"autogenerated": false,
"ratio": 3.3435114503816794,
"con... |
#!/bin/env python
####
## build package for hudson
## used to build nightly packages for ohwidget
## and upload to upstream package repository
## will only work on hudson and our network - not supposed to be called externally
###
## usage: set env arg TARGET_ARCH with an arch and set env arg REPOSITORY as nightly & s... | {
"repo_name": "broonie89/loadify-1",
"path": "lib/ohdevtools/commands/build_package.py",
"copies": "1",
"size": "5367",
"license": "mit",
"hash": -5334702076558879000,
"line_mean": 31.7256097561,
"line_max": 212,
"alpha_frac": 0.5899012484,
"autogenerated": false,
"ratio": 3.460348162475822,
"c... |
#!/bin/env python
##############################################
# CompareBLASTs #
# A tool to compare the found hits from two #
# BLAST searches with the same search query. #
# #
# by Philipp B. Rentzsch #
# BCCDC Vancouver, ... | {
"repo_name": "Public-Health-Bioinformatics/blast_comparison",
"path": "main.py",
"copies": "1",
"size": "14230",
"license": "mit",
"hash": -3328828137473905700,
"line_mean": 48.4097222222,
"line_max": 238,
"alpha_frac": 0.5711876318,
"autogenerated": false,
"ratio": 4.040318001135718,
"config_... |
#!/bin/env python
"""
Compress and delete a folder if 50% of the files inside it are less than 2MB.
It only considers files in the first level of the folder.
"""
import os
import shutil
import sys
import tarfile
from contextlib import contextmanager
@contextmanager
def cd(newdir):
prevdir = os.getcwd()
os.... | {
"repo_name": "escorciav/linux-utils",
"path": "hacks/compress_folder.py",
"copies": "1",
"size": "2153",
"license": "mit",
"hash": -2992386942273787000,
"line_mean": 26.961038961,
"line_max": 77,
"alpha_frac": 0.6326056665,
"autogenerated": false,
"ratio": 3.68034188034188,
"config_test": fals... |
#
# Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
# All rights reserved.
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice, this list o... | {
"repo_name": "wayfinder/Wayfinder-CppCore-v3",
"path": "ngplib/copy_templates.py",
"copies": "1",
"size": "2946",
"license": "bsd-3-clause",
"hash": 5727523718443106000,
"line_mean": 43.6363636364,
"line_max": 759,
"alpha_frac": 0.7026476578,
"autogenerated": false,
"ratio": 4.126050420168068,
... |
# --
# Copyright (c) 2008-2021 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
# --
import os
import gzip
import textwrap
from setuptools.command.sdist import sdist
from setupto... | {
"repo_name": "nagareproject/core",
"path": "setup.py",
"copies": "1",
"size": "4383",
"license": "bsd-3-clause",
"hash": -6784617685799433000,
"line_mean": 30.5323741007,
"line_max": 140,
"alpha_frac": 0.6274241387,
"autogenerated": false,
"ratio": 3.8046875,
"config_test": false,
"has_no_ke... |
# Copyright (c) 2012-2017 The Khronos Group Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | {
"repo_name": "KhronosGroup/OpenVX-cts",
"path": "run_tests.py",
"copies": "1",
"size": "6666",
"license": "apache-2.0",
"hash": 1927628399555837400,
"line_mean": 29.5779816514,
"line_max": 140,
"alpha_frac": 0.5124512451,
"autogenerated": false,
"ratio": 4.030229746070133,
"config_test": true,... |
#
# Copyright (C) 2012 by Adam Ewing (adam.ewing@gmail.com)
#
# Released under the MIT license, see LICENSE.txt
#
import math
class Pair:
"""Stores information for a genome/element read pair"""
def __init__(self,chrom,readPos,readStrand,mateElt,mateChrom,mateStrand,matePos,eltStart,eltEnd,eltStrand,eltFullLe... | {
"repo_name": "adamewing/discord-retro",
"path": "lib/pairinfo.py",
"copies": "1",
"size": "17431",
"license": "mit",
"hash": -8277356514574893000,
"line_mean": 39.16359447,
"line_max": 152,
"alpha_frac": 0.5872296483,
"autogenerated": false,
"ratio": 3.828464748517461,
"config_test": true,
"... |
"""
Copyright (C) 2012 by Adam Ewing (adam.ewing@gmail.com)
Released under the MIT license, see LICENSE.txt
"""
import pysam, sys, re
def uniqann(annList):
uniq = {}
for ann in annList:
uniq[ann] = 1
return uniq.keys()
def checkfile(fname):
try:
open(fname)
except IOError as e... | {
"repo_name": "adamewing/discord-retro",
"path": "lib/annotate.py",
"copies": "1",
"size": "2349",
"license": "mit",
"hash": -486922220157716860,
"line_mean": 30.32,
"line_max": 105,
"alpha_frac": 0.5014899957,
"autogenerated": false,
"ratio": 4.099476439790576,
"config_test": false,
"has_no_... |
#
# Copyright (C) 2012 by Adam Ewing (adam.ewing@gmail.com)
#
# Released under the MIT license, see LICENSE.txt
#
import re, os, subprocess, tempfile, pysam, sys, argparse, peakparser
from string import maketrans
def checkfile(fname):
try:
open(fname)
except IOError as e:
print "can't find fi... | {
"repo_name": "adamewing/discord-retro",
"path": "lib/multipoint.py",
"copies": "1",
"size": "23814",
"license": "mit",
"hash": 13195403074521236,
"line_mean": 38.4925373134,
"line_max": 155,
"alpha_frac": 0.569286974,
"autogenerated": false,
"ratio": 3.681249033853764,
"config_test": true,
"... |
#*************************************************************************
#Copyright (C) 2015 by Arash Bakhtiari
#You may not use this file except in compliance with the License.
#You obtain a copy of the License in the LICENSE file.
#Unless required by applicable law or agreed to in writing, software
#distributed u... | {
"repo_name": "arashb/tbslas",
"path": "scripts/utils_pp.py",
"copies": "1",
"size": "24263",
"license": "bsd-3-clause",
"hash": 5576294703964485000,
"line_mean": 34.8920118343,
"line_max": 108,
"alpha_frac": 0.5078102461,
"autogenerated": false,
"ratio": 3.265545087483176,
"config_test": false... |
#!/bin/env python
"""Defines a source of words to be used in testing."""
import argparse
import itertools
import os
import random
class WordSource(object):
"""Models a source of words."""
def __init__(self, src_dir='.'):
source_file_name = os.path.join(src_dir, 'latin_words.txt')
lines = [... | {
"repo_name": "mrwizard82d1/pyutils",
"path": "word_source.py",
"copies": "1",
"size": "3013",
"license": "apache-2.0",
"hash": -8211583827202532000,
"line_mean": 29.7448979592,
"line_max": 75,
"alpha_frac": 0.5828078327,
"autogenerated": false,
"ratio": 3.872750642673522,
"config_test": false,... |
#!/bin/env python
# -----------------------------------------------------------------------
# Determine the time overlap of the VM with the measurement window
#
# Aug 31 2016
# -----------------------------------------------------------------------
#
# type 1 (no overlap before or after)
# |---VM---|
# ... | {
"repo_name": "hep-gc/cloud-monitoring",
"path": "vm_overlap.py",
"copies": "1",
"size": "2357",
"license": "mit",
"hash": -2487306428880035000,
"line_mean": 22.3366336634,
"line_max": 77,
"alpha_frac": 0.4853627493,
"autogenerated": false,
"ratio": 3.0850785340314135,
"config_test": false,
"... |
'''
Differential expression analysis for single or paired-end RNA-Seq data using
the Tuxedo protocol (Tophat, Cufflinks) and EdgeR/Voom with counts from
HTSeq-count.
Authors: Jessica Chung, Bernie Pope, Clare Sloggett, Gayle Philip, Marek Cmero.
Description: This program implements a workflow pipeline for differen... | {
"repo_name": "jessicachung/rna_seq_pipeline",
"path": "RNA-seq_pipeline.py",
"copies": "1",
"size": "36838",
"license": "mit",
"hash": -7972340485150674000,
"line_mean": 37.7768421053,
"line_max": 80,
"alpha_frac": 0.6000868668,
"autogenerated": false,
"ratio": 3.326530612244898,
"config_test"... |
#!/bin/env python
# Needs Net-SNMP Python bindings
from optparse import OptionParser
import sys
import netsnmp
import pickle
import socket
import struct
import time
package = ([])
def fetchOID(host, community, oid, name):
if options.verbose:
print >> sys.stderr, 'connecting to host: %s using community: ... | {
"repo_name": "linkslice/graphite-tools",
"path": "snmp_pickle.py",
"copies": "1",
"size": "3691",
"license": "mit",
"hash": -6644711975801147000,
"line_mean": 35.5445544554,
"line_max": 105,
"alpha_frac": 0.6057978868,
"autogenerated": false,
"ratio": 3.6617063492063493,
"config_test": false,
... |
#!/bin/env python
# Needs Net-SNMP Python bindings
from optparse import OptionParser
import sys
import os
import netsnmp
import pickle
import socket
import struct
import time
os.environ['MIBS'] = 'all' # install Cisco/airespace mibs in net-snmp mibs directory
# usually /usr/share/snmp/mibs... | {
"repo_name": "linkslice/graphite-tools",
"path": "cisco-airespace.py",
"copies": "1",
"size": "5482",
"license": "mit",
"hash": -6091721852497073000,
"line_mean": 39.0145985401,
"line_max": 134,
"alpha_frac": 0.6014228384,
"autogenerated": false,
"ratio": 3.230406599882145,
"config_test": fals... |
#!/bin/env python
"""
Example illustrating use of expanded ensembles framework to perform a
generic expanded ensembles simulation over chemical species.
This could represent sampling of small molecules, protein mutants, or both.
"""
import copy
import logging
import numpy as np
import perses.annihilation.ncmc_swi... | {
"repo_name": "choderalab/perses",
"path": "examples/rjmc/run_example.py",
"copies": "1",
"size": "6481",
"license": "mit",
"hash": 2787314693063293400,
"line_mean": 34.4153005464,
"line_max": 143,
"alpha_frac": 0.6525227588,
"autogenerated": false,
"ratio": 3.8554431885782274,
"config_test": f... |
#! /bin/env python
"""
Examples
--------
Create a grid of length 2 in the x direction, and 3 in the y direction.
>>> g = Rectilinear([1., 2., 3.], [1., 2., 4., 8.])
>>> g.get_point_count()
12
>>> g.get_cell_count()
6
>>> g.get_x()
array([ 1., 2., 4., 8., 1., 2., 4., 8., 1., 2., 4., 8.])
>>> g.get_y()
arra... | {
"repo_name": "csdms/coupling",
"path": "pymt/grids/rectilinear.py",
"copies": "2",
"size": "6453",
"license": "mit",
"hash": 7395814766217350000,
"line_mean": 25.4467213115,
"line_max": 96,
"alpha_frac": 0.4986827832,
"autogenerated": false,
"ratio": 2.9185888738127543,
"config_test": false,
... |
#! /bin/env python
"""
Examples
--------
Create a grid of length 2 in the x direction, and 3 in the y direction.
>>> (x, y) = np.meshgrid ([1., 2., 4., 8.], [1., 2., 3.])
>>> g = Structured(y.flatten(), x.flatten(), [3, 4])
>>> g.get_point_count()
12
>>> g.get_cell_count()
6
>>> g.get_x()
array([ 1., 2., 4., 8., ... | {
"repo_name": "csdms/coupling",
"path": "pymt/grids/structured.py",
"copies": "1",
"size": "6051",
"license": "mit",
"hash": 4578148262856872000,
"line_mean": 27.1441860465,
"line_max": 99,
"alpha_frac": 0.5537927615,
"autogenerated": false,
"ratio": 2.9661764705882354,
"config_test": false,
... |
#!/bin/env/python
# File: hybrid_logger.py
#
# Raspberry Pi data transfer script
#
# Date: 6/27/18
# Daniel Henshaw and Josh Tracy
# Platform: Raspberry Pi 3 model B
#
# Python version: 2.7.9
import os # for Linux terminal commands\
import RPi.GPIO as GPIO ... | {
"repo_name": "UCHIC/WaterMonitor",
"path": "Previous_Designs/Hybrid_Prototype/Software/RPi_PythonScripts/hybrid_logger_2.py",
"copies": "1",
"size": "7488",
"license": "bsd-3-clause",
"hash": 2406872407909867500,
"line_mean": 38.829787234,
"line_max": 163,
"alpha_frac": 0.5269764957,
"autogenerate... |
#!/bin/env python
#*******************************************************************************
#
# Filename : 00_gen_dataset.py
# Description : Generating Dataset list from input json file
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#************************************************... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "RunSequence/00_gen_dataset.py",
"copies": "1",
"size": "1680",
"license": "mit",
"hash": -2971522726935491000,
"line_mean": 31.9411764706,
"line_max": 116,
"alpha_frac": 0.568452381,
"autogenerated": false,
"ratio": 3.6601307189542482,
"confi... |
#!/bin/env python
#*******************************************************************************
#
# Filename : 01_run_baseline_selection.sh
# Description : Submitting all designated datasets to crab
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#***************************************... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "RunSequence/01_run_baseline_selection.py",
"copies": "1",
"size": "3961",
"license": "mit",
"hash": -7172350592245446000,
"line_mean": 32.0083333333,
"line_max": 123,
"alpha_frac": 0.5420348397,
"autogenerated": false,
"ratio": 3.62728937728937... |
#!/bin/env python
#*******************************************************************************
#
# Filename : 02_retrieve_files.py
# Description : Retrieving files of crab output
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#**********************************************************... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "RunSequence/02_retrieve_files.py",
"copies": "1",
"size": "3184",
"license": "mit",
"hash": -2844636641161289700,
"line_mean": 38.8,
"line_max": 123,
"alpha_frac": 0.534861809,
"autogenerated": false,
"ratio": 3.728337236533958,
"config_test"... |
#!/bin/env python
#*************************************************************************
#
# Filename : 03_run_massreco.py
# Description : Running mass reconstruction with standard methods
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#*****************************************************... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "RunSequence/local_run_topselection.py",
"copies": "1",
"size": "3727",
"license": "mit",
"hash": 3337866059375461400,
"line_mean": 39.0752688172,
"line_max": 142,
"alpha_frac": 0.5664072981,
"autogenerated": false,
"ratio": 3.749496981891348,
... |
#!/bin/env python
#-------------------------------------------------------------------------------
#
# Filename : all_trunc_gaus.py
# Description : Matplotlib file for generating allthe various Truncated
# Gaussians determined describe in the article
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.p... | {
"repo_name": "enochnotsocool/enochnotsocool.github.io",
"path": "images/genimage/stat_infer/all_trunc_gaus.py",
"copies": "1",
"size": "2776",
"license": "mit",
"hash": 8172511531433912000,
"line_mean": 30.5454545455,
"line_max": 113,
"alpha_frac": 0.5698847262,
"autogenerated": false,
"ratio": ... |
#!/bin/env python
#*******************************************************************************
#
# Filename : dumpLumiCount.py
# Description : Dumping number of Events, Lumi and Runs in a list of input files
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#****************************... | {
"repo_name": "NTUHEP-Tstar/ManagerUtils",
"path": "EDMUtils/scripts/dumpLumiCount.py",
"copies": "1",
"size": "1271",
"license": "mit",
"hash": -2611482127617603000,
"line_mean": 31.5897435897,
"line_max": 85,
"alpha_frac": 0.5247836349,
"autogenerated": false,
"ratio": 3.4444444444444446,
"co... |
#
# Filename : dumpsetlist.py
# Description : Dumping the list in the python
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#*******************************************************************************
import argparse
import TstarAnalysis.RunSequence.Naming as myname
def unique( seq ... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "RunSequence/dumpsetlist.py",
"copies": "1",
"size": "1385",
"license": "mit",
"hash": -7896596646753990000,
"line_mean": 28.4680851064,
"line_max": 89,
"alpha_frac": 0.5227436823,
"autogenerated": false,
"ratio": 3.6161879895561357,
"config_t... |
import argparse
import importlib
import os
import ROOT
def main():
parser = argparse.ArgumentParser(
description='Creating the Pileupweigt in plain text files')
parser.add_argument('-x', '--crosssection', dest='xsec', type=int,
help='Minimum bias cross section to use',
... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "EventWeight/makePUweight.py",
"copies": "1",
"size": "4119",
"license": "mit",
"hash": 125311250918800640,
"line_mean": 39.7821782178,
"line_max": 130,
"alpha_frac": 0.4658897791,
"autogenerated": false,
"ratio": 4.010710808179162,
"config_te... |
#!/bin/env python
#*************************************************************************
#
# Filename : mergeScaleFactor.py
# Description : Merging Scale factor from different objects and
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#******************************************************... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "EventWeight/mergeScaleFactor.py",
"copies": "1",
"size": "3282",
"license": "mit",
"hash": -4901192520902124000,
"line_mean": 29.1100917431,
"line_max": 100,
"alpha_frac": 0.5862279098,
"autogenerated": false,
"ratio": 3.2082111436950145,
"co... |
#!/bin/env python
#*******************************************************************************
#
# Filename : pack_plots.py
# Description : Packing all plots into single tar file
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#**********************************************************... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "RunSequence/pack_plots.py",
"copies": "1",
"size": "1559",
"license": "mit",
"hash": -8237438713963912000,
"line_mean": 38.9743589744,
"line_max": 92,
"alpha_frac": 0.5657472739,
"autogenerated": false,
"ratio": 3.3099787685774946,
"config_te... |
#!/bin/env python
#*******************************************************************************
#
# Filename : runHistCompare.py
# Description : Generating scripts for running hist compare
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#*************************************************... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "RunSequence/local_run_recocomp.py",
"copies": "1",
"size": "3569",
"license": "mit",
"hash": 1214898000655155700,
"line_mean": 36.1770833333,
"line_max": 108,
"alpha_frac": 0.5351639115,
"autogenerated": false,
"ratio": 3.850053937432578,
"co... |
#!/bin/env python
#*******************************************************************************
#
# Filename : Setup.py
# Description : Setup script for linking objects into home directory
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#*************************************************... | {
"repo_name": "enochnotsocool/UnixConfig",
"path": "Setup.py",
"copies": "1",
"size": "4378",
"license": "mit",
"hash": -8163903463942972000,
"line_mean": 34.8852459016,
"line_max": 111,
"alpha_frac": 0.5872544541,
"autogenerated": false,
"ratio": 4.012832263978002,
"config_test": false,
"has... |
import argparse
import os
import sys
import ManagerUtils.SysUtils.pluginProcessUtils as myproc
import ManagerUtils.SysUtils.pluginTimeUtils as mytime
def main():
parser = argparse.ArgumentParser()
parser.add_argument('scriptlist', type=str, nargs='+',
help='script files to process',
... | {
"repo_name": "NTUHEP-Tstar/TstarAnalysis",
"path": "RunSequence/submit_cmsrun.py",
"copies": "1",
"size": "1696",
"license": "mit",
"hash": 847603373193332600,
"line_mean": 32.2549019608,
"line_max": 84,
"alpha_frac": 0.53125,
"autogenerated": false,
"ratio": 4.229426433915212,
"config_test": ... |
#!/bin/env python
#-------------------------------------------------------------------------------
#
# Filename : update_mathjax.py
# Description : updating the mathjax.html from when given a new .sty file
# Author : Yi-Mu "Enoch" Chen [ ensc@hep1.phys.ntu.edu.tw ]
#
#----------------------------------------... | {
"repo_name": "enochnotsocool/enochnotsocool.github.io",
"path": "_includes/update_mathjax.py",
"copies": "1",
"size": "3978",
"license": "mit",
"hash": 2042386015947603500,
"line_mean": 29.3664122137,
"line_max": 115,
"alpha_frac": 0.4912016088,
"autogenerated": false,
"ratio": 3.642857142857143... |
#!/bin/env python
"""
"""
from __future__ import print_function
import sys
import os
import logging
import argparse
from . import *
from .. import mbusTime
def main(argv):
cfg = parseArgs(argv)
log = logging.getLogger()
log.setLevel(logging.DEBUG)
with (open(cfg.DESTINATION, "w") if cfg.DESTINATION el... | {
"repo_name": "tulth/diy-acura-bluetooth",
"path": "target_desktop/py_lib/mbus/nibbles/nibbles_to_toggles.py",
"copies": "1",
"size": "1979",
"license": "mit",
"hash": -8287669856225393000,
"line_mean": 34.3392857143,
"line_max": 177,
"alpha_frac": 0.6174835776,
"autogenerated": false,
"ratio": 4... |
#!/bin/env python
"""
"""
from __future__ import print_function
import sys
import os
import logging
import argparse
from . import *
def main(argv):
mbt0 = MbusTime(12, mbusTimeFormat="pyTimeElapsed")
print("mtb0 >>{}<<".format(mbt0))
mbt1 = MbusTime(12, mbusTimeFormat="microsHex")
print("mtb1 >>{}<<".f... | {
"repo_name": "tulth/diy-acura-bluetooth",
"path": "target_desktop/py_lib/mbus/mbusTime/demo.py",
"copies": "1",
"size": "1421",
"license": "mit",
"hash": 5425918131361652000,
"line_mean": 32.8333333333,
"line_max": 97,
"alpha_frac": 0.5777621393,
"autogenerated": false,
"ratio": 2.43739279588336... |
#!/bin/env python
"""
"""
from __future__ import print_function
import sys
import os
import logging
import argparse
import ctypes
from . import *
from . import mbusTime
from . import nibbles
from . import toggles
from . import nibble_link_rx_so
libSoName = "build/libMbus.so"
def main(argv):
cfg = parseArgs(argv)
... | {
"repo_name": "tulth/diy-acura-bluetooth",
"path": "target_desktop/py_lib/mbus/toggle_phy_then_link_rx_so.py",
"copies": "1",
"size": "4021",
"license": "mit",
"hash": -3960995222932970500,
"line_mean": 39.6161616162,
"line_max": 177,
"alpha_frac": 0.5971151455,
"autogenerated": false,
"ratio": 3... |
#!/bin/env python
"""
Functions to parse directories of input fastq files, create symlinks with expected filename structures, and return metadata.
Clare Sloggett, VLSCI
"""
import sys
import re
import os.path
from collections import defaultdict
from rubra.utils import (mkLink)
def parse_and_link(file, symlink_dir, ... | {
"repo_name": "vlsci/variant_calling_pipeline",
"path": "input_fastq.py",
"copies": "3",
"size": "2174",
"license": "mit",
"hash": 4677178597639519000,
"line_mean": 40.8076923077,
"line_max": 124,
"alpha_frac": 0.6517939282,
"autogenerated": false,
"ratio": 3.3549382716049383,
"config_test": fa... |
"""
GATK-based variant-calling pipeline.
Authors: Bernie Pope, Clare Sloggett, Gayle Philip.
Thanks to Dmitri Mouradov and Maria Doyle for input on the initial
analysis design.
Thanks to Matt Wakefield for contributions to Rubra
(https://github.com/bjpop/rubra) during pipeline development.
Description:
This progr... | {
"repo_name": "claresloggett/test-repo-varcall",
"path": "pipeline.py",
"copies": "1",
"size": "23828",
"license": "mit",
"hash": 1552345778930629600,
"line_mean": 39.662116041,
"line_max": 195,
"alpha_frac": 0.6718986067,
"autogenerated": false,
"ratio": 3.216088540963693,
"config_test": false... |
"""
GATK-based variant-calling pipeline, WGS version.
Authors: Bernie Pope, Clare Sloggett, Gayle Philip.
Thanks to Dmitri Mouradov and Maria Doyle for input on the initial
analysis design.
Thanks to Matt Wakefield for contributions to Rubra
(https://github.com/bjpop/rubra) during pipeline development.
Description... | {
"repo_name": "magosil86/variant_calling_pipeline",
"path": "pipeline.py",
"copies": "2",
"size": "22225",
"license": "mit",
"hash": 2760158036216094700,
"line_mean": 38.4060283688,
"line_max": 187,
"alpha_frac": 0.6739707537,
"autogenerated": false,
"ratio": 3.2497441146366426,
"config_test": ... |
#!/bin/env python
# Generation of CVs from coordination exel sheet
# Requiremts:
# -- python version >=2.7
# -- pandas library
# -- pyesgf library
# Input:
# -- File named CORDEX_ESGF_coordination_issues.xslx in directory ../Cordex_Forms
# -- Path to where the repo containing this script was checked out
#
# Output:
... | {
"repo_name": "IS-ENES-Data/scripts",
"path": "Scripts/coordination1.py",
"copies": "1",
"size": "14461",
"license": "apache-2.0",
"hash": 4150257161759245300,
"line_mean": 42.0386904762,
"line_max": 283,
"alpha_frac": 0.52997718,
"autogenerated": false,
"ratio": 3.5910106779240127,
"config_tes... |
#! /bin/env python
"""
>>> get_connectivity((6, ))
array([0, 1, 1, 2, 2, 3, 3, 4, 4, 5])
>>> get_connectivity((6, ), ordering='ccw')
array([1, 0, 2, 1, 3, 2, 4, 3, 5, 4])
>>> get_connectivity((3, 4))
array([ 0, 1, 5, 4, 1, 2, 6, 5, 2, 3, 7, 6, 4, 5, 9, 8, 5,
6, 10, 9, 6, 7, 11, 10])
>>> g... | {
"repo_name": "csdms/coupling",
"path": "pymt/grids/connectivity.py",
"copies": "2",
"size": "8521",
"license": "mit",
"hash": 4945788725690788000,
"line_mean": 27.6902356902,
"line_max": 88,
"alpha_frac": 0.5067480343,
"autogenerated": false,
"ratio": 2.915155661991105,
"config_test": false,
... |
#!/bin/env python
###############################################################################
# glideinWMSVersion.py
#
# Description:
# Execute a ls command on a condor job working directory
#
# Usage:
# glideinWMSVersion.py <Path to glideinWMS distribution> [<Checksum file>]
#
# Author:
# Parag Mhashilkar (A... | {
"repo_name": "holzman/glideinwms-old",
"path": "lib/glideinWMSVersion.py",
"copies": "1",
"size": "4903",
"license": "bsd-3-clause",
"hash": 6514200669829562000,
"line_mean": 34.0214285714,
"line_max": 99,
"alpha_frac": 0.4903120538,
"autogenerated": false,
"ratio": 4.285839160839161,
"config_... |
#!/bin/env python
"""
Illustrate how to combine a SMIRNOFF parameterized small molecule with an AMBER parameterized protein using ParmEd.
"""
#
# Load and parameterize the small molecule
#
# Load the small molecule
from openff.toolkit.utils import get_data_file_path
ligand_filename = get_data_file_path('molecules/t... | {
"repo_name": "open-forcefield-group/openforcefield",
"path": "examples/deprecated/mixedFF_structure/generate_mixedFF_complex.py",
"copies": "1",
"size": "2220",
"license": "mit",
"hash": -2352615653362829000,
"line_mean": 38.6428571429,
"line_max": 139,
"alpha_frac": 0.7617117117,
"autogenerated":... |
#!/bin/env python
"""
"""
import os
DIRNAME = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
#TEMPLATE_DEBUG = True #DEBUG
ADMINS = (
('', ''),
)
MANAGERS = ADMINS
if DEBUG:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'salt.db'
... | {
"repo_name": "rangertaha/salt-manager",
"path": "salt-manager/webapp/settings.py",
"copies": "1",
"size": "6461",
"license": "mit",
"hash": -7680853214243855000,
"line_mean": 29.9138755981,
"line_max": 131,
"alpha_frac": 0.6695557963,
"autogenerated": false,
"ratio": 3.6461625282167045,
"confi... |
#!/bin/env python
"""
"""
# import the logging library
import logging
from django.forms import ModelForm
from django.conf import settings
from models import *
# Get an instance of a logger
logger = logging.getLogger(__name__)
class AccessForm(ModelForm):
class Meta:
model = Access
#fields = [''... | {
"repo_name": "rangertaha/salt-manager",
"path": "salt-manager/webapp/apps/fabric/fabhistory/forms.py",
"copies": "2",
"size": "1037",
"license": "mit",
"hash": 4211716942001343000,
"line_mean": 29.5294117647,
"line_max": 94,
"alpha_frac": 0.6239151398,
"autogenerated": false,
"ratio": 3.67730496... |
#!/bin/env python
import time
import sys
sys.path.insert(0, '.')
import locale
locale.setlocale( locale.LC_ALL, 'English_Australia.1252' )
import opsbro.misc.wmi as wmi
import opsbro.misc.winstats as winstats
import _winreg
t0 = time.time()
c = wmi.WMI()
t1 = time.time()
print "WMI TIME", t1 - t0
_os = c.Win32_... | {
"repo_name": "naparuba/opsbro",
"path": "spike/test_wmi.py",
"copies": "2",
"size": "19646",
"license": "mit",
"hash": -8457279780536310000,
"line_mean": 27.7222222222,
"line_max": 142,
"alpha_frac": 0.6113712715,
"autogenerated": false,
"ratio": 3.329266226063379,
"config_test": false,
"has... |
"""
LICENCE
-------
Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to
KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
"""
import optparse
import os
import os.path as osp
import pprint
from SMQTK_Backend.ECDContr... | {
"repo_name": "anguoyang/SMQTK",
"path": "OLD_ROOT/Backend/SMQTK_Backend/file_cleanup.py",
"copies": "1",
"size": "1701",
"license": "bsd-3-clause",
"hash": -7888854625893566000,
"line_mean": 31.0943396226,
"line_max": 79,
"alpha_frac": 0.6549088771,
"autogenerated": false,
"ratio": 3.88356164383... |
#!/bin/env python
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | {
"repo_name": "wbond/subversion",
"path": "tools/dev/gen_junit_report.py",
"copies": "2",
"size": "11577",
"license": "apache-2.0",
"hash": 2961055150687675400,
"line_mean": 37.4617940199,
"line_max": 80,
"alpha_frac": 0.5731191155,
"autogenerated": false,
"ratio": 3.4912545235223162,
"config_t... |
#!/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Licens... | {
"repo_name": "mpereaji/incubator-spot",
"path": "spot-ingest/worker.py",
"copies": "10",
"size": "3456",
"license": "apache-2.0",
"hash": 1415321643458968300,
"line_mean": 37.8314606742,
"line_max": 158,
"alpha_frac": 0.7080439815,
"autogenerated": false,
"ratio": 3.7483731019522777,
"config_t... |
#!/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Licen... | {
"repo_name": "rabarona/incubator-spot",
"path": "spot-ingest/common/kafka_client.py",
"copies": "10",
"size": "4721",
"license": "apache-2.0",
"hash": -3241389937428688400,
"line_mean": 33.4598540146,
"line_max": 161,
"alpha_frac": 0.665325143,
"autogenerated": false,
"ratio": 3.8728465955701394... |
#!/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Licens... | {
"repo_name": "NathanSegerlind/incubator-spot",
"path": "spot-ingest/pipelines/proxy/worker.py",
"copies": "10",
"size": "3320",
"license": "apache-2.0",
"hash": 991691646213455200,
"line_mean": 39,
"line_max": 234,
"alpha_frac": 0.6045180723,
"autogenerated": false,
"ratio": 3.8649592549476135,
... |
#/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License... | {
"repo_name": "brandon-edwards/incubator-spot",
"path": "spot-ingest/pipelines/dns/collector.py",
"copies": "10",
"size": "5936",
"license": "apache-2.0",
"hash": -8198387293065342000,
"line_mean": 39.380952381,
"line_max": 228,
"alpha_frac": 0.6153975741,
"autogenerated": false,
"ratio": 3.88481... |
"""
NMEA string parser class
by Brian C. Lane <bcl@brianlane.com>
Copyright 2006 by Brian C. Lane
All Rights Reserved
"""
def check_checksum( msg ):
"""
Check the checksum of a NMEA 0183 sentence. Skips leading ! or $ and stops
at *
It ignores non-standard extensions after the checksum
... | {
"repo_name": "packetlss/aishack",
"path": "python/linux/nmea.py",
"copies": "2",
"size": "1560",
"license": "bsd-3-clause",
"hash": 8151847622075991000,
"line_mean": 21.2857142857,
"line_max": 78,
"alpha_frac": 0.558974359,
"autogenerated": false,
"ratio": 3.443708609271523,
"config_test": fal... |
#/bin/env python
"""Merge two spectrum of the same object.
The spec object used as a spectrum should contain :
spec.x as the wavelength (an array of size N) as the cernter of bin
spec.y as the flux (an array of size N)
spec.v as the variance of the flux (an array of size N)
spec.step : either an array (of size N) co... | {
"repo_name": "nicolaschotard/snspin",
"path": "snspin/spectrum/merge.py",
"copies": "1",
"size": "4534",
"license": "mit",
"hash": -6905414914458001000,
"line_mean": 38.7719298246,
"line_max": 88,
"alpha_frac": 0.6071901191,
"autogenerated": false,
"ratio": 3.0843537414965985,
"config_test": f... |
#
# mpycache - a LRU Cache implementation in python
# author: Saurav Mohapatra (mohaps@gmail.com)
# website: http://code.google.com/p/mpycache
# version: 1.0.0
# date: 01/01/2010
# license: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html)
# Copyright (c) 20... | {
"repo_name": "scionrep/scioncc",
"path": "src/pyon/util/lru_cache.py",
"copies": "4",
"size": "5804",
"license": "bsd-2-clause",
"hash": -4363811274687946000,
"line_mean": 35.049689441,
"line_max": 129,
"alpha_frac": 0.5585802895,
"autogenerated": false,
"ratio": 3.6734177215189874,
"config_te... |
'''
Next generation sequencing pipeline.
Authors: Bernie Pope, Maria Doyle, Jason Ellul and Jason Li.
Description:
This program implements a workflow pipeline for next generation
sequencing, predominantly the read mapping task, up until variant
detection.
It uses the Ruffus library to make the description of the p... | {
"repo_name": "bjpop/ngs-pipeline",
"path": "src/ruffus/pipeline.py",
"copies": "1",
"size": "6414",
"license": "bsd-3-clause",
"hash": -9154580464989056000,
"line_mean": 39.8535031847,
"line_max": 127,
"alpha_frac": 0.7315247895,
"autogenerated": false,
"ratio": 3.415335463258786,
"config_test... |
#!/bin/env python
"""
NN_io includes some functions related to input/output of NN potential.
"""
from __future__ import print_function
def read_const(fname):
"""
Read in.const.NN file.
"""
f= open(fname,'r')
buf= f.readline().split()
nl= int(buf[0])
nsp=int(buf[1])
nhl= []
for il in... | {
"repo_name": "ryokbys/nap",
"path": "nappy/nn/NN_io.py",
"copies": "1",
"size": "2506",
"license": "mit",
"hash": 2525837334228149000,
"line_mean": 26.8444444444,
"line_max": 79,
"alpha_frac": 0.5335195531,
"autogenerated": false,
"ratio": 2.663124335812965,
"config_test": false,
"has_no_key... |
#!/bin/env python
###############################################
## ##
## Tok3n wrapper client for APIv2 ##
## By Tok3n Solutions SAPI CV ##
## September 2014 ##
## ##
## Basic... | {
"repo_name": "Tok3n/wrappers",
"path": "python/tok3n_wrapper.py",
"copies": "1",
"size": "1466",
"license": "apache-2.0",
"hash": -3329600830447380000,
"line_mean": 26.679245283,
"line_max": 84,
"alpha_frac": 0.4897680764,
"autogenerated": false,
"ratio": 3.758974358974359,
"config_test": fals... |
#!/bin/env python
"""
os.walk is an awesome generator.
However, I needed the same functionality,
only I wanted to walk 'up' the
directory tree.
This allows seaching for files
in directories directly above
a given directory.
"""
import os
from os import path
def walk_up(bottom):
"""
mimic os.walk, but walk ... | {
"repo_name": "ionutvmi/sublimePacks",
"path": "utils/walk_up.py",
"copies": "1",
"size": "1265",
"license": "mit",
"hash": -6265913951940654000,
"line_mean": 17.8805970149,
"line_max": 53,
"alpha_frac": 0.5913043478,
"autogenerated": false,
"ratio": 3.698830409356725,
"config_test": false,
"... |
#!/bin/env python
"""
Page module that contain a list of Page class
and its variants implemented in subclass
which can update, filter titles and display them
"""
import logging
from pprint import pprint
import time
from datetime import datetime
import feedparser
import requests
from bs4 import BeautifulSoup as soup
... | {
"repo_name": "NearHuscarl/dotfiles",
"path": ".config/polybar/news/page.py",
"copies": "1",
"size": "12648",
"license": "bsd-3-clause",
"hash": -4551765186971199500,
"line_mean": 27.255033557,
"line_max": 93,
"alpha_frac": 0.6287410926,
"autogenerated": false,
"ratio": 2.9808827000236016,
"con... |
#!/bin/env python
"""
Parse an AMBER OpenMM ffxml file to generate variants of amino acid residue templates with protonated termini
"""
import xml.etree.ElementTree as etree
from xml.etree.ElementTree import Element, ElementTree, SubElement
input_filename = 'protein.ff14SB.xml' # input ffxml filename
output_filename... | {
"repo_name": "choderalab/perses",
"path": "perses/analysis/generate-protonated-termini.py",
"copies": "1",
"size": "1379",
"license": "mit",
"hash": -8180100610719137000,
"line_mean": 34.358974359,
"line_max": 109,
"alpha_frac": 0.6802030457,
"autogenerated": false,
"ratio": 3.3552311435523112,
... |
"""
Program: kmean-prob
Author: Travis Cunningham
"""
import random
import sys
from collections import Counter
class PGMImage(object):
"""
Represents the PGM image.
For the contents parameter, specify an array of pixels.
"""
def __init__(self, width, height, max_grayscale, contents):
... | {
"repo_name": "travcunn/cs362-kmeans",
"path": "src/kmean-prob.py",
"copies": "1",
"size": "7760",
"license": "mit",
"hash": -1399960424528616400,
"line_mean": 30.4170040486,
"line_max": 80,
"alpha_frac": 0.5717783505,
"autogenerated": false,
"ratio": 4.323119777158774,
"config_test": false,
... |
"""
Program: kmean-simple
Author: Travis Cunningham
"""
import random
import sys
class PGMImage(object):
"""
Represents the PGM image.
For the contents parameter, specify an array of pixels.
"""
def __init__(self, width, height, max_grayscale, contents):
self._width = width
s... | {
"repo_name": "travcunn/cs362-kmeans",
"path": "src/kmean-simple.py",
"copies": "1",
"size": "6976",
"license": "mit",
"hash": 3852609193647593000,
"line_mean": 29.0689655172,
"line_max": 80,
"alpha_frac": 0.5702408257,
"autogenerated": false,
"ratio": 4.2718922229026335,
"config_test": false,
... |
"""
==============================================================================
Program: NBack.py
Author: Kyle Reese Almryde
Date: Thu 03/21/2013 @ 10:33:30 AM
Updated: Thu 03/28/2013 @ 11:42:48 AM
Description: This program uses the Python Image Library (PIL) to build and
manipulate images for th... | {
"repo_name": "KrbAlmryde/Utilities",
"path": "NBack/NBack.py",
"copies": "1",
"size": "13743",
"license": "mit",
"hash": 1465093623893133600,
"line_mean": 33.1017369727,
"line_max": 136,
"alpha_frac": 0.5768755003,
"autogenerated": false,
"ratio": 3.710313174946004,
"config_test": false,
"ha... |
#!/bin/env python
'''
proxy based on https://pypi.python.org/pypi/ProxyHTTPServer/
digest auth based on http://svn.python.org/projects/stackless/branches/release26-maint/Lib/test/test_urllib2_localnet.py
'''
import BaseHTTPServer, httplib, SocketServer, urllib, hashlib, urlparse
class DigestAuthHandler:
"""Hand... | {
"repo_name": "meryt/python-proxies",
"path": "ProxyHTTPServer.py",
"copies": "1",
"size": "9185",
"license": "unlicense",
"hash": 293779153017704600,
"line_mean": 26.5825825826,
"line_max": 120,
"alpha_frac": 0.6038105607,
"autogenerated": false,
"ratio": 3.3027687882056815,
"config_test": fal... |
#!/bin/env python
'''
proxy based on https://pypi.python.org/pypi/ProxyHTTPServer/
'''
import BaseHTTPServer, httplib, SocketServer, urllib, hashlib, urlparse
from base64 import b64decode
class DecodeError(Exception):
pass
class BasicAuthHandler:
"""Handler for performing basic authentication."""
def ... | {
"repo_name": "meryt/python-proxies",
"path": "BasicProxyHTTPServer.py",
"copies": "1",
"size": "7227",
"license": "unlicense",
"hash": 1415957078504268300,
"line_mean": 24.5371024735,
"line_max": 98,
"alpha_frac": 0.6373322264,
"autogenerated": false,
"ratio": 3.1725197541703247,
"config_test"... |
#!/bin/env python
"""
Second demonstration script for Scipy2014 build off
iPython notebook
=====================
Takes four processed radar files in CF Radial,
does initial QC and then mesh maps the 3 X-Band systems
and co-maps the C-Band system.
"""
from matplotlib import use
use('agg')
import numpy as np
import py... | {
"repo_name": "scollis/scipy_analysis_2014",
"path": "part_2_mapping_to_cartesian_space_and_meshing.py",
"copies": "1",
"size": "6745",
"license": "bsd-3-clause",
"hash": -910117176238867700,
"line_mean": 34.3141361257,
"line_max": 96,
"alpha_frac": 0.6164566345,
"autogenerated": false,
"ratio": ... |
#!/bin/env python
'''
See: http://www.careercup.com/question?id=5201559730257920
To test this code run:
python frontbacksort.py
It will execute the doctests for all code in this solution.
'''
class Node:
'''
A node in a linked list.
>>> n = Node(1000, None)
>>> print n
[1000]
'''
def __init__(self, val... | {
"repo_name": "ianchesal/careercup.com",
"path": "frontbacksort.py",
"copies": "1",
"size": "9583",
"license": "mit",
"hash": 4071709141709149000,
"line_mean": 21.9258373206,
"line_max": 68,
"alpha_frac": 0.6112908275,
"autogenerated": false,
"ratio": 2.668615984405458,
"config_test": false,
... |
#/bin/env python
'''
Simple "Pink World" example for pyopenvr python bindings for OpenVR virtual reality SDK.
Colors the whole world pink, demonstrating OpenGL rendering, without any of
the spatial algebra needed to actually draw scene items.
This is more interesting than you might think, if you have the
HTC Vive set... | {
"repo_name": "cmbruns/pyopenvr",
"path": "src/samples/glut/pink_world.py",
"copies": "1",
"size": "5632",
"license": "bsd-3-clause",
"hash": -3841274357329469000,
"line_mean": 40.7185185185,
"line_max": 115,
"alpha_frac": 0.6594460227,
"autogenerated": false,
"ratio": 3.539912005028284,
"confi... |
import time
import urllib2
from kafka import KafkaClient, SimpleProducer
from kafka.common import LeaderNotAvailableError
import json
import argparse
import sys
import hashlib
from datetime import datetime
class KafkaBot():
def __init__(self,server,user_agent):
self.server = server
self.user_agent... | {
"repo_name": "fullergalway/KafkaBot",
"path": "kafkabot.py",
"copies": "1",
"size": "3661",
"license": "mit",
"hash": -2023484358929791500,
"line_mean": 42.0705882353,
"line_max": 165,
"alpha_frac": 0.6104889374,
"autogenerated": false,
"ratio": 3.9281115879828326,
"config_test": false,
"has... |
#!/bin/env python
#
# Stupid python-isms to make code slightly more portable
#
from __future__ import print_function
#
# Import modules
#
import optparse
import os
import socket
import sys
import time
import xdd
#
# Time in seconds to wait between failed transfer retries
#
XDD_FILE_RETRY_DELAY = 5.0
class InvalidSp... | {
"repo_name": "eunsungc/gt6-RAMSES_8_5",
"path": "xdd-7.0.0.rc-ramses3/src/tools/python/xdd_file_transfer.py",
"copies": "1",
"size": "11393",
"license": "apache-2.0",
"hash": 8850760291389728000,
"line_mean": 31.6446991404,
"line_max": 117,
"alpha_frac": 0.5757921531,
"autogenerated": false,
"ra... |
#!/bin/env python
#
# Synchronise local files with Google Drive
#
import oauth2client
import optparse
import httplib2
import os
from apiclient import discovery
FOLDER_MIME_TYPE = "application/vnd.google-apps.folder"
SCOPE = 'https://www.googleapis.com/auth/drive'
APPLICATION_NAME = 'Backup'
CLIENT_SECRET_FILE = 'cl... | {
"repo_name": "GwenIves/Scripts",
"path": "src/gdrive_sync.py",
"copies": "1",
"size": "3160",
"license": "mit",
"hash": -5887796842707214000,
"line_mean": 25.3333333333,
"line_max": 85,
"alpha_frac": 0.6316455696,
"autogenerated": false,
"ratio": 3.550561797752809,
"config_test": false,
"has... |
#!/bin/env python
#
#
# Tax Free Holiday
#
# import wxversion
# wxversion.select('2.8')
import wx
#import wx.calendar as cal
import wx.grid as gridlib
import sys,re
import faulthandler
#import psycopg2
import json
import pout
import xml.etree.cElementTree as ET
import wx.lib.masked as masked
import datetime
import han... | {
"repo_name": "fuspu/RHP-POS",
"path": "taxfreeholiday.py",
"copies": "1",
"size": "16079",
"license": "mit",
"hash": -1140969314049560800,
"line_mean": 36.0483870968,
"line_max": 114,
"alpha_frac": 0.5476086821,
"autogenerated": false,
"ratio": 3.4623169681309216,
"config_test": false,
"has_... |
"""
The MIT License
Copyright (c) 2010 The Chicago Tribune & Contributors
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, cop... | {
"repo_name": "newsapps/beeswithmachineguns",
"path": "beeswithmachineguns/bees.py",
"copies": "1",
"size": "55814",
"license": "mit",
"hash": -7967196385692297000,
"line_mean": 41.6386554622,
"line_max": 210,
"alpha_frac": 0.6240728133,
"autogenerated": false,
"ratio": 3.717463700546157,
"conf... |
#!/bin/env python
"""
The reader will take and translate the XML into appropriate
Val data structures. This is appropriate for Key-Value documents,
where the tags and attributes translate readily to key-value pairs
of dictionaries.
Examples:
<book attr1="1" attr2="2">
<chapter>text chap ... | {
"repo_name": "RichIsMyName/PicklingToolsRepo",
"path": "PythonModule/ptools/xmlloader.py",
"copies": "3",
"size": "52157",
"license": "bsd-3-clause",
"hash": 2641665158086875600,
"line_mean": 36.7675597393,
"line_max": 154,
"alpha_frac": 0.5535402726,
"autogenerated": false,
"ratio": 4.001304181... |
"""
The server manages the connections to all the clients, receives data from clients
and sends them to all the other clients
"""
"""
Copyright 2016 Meng Du
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may ... | {
"repo_name": "Haaaaaank/Dual-Eye-Tracking",
"path": "server.py",
"copies": "1",
"size": "6881",
"license": "apache-2.0",
"hash": 2780446663466776600,
"line_mean": 36.3967391304,
"line_max": 108,
"alpha_frac": 0.5804388897,
"autogenerated": false,
"ratio": 4.250154416306362,
"config_test": fals... |
#!/bin/env python
"""
This class convert dictionaries to XML. This is usually
an easy mapping, because key-value mappings go easily to XML
(the other way is more problematic). A potential issue
usually is how to handle attributes.... See the options below!
Examples:
{ 'book' = {
'cha... | {
"repo_name": "RichIsMyName/PicklingToolsRepo",
"path": "Python/xmldumper.py",
"copies": "3",
"size": "29166",
"license": "bsd-3-clause",
"hash": 6500534610589834000,
"line_mean": 37.7330677291,
"line_max": 137,
"alpha_frac": 0.5812932867,
"autogenerated": false,
"ratio": 3.766757070902751,
"co... |
#!/bin/env python
#
# This example registers a callback handler, so that when CTRL+C is pressed
# the running COPASI task is asked to be stopped
#
import COPASI
import sys
import signal
try:
dataModel = COPASI.CCopasiRootContainer.addDatamodel()
except:
dataModel = COPASI.CRootContainer.addDatamodel()
clas... | {
"repo_name": "copasi/COPASI",
"path": "copasi/bindings/python/examples/process_callback.py",
"copies": "2",
"size": "1898",
"license": "artistic-2.0",
"hash": -3080999087768286700,
"line_mean": 26.5217391304,
"line_max": 89,
"alpha_frac": 0.6596417281,
"autogenerated": false,
"ratio": 3.72156862... |
#!/bin/env python
"""
This file is executed everytime before python interactive shell is run
to setup stuff. Remember to put export PYTHONSTARTUP=$HOME/.pythonrc.py
in .bashrc
"""
# pylint: disable=unused-import
# Import common modules
from datetime import datetime
from pprint import pprint as p
from code import Int... | {
"repo_name": "NearHuscarl/dotfiles",
"path": ".pythonrc.py",
"copies": "1",
"size": "7928",
"license": "bsd-3-clause",
"hash": -3489750927622048000,
"line_mean": 27.1134751773,
"line_max": 91,
"alpha_frac": 0.6600655903,
"autogenerated": false,
"ratio": 2.9243821468092954,
"config_test": false... |
import cgi
import sys,os, string, types
os.environ['MPLCONFIGDIR']='/tmp'
from PEATDB.Base import PDatabase
from PEATDB.Record import PEATRecord
from PEATDB.PEATTables import PEATTableModel, PEATTable
from PEATDB.web import PEATWeb
from pKD import pKDInterface
class titdbWeb(PEATWeb):
"""Class providing a web in... | {
"repo_name": "dmnfarrell/peat",
"path": "titration_db/titdb.py",
"copies": "1",
"size": "33402",
"license": "mit",
"hash": -5272920006230734000,
"line_mean": 41.2275600506,
"line_max": 183,
"alpha_frac": 0.533141728,
"autogenerated": false,
"ratio": 3.9688688212927756,
"config_test": false,
... |
#! /bin/env python
"""
This is the BoccaCmd module
>>> b = BoccaCmd (".",package="my.package")
>>> b.full_name ("func")
'my.package.func'
>>> b.short_name ("my.package.func")
'func'
"""
import subprocess
import os
import sys
import shutil
import optparse
import tarfile
import commands
from types import *
pass_pre =... | {
"repo_name": "csdms/bocca-tools",
"path": "bocca/bocca_objects.py",
"copies": "1",
"size": "5286",
"license": "mit",
"hash": 5601204532385237000,
"line_mean": 24.4134615385,
"line_max": 77,
"alpha_frac": 0.5891032917,
"autogenerated": false,
"ratio": 3.3434535104364325,
"config_test": false,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.