text
stringlengths
0
1.05M
meta
dict
''' Created on Aug 12, 2014 @author: up45 ''' if __name__ == '__main__': try: from pkg_resources import require require('python-dateutil') except: pass import sys import pygtk pygtk.require('2.0') import gtk import gnomeapplet import view, model class PanelApplet: def __init...
{ "repo_name": "ulrikpedersen/toggl-gnome-applet", "path": "panel-applet.py", "copies": "1", "size": "2640", "license": "unlicense", "hash": 1155727942941388300, "line_mean": 27.6956521739, "line_max": 121, "alpha_frac": 0.5575757576, "autogenerated": false, "ratio": 3.50597609561753, "config_te...
#!/bin/env python2.6 from __future__ import print_function import subprocess from subprocess import PIPE import os import os.path import sys import shutil import optparse import tarfile import tempfile import types import re from commands import getstatusoutput from bocca.verbose import Verbose class Error (Except...
{ "repo_name": "csdms/bocca-tools", "path": "bocca/shutils.py", "copies": "1", "size": "1974", "license": "mit", "hash": -2872060172668842500, "line_mean": 21.9534883721, "line_max": 79, "alpha_frac": 0.6697061803, "autogenerated": false, "ratio": 3.3288364249578413, "config_test": false, "has...
#!/bin/env python2.6 import datetime import time import optparse import os import re import signal import socket import string import sys from collections import defaultdict from macpath import basename #### # DO NOT CHANGE __reload = False #### def timeit(method): def timed(*args, **kw): ts = time.time() ...
{ "repo_name": "Ralnoc/rsyslog-statcollector", "path": "rsyslog-statcollector.py", "copies": "1", "size": "4253", "license": "mit", "hash": -4086616016738052600, "line_mean": 28.7412587413, "line_max": 170, "alpha_frac": 0.6277921467, "autogenerated": false, "ratio": 3.314886983632112, "config_t...
#!/bin/env python2.6 import os, sys, signal from pkg_resources import require require("cothread==2.8") from PyQt4 import QtCore, QtGui from PyQt4.Qt import * from PyQt4.Qwt5 import * # Import the cothread library in each module that uses it. import cothread from cothread.catools import * from numpy import * # Enab...
{ "repo_name": "dls-controls/pmacUtil", "path": "pmacUtilApp/opi/qt/geobrick_gather.py", "copies": "1", "size": "17734", "license": "apache-2.0", "hash": -3619168102686923300, "line_mean": 42.1484184915, "line_max": 132, "alpha_frac": 0.5363708131, "autogenerated": false, "ratio": 3.65724891730253...
#!/bin/env python2.7 # -*- coding: utf-8 -*- # dydrmntion@gmail.com ~ 2013 import sys import os _here = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(_here, '../lib')) import socket from socketio.server import SocketIOServer from gevent import monkey monkey.patch_all() from server import...
{ "repo_name": "dbsr/reloaded", "path": "reloaded/run.py", "copies": "1", "size": "1136", "license": "unlicense", "hash": 956631540502693400, "line_mean": 26.0476190476, "line_max": 80, "alpha_frac": 0.650528169, "autogenerated": false, "ratio": 3.4634146341463414, "config_test": false, "has_n...
''' author: atupal 2013.7.21 ''' import json id_set = set() def score_grade(ID): with open('./score_grade.json', 'r') as fi: score = json.loads("[" + fi.read().strip().strip(',').strip('\n').strip(',') + "]" ) for s in score: for ss in s: if str(ss).startswith( str(ID) ): pr...
{ "repo_name": "atupal/getscore_hub", "path": "query_score.py", "copies": "1", "size": "1168", "license": "mit", "hash": -6555767834748786000, "line_mean": 24.9555555556, "line_max": 92, "alpha_frac": 0.5102739726, "autogenerated": false, "ratio": 2.821256038647343, "config_test": false, "has_...
#!/bin/env python2.7 # -*- coding: utf-8 -*- import sys import collections import calendar import time import numpy as np # from dateutil.parser import parse as dateparse import smart_csv def spark(data, bins=10): bars = u' ▁▂▃▄▅▆▇█' n, _ = np.histogram(data, bins=bins) n2 = n * (len(bars) - 1) / (max(...
{ "repo_name": "gurgeh/data-preppy", "path": "summarize_csv.py", "copies": "1", "size": "7334", "license": "apache-2.0", "hash": -4836506514697004000, "line_mean": 26.825095057, "line_max": 115, "alpha_frac": 0.4931675321, "autogenerated": false, "ratio": 3.3958236658932717, "config_test": false...
#!/bin/env python2.7 # -*- coding: utf-8 -*- # This is an awesome bot for the big Battleship which takes place on # https://www.brainjar.org/battleships # For the moment, it is just a random bot. It should be enough to win # against first competitors :) import sys import json import random def error(msg, error_co...
{ "repo_name": "marienfressinaud/battleship-bot", "path": "bot.py", "copies": "1", "size": "8646", "license": "mit", "hash": -791793727780682400, "line_mean": 26.4476190476, "line_max": 79, "alpha_frac": 0.5256766135, "autogenerated": false, "ratio": 3.8928410625844214, "config_test": false, "...
#!/bin/env python2.7 #encoding:utf-8 from pymongo import MongoClient import datetime mongopath = "localhost" nowDate = datetime.datetime.now().strftime("%Y%m%d") # 当前日期 startDate = (datetime.datetime.now() + datetime.timedelta(days=-720)).strftime("%Y%m%d") endDate = (datetime.datetime.now() + datetime.timedelta(days...
{ "repo_name": "sincerefly/getEastmoneyReport", "path": "sina_guping/statistics-6/sta-4.py", "copies": "1", "size": "1478", "license": "mit", "hash": -7589713870011064000, "line_mean": 23.6440677966, "line_max": 89, "alpha_frac": 0.5625859697, "autogenerated": false, "ratio": 3.2970521541950113, ...
#!/bin/env python2.7 #encoding:utf-8 from pymongo import MongoClient import pymongo import datetime import sys # Settings mongopath = "localhost" # 数据库地址 #startDate = "20150104" # 检索数据开始日期 #endDate = "20150529" # 检索数据结束日期 #endDate = "20150227" # 检索数据结束日期 nowDate = datetime.datetime.now().strftime("%Y%m%d") # 当...
{ "repo_name": "sincerefly/getEastmoneyReport", "path": "sina_guping/statistics-6/sta.py", "copies": "1", "size": "7643", "license": "mit", "hash": 2501639935549778000, "line_mean": 24.5543478261, "line_max": 112, "alpha_frac": 0.5160924429, "autogenerated": false, "ratio": 2.7422239502332815, "...
#!/bin/env python2.7 # -*- encoding: utf-8 -*- import abc # TODO add a global entry cache? class Engine(object): __metaclass__ = abc.ABCMeta @abc.abstractmethod def __init__(self, session): '''constructor''' @abc.abstractmethod def get_user_drafts(self): '''Get unfinished user e...
{ "repo_name": "shoul/knecht", "path": "knecht/engine/__init__.py", "copies": "1", "size": "1906", "license": "bsd-2-clause", "hash": 7871891943903109000, "line_mean": 22.5308641975, "line_max": 57, "alpha_frac": 0.6023084995, "autogenerated": false, "ratio": 4.207505518763797, "config_test": fa...
#!/bin/env python2.7 # -*- encoding: utf-8 -*- """ Яша плавал в бассейне размером N × M метров и устал. В этот момент он обнаружил, что находится на расстоянии x метров от одного из длинных бортиков (не обязательно от ближайшего) и y метров от одного из коротких бортиков. Какое минимальное расстояние должен проплыть ...
{ "repo_name": "g10k/sw_lessons", "path": "lessons/lesson_2/examples/yasha.py", "copies": "2", "size": "1678", "license": "bsd-3-clause", "hash": -1502585966727798500, "line_mean": 26.0833333333, "line_max": 132, "alpha_frac": 0.49, "autogenerated": false, "ratio": 1.8105849582172702, "config_te...
#!/bin/env python2.7 # -*- encoding: utf-8 -*- # shebang - позволяет выполниться скрипту python без указания python script.py, а как ./script.py """В школе решили набрать три новых математических класса. Так как занятия по математике у них проходят в одно и то же время, было решено выделить кабинет для каждого класса ...
{ "repo_name": "g10k/sw_lessons", "path": "lessons/lesson_2/examples/desks.py", "copies": "2", "size": "2550", "license": "bsd-3-clause", "hash": -242303231140266620, "line_mean": 33.6166666667, "line_max": 119, "alpha_frac": 0.7270101107, "autogenerated": false, "ratio": 1.9799809342230696, "co...
#!/bin/env python2.7 from __future__ import print_function import six import six.moves.urllib.request import os import logging DOWNDIR = os.path.join(os.path.dirname(__file__), 'downloadedpapers') URL = { 'bg-8-515-2011.pdf': 'https://www.biogeosciences.net/8/515/2011/bg-8-515-2011.pdf', 'esd-4-11-2013.pdf': ...
{ "repo_name": "perrette/myref", "path": "tests/download.py", "copies": "1", "size": "1198", "license": "mit", "hash": 6844544873432457000, "line_mean": 23.4489795918, "line_max": 110, "alpha_frac": 0.6569282137, "autogenerated": false, "ratio": 2.9653465346534653, "config_test": false, "has_n...
#!/bin/env python2.7 import os import csv import sys from operator import itemgetter import operator from os.path import join, dirname, realpath, split try: scriptdir = dirname(realpath(__file__)) except NameError: scriptdir = dirname(realpath(sys.argv[0])) sys.path.append(join(scriptdir, '..', '..', 'common',...
{ "repo_name": "HorvathLab/NGS", "path": "common/src/exonicFilter.py", "copies": "1", "size": "7126", "license": "mit", "hash": -4922854963414147000, "line_mean": 35.1725888325, "line_max": 161, "alpha_frac": 0.5787257929, "autogenerated": false, "ratio": 3.6394279877425944, "config_test": false...
#!/bin/env python2.7 import os import sys import fnmatch import requests import socket import argparse from xml.dom import minidom from urlparse import urlparse sys.path.append('.') from app.helpers.hdfsproxy import HdfsProxy from app.oozie.console import OozieConsole CERTS = {} APPID = 'app.griduser.aga_se' YCA_PROXY...
{ "repo_name": "anbu78/python-oozie-console", "path": "bin/ooziecli.py", "copies": "1", "size": "3586", "license": "apache-2.0", "hash": 8681075978717168000, "line_mean": 30.1826086957, "line_max": 94, "alpha_frac": 0.6134969325, "autogenerated": false, "ratio": 3.4250238777459407, "config_test"...
#!/bin/env python2.7 import sys import csv import os.path from collections import defaultdict, Counter from operator import itemgetter def read_events(file): cosmic_dic = defaultdict(list) count = 0 count_sam = 0 l = [] total = Counter() l_sam = [] count_A_T = 0 count_A_G = 0 count...
{ "repo_name": "HorvathLab/NGS", "path": "RNA2DNAlign/src/summary_analysis.py", "copies": "1", "size": "4036", "license": "mit", "hash": -657106953633515800, "line_mean": 39.7676767677, "line_max": 81, "alpha_frac": 0.3954410307, "autogenerated": false, "ratio": 3.2706645056726096, "config_test"...
#!/bin/env python2.7 import sys import os import argparse from collections import defaultdict import pickle import fileinput ''' License: This is free and unencumbered software released into the public domain. All authors are or were bona fide officers or employees of the U.S. Government at the time the software was...
{ "repo_name": "sanjuroj/bioscripts", "path": "ncbiTaxonomyMunger.py", "copies": "1", "size": "12724", "license": "mit", "hash": 6754117121697802000, "line_mean": 35.8579710145, "line_max": 163, "alpha_frac": 0.5901690916, "autogenerated": false, "ratio": 3.893141457440294, "config_test": false,...
#!/bin/env python2.7 import sys import os import argparse from collections import defaultdict import re def main(): args=processArgs() assemblyValues = {} with open(args.seqfile,'r') as fh : priorcomp = "" priorsub = "" priorseq = "" for line in fh : line =...
{ "repo_name": "sanjuroj/bioscripts", "path": "characterizeTrinity.py", "copies": "1", "size": "3442", "license": "mit", "hash": 8229378588869087000, "line_mean": 28.6810344828, "line_max": 134, "alpha_frac": 0.5441603719, "autogenerated": false, "ratio": 4.073372781065089, "config_test": false,...
#!/bin/env python2.7 import sys import os import argparse from matplotlib import pyplot as plt import numpy as np from matplotlib_venn import venn3, venn3_circles def main(): args=processArgs() plt.figure(figsize=(4,4)) v = venn3(subsets=(1, 1, 1, 1, 1, 1, 1), set_labels = ('GenomicHit', 'NoGenomicHi...
{ "repo_name": "sanjuroj/bioscripts", "path": "probation/venn.py", "copies": "1", "size": "2076", "license": "mit", "hash": 1128884847951099800, "line_mean": 33.6166666667, "line_max": 115, "alpha_frac": 0.5963391137, "autogenerated": false, "ratio": 3.2236024844720497, "config_test": false, "...
#!/bin/env python2.7 import sys import os import argparse import re from operator import itemgetter def main(): args=processArgs() seqs={} header="" geneid="" with open(args.fasta) as FH : for line in FH : match = re.match(">",line) if match != None : ...
{ "repo_name": "sanjuroj/bioscripts", "path": "getLongORFs.py", "copies": "1", "size": "2949", "license": "mit", "hash": 2902906488909115000, "line_mean": 31.7777777778, "line_max": 119, "alpha_frac": 0.512377077, "autogenerated": false, "ratio": 3.9477911646586343, "config_test": false, "has_...
#!/bin/env python2.7 import sys import os import argparse import re import gzip ########################### # Note this doesn't work for FASTA files # Need to check if the header info gets processed when there is no space in the header ########################### def main(): args=processArgs() fileList =...
{ "repo_name": "sanjuroj/bioscripts", "path": "probation/splitFastAQReads.py", "copies": "1", "size": "3141", "license": "mit", "hash": 4379332923555282400, "line_mean": 29.2019230769, "line_max": 111, "alpha_frac": 0.5606494747, "autogenerated": false, "ratio": 3.9759493670886075, "config_test"...
#!/bin/env python2.7 import sys import os import argparse def main(): args=processArgs() def processArgs(): class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('\nError: %s\n\n' % message) self.print_help() sys.exit(2) ...
{ "repo_name": "sanjuroj/bioscripts", "path": "pythonTemplate.py", "copies": "1", "size": "1166", "license": "mit", "hash": 3647799724782867500, "line_mean": 25.5227272727, "line_max": 111, "alpha_frac": 0.5720411664, "autogenerated": false, "ratio": 3.9795221843003414, "config_test": false, "...
#!/bin/env python2.7 import sys import os import argparse def main(): args=processArgs() """ def processArgs(): class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('\nerror: %s\n\n' % message) self.print_help() sys.exit(2) ...
{ "repo_name": "sanjuroj/bioscripts", "path": "parseBlastXML.py", "copies": "1", "size": "1780", "license": "mit", "hash": 5408735703567259000, "line_mean": 26.828125, "line_max": 111, "alpha_frac": 0.5702247191, "autogenerated": false, "ratio": 3.7473684210526317, "config_test": false, "has_n...
#!/bin/env python2.7 import sys import os import argparse def main(): args=processArgs() #print args.fasta readFasta(args.file) def processArgs(): argParser = argparse.ArgumentParser() argParser.add_argument('file', help="fasta file") argParser.add_argument('-p', ...
{ "repo_name": "sanjuroj/bioscripts", "path": "fastaShuffle.py", "copies": "1", "size": "1778", "license": "mit", "hash": 7641050473710147000, "line_mean": 21.7948717949, "line_max": 111, "alpha_frac": 0.5067491564, "autogenerated": false, "ratio": 4.050113895216401, "config_test": false, "has...
#!/bin/env python2.7 import sys import os import csv import os.path import gzip import re from collections import defaultdict from version import VERSION VERSION = '%s' % (VERSION,) from os.path import join, dirname, realpath, split try: scriptdir = dirname(realpath(__file__)) except NameError: scriptdir = di...
{ "repo_name": "HorvathLab/NGS", "path": "RNA2DNAlign/src/snv_computation.py", "copies": "1", "size": "8332", "license": "mit", "hash": -7818386137578891000, "line_mean": 39.8431372549, "line_max": 136, "alpha_frac": 0.610537686, "autogenerated": false, "ratio": 3.355618203785743, "config_test":...
#!/bin/env python2.7 import sys import os import os.path import glob import copy import traceback import re import csv import tempfile import urllib import shutil import atexit import subprocess import time import math from collections import defaultdict, Counter from os.path import join, dirname, realpath try: sys...
{ "repo_name": "HorvathLab/NGS", "path": "attic/readCounts/src/phasedReadCounts.py", "copies": "1", "size": "13366", "license": "mit", "hash": 9107811082229976000, "line_mean": 33.7168831169, "line_max": 136, "alpha_frac": 0.6105042646, "autogenerated": false, "ratio": 3.300246913580247, "config...
#!/bin/env python2.7 import sys import os import os.path import glob import copy import traceback import re import csv import tempfile import urllib.request, urllib.parse, urllib.error import shutil import atexit import subprocess import time import math from collections import defaultdict, Counter from os.path import ...
{ "repo_name": "HorvathLab/NGS", "path": "ReadCounts/src/phasedReadCounts.py", "copies": "1", "size": "13674", "license": "mit", "hash": -3133619056953745400, "line_mean": 34.3333333333, "line_max": 136, "alpha_frac": 0.6029691385, "autogenerated": false, "ratio": 3.333495855680156, "config_test...
#!/bin/env python2.7 import sys import os import os.path import glob import copy import traceback import time import re import csv import tempfile import urllib import shutil import atexit import subprocess import time import math from collections import defaultdict from os.path import join, dirname, realpath try: ...
{ "repo_name": "HorvathLab/NGS", "path": "attic/readCounts/src/LoH.py", "copies": "1", "size": "10402", "license": "mit", "hash": -7061377580047517000, "line_mean": 30.0507462687, "line_max": 117, "alpha_frac": 0.5990194193, "autogenerated": false, "ratio": 3.4205853337717858, "config_test": fal...
#!/bin/env python2.7 import sys import os import os.path import glob import copy import traceback import time import re import csv import tempfile import urllib.request, urllib.parse, urllib.error import shutil import atexit import subprocess import time import math from collections import defaultdict from os.path impo...
{ "repo_name": "HorvathLab/NGS", "path": "RNA2DNAlign/src/LoH.py", "copies": "1", "size": "10447", "license": "mit", "hash": 6025042905087289000, "line_mean": 30.1850746269, "line_max": 117, "alpha_frac": 0.5981621518, "autogenerated": false, "ratio": 3.414052287581699, "config_test": false, "...
#!/bin/env python2.7 import sys import os import re import argparse import subprocess import re import copy import collections def main(): args=processArgs() checkErrors(args) #nameConvertFile = "/raid1/home/bpp/jogdeos/cronn/geoSubs/nameConverts.tab" outDir = args.o or "./" s...
{ "repo_name": "sanjuroj/bioscripts", "path": "ncbiFileSubs.py", "copies": "1", "size": "12892", "license": "mit", "hash": -7133719654745143000, "line_mean": 35.8342857143, "line_max": 212, "alpha_frac": 0.5326559106, "autogenerated": false, "ratio": 4.0952986022871665, "config_test": false, "...
#!/bin/env python2.7 # Mailmon v2.1 by Kyle Claisse # This script reads in an email in text form and executes certain functions based on the content of the message. # # Version 2.1 now uses remote SMTP servers instead of local MTAs to send mail. Make sure you go over the new configuration options! import email import...
{ "repo_name": "TheRealBanana/Mailmon", "path": "mailmon2.py", "copies": "1", "size": "7474", "license": "mit", "hash": -5061863927430046000, "line_mean": 32.8190045249, "line_max": 168, "alpha_frac": 0.6016858443, "autogenerated": false, "ratio": 3.7614494212380474, "config_test": false, "has...
''' chromachron clone in python2.7 and pygame1.9 inspired by awesome german design and pixies @author brian morrow ''' import pygame, sys, random, time, math, pygame.gfxdraw from pygame.locals import * from datetime import datetime fps = 1 winwidth = 500 winheight = 500 def main(): pygame.init() fpsclock...
{ "repo_name": "killerbat00/pyChromachron", "path": "clock.py", "copies": "1", "size": "2143", "license": "mit", "hash": 6154994088708565000, "line_mean": 24.2117647059, "line_max": 75, "alpha_frac": 0.5940270649, "autogenerated": false, "ratio": 3.490228013029316, "config_test": false, "has_n...
import csv import datetime import os import re import sys import traceback import urllib2 # Python3 Note: will need changed def usage(): ''' Prints how to use script''' print('Usage: python.exe UrlChecker.py [Output File(.csv)] [Directory To Check] ' '[File Filters(ex/default:".html,.erb")] [Local Server UR...
{ "repo_name": "Esri/ops-server-config", "path": "SupportFiles/UrlChecker.py", "copies": "1", "size": "8507", "license": "apache-2.0", "hash": 4722778187487849000, "line_mean": 34.152892562, "line_max": 140, "alpha_frac": 0.6286587516, "autogenerated": false, "ratio": 3.5653813914501256, "config...
from IntelHexRecord import IntelHexRecord from Avr109 import Avr109 import time import sys import os class FirmwareSegment(object): def __init__(self, memory_type, address, data): self.memory_type = memory_type self.address = address self.data = data def __len__(sel...
{ "repo_name": "amishHammer/tnc1-python-config", "path": "BootLoader.py", "copies": "1", "size": "6504", "license": "apache-2.0", "hash": -2473027131547615700, "line_mean": 29.3971962617, "line_max": 133, "alpha_frac": 0.5159901599, "autogenerated": false, "ratio": 4.049813200498132, "config_tes...
#!/bin/env python2.7 from __future__ import print_function, unicode_literals from builtins import bytes, chr import threading import serial import time import datetime import math import traceback from io import StringIO, BytesIO from struct import pack, unpack from gi.repository import GLib from BootLoader import Bo...
{ "repo_name": "mobilinkd/tnc1-python-config", "path": "TncModel.py", "copies": "1", "size": "29147", "license": "apache-2.0", "hash": 8721792196576527000, "line_mean": 32.3871706758, "line_max": 99, "alpha_frac": 0.566130305, "autogenerated": false, "ratio": 3.4848158775705405, "config_test": f...
#! /bin/env python2.7 import argparse import getpass import hashlib import os import subprocess from itertools import starmap, cycle def encrypt(message, key): # single letter encrpytion. def enc(c, k): return chr((ord(k) + ord(c)) % 256) return "".join(starmap(enc, zip(message, cycle(key)))) def decryp...
{ "repo_name": "pl53/fast_kerberos", "path": "fastK.py", "copies": "1", "size": "2850", "license": "apache-2.0", "hash": -8284572620019126000, "line_mean": 33.756097561, "line_max": 90, "alpha_frac": 0.6585964912, "autogenerated": false, "ratio": 3.6213468869123253, "config_test": false, "has_...
#!/bin/env python2.7 import glob import json import os import platform import re import shutil import struct import subprocess import time script_tag = "[OT-App frontend build] " script_tab = " " # The project_root_dir depends on the location of this file, so it cannot be # moved without upda...
{ "repo_name": "Opentrons/otone_frontend", "path": "scripts/build_electron_app_with_builder.py", "copies": "1", "size": "7829", "license": "apache-2.0", "hash": 7847308325032811, "line_mean": 31.4854771784, "line_max": 96, "alpha_frac": 0.5999489079, "autogenerated": false, "ratio": 3.668697282099...
#!/bin/env python2.7 import os import sys # Find our project root, assuming this file lives in ./scripts/. We add that # root dir to sys.path and use it as our working directory. project_root = os.path.realpath( os.path.join(os.path.dirname(__file__), '..')) if project_root not in sys.path: sys.path.insert(0,...
{ "repo_name": "jehiah/assetman", "path": "scripts/invalidate_cloudfront_assets.py", "copies": "2", "size": "1411", "license": "apache-2.0", "hash": -2845763681278227500, "line_mean": 31.8372093023, "line_max": 122, "alpha_frac": 0.6491849752, "autogenerated": false, "ratio": 3.4839506172839507, ...
#!/bin/env python2.7 import threading import serial import time import math from StringIO import StringIO from gi.repository import GLib from BootLoader import BootLoader class KissData(object): def __init__(self): self.packet_type = None; self.sub_type = None; self.data = None se...
{ "repo_name": "amishHammer/tnc1-python-config", "path": "TncModel.py", "copies": "1", "size": "19398", "license": "apache-2.0", "hash": -1060314260749265500, "line_mean": 31.0628099174, "line_max": 99, "alpha_frac": 0.5565522219, "autogenerated": false, "ratio": 3.5704030922142462, "config_test...
#!/bin/env python2.7 """ asn_capture Description: Performs AS lookup for the destination of every packet processed and stores in database for later viewing in web summary. Traffic can either be gathered via a live capture with custom filter (pcap) or via netflow by sending flow...
{ "repo_name": "coxley/asn_report", "path": "asn_report/asn_capture.py", "copies": "1", "size": "6968", "license": "mit", "hash": 6485360679777589000, "line_mean": 28.0333333333, "line_max": 79, "alpha_frac": 0.5496555683, "autogenerated": false, "ratio": 3.8818941504178275, "config_test": false...
#!/bin/env python2.7 """ http://en.wikipedia.org/wiki/Intel_HEX """ class IntelHexRecord(object): def __init__(self, line): self.parse(line) def hasValidStartCode(self, line): return line[0] == ':' def getByteCount(self, line): byteCoun...
{ "repo_name": "mobilinkd/tnc1-python-config", "path": "IntelHexRecord.py", "copies": "1", "size": "3438", "license": "apache-2.0", "hash": -3628190875504491500, "line_mean": 25.0454545455, "line_max": 100, "alpha_frac": 0.5453752182, "autogenerated": false, "ratio": 3.8327759197324416, "config_...
#!/bin/env python2.7 """ interface_monitor Description: Monitors an interface's I/O by sending commands in loop via SSH Usage: interface_monitor -c <host> -i <interface> [options] Options: -h --help Show this screen. -v --verbose Verbose output. -u <username> ...
{ "repo_name": "coxley/interface_monitor", "path": "interface_monitor/interface_monitor.py", "copies": "1", "size": "6536", "license": "mit", "hash": 2530530251471727600, "line_mean": 29.9763033175, "line_max": 79, "alpha_frac": 0.5442166463, "autogenerated": false, "ratio": 4.022153846153846, "...
#!/bin/env python2.7 """ This is a module. """ import datetime import json import os.path import dateutil.parser import pytz def clean_ndays(overrides): """Delete all nday overrides that are no longer relevant. :param overrides: The overrides dictionary :returns: The updated overrides :rtype: dict ...
{ "repo_name": "dalyd/Tools", "path": "scripts/oneoffs/mongoperoverrides/update_all.py", "copies": "1", "size": "2916", "license": "mit", "hash": 1000051249398558500, "line_mean": 29.375, "line_max": 97, "alpha_frac": 0.6083676269, "autogenerated": false, "ratio": 4.18364418938307, "config_test"...
#!/bin/env python2.7 # This script creates thumbnail images for all png images in a directory. # The original size images are renamed to [name]_large.png while the thumbnail # images are saved as [name].png (the original filename). from PIL import Image import os import sys import shutil MAX_SIZE = 600, 400 def thu...
{ "repo_name": "ScottTodd/scotttodd.github.io", "path": "util/thumbnail.py", "copies": "1", "size": "1668", "license": "mit", "hash": -1103382253269498600, "line_mean": 36.0666666667, "line_max": 79, "alpha_frac": 0.610911271, "autogenerated": false, "ratio": 3.4605809128630707, "config_test": f...
#/bin/env python2.7 # pip install dnspython # pip install requests import xml.dom.minidom import argparse import hashlib import dns.resolver import sys import re import requests import xml.etree.ElementTree as ET parser = argparse.ArgumentParser(description='SML/SMP lookup') parser.add_argument('participantid', met...
{ "repo_name": "rikribbers/si-oxalis-workshop", "path": "sml-lookup.py", "copies": "1", "size": "2465", "license": "mit", "hash": 1426549894916227000, "line_mean": 24.412371134, "line_max": 105, "alpha_frac": 0.662474645, "autogenerated": false, "ratio": 3.462078651685393, "config_test": false, ...
#!/bin/env python2 # booklet -p 0-99 -s 5 # -p Pages (default all) # -s Sheets per "page group" (find correct term) (default auto = as many as is required to fit all pages) import math, PyPDF2.utils, sys def iter_pages( pages ): if pages % 4: pages = pages + 4 - pages % 4 for output_page in ran...
{ "repo_name": "Nimdraug/booklet", "path": "booklet.py", "copies": "1", "size": "4964", "license": "mit", "hash": 7102507284070353000, "line_mean": 32.768707483, "line_max": 116, "alpha_frac": 0.5328364222, "autogenerated": false, "ratio": 3.081315952824333, "config_test": false, "has_no_keywo...
#!/bin/env python2 #coding: utf-8 """iPlanet ldap server does not allow us to read more than 4000 records in one step. We could change this on the server-side via i.e. sizelimit=-1 but imagine that you may not have the appropriate access to the ldap server, or that - we the admins - do not want to enable everybody to r...
{ "repo_name": "spahan/unixdmoain", "path": "lib/dbmcache.py", "copies": "1", "size": "7522", "license": "bsd-3-clause", "hash": -815975837599191600, "line_mean": 36.2376237624, "line_max": 173, "alpha_frac": 0.6164583887, "autogenerated": false, "ratio": 3.4409881061299177, "config_test": false...
#!/bin/env python2 # -*- coding: utf-8 -*- from random import seed, random, uniform import time as t import numpy as np # Init list of packages packages = [] total_value = 0 total_weight = 0 total_volume = 0 with open("pso-packages.txt") as f: for line in f: val, weight = (float(x) for x in line.strip()...
{ "repo_name": "marienfressinaud/AI_pso", "path": "task4/pso.py", "copies": "1", "size": "6686", "license": "mit", "hash": -1835537135687562200, "line_mean": 24.3257575758, "line_max": 77, "alpha_frac": 0.6027520191, "autogenerated": false, "ratio": 3.777401129943503, "config_test": false, "ha...
#!/bin/env python2 # -*- coding: utf-8 -*- from random import seed, random, uniform import time as t import numpy as np # Init list of packages packages = [] total_value = 0 total_weight = 0 with open("pso-packages.txt") as f: for line in f: val, weight = (float(x) for x in line.strip().split(",")) ...
{ "repo_name": "marienfressinaud/AI_pso", "path": "task3/pso.py", "copies": "1", "size": "6292", "license": "mit", "hash": 367381732367256450, "line_mean": 24.4736842105, "line_max": 77, "alpha_frac": 0.6029879212, "autogenerated": false, "ratio": 3.7949336550060315, "config_test": false, "has...
#!/bin/env python2 # -*- coding: utf-8 -*- from random import seed, random, uniform import numpy as np import plot_graph as pg #seed(42) # we set the random seed in order to have always the same results GRAPH_OUTPUT = False DECREASE_WEIGHT = True NB_RUN = 10 # how many times we will run algorithm NB_DIMENSION...
{ "repo_name": "marienfressinaud/AI_pso", "path": "task2/pso.py", "copies": "1", "size": "7296", "license": "mit", "hash": -6361924021586270000, "line_mean": 25.3393501805, "line_max": 78, "alpha_frac": 0.5820997807, "autogenerated": false, "ratio": 3.84607274644175, "config_test": false, "has...
#!/bin/env python2 # -*- coding: utf-8 -*- from random import seed, random, uniform import numpy as np import plot_graph as pg # seed(42) # we set the random seed in order to have always the same results GRAPH_OUTPUT = True NB_RUN = 10 # how many times we will run algorithm NB_DIMENSIONS = 1 # number of dime...
{ "repo_name": "marienfressinaud/AI_pso", "path": "task1/pso.py", "copies": "1", "size": "5088", "license": "mit", "hash": -7481764536628449000, "line_mean": 23.9411764706, "line_max": 78, "alpha_frac": 0.5737028302, "autogenerated": false, "ratio": 3.8633257403189067, "config_test": false, "h...
#!/bin/env python2 # -*- coding: utf-8 -*- from time import time from factory import Factory import ui MIN_LOOPS = 1 MAX_LOOPS = 2000 MIN_TIME_LIMIT = 5 MAX_TIME_LIMIT = 3600 def exec_game(game_type, env): """ Function which runs a game according to the current configuration """ local_search_typ...
{ "repo_name": "marienfressinaud/AI_Puzzle-Solver", "path": "PuzzleSolver/puzzle_solver.py", "copies": "1", "size": "2887", "license": "mit", "hash": 121623850879444000, "line_mean": 21.9126984127, "line_max": 77, "alpha_frac": 0.5490128161, "autogenerated": false, "ratio": 3.3107798165137616, "...
#!/bin/env python2 # coding: utf-8 import copy import operator def depth_iter(mydict, ks=None, maxdepth=10240, intermediate=False, empty_leaf=False, is_allowed=None): ks = ks or [] dickeys = sorted(mydict.keys()) for k in dickeys: v = mydict[k] ks.append(...
{ "repo_name": "sejust/pykit", "path": "dictutil/dictutil.py", "copies": "2", "size": "10252", "license": "mit", "hash": 3279667226885609500, "line_mean": 22.1945701357, "line_max": 107, "alpha_frac": 0.5208739758, "autogenerated": false, "ratio": 3.6562054208273893, "config_test": false, "has...
#! /bin/env python2 # coding: utf-8 import numpy as np import networkx as nx import matplotlib.pyplot as plt import random as rd from pickle import dump class Data: def __init__(self): self.m_list1 = [] self.m_list2 = [] N = 100 M = 100 MAX = N + M + 1 MAX_EDGE = 380 MAX_DEG = 450 ITERATIONS = 50...
{ "repo_name": "kaslusimoes/SummerSchool2016", "path": "simulation-multiple-variations-random.py", "copies": "1", "size": "4619", "license": "apache-2.0", "hash": 8979269809582253000, "line_mean": 24.6611111111, "line_max": 91, "alpha_frac": 0.4697986577, "autogenerated": false, "ratio": 2.9685089...
#! /bin/env python2 # coding: utf-8 import numpy as np import networkx as nx import matplotlib.pyplot as plt import random as rd import os from pickle import dump, load class Data: def __init__(self): self.m_list1 = [] self.m_list2 = [] N = 100 M = 100 MAX = N + M + 1 MAX_EDGE = 380 MAX_DEG = 450...
{ "repo_name": "kaslusimoes/SummerSchool2016", "path": "simulation-finetuning.py", "copies": "1", "size": "6726", "license": "apache-2.0", "hash": 4579473974570181000, "line_mean": 24.0037174721, "line_max": 91, "alpha_frac": 0.4634255129, "autogenerated": false, "ratio": 2.95129442738043, "conf...
#! /bin/env python2 # coding: utf-8 import numpy as np import networkx as nx import matplotlib.pyplot as plt import random as rd N = 100 M = 100 MAX = N + M + 1 MAX_EDGE = 380 MAX_DEG = 450 ITERATIONS = 50000 T = 1.4 S = 1.0 beta = 0.5 # initial fraction of cooperators p1, p2 = .5, .5 # number of cooperators cc1, cc...
{ "repo_name": "kaslusimoes/SummerSchool2016", "path": "simulation-simple.py", "copies": "1", "size": "3367", "license": "apache-2.0", "hash": 4499354338281401000, "line_mean": 24.5075757576, "line_max": 91, "alpha_frac": 0.4974754975, "autogenerated": false, "ratio": 2.8802395209580838, "config...
#!/bin/env python2 # coding: utf-8 class FixedKeysDict(dict): # {'key', value_constructor} keys_default = {} # ordered keys as ident ident_keys = () def __init__(self, *args, **argkv): super(FixedKeysDict, self).__init__(*args, **argkv) # Convert present keys for k in ...
{ "repo_name": "sejust/pykit", "path": "dictutil/fixed_keys_dict.py", "copies": "2", "size": "1035", "license": "mit", "hash": -7149729186816451000, "line_mean": 25.5384615385, "line_max": 69, "alpha_frac": 0.5526570048, "autogenerated": false, "ratio": 3.75, "config_test": false, "has_no_keyw...
#!/bin/env python2 # -*- coding: utf-8 -*- """ Fetches, parses and stores the data from the austrian aid projects website since January 1st 2010. """ import urllib2 import bs4 from bs4 import BeautifulSoup from datetime import datetime import re import json import os import string import time __author__ = "Christia...
{ "repo_name": "OKFNat/aidScraper", "path": "code/aid-scraper.py", "copies": "1", "size": "9538", "license": "mit", "hash": -4813312777933520000, "line_mean": 27.5568862275, "line_max": 152, "alpha_frac": 0.6797022437, "autogenerated": false, "ratio": 3.0463110827211755, "config_test": false, ...
#!/bin/env python2 # -*- coding: utf-8 -*- """ Scrapes, re-structures and saves the data from the EU arms exports reports from 2005 to 2013. """ import urllib2 import bs4 from bs4 import BeautifulSoup from bs4 import UnicodeDammit from datetime import datetime import json import os from sets import Set import csv _...
{ "repo_name": "OKFNat/armsScraper", "path": "code/arms-scraper.py", "copies": "1", "size": "21774", "license": "mit", "hash": -1250155655280615000, "line_mean": 34.5203915171, "line_max": 338, "alpha_frac": 0.6731882061, "autogenerated": false, "ratio": 3.2015880017644465, "config_test": false,...
# The MIT License (MIT) # # Copyright (c) 2015 Alex Headley <aheadley@waysaboutstuff.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation ...
{ "repo_name": "aheadley/python-diva", "path": "diva/util.py", "copies": "1", "size": "2626", "license": "mit", "hash": -3807791811539826700, "line_mean": 36.5142857143, "line_max": 80, "alpha_frac": 0.7105864433, "autogenerated": false, "ratio": 4.188197767145136, "config_test": false, "has_n...
from xml.etree.ElementTree import Element from xml.etree import ElementTree import six from vecnet.openmalaria.scenario.core import Section, attribute, attribute_setter, section, tag_value, tag_value_setter from vecnet.openmalaria.scenario.healthsystem import HealthSystem class Deploy(Section): @property @at...
{ "repo_name": "vecnet/vecnet.openmalaria", "path": "vecnet/openmalaria/scenario/interventions.py", "copies": "1", "size": "38233", "license": "mpl-2.0", "hash": 1985823706779040500, "line_mean": 31.3186813187, "line_max": 123, "alpha_frac": 0.5978866424, "autogenerated": false, "ratio": 3.9917519...
import sys import argparse from vecnet.openmalaria.experiment import ExperimentSpecification def main(filename, generate_seed=False): with open(filename) as fp: exp = ExperimentSpecification(fp) i = 1 keys = exp.experiment["sweeps"].keys() csvfile = open("scenarios.csv", "w") # Write "...
{ "repo_name": "vecnet/vecnet.openmalaria", "path": "vecnet/openmalaria/bin/expand.py", "copies": "1", "size": "2003", "license": "mpl-2.0", "hash": -592527782163899300, "line_mean": 32.3833333333, "line_max": 91, "alpha_frac": 0.6370444333, "autogenerated": false, "ratio": 3.793560606060606, "c...
import unittest import os from vecnet.openmalaria import get_schema_version_from_xml class TestGetSchemaVersion(unittest.TestCase): def setUp(self): pass def test_get_schema_version_from_xml(self): base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files") # use f...
{ "repo_name": "vecnet/vecnet.openmalaria", "path": "vecnet/openmalaria/tests/test_get_schema_version.py", "copies": "1", "size": "2173", "license": "mpl-2.0", "hash": 4259926977757965300, "line_mean": 41.6078431373, "line_max": 107, "alpha_frac": 0.6682006443, "autogenerated": false, "ratio": 3.5...
from django.contrib import admin from website.apps.home.models import Location, Simulation, Data, SimulationModel, Totals, UploadJob class LocationAdmin(admin.ModelAdmin): list_display = ("id", "department", "department_code", "municipality", "municipality_code", "creation_timestamp") ordering = ("departmen...
{ "repo_name": "ecaldwe1/zika", "path": "website/apps/home/admin.py", "copies": "2", "size": "1755", "license": "mpl-2.0", "hash": -3561293571372008400, "line_mean": 44, "line_max": 126, "alpha_frac": 0.7287749288, "autogenerated": false, "ratio": 3.596311475409836, "config_test": false, "has_...
import logging from django.http.request import HttpRequest import warnings logger = logging.getLogger(__name__) SUCCESS = "alert-success" DANGER = "alert-danger" WARNING = "alert-warning" INFO = "alert-info" def set_notification(session, message, alert_type): """ Set notification that will be displayed in {% ...
{ "repo_name": "vecnet/zika", "path": "website/notification.py", "copies": "2", "size": "2107", "license": "mpl-2.0", "hash": -2200131601411578600, "line_mean": 37.3090909091, "line_max": 154, "alpha_frac": 0.7228286664, "autogenerated": false, "ratio": 4.013333333333334, "config_test": false, ...
#!/bin/env python2 # -*- coding: utf-8 -*- # 个推api wrapper from igt_push import IGeTui from igetui.template.igt_transmission_template import TransmissionTemplate from igetui.igt_message import IGtSingleMessage from igetui.igt_target import Target import json import hashlib # add your own appkey, appid, mastersecret ...
{ "repo_name": "FXuZ/colock-server", "path": "message/igt_wrappers.py", "copies": "1", "size": "2794", "license": "apache-2.0", "hash": 4490052709587164000, "line_mean": 28.0625, "line_max": 92, "alpha_frac": 0.6784946237, "autogenerated": false, "ratio": 3.394160583941606, "config_test": false,...
""" config_generator.py Usage: ./config_generator.py <config_file> [--output_format=<output_format>] ./config_generator.py -h | --help Options: -h --help Show this screen. --output_format=<output_format> Output Config format(json or yaml) [default: json]. """ import json...
{ "repo_name": "qingqing01/Paddle", "path": "demo/recommendation/data/config_generator.py", "copies": "2", "size": "3364", "license": "apache-2.0", "hash": -2913270154995691500, "line_mean": 25.4881889764, "line_max": 91, "alpha_frac": 0.5160523187, "autogenerated": false, "ratio": 3.7461024498886...
from py_paddle import swig_paddle, DataProviderConverter from common_utils import * from paddle.trainer.config_parser import parse_config try: import cPickle as pickle except ImportError: import pickle import sys if __name__ == '__main__': model_path = sys.argv[1] swig_paddle.initPaddle('--use_gpu=0...
{ "repo_name": "qingqing01/Paddle", "path": "demo/recommendation/prediction.py", "copies": "2", "size": "1973", "license": "apache-2.0", "hash": 8674644398065014000, "line_mean": 37.6862745098, "line_max": 80, "alpha_frac": 0.6528129752, "autogenerated": false, "ratio": 3.6741154562383613, "conf...
""" config_generator.py Usage: ./config_generator.py <config_file> [--output_format=<output_format>] ./config_generator.py -h | --help Options: -h --help Show this screen. --output_format=<output_format> Output Config format(json or yaml) [default: json]. """ import jso...
{ "repo_name": "zuowang/Paddle", "path": "demo/recommendation/data/config_generator.py", "copies": "2", "size": "3433", "license": "apache-2.0", "hash": -461252046492616450, "line_mean": 24.6194029851, "line_max": 91, "alpha_frac": 0.5056801631, "autogenerated": false, "ratio": 3.7725274725274724,...
""" Separate movielens 1m dataset to train/test file. Usage: ./separate.py <input_file> [--test_ratio=<test_ratio>] [--delimiter=<delimiter>] ./separate.py -h | --help Options: -h --help Show this screen. --version Show version. --test_ratio=<test_ratio...
{ "repo_name": "zuowang/Paddle", "path": "demo/recommendation/data/split.py", "copies": "2", "size": "2390", "license": "apache-2.0", "hash": -5445439447899633000, "line_mean": 34.671641791, "line_max": 84, "alpha_frac": 0.5937238494, "autogenerated": false, "ratio": 3.898858075040783, "config_t...
#!/bin/env python2 # -*- encoding:utf-8 -*- from django.shortcuts import render_to_response from django.http import HttpResponse from django import forms import colock.settings from importlib import import_module from colock.utils import call_hook from colock import utils, validation from django.views.decorators.csrf...
{ "repo_name": "FXuZ/colock-server", "path": "colock/dispatch.py", "copies": "1", "size": "2116", "license": "apache-2.0", "hash": 4171893781788430300, "line_mean": 28.3888888889, "line_max": 100, "alpha_frac": 0.6120037807, "autogenerated": false, "ratio": 4.157170923379175, "config_test": fals...
#!/bin/env python2 from __future__ import division from path import Path import re from argparse import ArgumentParser parser = ArgumentParser(description='A script to generate SFZ Mappings for drum samples by Analogue Drums.') parser.add_argument('samplepath') parser.add_argument('sfzfile') volume = -6 instruments ...
{ "repo_name": "luaks/analoguedrums_sfz_generator", "path": "ad_sfzgenerator.py", "copies": "1", "size": "3550", "license": "mit", "hash": 7247113384446093000, "line_mean": 32.4905660377, "line_max": 108, "alpha_frac": 0.5214084507, "autogenerated": false, "ratio": 3.125, "config_test": false, ...
#!/bin/env python2 from pykeyboard import PyKeyboard from time import sleep from random import choice import sys if len(sys.argv) < 2: print 'Usage: "./auto2048.py <strategy> [delay in seconds]"\n'\ 'Then focus on the browser window in which you are playing 2048.\n'\ 'Strategies include:\n'\...
{ "repo_name": "dashscar/Auto2048", "path": "auto2048.py", "copies": "1", "size": "2363", "license": "mit", "hash": 4993909772265930000, "line_mean": 25.5505617978, "line_max": 87, "alpha_frac": 0.5294117647, "autogenerated": false, "ratio": 2.998730964467005, "config_test": false, "has_no_key...
#!/bin/env python2 from pymongo import MongoClient import multiprocessing import time import logging # Room for improvement: handling of errors and empty mongo bulk executes. # Be smarter about what it means to max out memory. # Doc count isn't the best one can do. logging.basicConfig(level=logging.INFO) logger = lo...
{ "repo_name": "torypages/random", "path": "multiprocessing_mongo_bulk.py", "copies": "1", "size": "2956", "license": "mit", "hash": 739333587859001600, "line_mean": 30.1157894737, "line_max": 97, "alpha_frac": 0.6031799729, "autogenerated": false, "ratio": 3.838961038961039, "config_test": fals...
#!/bin/env python2 import argparse from katana.service import KatanaService import logging from importlib import import_module parser = argparse.ArgumentParser(description='Distributed transaction manager') parser.add_argument('--config', default='katana.ini', help='Config file') parser.add_argument('--verbose', actio...
{ "repo_name": "toudi/katana", "path": "katanad.py", "copies": "1", "size": "1219", "license": "mit", "hash": -864808225962057700, "line_mean": 35.9393939394, "line_max": 102, "alpha_frac": 0.742411813, "autogenerated": false, "ratio": 3.553935860058309, "config_test": true, "has_no_keywords":...
#!/bin/env python2 import argparse from sys import argv from pytube import YouTube from urllib2 import HTTPError def _real_main(urls): """Download the youtube videos provided Arguments: urls - A iterable list of hyperlinks to the desired videos Returns: None """ for url in urls:...
{ "repo_name": "en0/ytwatch", "path": "ytdl.py", "copies": "1", "size": "2293", "license": "unlicense", "hash": 1330571882871897600, "line_mean": 23.3936170213, "line_max": 110, "alpha_frac": 0.6105538596, "autogenerated": false, "ratio": 3.9398625429553267, "config_test": false, "has_no_keywo...
#!/bin/env python2 import dbus import dbus.service import dbus.mainloop.glib import gobject import sys import time import random import string OBJ_PATH = "/org/fubar/signal1" INTERFACE = "org.fubar.signal1" def _rs(l): return ''.join(random.choice(string.ascii_lowercase) for _ in range(l)) count = 0 prev_size ...
{ "repo_name": "mulkieran/dbus-signals", "path": "spamsignals.py", "copies": "2", "size": "2559", "license": "mit", "hash": -1349522569860718300, "line_mean": 21.6548672566, "line_max": 75, "alpha_frac": 0.5615474795, "autogenerated": false, "ratio": 3.43029490616622, "config_test": false, "ha...
#!/bin/env python2 import smtpd import asyncore import email from email.header import decode_header from jinja2 import Environment, FileSystemLoader import sys import signal import json import os import base64 class CustomSMTPServer(smtpd.SMTPServer): templateEnv = Environment(loader=FileSystemLoader('.')) T...
{ "repo_name": "kuehnelth/pyDisposableMail", "path": "mail.py", "copies": "1", "size": "3196", "license": "isc", "hash": 905966051042573700, "line_mean": 37.0476190476, "line_max": 94, "alpha_frac": 0.6054443054, "autogenerated": false, "ratio": 3.8138424821002386, "config_test": false, "has_n...
#!/bin/env python2 """Analizer module.""" from __future__ import division import cv2 import magic import numpy as np from scipy import ndimage from key_frame_extractor import get_key_frames PERCENTAGE_OF_FRAMES_TO_ANALIZE = 0.1 BYTES_PER_PIXEL = 3 class SkinRegion(object): def __init__(self, image, skin_mask...
{ "repo_name": "alcuadrado/pija", "path": "analizer.py", "copies": "1", "size": "6440", "license": "mit", "hash": 1358080712178240800, "line_mean": 28.8148148148, "line_max": 82, "alpha_frac": 0.5913043478, "autogenerated": false, "ratio": 3.5443037974683542, "config_test": false, "has_no_keyw...
#!/bin/env python2 """Analizer module.""" from __future__ import division import cv2 import magic import random import numpy as np from scipy import ndimage from key_frame_extractor import get_key_frames PERCENTAGE_OF_FRAMES_TO_ANALIZE = 0.1 BYTES_PER_PIXEL = 3 class SkinRegion(object): def __init__(self, im...
{ "repo_name": "mfsec/pija", "path": "analizer.py", "copies": "1", "size": "6254", "license": "mit", "hash": 1410907863623423700, "line_mean": 28.9234449761, "line_max": 82, "alpha_frac": 0.5930604413, "autogenerated": false, "ratio": 3.5635327635327636, "config_test": false, "has_no_keywords"...
#!/bin/env python2 # as.py -- Assembler # # Simple Python script to convert Khepra assembly programs into # working ROMs loadable by qpra and other emulators as per the specification. import sys import re import struct anyPattern = r""" ([a-zA-Z0-9_-]+:)? (?:.+)? $ """ instrPattern = r""" ([a-zA-Z0-9_-]+:)? ...
{ "repo_name": "tykel/qpra", "path": "as.py", "copies": "1", "size": "15014", "license": "mit", "hash": 516439476804386800, "line_mean": 30.4758909853, "line_max": 140, "alpha_frac": 0.418609298, "autogenerated": false, "ratio": 3.356583948133244, "config_test": false, "has_no_keywords": false...
#!/bin/env python2 ''' Command to send process connection count to MetricSender ''' # vim: expandtab:tabstop=4:shiftwidth=4 # Disabling invalid-name because pylint doesn't like the naming conention we have. # pylint: disable=invalid-name import argparse import psutil # Reason: disable pylint import-error because ou...
{ "repo_name": "rhdedgar/openshift-tools", "path": "scripts/monitoring/cron-send-connection-count.py", "copies": "12", "size": "2566", "license": "apache-2.0", "hash": -2629239669855177000, "line_mean": 35.1408450704, "line_max": 102, "alpha_frac": 0.5452065472, "autogenerated": false, "ratio": 4....
import arcpy import sys import os def usage(): print("creategdbs.py <Source Folder> <Destination Folder>") def getfolders(path, patterns): matching_file_list = [os.path.join(dp, f) for dp, dn, filenames in \ os.walk(path) for f in filenames if os.path.splitext(f)[1] in patterns] ...
{ "repo_name": "Esri/ops-server-config", "path": "SupportFiles/CreateFileGDBs.py", "copies": "1", "size": "2697", "license": "apache-2.0", "hash": -2198604875934594800, "line_mean": 36.4722222222, "line_max": 97, "alpha_frac": 0.6351501669, "autogenerated": false, "ratio": 4.098784194528875, "co...
#!/bin/env python2 def help(): from sys import exit print "Help" print "\t-h : This Message" print "\t--host : host address for coordinator" print "\t--port : port number for coordinator" print "\t--host_list: list of hosts" print "\t--start : start cluster" print "\...
{ "repo_name": "varunmittal91/Distributed-Key-Value-Store", "path": "exec.py", "copies": "1", "size": "2250", "license": "mit", "hash": -4485359724048845300, "line_mean": 27.125, "line_max": 112, "alpha_frac": 0.5031111111, "autogenerated": false, "ratio": 3.7067545304777596, "config_test": fals...
#!/bin/env python2 from __future__ import print_function import sys, os, re, subprocess, webbrowser, SimpleHTTPServer, SocketServer, socket, tempfile, json, logging, argparse, urllib, shlex PORT = 8080 TEST_PATH = os.path.abspath('.') BUILD_PATH = os.path.join(os.path.dirname(__file__), 'build') class Compiler(objec...
{ "repo_name": "ngld/emscripten-libsdl-tests", "path": "test_server.py", "copies": "1", "size": "10001", "license": "mit", "hash": -1826169550036334300, "line_mean": 31.7901639344, "line_max": 138, "alpha_frac": 0.5083491651, "autogenerated": false, "ratio": 4.026167471819646, "config_test": tru...
#!/bin/env python2 from __future__ import print_function import sys, os, subprocess from os import listdir from os.path import isfile, join, sep def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def which(program): import os def is_exe(fpath): return os.path.isfile(fpath) and o...
{ "repo_name": "crabman77/minetest-minetestforfun-server", "path": "mods/u_skins/generate_previews.py", "copies": "8", "size": "2673", "license": "unlicense", "hash": 9036639787363487000, "line_mean": 30.4470588235, "line_max": 103, "alpha_frac": 0.5596707819, "autogenerated": false, "ratio": 3.20...
#!/bin/env/python2 from pylab import * times0_1 = array([187.150625,108.330420,74.426996,57.390306,29.875077,32.799355,30.877238,40.771062]) times1 = array([2739.799414,1436.301511,1055.523877,840.427201,493.569283,384.757745,314.533461,279.590304]) times10 = array([22353.0, 12010.3, 7584.1, 5601.3, 2817.093872,1505....
{ "repo_name": "pjozog/sparse-gp-petsc", "path": "report/figures/resultsse.py", "copies": "1", "size": "1977", "license": "bsd-2-clause", "hash": -496982801454999230, "line_mean": 25.36, "line_max": 108, "alpha_frac": 0.6605968639, "autogenerated": false, "ratio": 2.3563766388557807, "config_tes...
#!/bin/env python2 """Handling events as tickets The goal here is, provided a maintenance event, create an event if not a duplicate. To determine if not duplicate, use some combination of values to form a key. Methods to delete, update, and otherwise transform the ticket should be available A base class, Ticket, is ...
{ "repo_name": "maint-notification/maint-notification", "path": "xmaintnote/ticketing.py", "copies": "1", "size": "9731", "license": "bsd-2-clause", "hash": -8500603476660222000, "line_mean": 32.5551724138, "line_max": 79, "alpha_frac": 0.5759942452, "autogenerated": false, "ratio": 4.478140819144...
#!/bin/env python2 import copy from commands.classes.Pokemons import * import random class UserManager: def __init__(self): self.userlist = [] def addUser(self, user): self.userlist.append(user) def remUser(self, username): self.userlist.remove(self.findUser(username)) d...
{ "repo_name": "AlexMog/IRCPokemonBot", "path": "User.py", "copies": "1", "size": "2813", "license": "mit", "hash": 8533511982203624000, "line_mean": 24.8073394495, "line_max": 114, "alpha_frac": 0.5641663704, "autogenerated": false, "ratio": 3.978783592644979, "config_test": false, "has_no_ke...
#!/bin/env python2 import csv import editdistance import subprocess import sys VERBOSE = True UNDEFINED = '?' SPRING = 'Spring' FALL = 'Fall' SUMMER = 'Summer' PAGE_SEPARATOR = '=' * 79 GRADE_TITLE = 'GRADE BREAKDOWN/PERCENTAGE' HEADER_ROW = ['Page', 'Year', 'Term', 'Number', 'A+', 'A', 'A-', 'B+', 'B',...
{ "repo_name": "kevinwortman/CSUF-grade-report-scanner", "path": "grade-report-scanner.py", "copies": "1", "size": "3427", "license": "mit", "hash": -5402555602972249000, "line_mean": 28.5431034483, "line_max": 125, "alpha_frac": 0.4776772687, "autogenerated": false, "ratio": 3.529351184346035, ...
#!/bin/env python2 import datetime import os import time import pytz as tz import Xlib.display class Battery(object): def __init__(self): base_path = '/sys/class/power_supply/BAT{}' i = 0 while not os.path.isdir(base_path.format(i)): if i > 255: raise RuntimeE...
{ "repo_name": "gagnonlg/dwmstatus", "path": "dwmstatus.py", "copies": "1", "size": "1460", "license": "mit", "hash": 3476005718082878500, "line_mean": 22.1746031746, "line_max": 69, "alpha_frac": 0.5273972603, "autogenerated": false, "ratio": 3.2444444444444445, "config_test": false, "has_no_...
#!/bin/env python2 import logging import random import time from flask import Flask, g, request log = logging.getLogger('rolling') log.info('importing %s...', 'ver_a') # do busy work to delay starting up for i in range(10**7 * random.randint(3, 10)): i *= 3.71543 i %= 1000000 # Setup the app app = Flask(__n...
{ "repo_name": "shamer/uwsgi_rolling_restart", "path": "ver_a/fooserv/main.py", "copies": "1", "size": "1872", "license": "apache-2.0", "hash": 3800310534801300500, "line_mean": 23, "line_max": 77, "alpha_frac": 0.6324786325, "autogenerated": false, "ratio": 3.1728813559322036, "config_test": fa...
#!/bin/env python2 import logging import random import time from flask import Flask, g, request log = logging.getLogger('rolling') log.info('importing %s...', 'ver_b') # do busy work to delay starting up for i in range(10**7 * random.randint(3, 10)): i *= 3.71543 i %= 1000000 # Setup the app app = Flask(__n...
{ "repo_name": "shamer/uwsgi_rolling_restart", "path": "ver_b/fooserv/main.py", "copies": "1", "size": "1872", "license": "apache-2.0", "hash": -6461912186480806000, "line_mean": 23, "line_max": 77, "alpha_frac": 0.6324786325, "autogenerated": false, "ratio": 3.1728813559322036, "config_test": f...
#!/bin/env python2 import operator import sys import collections import matplotlib.pyplot as plt from oslo.config import cfg from oslo.db.sqlalchemy import utils as db_utils import pandas as pd from subunit2sql.db import api from subunit2sql.db import models from subunit2sql import shell CONF = cfg.CONF SHELL_OPTS...
{ "repo_name": "mtreinish/subunit2sql-analysis", "path": "run_time.py", "copies": "1", "size": "7720", "license": "apache-2.0", "hash": 2868778256105801700, "line_mean": 33.6188340807, "line_max": 92, "alpha_frac": 0.5382124352, "autogenerated": false, "ratio": 3.567467652495379, "config_test": ...
#!/bin/env python2 import os import WikiwhoRelationships from copy import deepcopy import operator from sys import argv,exit import getopt from wmf import dump from structures.Revision import Revision import re import datetime #from django.utils import simplejson def getStatsOfFile(revisions, order, relations, tags):...
{ "repo_name": "wikiwho/whovis", "path": "wikistats.py", "copies": "1", "size": "42228", "license": "mit", "hash": -6780855622002126000, "line_mean": 46.6076662909, "line_max": 339, "alpha_frac": 0.5646016861, "autogenerated": false, "ratio": 3.682567367227697, "config_test": false, "has_no_ke...
#!/bin/env python2 import os, re, sqlite3 from bs4 import BeautifulSoup, NavigableString, Tag def clean_path(path): return path.strip().split("#")[0] def clean_url(url): return "html/%s" % url.strip() def read_file(path): with open(os.path.join(docpath, path)) as f: return f.read() db = sqlite3.connect("qt335.d...
{ "repo_name": "ryanwersal/qt-335-zeal-docset", "path": "gendocset.py", "copies": "1", "size": "1459", "license": "mit", "hash": 1431496310252858600, "line_mean": 32.9302325581, "line_max": 155, "alpha_frac": 0.6847155586, "autogenerated": false, "ratio": 2.8551859099804306, "config_test": false...
#!/bin/env python2 import random class Item: def __init__(self, name): self.name = name self.price = 0 def use(self, battle): return ("Nothing to do :(", True) class Pokeball(Item): def __init__(self, name, percent, price): Item.__init__(self, name) self.percent =...
{ "repo_name": "AlexMog/IRCPokemonBot", "path": "commands/classes/Item.py", "copies": "1", "size": "1364", "license": "mit", "hash": -7270507077268334000, "line_mean": 28.652173913, "line_max": 110, "alpha_frac": 0.5828445748, "autogenerated": false, "ratio": 3.6470588235294117, "config_test": f...
#!/bin/env python2 # Imports from bs4 import BeautifulSoup import sys import re import urllib import datetime import urllib2 from flask import Flask, Response, redirect app = Flask(__name__) # Project info __author__ = "Valmik Jangla" __email__ = "mail@valmik.in" __version__ = "1.0" __docs__ = "https://github...
{ "repo_name": "vjFaLk/RSS4TPB", "path": "main.py", "copies": "1", "size": "11854", "license": "mit", "hash": -8671180719391529000, "line_mean": 40.451048951, "line_max": 200, "alpha_frac": 0.6304201114, "autogenerated": false, "ratio": 2.805016564126834, "config_test": false, "has_no_keywords...
#!/bin/env python2 import solution import unittest class Test(unittest.TestCase): def test_base(self): input_key = '6JUPiyB8BBcydqprLyoadMWuWyhBxsaRu2YPpMRMfa93tRhKQ97' public_key = 'DHjmUqaaYBfDpyFvD9H8RjafbFy7cU5fGa' self.assertEqual(solution.answer(input_key, public_key), public_key) ...
{ "repo_name": "acerix/doge-millionaire", "path": "test.py", "copies": "1", "size": "2313", "license": "mit", "hash": 3651116840911935500, "line_mean": 38.8793103448, "line_max": 84, "alpha_frac": 0.7189796801, "autogenerated": false, "ratio": 2.294642857142857, "config_test": true, "has_no_ke...