text
stringlengths
0
1.05M
meta
dict
import os, sys, commands, urllib2 from HTMLParser import HTMLParser, HTMLParseError import smtplib from email.mime.text import MIMEText class ChParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.br = 0 self.sentense = "" self.flag = False self.sflag = Fa...
{ "repo_name": "CORDEA/niconico-visualization", "path": "getdataFromWikipedia.py", "copies": "1", "size": "1155", "license": "apache-2.0", "hash": -2013799508114429400, "line_mean": 23.0625, "line_max": 63, "alpha_frac": 0.5523809524, "autogenerated": false, "ratio": 3.564814814814815, "config_t...
import os import sys import logging as log from stat import S_IXUSR, S_IWUSR, S_IRUSR from subprocess import Popen, PIPE from tempfile import NamedTemporaryFile DEBUG = True if os.environ.get('DEBUG', '0') == '1' else False TEMP = os.environ.get('TEMP', '/tmp') KEYS_DIR = os.environ.get('KEYS_DIR', os...
{ "repo_name": "chripo/ssh-keyring", "path": "ssh-keyring.py", "copies": "1", "size": "5609", "license": "bsd-2-clause", "hash": -9034356642681711000, "line_mean": 35.1870967742, "line_max": 82, "alpha_frac": 0.5951149938, "autogenerated": false, "ratio": 3.8156462585034014, "config_test": false...
#!/bin/env python # encoding: utf-8 from flask import jsonify from pymongo import MongoClient, GEO2D import os from flask import Flask, request import re, time, json, pymongo from collections import namedtuple from joblib import Parallel, delayed import multiprocessing import datetime from multiprocessing.pool import ...
{ "repo_name": "Nithanaroy/geospatial-tweets-heatmap", "path": "tweet_service.py", "copies": "1", "size": "12893", "license": "mit", "hash": 4155622773944194600, "line_mean": 39.6719242902, "line_max": 174, "alpha_frac": 0.5941208408, "autogenerated": false, "ratio": 3.4436431623931623, "config_...
#!/bin/env python #encoding=utf8 import binascii import hashlib import ConfigParser import gmpy2 from Crypto.Cipher import DES DES_KEY = 'SCUBEPGW' HASH_PAD = '0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
{ "repo_name": "Codefor/netpayclient", "path": "python/netpayclient.py", "copies": "1", "size": "5067", "license": "mit", "hash": 7845444690809575000, "line_mean": 24.8520408163, "line_max": 229, "alpha_frac": 0.601342017, "autogenerated": false, "ratio": 3.1066830165542614, "config_test": false...
#!/bin/env python # -*- encoding: utf-8 import codecs import sys, tty, termios class InputMethod: def __init__(self): self._wordMap = {} def add(self, stroke, character): lst = self._wordMap.setdefault(stroke, []) lst.append(character) def get(self, stroke): return self....
{ "repo_name": "hktonylee/ChangJieFun", "path": "changjie.py", "copies": "1", "size": "7652", "license": "mit", "hash": -6267420431208076000, "line_mean": 26.038869258, "line_max": 83, "alpha_frac": 0.5300575013, "autogenerated": false, "ratio": 3.687710843373494, "config_test": false, "has_no...
#!/bin/env python #encoding:utf-8 import db_act def username_check(username): _sql="select * from user where username=%s;" _args=(username,) _cnt,rt_list=db_act.db_act(_sql,_args) return _cnt def user_passwd_check(username,in_passwd): _sql="select * from user where username=%s and password=md5(%s...
{ "repo_name": "51reboot/actual_09_homework", "path": "09/zhouyang/09/cmdb/user/users.py", "copies": "1", "size": "1710", "license": "mit", "hash": 4524307078393708500, "line_mean": 30.8958333333, "line_max": 77, "alpha_frac": 0.6274509804, "autogenerated": false, "ratio": 2.7079646017699117, "c...
#!/bin/env python #-*- encoding: utf-8 -*- import sys import socket import Queue import json import time import threading ## private sock=None def thread_recver(): global sock while True: try: data = sock.recv(8192) if not data: break print '#### R...
{ "repo_name": "dungeonsnd/forwarding", "path": "forwarding/test-client/src/test_forwarding_client.py", "copies": "1", "size": "1147", "license": "bsd-3-clause", "hash": -4851376013997231000, "line_mean": 18.4406779661, "line_max": 57, "alpha_frac": 0.5309503051, "autogenerated": false, "ratio": 3...
#!/bin/env python #-*- encoding: utf-8 -*- import sys import socket import Queue import json import time import threading # public serverIp ='127.0.0.1' serverPort =8601 chid=None recvQueue = Queue.Queue() sendQueue = Queue.Queue() ## private sock=None sockExceptionEvent = threading.Event() stopThread =False def ...
{ "repo_name": "dungeonsnd/forwarding", "path": "forwarding/test-client/src/test_forwarding_server.py", "copies": "1", "size": "3464", "license": "bsd-3-clause", "hash": 1385672868549977600, "line_mean": 21.940397351, "line_max": 68, "alpha_frac": 0.519630485, "autogenerated": false, "ratio": 3.96...
#!/bin/env python # -*- encoding: utf-8 -*- import sys, urllib, time, json, traceback from optparse import OptionParser NG_STATUS_URI = 'http://127.0.0.1:9091/monitor/basic_status' class Histogram(object): def __init__(self, values = None): self.values = [] self.dirty = False self.add(v...
{ "repo_name": "GuyCheung/falcon-ngx_metric", "path": "nginx_collect.py", "copies": "1", "size": "14308", "license": "apache-2.0", "hash": -610411433819919000, "line_mean": 28.5010309278, "line_max": 220, "alpha_frac": 0.5946323735, "autogenerated": false, "ratio": 3.6696588868940756, "config_te...
#!/bin/env python # encoding: UTF-8 import urllib.request import urllib.parse from collections import namedtuple from bs4 import BeautifulSoup from TwitterAPI import TwitterAPI from .config import * # noqa import logging from .logger import handler logger = logging.getLogger(__name__) logger.addHandler(handler) S...
{ "repo_name": "shrkw/jkk-notifier", "path": "jkk/checker.py", "copies": "1", "size": "1589", "license": "mit", "hash": -1822947933419381200, "line_mean": 28.4905660377, "line_max": 76, "alpha_frac": 0.6142034549, "autogenerated": false, "ratio": 3.1897959183673468, "config_test": false, "has_...
__Author__ = "Yoshihiro Tanaka" __date__ = "2014-11-21" import sys, urllib2 from HTMLParser import HTMLParser class ChParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.br = 0 self.sentense = "" self.flag = False self.sflag = False self.coun...
{ "repo_name": "CORDEA/niconico-visualization", "path": "act1/getdataFromWikipedia.py", "copies": "1", "size": "1090", "license": "apache-2.0", "hash": -878592202432188200, "line_mean": 22.6956521739, "line_max": 63, "alpha_frac": 0.528440367, "autogenerated": false, "ratio": 3.4713375796178343, ...
#!/bin/env/python # -*- encoding: utf-8 -*- """ =============================================================================== -------------------------------AUVSI SUAS 2018--------------------------------- =============================================================================== --------------------------------...
{ "repo_name": "hal112358/clark_aerospace", "path": "auvsi/AUVSI.py", "copies": "1", "size": "66626", "license": "mit", "hash": 4230993450691244500, "line_mean": 28.9577338129, "line_max": 158, "alpha_frac": 0.4945066491, "autogenerated": false, "ratio": 3.687513836617224, "config_test": false, ...
#!/bin/env/python # -*- encoding:utf-8 -*- """ =============================================================================== ESRA GROUND STATION =============================================================================== author=hal112358 ----------------------------------------------------------------------------...
{ "repo_name": "hal112358/clark_aerospace", "path": "esra/rocketPi1.py", "copies": "1", "size": "1402", "license": "mit", "hash": 1358788867703841500, "line_mean": 22.3666666667, "line_max": 79, "alpha_frac": 0.5342368046, "autogenerated": false, "ratio": 3.5674300254452924, "config_test": false...
#!bin/env/python # -*- encoding: utf-8 -*- """ =============================================================================== ESRA IREC SPACEPORT AMERICA CUP 2018 =============================================================================== author=hal112358 -----------------------------------------------------------...
{ "repo_name": "hal112358/clark_aerospace", "path": "esra/ESRA.py", "copies": "1", "size": "21762", "license": "mit", "hash": -9036512253641395000, "line_mean": 26.7931034483, "line_max": 158, "alpha_frac": 0.4759213308, "autogenerated": false, "ratio": 3.8819122368890473, "config_test": false, ...
#!/bin/env/python # -*- encoding: utf-8 -*- """ =============================================================================== Experimental Camera Gyroscope =============================================================================== author=hal112358 -----------------------------------------------------------------...
{ "repo_name": "hal112358/clark_aerospace", "path": "camera_gyro/update.py", "copies": "1", "size": "4825", "license": "mit", "hash": -2199003146434171400, "line_mean": 24.2670157068, "line_max": 79, "alpha_frac": 0.5311917098, "autogenerated": false, "ratio": 3.08898847631242, "config_test": fa...
#!/bin/env/python # -*- encoding: utf-8 -*- """ =============================================================================== Flight Trajectory Visualization =============================================================================== author=hal112358 ---------------------------------------------------------------...
{ "repo_name": "hal112358/clark_aerospace", "path": "flight_path/plot_path.py", "copies": "1", "size": "1575", "license": "mit", "hash": 6130323435572266000, "line_mean": 26.1724137931, "line_max": 79, "alpha_frac": 0.5561904762, "autogenerated": false, "ratio": 3.0821917808219177, "config_test"...
__Author__ = "CORDEA" __date__ = "2014-08-01" from collections import Counter chrList = ["chrX"] for i in range(1,23): chrList.append("chr" + str(i)) #outFile2 = open("specific_2.log", "w") #outFile3 = open("specific_3.log", "w") #for limit in range(0, 110, 10): for limit in range(10, 20, 10): outFile1 ...
{ "repo_name": "CORDEA/analysis_of_1000genomes-data", "path": "programs/OLD/min_max.py", "copies": "1", "size": "2378", "license": "apache-2.0", "hash": -8851899529569970000, "line_mean": 32.9714285714, "line_max": 74, "alpha_frac": 0.3839360807, "autogenerated": false, "ratio": 3.377840909090909,...
__Author__ = "CORDEA" __date__ = "2014-08-19" import sys #arg = sys.argv[1] #chr = arg.split(":") chrList = [] #for i in chr: # chrList.append("chr" + str(i)) #for i in range(1,23): # chrList.append("chr" + str(i)) chrList.append("chrX") #infile = open("osp_set_200k.lst", "r") #lines = infile.readlines() #i...
{ "repo_name": "CORDEA/analysis_of_1000genomes-data", "path": "programs/machine_learning/create_mongo_snp.py", "copies": "1", "size": "2068", "license": "apache-2.0", "hash": 1674452685128311300, "line_mean": 26.9459459459, "line_max": 103, "alpha_frac": 0.4086073501, "autogenerated": false, "rati...
__Author__ = "CORDEA" __date__ = "2014-08-19" import sys #arg = sys.argv[1] #chr = arg.split(":") chrList = [] #for i in chr: # chrList.append("chr" + str(i)) for i in range(1,23): chrList.append("chr" + str(i)) infile = open("osp_set_200k.lst", "r") lines = infile.readlines() infile.close() idList = [] ...
{ "repo_name": "CORDEA/analysis_of_1000genomes-data", "path": "programs/machine_learning/sample_snp.py", "copies": "1", "size": "1706", "license": "apache-2.0", "hash": -4431310742735395000, "line_mean": 27.4333333333, "line_max": 84, "alpha_frac": 0.4320046893, "autogenerated": false, "ratio": 3....
__Author__ = "CORDEA" __date__ = "2014-08-20" import sys arg = sys.argv[1] infile = open("pred_for_osp.csv", "r") lines = infile.readlines() infile.close() idDict = {} for line in lines: tmp = [r.rstrip("\r\n") for r in line.split(",")] idDict[tmp[1]] = [tmp[2], tmp[3], tmp[0]] infile = open(arg, "r") ...
{ "repo_name": "CORDEA/analysis_of_1000genomes-data", "path": "programs/machine_learning/osp_svm.py", "copies": "1", "size": "1436", "license": "apache-2.0", "hash": 5610559768628588000, "line_mean": 26.0943396226, "line_max": 82, "alpha_frac": 0.471448468, "autogenerated": false, "ratio": 2.69418...
__Author__ = "CORDEA" __date__ = "2014-08-21" from collections import Counter infile = open("pred_info.vcf", "r") lines = infile.readlines() infile.close() # 0001a56c,chr1,5088617,2169089,44.2448979592,G,092a8efa7cd6427c91900bded95cab33,A,4:37:7:12,14:36:24:23,0:54:5:2,0:88:0:0,2:61:19:15,3:54:14:14,0:96:0:1,2:4...
{ "repo_name": "CORDEA/analysis_of_1000genomes-data", "path": "programs/machine_learning/extract_pred.py", "copies": "1", "size": "1133", "license": "apache-2.0", "hash": 5975077623915082000, "line_mean": 22.1224489796, "line_max": 227, "alpha_frac": 0.5736981465, "autogenerated": false, "ratio": ...
__Author__ = "CORDEA" __date__ = "2014-10-22" import commands, sys infile = open("sample_population.tsv", "r") lines = infile.readlines() infile.close() sDict = {} for line in lines: tmp = line.split("\t") sDict[tmp[0]] = tmp[1] files = commands.getoutput('ls dbdata/').split("\n") for filename in files...
{ "repo_name": "CORDEA/analysis_of_1000genomes-data", "path": "programs/examine_phase3/create_dbdata.py", "copies": "1", "size": "2250", "license": "apache-2.0", "hash": 7432657882583382000, "line_mean": 31.6086956522, "line_max": 94, "alpha_frac": 0.4142222222, "autogenerated": false, "ratio": 3....
__Author__ = "CORDEA" __date__ = "2014-11-17" import sys, re with open(sys.argv[1]) as f: lines = f.readlines() sig = dbn = orid = "-" dbnDict = {0:"Uncertain significance", 1:"not provided", 2:"Benign", 3:"Likely benign", 4:"Likely pathogenic", 5:"Pathogenic",6:"drug response", 7:"histocompatibility", 255:"o...
{ "repo_name": "CORDEA/analysis_of_1000genomes-data", "path": "programs/linking_clinvar/vcf_edit.py", "copies": "1", "size": "1284", "license": "apache-2.0", "hash": 6265170309705527000, "line_mean": 30.3170731707, "line_max": 181, "alpha_frac": 0.4953271028, "autogenerated": false, "ratio": 2.931...
__Author__ = "CORDEA" __date__ = "2014-11-25" import sys with open(sys.argv[1]) as f: lines = f.readlines() conDict = { "YRI": "AFR", "CHB": "ASN", "TSI": "EUR", "LWK": "AFR", "CHS": "ASN", "GBR": "EUR", "IBS": "EUR", "FIN": "EUR", "ASW...
{ "repo_name": "CORDEA/analysis_of_1000genomes-data", "path": "results/blindtest/check_result.py", "copies": "1", "size": "1268", "license": "apache-2.0", "hash": -7658780284788991000, "line_mean": 20.4915254237, "line_max": 63, "alpha_frac": 0.3848580442, "autogenerated": false, "ratio": 2.703624...
#!/bin/env/python # -*- encoding: utf-8 -*- """ =============================================================================== =============================================================================== """ from __future__ import print_function from __future__ import division import numpy as np import argparse im...
{ "repo_name": "hal112358/clark_aerospace", "path": "camera_gyro/visualization.py", "copies": "1", "size": "7049", "license": "mit", "hash": 5789937265589666000, "line_mean": 24.1785714286, "line_max": 79, "alpha_frac": 0.4304156618, "autogenerated": false, "ratio": 3.5439919557566615, "config_t...
import logging log = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) import math import os from PIL import Image from PIL import ImageChops from PIL import ImageColor from layouts import get_layout from spritesheet import Sprite, Sheet ##########################################################...
{ "repo_name": "criptych/texpack", "path": "texpack.py", "copies": "1", "size": "24641", "license": "mit", "hash": 5830908003827395000, "line_mean": 34.7115942029, "line_max": 114, "alpha_frac": 0.4748183921, "autogenerated": false, "ratio": 4.137172599059772, "config_test": false, "has_no_key...
#!/bin/env python # encoding=utf-8 #用apt-get install python-tornado安装的不是最新,有bug。要用 pip install tornado # #此方案采用websocket实现 import os from Gobang import Gobang, GameRoom import random import tornado import json from tornado import web, autoreload, websocket, ioloop from datetime import timedelta import logging from t...
{ "repo_name": "heibanke/webchat", "path": "app.py", "copies": "1", "size": "11936", "license": "mit", "hash": -5100579491392414000, "line_mean": 35.7682539683, "line_max": 145, "alpha_frac": 0.6049905025, "autogenerated": false, "ratio": 3.4822609741431148, "config_test": false, "has_no_keywo...
#!/bin/env python # encoding:utf-8 # u"""Sequence_Extractor 配列の特定領域を切り取って保存するプログラム 推奨パッケージ: xlwt(必須ではありません) 動作確認環境 : Mac OS X v10.9.4 (Python 2.7.6) Fedora 19 (Python 2.7.5) *Python3系で動作するかはわかりません。* コマンドラインオプションの詳細は*-h*または*--help*で確認して下さい。 注意事項: 各染色体配列のファイルは少なくとも*染色体番号.faで終わっている必要がありま...
{ "repo_name": "CORDEA/extract-sequences", "path": "extract_seq.py", "copies": "1", "size": "13588", "license": "apache-2.0", "hash": 2587035274948496000, "line_mean": 31.7465940054, "line_max": 117, "alpha_frac": 0.5044100516, "autogenerated": false, "ratio": 2.9955134596211366, "config_test": ...
#!/bin/env python # enconding: utf-8 import fileinput import re import time def get_bigger_neighbor(array, last_index=0): if len(array) == 1: value = max(array) index = array.index(value) return value, index else: # value = max(array) index = last_index end = i...
{ "repo_name": "jesuejunior/piramide-numeros", "path": "main.py", "copies": "1", "size": "1320", "license": "bsd-3-clause", "hash": -5300613650455693000, "line_mean": 21, "line_max": 63, "alpha_frac": 0.5454545455, "autogenerated": false, "ratio": 3.492063492063492, "config_test": false, "has_...
#!/bin/env python """Exploratory code to convert bcbio generated CWL into the Nextflow DSL. Uses cwltool parser to parse input CWL then converts objects into cwl2wdl style dictionaries of workflows and processes (https://github.com/chapmanb/cwl2wdl) before converting into Nextflow. Current status: - steps -> processe...
{ "repo_name": "brainstorm/bcbio-nextgen", "path": "scripts/utils/cwltool2nextflow.py", "copies": "3", "size": "10671", "license": "mit", "hash": -7985336484849464000, "line_mean": 37.247311828, "line_max": 104, "alpha_frac": 0.5729547371, "autogenerated": false, "ratio": 3.515980230642504, "con...
#!/bin/env python """Exploratory code to convert bcbio generated CWL into WDL. Uses cwltool parser to parse input CWL then, calls out to cwl2wdl for generation of WDL using this fork of cwl2wdl: https://github.com/chapmanb/cwl2wdl Current status: - Connected workflow, sub-workflow and tool output - Records -> Object...
{ "repo_name": "biocyberman/bcbio-nextgen", "path": "scripts/cwltool2wdl.py", "copies": "5", "size": "14159", "license": "mit", "hash": 9141692450801886000, "line_mean": 42.1676829268, "line_max": 111, "alpha_frac": 0.5955222826, "autogenerated": false, "ratio": 3.5548581471252825, "config_test"...
##!/bin/env python '''farm.py - process data stream on cluster =========================================== Purpose ------- This script reads data from stdin and splits it into independent chunks to be executed on a cluster. Usage ----- As a basic, but not very useful example, the following command will take the in...
{ "repo_name": "CGATOxford/CGATPipelines", "path": "scripts/farm.py", "copies": "1", "size": "36489", "license": "mit", "hash": -583620295161615500, "line_mean": 30.3748925193, "line_max": 91, "alpha_frac": 0.5320233495, "autogenerated": false, "ratio": 4.137074829931973, "config_test": false, ...
import re import string import os, sys, re _debug = False def info(msg): if _debug: print msg import struct def str_to_buff(str_buff, len): tup = struct.unpack("%dB" % len, str_buff) return tup def printf(format, *args): """printf for old C folks, does not do auto newline""" sys.stdout....
{ "repo_name": "jjwright55/code_fragments", "path": "frags/python/GdrDump.py", "copies": "1", "size": "2101", "license": "unlicense", "hash": -5151241352080048000, "line_mean": 24.950617284, "line_max": 103, "alpha_frac": 0.5121370776, "autogenerated": false, "ratio": 3.377813504823151, "config_...
"""Simple base text representation of phylo tree.""" __author__ = "Micah Hamady" __copyright__ = "Copyright 2007-2012, The Cogent Project" __credits__ = ["Micah Hamady"] __license__ = "GPL" __version__ = "1.5.3" __maintainer__ = "Micah Hamady" __email__ = "hamady@colorado.edu" __status__ = "Prototype" class TextNode(...
{ "repo_name": "sauloal/cnidaria", "path": "scripts/venv/lib/python2.7/site-packages/cogent/format/text_tree.py", "copies": "1", "size": "3462", "license": "mit", "hash": 589594969740759200, "line_mean": 29.3684210526, "line_max": 95, "alpha_frac": 0.5690352397, "autogenerated": false, "ratio": 3....
#!/bin/env python #file written by Antony Fray, 13/11/15 in the HEP Software Workshop # # Plot dimuon mass distribution for SWC HEP 2015 # (Note: Comments from here on are for my benefit. Shouldnt need comments after here if variables are appropriately named) # from ROOT import TFile from ROOT import TH1D def tree_fr...
{ "repo_name": "antonyfray/dimuon", "path": "dimuon.py", "copies": "1", "size": "1351", "license": "mit", "hash": -7069247999268488000, "line_mean": 33.641025641, "line_max": 122, "alpha_frac": 0.6580310881, "autogenerated": false, "ratio": 3.3275862068965516, "config_test": false, "has_no_key...
#!/bin/env python from ansible.module_utils.basic import * from xml.etree import ElementTree from subprocess import PIPE, Popen def main(): pcs_error_message = "" module = AnsibleModule(argument_spec={}) process = Popen(['pcs', 'status', 'xml'], stdout=PIPE) cib = (process.communicate()[0]) root =...
{ "repo_name": "aepifanov/mos_mu", "path": "modules/check_pacemaker.py", "copies": "1", "size": "2646", "license": "apache-2.0", "hash": -2002859462328588500, "line_mean": 43.8474576271, "line_max": 146, "alpha_frac": 0.6239606954, "autogenerated": false, "ratio": 3.3578680203045685, "config_tes...
#!/bin/env python from ansible.module_utils.basic import * def _haproxy_weight(host, weight, app_name): return { "host": host, "weight": str(weight) + "%", "backend": app_name + "_be", "socket": "/var/lib/haproxy/" + app_name + ".stats" } def _haproxy_state(host, state, app_name): return { "host":...
{ "repo_name": "OpenConext/OpenConext-deploy", "path": "library/haproxy_commands.py", "copies": "1", "size": "2208", "license": "apache-2.0", "hash": -3529118447378479000, "line_mean": 35.1967213115, "line_max": 82, "alpha_frac": 0.6268115942, "autogenerated": false, "ratio": 3.066666666666667, ...
#!/bin/env python from datetime import datetime import picamera import io import os import logging import time MODE_SLEEP = 0 MODE_SEEK = 1 MODE_RECORD = 2 SLEEP_SECONDS = 10 OUTPUT_PATH = '/home/michael/Sync/HomeCam' PIR_DETECT = '/tmp/pir' PIR_ENABLED = '/tmp/pir_enable' class CameraControl: def __init__(se...
{ "repo_name": "mikeand/camcontrol", "path": "camcontrol/camcontrol.py", "copies": "1", "size": "3605", "license": "mit", "hash": 4547440973148260400, "line_mean": 30.6228070175, "line_max": 77, "alpha_frac": 0.5522884882, "autogenerated": false, "ratio": 3.9227421109902068, "config_test": false...
#!/bin/env python from distutils.core import setup from distutils.command.install_data import install_data from distutils.command.install import INSTALL_SCHEMES import os import sys class osx_install_data(install_data): def finalize_options(self): self.set_undefined_options('install', ('install_lib', 'ins...
{ "repo_name": "Excentrics/publication-backbone", "path": "setup.py", "copies": "1", "size": "3351", "license": "bsd-3-clause", "hash": 7386639897426406000, "line_mean": 30.0277777778, "line_max": 87, "alpha_frac": 0.6072814085, "autogenerated": false, "ratio": 3.314540059347181, "config_test": ...
#!/bin/env python from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) import os import logging import shutil from pyximport.pyxbuild import pyx_to_dll from multiscanner.common import utils WD = os.path.dirname(os.path.dirname(os.path.abspath(_...
{ "repo_name": "mitre/multiscanner", "path": "multiscanner/utils/cython_compile_libs.py", "copies": "2", "size": "1325", "license": "mpl-2.0", "hash": -4606863286587791000, "line_mean": 26.6041666667, "line_max": 71, "alpha_frac": 0.5713207547, "autogenerated": false, "ratio": 3.9909638554216866, ...
#!/bin/env python from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) import os import shutil import sys from pyximport.pyxbuild import pyx_to_dll WD = os.path.dirname(os.path.dirname((os.path.abspath(__file__)))) LIBS = os.path.join(WD, 'libs'...
{ "repo_name": "jmlong1027/multiscanner", "path": "utils/cython_compile_libs.py", "copies": "1", "size": "1345", "license": "mpl-2.0", "hash": -4179125460467921000, "line_mean": 25.9, "line_max": 71, "alpha_frac": 0.5687732342, "autogenerated": false, "ratio": 3.9558823529411766, "config_test": ...
#!/bin/env python from __future__ import division, absolute_import, with_statement, print_function, unicode_literals import os import sys import shutil from pyximport.pyxbuild import pyx_to_dll WD = os.path.dirname(os.path.dirname((os.path.abspath(__file__)))) LIBS = os.path.join(WD, 'libs') # Adds the libs directory t...
{ "repo_name": "awest1339/multiscanner", "path": "utils/cython_compile_libs.py", "copies": "1", "size": "1250", "license": "mpl-2.0", "hash": -5010426130795057000, "line_mean": 27.4090909091, "line_max": 98, "alpha_frac": 0.5808, "autogenerated": false, "ratio": 3.869969040247678, "config_test":...
#!/bin/env python from __future__ import division import argparse import logging import numpy as np import os import re import sys from nii import write_nii_from_par from write_parrec_from_dicom import write_parrec_from_dicom from read_dicom import read_dicom from read_par import read_par def raw_convert(input_file,...
{ "repo_name": "MattVUIIS/raw2nii", "path": "project/raw2nii.py", "copies": "1", "size": "5515", "license": "mit", "hash": 2877429275673650000, "line_mean": 35.2828947368, "line_max": 91, "alpha_frac": 0.6038077969, "autogenerated": false, "ratio": 3.400123304562269, "config_test": false, "has...
#!/bin/env python from __future__ import print_function from pyz.application import Application from pyz.renderer import Renderer from argparse import ArgumentParser import math # Prohibit from main import * __all__ = [] class GameObject(object): pass class TimelineObject(object): pass class Ship(GameObj...
{ "repo_name": "siggame/PyVis", "path": "main.py", "copies": "1", "size": "3277", "license": "bsd-3-clause", "hash": 617633184791576300, "line_mean": 25.4274193548, "line_max": 123, "alpha_frac": 0.5532499237, "autogenerated": false, "ratio": 3.3168016194331984, "config_test": false, "has_no_k...
#!/bin/env python from __future__ import print_function import fnmatch import os import sys import subprocess import hashlib from virus_total_apis import PublicApi as VirusTotalPublicApi def hash_results(p): BLOCKSIZE = 65536 hashers = list() hashers.append(('md5', hashlib.md5())) hashers.append(('sha...
{ "repo_name": "CyberReboot/vent-plugins", "path": "check_files/run.py", "copies": "1", "size": "2504", "license": "apache-2.0", "hash": 8226539140920180000, "line_mean": 27.1348314607, "line_max": 78, "alpha_frac": 0.5838658147, "autogenerated": false, "ratio": 3.507002801120448, "config_test":...
#!/bin/env python from __future__ import print_function import os import sys import re import argparse import CppHeaderParser.CppHeaderParser as CppHeaderParser # input files header_files = [] cpp_files = [] # output directory out_dir = "" # transformation style to_style = "" # TODO def unx2win(identifier): """U...
{ "repo_name": "zhenglinj/pycppstyle", "path": "pycppstyle.py", "copies": "1", "size": "6663", "license": "artistic-2.0", "hash": -3939179582113272300, "line_mean": 33.703125, "line_max": 99, "alpha_frac": 0.5658111962, "autogenerated": false, "ratio": 4.025981873111783, "config_test": false, ...
#! /bin/env python from __future__ import print_function import sys import argparse import os import os.path #import tabix import pysam from pysam import VCF import csv import cPickle as pickle # python data tables! #import pandas from collections import defaultdict import pymongo #from bson import Binary, Code #from b...
{ "repo_name": "pontikos/uclex_browser", "path": "load_vcfs/vcf_to_json.py", "copies": "1", "size": "6805", "license": "mit", "hash": -3647896267683475000, "line_mean": 41.7987421384, "line_max": 149, "alpha_frac": 0.5637031594, "autogenerated": false, "ratio": 3.3390578999018645, "config_test":...
#!/bin/env python from __future__ import print_function import sys import json from django.contrib.gis.gdal import DataSource def validate(layer, field_map): # does shp have any hitherto unknown field names? additional = [] for sfield in layer.fields: if sfield.lower() not in field_map.keys(): ...
{ "repo_name": "Ecotrust/PEW-EFH", "path": "scripts/validate_fields.py", "copies": "2", "size": "1234", "license": "apache-2.0", "hash": 8781300010919102000, "line_mean": 30.641025641, "line_max": 96, "alpha_frac": 0.6280388979, "autogenerated": false, "ratio": 3.640117994100295, "config_test": ...
#!/bin/env python from __future__ import print_function import sys import os import ctypes from . import nibbles BIT_TIME = 3100 BIT_ZERO_LOW_TIME = 675 BIT_ONE_LOW_TIME = 1890 BIT_ONEVAL_THRESH_TIME = (BIT_ZERO_LOW_TIME + BIT_ONE_LOW_TIME) >> 1 BIT_LOW_TOO_LONG_TIME = (BIT_TIME + BIT_ONE_LOW_TIME) >> 1 NIBBLE_END_GAP...
{ "repo_name": "tulth/diy-acura-bluetooth", "path": "target_desktop/py_lib/mbus/__init__.py", "copies": "1", "size": "9695", "license": "mit", "hash": -6648673297769005000, "line_mean": 31.6430976431, "line_max": 117, "alpha_frac": 0.5775141826, "autogenerated": false, "ratio": 3.257728494623656, ...
#!/bin/env python from __future__ import print_function import sys import os import datetime from .. import toggles MBUS_TIME_FORMATS = ("pyTimeElapsed", "microsHex", "microsInt", "blank") TIMEZERO = datetime.datetime.strptime("0:0:00.0", "%H:%M:%S.%f", ) class MbusTime(object): def __init__(self, val=0, mbusTi...
{ "repo_name": "tulth/diy-acura-bluetooth", "path": "target_desktop/py_lib/mbus/mbusTime/__init__.py", "copies": "1", "size": "2840", "license": "mit", "hash": 7046174206127376000, "line_mean": 31.2727272727, "line_max": 85, "alpha_frac": 0.6098591549, "autogenerated": false, "ratio": 3.5858585858...
#! /bin/env python from __future__ import print_function import sys import os import tarfile import argparse from os.path import dirname, join, abspath from shutil import copy from subprocess import check_call parser = argparse.ArgumentParser( description='Build salt rpms', ) parser.add_argument('build...
{ "repo_name": "stephane-martin/salt-debian-packaging", "path": "salt-2016.3.2/pkg/rpm/build.py", "copies": "2", "size": "1374", "license": "apache-2.0", "hash": -3748274773519963000, "line_mean": 26.48, "line_max": 91, "alpha_frac": 0.6441048035, "autogenerated": false, "ratio": 3.173210161662817...
#!/bin/env python from __future__ import print_function import sys import os import time from .. import mbusTime class ToggleElement(object): def __init__(self, mbusTimeFormat="microsHex"): super().__init__() self.time = mbusTime.MbusTime(val=0, mbusTimeFormat=mbusTimeFormat) self.val = No...
{ "repo_name": "tulth/diy-acura-bluetooth", "path": "target_desktop/py_lib/mbus/toggles/__init__.py", "copies": "1", "size": "4822", "license": "mit", "hash": 8128242443553780000, "line_mean": 33.4428571429, "line_max": 89, "alpha_frac": 0.6163417669, "autogenerated": false, "ratio": 3.64199395770...
#!/bin/env python from __future__ import print_function import sys import re import subprocess def get_change_log(previous_sha): args = ['git', '--no-pager', 'log', '--merges', '--grep', 'Merge pull request', '--pretty=format:"%h|%s|%b|%p"', 'master...{}'.format(previous_sha)] log = subprocess.check_output(arg...
{ "repo_name": "44px/redash", "path": "bin/get_changes.py", "copies": "2", "size": "1096", "license": "bsd-2-clause", "hash": 8404570288033423000, "line_mean": 29.4722222222, "line_max": 152, "alpha_frac": 0.5620437956, "autogenerated": false, "ratio": 3.6533333333333333, "config_test": false, ...
#! /bin/env python from __future__ import print_function import sys import requests import py2neo py2neo.authenticate("bigtop:57474", "neo4j", "1") graph = py2neo.Graph('http://bigtop:57474/db/data/',secure=False,bolt=None, bolt_port=57687) p=requests.get('https://raw.githubusercontent.com/obophenotype/human-phenotyp...
{ "repo_name": "phenopolis/pheno4j", "path": "python/hpo_import.py", "copies": "1", "size": "2716", "license": "mit", "hash": -6202673506857172000, "line_mean": 30.5813953488, "line_max": 103, "alpha_frac": 0.5813696613, "autogenerated": false, "ratio": 2.724172517552658, "config_test": false, ...
#!/bin/env python from __future__ import print_function import sys sys.path.insert(0, '/mnt/xfs1/home/asalomatov/projects/variants/variants') import ped import variants import func import pandas import os import features import yaml from multiprocessing import Pool print(sys.argv) if len(sys.argv) != 3: sys.exit('...
{ "repo_name": "asalomatov/variants", "path": "variants/work/extractFeatures.py", "copies": "1", "size": "5457", "license": "mit", "hash": -5344669992560496000, "line_mean": 40.6564885496, "line_max": 106, "alpha_frac": 0.6078431373, "autogenerated": false, "ratio": 2.926005361930295, "config_te...
#!/bin/env python from __future__ import print_function import os import sys import fnmatch from vpp_papi import VPP vpp_json_dir = '/usr/share/vpp/api/' jsonfiles = [] for root, dirnames, filenames in os.walk(vpp_json_dir): for filename in fnmatch.filter(filenames, '*.api.json'): jsonfiles.append(os.pat...
{ "repo_name": "GabrielGanne/vpp-flowtable", "path": "ft-test/flowtable-pm.py", "copies": "1", "size": "1495", "license": "apache-2.0", "hash": 5036331274353039000, "line_mean": 30.1458333333, "line_max": 137, "alpha_frac": 0.6949832776, "autogenerated": false, "ratio": 2.542517006802721, "confi...
#!/bin/env python from __future__ import print_function import vpp_papi as vpp from vpp_papi.portmirroring import * import vpp_papi.portmirroring as pm if_1_name = 'tap-0' if_2_name = 'tap-1' if_3_name = 'tap-2' r = vpp.connect('papi') if_1_sw_if_index = vpp.sw_interface_dump(1, if_1_name)[0].sw_if_index if_2_sw_...
{ "repo_name": "GabrielGanne/vpp-flowtable", "path": "ft-test/classifier-pm.py", "copies": "1", "size": "1435", "license": "apache-2.0", "hash": -7845352937675463000, "line_mean": 30.1956521739, "line_max": 115, "alpha_frac": 0.6954703833, "autogenerated": false, "ratio": 2.303370786516854, "con...
#!/bin/env python from __future__ import print_function # Re-projects a 2D FITS image so that it is aligned pixel-for-pixel with # another reference FITS image. # Usage: # wcsalign.py <infile> <reffile> <outfile> # # <infile> = Input fits file # <reffile> = Reference fits file # <outfile> = Output fits...
{ "repo_name": "astocko/agpy", "path": "agpy/wcsalign_starlink.py", "copies": "2", "size": "15531", "license": "mit", "hash": 1300747770395131600, "line_mean": 39.8710526316, "line_max": 110, "alpha_frac": 0.632927693, "autogenerated": false, "ratio": 3.5540045766590387, "config_test": false, ...
#!/bin/env python from __future__ import print_function, with_statement from jinja2 import Environment, FileSystemLoader import re import subprocess env = Environment(loader=FileSystemLoader('.')) rust_config = env.get_template('rustc.fish.template') cargo_config = env.get_template('cargo.fish.template') # Codegen ...
{ "repo_name": "bheesham/rust.fish", "path": "gen.py", "copies": "1", "size": "2151", "license": "mit", "hash": -6537282852831630000, "line_mean": 20.9489795918, "line_max": 89, "alpha_frac": 0.6192468619, "autogenerated": false, "ratio": 2.6921151439299122, "config_test": false, "has_no_keywo...
#!/bin/env python from __future__ import unicode_literals,print_function import six import subprocess import sys import re import h5py import copy import numpy as np import numpy.linalg as lg from scipy.linalg import eigh import warnings def get_quantity(filepath,Nsamp): if type(filepath)!=list: filepath=[...
{ "repo_name": "EPFL-LQM/gpvmc", "path": "tools/vmc_postproc/load.py", "copies": "2", "size": "3839", "license": "mit", "hash": 3158963164671731700, "line_mean": 29.2283464567, "line_max": 78, "alpha_frac": 0.5907788487, "autogenerated": false, "ratio": 3.2616822429906542, "config_test": false, ...
#!/bin/env python from __future__ import unicode_literals,print_function import six import subprocess import sys import re import h5py import time import numpy as np from vmc_postproc import load def vmc_exec(**kwargs): """ arguments: - nprocs (default 4)` - hosts (default localhost) - slurmqueue (...
{ "repo_name": "bdallapi/gpvmc", "path": "tools/vmc_postproc/execute.py", "copies": "2", "size": "4372", "license": "mit", "hash": -4697396319904075000, "line_mean": 34.8360655738, "line_max": 158, "alpha_frac": 0.6095608417, "autogenerated": false, "ratio": 3.483665338645418, "config_test": fal...
#!/bin/env python from net_system.models import NetworkDevice import django from netmiko import ConnectHandler from datetime import datetime from multiprocessing import Process, current_process import time def show_ver(device): creds = device.credentials remote_conn = ConnectHandler( device_type=devic...
{ "repo_name": "patrebert/pynet_cert", "path": "class8/ex7/ex7.py", "copies": "1", "size": "1044", "license": "apache-2.0", "hash": 6485358363018866000, "line_mean": 22.7272727273, "line_max": 58, "alpha_frac": 0.6388888889, "autogenerated": false, "ratio": 3.8955223880597014, "config_test": fal...
#!/bin/env python from net_system.models import NetworkDevice import django from netmiko import ConnectHandler from datetime import datetime from multiprocessing import Process, current_process, Queue import time def show_ver(device, q): output_dict = {} creds = device.credentials remote_conn = ConnectHan...
{ "repo_name": "patrebert/pynet_cert", "path": "class8/ex8/ex8.py", "copies": "1", "size": "1312", "license": "apache-2.0", "hash": -5932675925633548000, "line_mean": 24.2307692308, "line_max": 60, "alpha_frac": 0.6082317073, "autogenerated": false, "ratio": 3.6750700280112043, "config_test": fa...
#!/bin/env python from net_system.models import NetworkDevice import django from netmiko import ConnectHandler from datetime import datetime import threading import time def show_ver(device): creds = device.credentials remote_conn = ConnectHandler( device_type=device.device_type, ip=device.ip...
{ "repo_name": "patrebert/pynet_cert", "path": "class8/ex6/ex6.py", "copies": "1", "size": "1105", "license": "apache-2.0", "hash": 8189757837330321000, "line_mean": 24.6976744186, "line_max": 69, "alpha_frac": 0.643438914, "autogenerated": false, "ratio": 3.9891696750902526, "config_test": fals...
#!/bin/env python from numpy import * import sys def corr(i,x,mean,var): N=len(x) if var==0:#if the variance is 0 return an effectively infinity corr return 1e100 corr=1.0/var*1.0/(N-i)*sum((x[0:N-i]-mean)*(x[i:N]-mean)) return corr def Stats(x): N=len(x) mean=sum(x)/(N+0.0) xSqua...
{ "repo_name": "habanero-rice/hclib", "path": "test/performance-regression/full-apps/qmcpack/utils/Forces.py", "copies": "2", "size": "2761", "license": "bsd-3-clause", "hash": -1167397202830704000, "line_mean": 25.0471698113, "line_max": 79, "alpha_frac": 0.5161173488, "autogenerated": false, "ra...
#!/bin/env python from orvibo.s20 import S20, discover import argparse import logging import binascii #logging.basicConfig(level=logging.DEBUG) class Pistorasia(object): def __init__(self, sockets): self.pistorasiat = [] for (name, ip, mac) in sockets: self.pistorasiat.append((name, ...
{ "repo_name": "skarna1/python2-orvibo-s20", "path": "tv.py", "copies": "1", "size": "2374", "license": "mit", "hash": -732205894200552100, "line_mean": 29.0506329114, "line_max": 86, "alpha_frac": 0.5804549284, "autogenerated": false, "ratio": 3.338959212376934, "config_test": false, "has_no_...
#!/bin/env python from pygments import lexers, highlight, formatters from pygments.util import ClassNotFound from lxml import etree from lxml.html import fragment_fromstring def html_highlight(context, language, code, config): """ Highlight the given ``code`` in the given ``language``. ``context`` is the ...
{ "repo_name": "bockel/docbook5-bootstrap", "path": "share/dbk5proc.py", "copies": "1", "size": "2096", "license": "apache-2.0", "hash": -6204891352591700000, "line_mean": 32.2698412698, "line_max": 89, "alpha_frac": 0.6316793893, "autogenerated": false, "ratio": 3.358974358974359, "config_test"...
#!/bin/env python from pylab import * from numpy import * from matplotlib.patches import Ellipse, Wedge rc('text', usetex=True) deg2rad = pi/180.0 rad2deg = 180.0/pi def Cos(x): return cos(pi*x/180.0) def Sin(x): return sin(pi*x/180.0) def findendpoint(m, b, Vlen, x1, y1): A = m*m+1 B = -2*x1 - 2*y1*m +...
{ "repo_name": "kapteyn-astro/kapteyn", "path": "doc/source/EXAMPLES/etermfig.py", "copies": "1", "size": "4130", "license": "bsd-3-clause", "hash": -1506834113833890000, "line_mean": 23.4378698225, "line_max": 79, "alpha_frac": 0.6065375303, "autogenerated": false, "ratio": 1.9362400375058604, ...
#!/bin/env python from pymongo import MongoClient import MySQLdb as mdb import json import pprint import sys names = [] client = MongoClient() db = client.gdelt collection = db.summary """ with open("country_codes.json") as f: s = json.load(f) with open("iso.txt", "w") as f: for x in s: names.append...
{ "repo_name": "samzhang111/diplomacy-viz", "path": "scratch/get_counts.py", "copies": "1", "size": "2157", "license": "bsd-3-clause", "hash": -434555839374765500, "line_mean": 29.3802816901, "line_max": 176, "alpha_frac": 0.5910987483, "autogenerated": false, "ratio": 3.5771144278606966, "confi...
#!/bin/env python from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim import ssl import sys argvs = sys.argv target_vm = argvs[1] target_metric_group = argvs[2] target_metric_key = argvs[3] context = ssl._create_unverified_context() si = SmartConnect(host="ホスト名/IPアドレス", user="...
{ "repo_name": "tech-sketch/zabbix_book_sample", "path": "2nd_edition/Chapter3/3-3_get_perfcounter_cpuusage.py", "copies": "1", "size": "1397", "license": "apache-2.0", "hash": 4216645847304156000, "line_mean": 39.0882352941, "line_max": 125, "alpha_frac": 0.6661775495, "autogenerated": false, "ra...
#!/bin/env python from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim import ssl context = ssl._create_unverified_context() si = SmartConnect(host="ホスト名/IPアドレス", user="ユーザ名", pwd="パスワード", port=443, sslContext=context) cont...
{ "repo_name": "tech-sketch/zabbix_book_sample", "path": "2nd_edition/Chapter3/3-2_task_event_collector.py", "copies": "1", "size": "1145", "license": "apache-2.0", "hash": 8867843809094066000, "line_mean": 31.6764705882, "line_max": 88, "alpha_frac": 0.6795679568, "autogenerated": false, "ratio":...
#!/bin/env python from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim import ssl context = ssl._create_unverified_context() zabbix_sender = 'zabbix_senderパス' zabbix_server = 'Zabbixサーバホスト名またはIPアドレス' esxi_host = sys.argv[1] #HyperVisor hostname username = sys.argv[2] #HyperVisor login username ...
{ "repo_name": "tech-sketch/zabbix_book_sample", "path": "2nd_edition/Chapter7/7-3_host_resource_utilization.py", "copies": "1", "size": "1678", "license": "apache-2.0", "hash": 8905468543504378000, "line_mean": 39.1463414634, "line_max": 157, "alpha_frac": 0.6190765492, "autogenerated": false, "r...
#!/bin/env python from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim import ssl context = ssl._create_unverified_context() si = SmartConnect(host="ホスト名", user="ユーザ名", pwd="パスワード", port=443, #vSphere API稼動ポート:https(443)がデフォルト ...
{ "repo_name": "tech-sketch/zabbix_book_sample", "path": "2nd_edition/Chapter3/3-1_cpu_utilization.py", "copies": "1", "size": "1472", "license": "apache-2.0", "hash": 6199156875918423000, "line_mean": 44.9032258065, "line_max": 107, "alpha_frac": 0.5685172171, "autogenerated": false, "ratio": 3.5...
#!/bin/env python from ROOT import TFile, TH1D def tree_from_file(path): global file_events file_events = TFile(path) tree_events = file_events.Get("events") print type(tree_events) return tree_events def dimuon_masses(tree): n_events = tree.GetEntries() for i_event in xrange(n_events): ...
{ "repo_name": "fearghuskeeble/dimuon", "path": "dimuon.py", "copies": "1", "size": "1109", "license": "mit", "hash": 8429319748135564000, "line_mean": 30.6857142857, "line_max": 87, "alpha_frac": 0.6167718665, "autogenerated": false, "ratio": 3.177650429799427, "config_test": false, "has_no_k...
#!/bin/env python from schematics.models import Model, ModelMeta from schematics.contrib.mongo import ObjectIdType from tornado import gen #-- Tornado from tornado.concurrent import return_future #-- DB import motor from bson.objectid import ObjectId import functools __all__ = ['AsyncModel', 'connect'] _db = None ...
{ "repo_name": "wsantos/motorm", "path": "motorm/__init__.py", "copies": "1", "size": "6267", "license": "apache-2.0", "hash": -5634179317957422000, "line_mean": 26.7300884956, "line_max": 104, "alpha_frac": 0.5203446625, "autogenerated": false, "ratio": 4.349063150589868, "config_test": false, ...
#!/bin/env python from selenium import webdriver from selenium.common.exceptions import StaleElementReferenceException from time import sleep from getpass import getpass from random import randint if __name__ == '__main__': driver = webdriver.phantomjs.webdriver.WebDriver() driver.get('https://facebook.com') ...
{ "repo_name": "matthewbentley/autopoke", "path": "autopoke.py", "copies": "1", "size": "1177", "license": "mit", "hash": 2001998220008599600, "line_mean": 31.6944444444, "line_max": 69, "alpha_frac": 0.585386576, "autogenerated": false, "ratio": 4.086805555555555, "config_test": false, "has_n...
#!/bin/env python from setuptools import setup, Extension from codecs import open from os import path, listdir from Cython.Build import cythonize from sys import exec_prefix here = path.dirname(path.abspath(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() set...
{ "repo_name": "jzitelli/poolvr.py", "path": "setup.py", "copies": "1", "size": "2060", "license": "mit", "hash": 9115923858354377000, "line_mean": 39.3921568627, "line_max": 134, "alpha_frac": 0.5645631068, "autogenerated": false, "ratio": 3.8218923933209648, "config_test": false, "has_no_key...
from setuptools import setup setup( name='pypugly', use_scm_version=True, author='Alexandre Andrade', author_email='kaniabi@gmail.com', url='https://github.com/zerotk/pypugly', description='Another HTML generator based on JADE.', long_description='''Another HTML generator based on JADE....
{ "repo_name": "zerotk/pypugly", "path": "setup.py", "copies": "1", "size": "1447", "license": "mit", "hash": 2549268487778599400, "line_mean": 29.1458333333, "line_max": 77, "alpha_frac": 0.6192121631, "autogenerated": false, "ratio": 4.134285714285714, "config_test": false, "has_no_keywords"...
#!/bin/env python from sys import exit import argparse import rsa rsaBits = 1024 pubName = 'pub_rsa.pem' priName = 'pri_rsa.pem' def genKey(): # generate key couple (pubKey, priKey) = rsa.newkeys(rsaBits) # write public key pub = pubKey.save_pkcs1() pubFile = open(pubName, 'w+') pubFile.write(...
{ "repo_name": "zhaozq/rsaencrypt_self_data", "path": "rsacry.py", "copies": "1", "size": "2154", "license": "mit", "hash": -755219811222143600, "line_mean": 26.974025974, "line_max": 73, "alpha_frac": 0.5928505107, "autogenerated": false, "ratio": 3.258698940998487, "config_test": false, "has...
#!/bin/env python from tempfile import mkdtemp import os import re import sys import subprocess import shutil from glob import glob class IgnorableError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) known_ok = re.compile('|'.join([ r'''LaTeX Warning...
{ "repo_name": "calcu16/misc", "path": "bin/pylatex.py", "copies": "3", "size": "2688", "license": "bsd-2-clause", "hash": 597320318034711000, "line_mean": 29.202247191, "line_max": 157, "alpha_frac": 0.6201636905, "autogenerated": false, "ratio": 3.4461538461538463, "config_test": false, "has...
#!/bin/env python from urlparse import urlparse from optparse import OptionParser, OptionGroup import bees usage = """\ bees COMMAND [options] type 'bees --help' for an overview over all options Bees with Machine Guns A utility for arming (creating) many bees (small EC2 instances) to attack (load test) targets (w...
{ "repo_name": "obestwalter/AWSomECCommander", "path": "beeswithmachineguns/main.py", "copies": "1", "size": "10728", "license": "mit", "hash": 475154666128829950, "line_mean": 46.2599118943, "line_max": 79, "alpha_frac": 0.4908650261, "autogenerated": false, "ratio": 4.7011393514461, "config_te...
#! /bin/env python from .vtktypes import VtkRectilinear from .vtkxml import ( VtkAppendedDataElement, VtkCellDataElement, VtkCoordinatesElement, VtkExtent, VtkGridElement, VtkPieceElement, VtkPointDataElement, VtkRootElement, ) def get_elements(field, data_format="ascii", encoding="asc...
{ "repo_name": "csdms/pymt", "path": "deprecated/printers/vtk/vtr.py", "copies": "2", "size": "1146", "license": "mit", "hash": 7808166505468912000, "line_mean": 26.9512195122, "line_max": 71, "alpha_frac": 0.6448516579, "autogenerated": false, "ratio": 3.684887459807074, "config_test": false, ...
#! /bin/env python from .vtktypes import VtkStructured from .vtkxml import ( VtkAppendedDataElement, VtkCellDataElement, VtkExtent, VtkGridElement, VtkPieceElement, VtkPointDataElement, VtkPointsElement, VtkRootElement, ) def get_elements(field, data_format="ascii", encoding="ascii"): ...
{ "repo_name": "csdms/pymt", "path": "deprecated/printers/vtk/vts.py", "copies": "2", "size": "1094", "license": "mit", "hash": -1235305083443942700, "line_mean": 27.0512820513, "line_max": 84, "alpha_frac": 0.6489945155, "autogenerated": false, "ratio": 3.6711409395973154, "config_test": false,...
#! /bin/env python from .vtktypes import VtkUniformRectilinear from .vtkxml import ( VtkAppendedDataElement, VtkCellDataElement, VtkExtent, VtkGridElement, VtkOrigin, VtkPieceElement, VtkPointDataElement, VtkRootElement, VtkSpacing, ) def get_elements(field, data_format="ascii", en...
{ "repo_name": "csdms/coupling", "path": "deprecated/printers/vtk/vti.py", "copies": "2", "size": "1224", "license": "mit", "hash": 5133543336598962000, "line_mean": 27.4651162791, "line_max": 85, "alpha_frac": 0.6397058824, "autogenerated": false, "ratio": 3.6, "config_test": false, "has_no_k...
#!/bin/env python from wrpg.wfont.pack import pack_font import xml.etree.ElementTree as ET import sys # Littera exports in UTF-8. We want Extended ASCII. # There is a need to convert the values # {in: out} littera_char_translations = { 338: 140, 339: 155, } def parse_littera_xml_font(tree): root = tree.g...
{ "repo_name": "WalrusRPG/WFont", "path": "bundle.py", "copies": "1", "size": "1850", "license": "mit", "hash": 4633673623587830000, "line_mean": 29.3278688525, "line_max": 77, "alpha_frac": 0.5389189189, "autogenerated": false, "ratio": 3.4774436090225564, "config_test": false, "has_no_keywor...
#!/bin/env python from xml.dom.minidom import * import sys from check_qmcsystem import * class simulation: system = qmcsystem() def check_project (proj, sim): print 'checking project section' return def check_random (rand, sim): print 'checking random section' return #def check_qmcsystem(sy...
{ "repo_name": "habanero-rice/hcpp", "path": "test/performance-regression/full-apps/qmcpack/utils/check_input.py", "copies": "2", "size": "1924", "license": "bsd-3-clause", "hash": 7792351940133386000, "line_mean": 24.3157894737, "line_max": 74, "alpha_frac": 0.5540540541, "autogenerated": false, ...
#!/bin/env python from xml.dom.minidom import * import sys from pylab import * from numpy import * class channel: def __init__(self): self.channel_dict = { 's':0, 'p':1, 'd':2, 'f':3, 'g':4, 'h':5 } def parse_grid(self, elem): self.ri = float(elem.attributes['ri'].value) self.rf = f...
{ "repo_name": "habanero-rice/hclib", "path": "test/performance-regression/full-apps/qmcpack/utils/plot_fsatom.py", "copies": "2", "size": "3986", "license": "bsd-3-clause", "hash": 2065527336154976000, "line_mean": 31.406504065, "line_max": 78, "alpha_frac": 0.489713999, "autogenerated": false, "...
#! /bin/env python # harvest images for the given collection # by this point the isShownBy value for the doc should be filled in. # this should point at the highest fidelity object file available # from the source. # use brian's content md5s3stash to store the resulting image. # should just be a call to md5s3stash imp...
{ "repo_name": "mredar/harvester", "path": "scripts/harvest_all_images.py", "copies": "3", "size": "3180", "license": "bsd-3-clause", "hash": 4059874457349434000, "line_mean": 38.2592592593, "line_max": 172, "alpha_frac": 0.6245283019, "autogenerated": false, "ratio": 3.2783505154639174, "config...
#!/bin/env python '''https://docs.python.org/3/library/concurrent.futures.html''' import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.httpclient import tornado.gen from tornado.concurrent import run_on_executor from concurrent.futures import ThreadPoolExecutor impor...
{ "repo_name": "dongweiming/speakerdeck", "path": "tornado/5_concurrent_sleep.py", "copies": "2", "size": "1219", "license": "apache-2.0", "hash": -6386820416177219000, "line_mean": 28.0238095238, "line_max": 70, "alpha_frac": 0.7022149303, "autogenerated": false, "ratio": 3.7392638036809815, "c...
#!/bin/env python # I chose to implement the Comet driver in Python rather than Ruby because...the Ruby ICE bindings don't support callbacks. Blurg. # Mostly adapted from http://mumble.git.sourceforge.net/git/gitweb.cgi?p=mumble/mumble;a=blob_plain;f=scripts/testcallback.py;hb=HEAD # # Implements a simple callback resp...
{ "repo_name": "cheald/murmur-manager", "path": "widget/server/comet-server.py", "copies": "1", "size": "3306", "license": "mit", "hash": -7668684511728741000, "line_mean": 31.4117647059, "line_max": 133, "alpha_frac": 0.7075015124, "autogenerated": false, "ratio": 3.0413983440662373, "config_te...
#!/bin/env python #Id,Tz,From,To,Sched,Hours,Rating,Comment,Framerate,Snore,Noise,Cycles,Event import time pattern = '%d.%m.%Y %H:%M' header="matt.sleep" f = open('sleep-export.csv', 'r') while True: keys = f.readline() values = f.readline() values2 = f.readline() #Read untils you can't reads no mor...
{ "repo_name": "sawasy/graphite-sleep", "path": "electric-sheep.py", "copies": "1", "size": "1332", "license": "bsd-2-clause", "hash": 8762641111992105000, "line_mean": 30.7142857143, "line_max": 134, "alpha_frac": 0.5705705706, "autogenerated": false, "ratio": 3.3551637279596975, "config_test":...
# #!/bin/env python # import argparse # import asyncio # import json # import os # import signal # # from aiokafka import AIOKafkaProducer # # from .protocol import SecBeaconProtocol # from .beacon import set_master_key # # # Config # topic = 'beacons' # # parser = argparse.ArgumentParser( # description='Start a Ka...
{ "repo_name": "C3Wireless/c3-reference", "path": "src/c3reference/kafka.py", "copies": "1", "size": "2155", "license": "mit", "hash": -2875780176933873000, "line_mean": 31.6515151515, "line_max": 80, "alpha_frac": 0.6329466357, "autogenerated": false, "ratio": 3.2701062215478, "config_test": fa...
#!/bin/env python import argparse import os import re import subprocess import sys class Version: def __init__(self, major, minor, patch=0, pre_release_id=None, commit_hash=None, commits_since=0, is_dirty=False): self.major = major self.minor = minor self.patch = patch self.pre_rel...
{ "repo_name": "nioncode/GitVersioner", "path": "GitVersioner.py", "copies": "1", "size": "6369", "license": "mit", "hash": 216051008737338000, "line_mean": 38.5590062112, "line_max": 120, "alpha_frac": 0.593342754, "autogenerated": false, "ratio": 3.8835365853658534, "config_test": false, "ha...
import argparse import random import requests import traceback __author__ = 'ivan.v.polyakov' if __name__ != "__main__": exit(10) parser = argparse.ArgumentParser() parser.add_argument("-n", "--node" , metavar="HOST", dest="nodes", action="append", default=[], required=True, help="Node of ElasticSearch")...
{ "repo_name": "arshvin/scripts", "path": "elastic_search/check-haproxy-logs.py", "copies": "1", "size": "6138", "license": "apache-2.0", "hash": 7959216946173634000, "line_mean": 37.8544303797, "line_max": 140, "alpha_frac": 0.5343760182, "autogenerated": false, "ratio": 3.5603248259860787, "co...
#!/bin/env python import argparse import sys from common import databases as dbs def create_auth_db(args, parser): import models.auth db = dbs.auth_db() dbs.create_schema(db, dbs.AuthBase) def create_cust_db(org_id): import models.cust db = dbs.cust_db(org_id) dbs.create_schema(db, dbs.CustBas...
{ "repo_name": "ggerrietts/leadpipe", "path": "util/create_db.py", "copies": "1", "size": "1310", "license": "apache-2.0", "hash": -9076590594533833000, "line_mean": 31.75, "line_max": 146, "alpha_frac": 0.6923664122, "autogenerated": false, "ratio": 3.521505376344086, "config_test": false, "h...
#!/bin/env python import argparse #Frobnicate a string def frobnicate(s): y = '' for x in s: y += chr(ord(x) ^ 42) return y #Rotate by 0x80000 (UTF-16 rot) def rot524288(s): y = '' for x in s: y += chr(ord(x) ^ 0x80000) return y #Rotate by 0x8000 (UTF-8 rot) def rot32768(s): ...
{ "repo_name": "carlospatinos/security", "path": "l2/multiRot.py", "copies": "1", "size": "2040", "license": "mit", "hash": -7518451229642741000, "line_mean": 26.2133333333, "line_max": 121, "alpha_frac": 0.5598039216, "autogenerated": false, "ratio": 3.044776119402985, "config_test": false, "...
#!/bin/env python import asyncio from message import WeechatMessage import notify2 import argparse class WeechatRelayListener(asyncio.Protocol): def __init__(self, password, loop): self.password = password self.loop = loop self.buffer = b'' self.notification = None notify2....
{ "repo_name": "Fingel/weelisten", "path": "client.py", "copies": "1", "size": "2576", "license": "mit", "hash": 1149856345876251600, "line_mean": 36.8823529412, "line_max": 97, "alpha_frac": 0.6288819876, "autogenerated": false, "ratio": 3.9753086419753085, "config_test": false, "has_no_keywo...
#!/bin/env python import base64 import numpy as np class EncoderError(Exception): pass class UnknownEncoder(EncoderError): def __init__(self, name): self._name = name def __str__(self): return "%s: Unknown encoder" % self._name class Encoder(object): def encode(self, array): ...
{ "repo_name": "csdms/pymt", "path": "deprecated/printers/vtk/encoders.py", "copies": "2", "size": "1497", "license": "mit", "hash": 3934073824196327400, "line_mean": 22.390625, "line_max": 87, "alpha_frac": 0.6098864395, "autogenerated": false, "ratio": 3.7238805970149254, "config_test": false,...
#!/bin/env python import bpy def visible_only(bpy_data): """ Filter out all the invisible objects """ def visible(obj): return any(obj.is_visible(s) for s in bpy_data['scenes']) bpy_data['objects'] = [obj for obj in bpy_data['objects'] if visible(obj)] return bpy_data def selected_...
{ "repo_name": "Kupoman/blendergltf", "path": "blendergltf/filters.py", "copies": "1", "size": "2239", "license": "apache-2.0", "hash": 6827269486917285000, "line_mean": 25.6547619048, "line_max": 100, "alpha_frac": 0.5855292541, "autogenerated": false, "ratio": 3.9982142857142855, "config_test"...
#!/bin/env python import CalcStatistics import numpy import pylab import random from PIMC import * from PIMCHelp import * Path = None myPIMC = None tau=0.5 lam=0.5 numTimeSlices=5 numParticles=2 n = numpy.array(arange(0.0, 100.0, 1.0)) E = 0.5 + n beta = tau * numTimeSlices expBetaE = numpy.exp(-beta*E) print 6.0*su...
{ "repo_name": "b3sigma/fourd", "path": "pyvis/PIMCPy/EmbeddedBinding.py", "copies": "1", "size": "1039", "license": "mit", "hash": -29643027070669250, "line_mean": 22.6136363636, "line_max": 73, "alpha_frac": 0.7564966314, "autogenerated": false, "ratio": 2.910364145658263, "config_test": false...