text
stringlengths
0
1.05M
meta
dict
#!/bin/python trainFileContent = [list(map(lambda i: float(i), line.split(','))) for line in open('train_1_5.csv', 'r')] testFileContent = [list(map(lambda i: float(i), line.split(','))) for line in open('test_1_5.csv', 'r')] initPara = [0.0, 0.0, 0.0] def sign(row, para): return 1.0 if (para[0] * row[0] + para[1] *...
{ "repo_name": "Preffer/machine-learning-sutd", "path": "job1/main.py", "copies": "1", "size": "1606", "license": "apache-2.0", "hash": -2936289734926789600, "line_mean": 28.7407407407, "line_max": 106, "alpha_frac": 0.6787048568, "autogenerated": false, "ratio": 2.7312925170068025, "config_test...
#!bin/python #! -​*- coding:utf-8 -*​- ''' Project name here ================= About ----- This is a template for quickly creating a new Cement Framework Apps. For documentation please visit the official [CementFremework site](http://builtoncement.com/) Based on: [http://builtoncement.com/2.6/](http://buil...
{ "repo_name": "zunware/cli-framework", "path": "myapp.py", "copies": "1", "size": "3543", "license": "cc0-1.0", "hash": 5664704235349834000, "line_mean": 24.6376811594, "line_max": 105, "alpha_frac": 0.685415489, "autogenerated": false, "ratio": 3.1645796064400717, "config_test": false, "has_...
""" undine A wrapper for handling multi-archive backups with Borg """ from __future__ import print_function __author__="Mike Shultz <mike@votesmart.org>" __copyright__="Copyright (c) 2017 Vote Smart" __version__="0.0.3" import os, sys, argparse, socket, fasteners from subprocess import Popen, PIPE from envelopes...
{ "repo_name": "votesmart/undine", "path": "undine/__init__.py", "copies": "1", "size": "5371", "license": "mit", "hash": 7814218764878256000, "line_mean": 35.5442176871, "line_max": 115, "alpha_frac": 0.5902066654, "autogenerated": false, "ratio": 3.8227758007117436, "config_test": true, "has...
#!/bin/python # usage: # cat clAmdBlas.h | $0 import sys, re; from common import remove_comments, getTokens, getParameters, postProcessParameters try: if len(sys.argv) > 1: f = open(sys.argv[1], "r") else: f = sys.stdin except: sys.exit("ERROR. Can't open input file") fns = [] while ...
{ "repo_name": "sim9108/SDKS", "path": "LibOpenCv/opencv_core/src/opencl/runtime/generator/parser_clamdblas.py", "copies": "13", "size": "3232", "license": "mit", "hash": -4193596708623503000, "line_mean": 27.350877193, "line_max": 130, "alpha_frac": 0.5773514851, "autogenerated": false, "ratio": ...
#!/bin/python # usage: # cat clAmdFft.h | $0 import sys, re; from common import remove_comments, getTokens, getParameters, postProcessParameters try: if len(sys.argv) > 1: f = open(sys.argv[1], "r") else: f = sys.stdin except: sys.exit("ERROR. Can't open input file") fns = [] while ...
{ "repo_name": "DamianPilot382/Rubiks-Cube-Solver", "path": "opencv/sources/modules/core/src/opencl/runtime/generator/parser_clamdfft.py", "copies": "13", "size": "2951", "license": "apache-2.0", "hash": -5285995687587927000, "line_mean": 25.5855855856, "line_max": 108, "alpha_frac": 0.5753981701, "...
#!/bin/python # usage: # cat opencl11/cl.h | $0 cl_runtime_opencl11 # cat opencl12/cl.h | $0 cl_runtime_opencl12 import sys, re; from common import remove_comments, getTokens, getParameters, postProcessParameters try: if len(sys.argv) > 1: module_name = sys.argv[1] outfile = open('../../.....
{ "repo_name": "zzjkf2009/Midterm_Astar", "path": "opencv/modules/core/src/opencl/runtime/generator/parser_cl.py", "copies": "1", "size": "4408", "license": "mit", "hash": 6520456215601197000, "line_mean": 30.7122302158, "line_max": 132, "alpha_frac": 0.594600726, "autogenerated": false, "ratio": ...
#!/bin/python """Usage: babycrawl.py <url> [--proxyhost=<proxyhost> --proxyport=<proxyport>] [--cookie=<cookie> --cookiedomain=<cookiedomain>] [--debug] [--fullbabycrawl] babycrawl.py -h | --help babycrawl.py --version Arguments: <url> web url to use for crawling <proxyhost> proxy server eg localh...
{ "repo_name": "digitalassurance/babycrawl", "path": "babycrawl.py", "copies": "1", "size": "7059", "license": "mit", "hash": -831245144179522600, "line_mean": 28.9110169492, "line_max": 176, "alpha_frac": 0.7003824904, "autogenerated": false, "ratio": 3.3218823529411763, "config_test": false, ...
#!/bin/python """Usage: jsprobe.py <url> [--cookie=<cookie> --cookiedomain=<cookiedomain>] [--proxyhost=<proxyhost> --proxyport=<proxyport>] [--debug] jsprobe.py -h | --help jsprobe.py --version Arguments: <url> web url to use for testing Options: -h --help show this --debug shows ...
{ "repo_name": "mikemda/jsprobe", "path": "jsprobe.py", "copies": "1", "size": "7207", "license": "mit", "hash": -7072912220176536000, "line_mean": 28.4163265306, "line_max": 157, "alpha_frac": 0.7094491467, "autogenerated": false, "ratio": 3.2016881386050646, "config_test": false, "has_no_key...
#!/bin/python # Usage: python export.py <path_to_database> <path_for_new_folder> # Output: folder in given directory import datetime import time import os import sys import sqlite3 import json from slackclient import SlackClient # Used in conjunction with sqlite3 to generate JSON-like format def dict_factory(cursor,...
{ "repo_name": "GPKyte/dynamic-slack-archive", "path": "archive-bot/export.py", "copies": "1", "size": "4180", "license": "mit", "hash": 7133400594834475000, "line_mean": 29.071942446, "line_max": 93, "alpha_frac": 0.661722488, "autogenerated": false, "ratio": 3.5155592935239697, "config_test": ...
#!/bin/python # Usage: python significance_compare.py [stderr_file1] [stderr_file1] [metric] [ind/1samp] import sys import os import re import numpy from scipy import stats metric_options = set(["Precision", "Recall", "RPrecision", "NDCG", "RNDCG"]) def parse_parameters(): if len(sys.argv) == 5: stderr_file1 = sy...
{ "repo_name": "wangheda/CF4CFP", "path": "result/significance_compare.py", "copies": "1", "size": "2470", "license": "apache-2.0", "hash": 985125828383590000, "line_mean": 28.4047619048, "line_max": 93, "alpha_frac": 0.6623481781, "autogenerated": false, "ratio": 2.6818675352877306, "config_tes...
#!/bin/python # vim: set fileencoding=utf-8 ts=4 sw=4 expandtab fdm=marker: """ Main file for MCVerify. Parses the config, options to the file and executes the line of checkers. """ import os from os.path import expandvars, expanduser import logging import sys import checkers import argparse from config import CONFIG f...
{ "repo_name": "turbofish/mcverify", "path": "main.py", "copies": "1", "size": "1466", "license": "bsd-2-clause", "hash": -6050364783855132000, "line_mean": 22.2698412698, "line_max": 66, "alpha_frac": 0.6255115962, "autogenerated": false, "ratio": 3.7979274611398965, "config_test": true, "has...
#!/bin/python # -*- coding: iso-8859-15 -*- # # pycolorize.py - massage colorised HTML source code copied from Visual Studio # # jeremy tammik, autodesk inc, 2009-02-05 # # History: # # 2009-02-05 initial version # 2009-05-22 updated to support Visual Studio 2008 # 2011-04-19 updated to support Visual Studio...
{ "repo_name": "jeremytammik/tbc", "path": "a/zip/pycolorize.py", "copies": "1", "size": "7321", "license": "mit", "hash": 5906037271319770000, "line_mean": 37.3602150538, "line_max": 144, "alpha_frac": 0.5947274962, "autogenerated": false, "ratio": 2.7868290826037305, "config_test": false, "h...
#!/bin/python # -*- coding: utf-8 -*- from numpy import * import matplotlib.pyplot as plt def p_oP_plot(): X = loadtxt('../data/P.txt', delimiter=',') Y = loadtxt('../data/oP.txt', delimiter=',') plt.plot(X, Y, 'r-') plt.axis([0.0, 1.0, 0.0, amax(Y)]) plt.title('Expected profit - risky approach...
{ "repo_name": "Milias/FinancialStuff", "path": "Homeworks/hw1/python/plot-data.py", "copies": "1", "size": "1341", "license": "mit", "hash": 6120792577184157000, "line_mean": 23.75, "line_max": 71, "alpha_frac": 0.5787901419, "autogenerated": false, "ratio": 2.7551440329218106, "config_test": f...
#!/bin/python # -*- coding: utf-8 -*- from numpy import * import matplotlib.pyplot as plt f_line = lambda x, a, b: a*(1-x)+b*x def oP_X_plot(name, title, symbol): Xcall = loadtxt('../data/%s_%s_x.txt' % (name, 'call'), delimiter=',') Ycall = loadtxt('../data/%s_%s_mean.txt' % (name, 'call'), delimiter=',...
{ "repo_name": "Milias/FinancialStuff", "path": "Homeworks/hw2/python/plot-data.py", "copies": "4", "size": "3103", "license": "mit", "hash": 1122326488668117400, "line_mean": 30.3229166667, "line_max": 132, "alpha_frac": 0.5456010313, "autogenerated": false, "ratio": 2.3650914634146343, "config...
# !/bin/python # coding:utf-8 import socket import os import threading import pickle from tbdmLogging import tbdmLogger import itchat from itchat.content import * # import requests # def get_response(msg): # key = 'ff61dcbd86f34a21bdb2f2a980014fb1' # url = 'http://www.tuling123.com/openapi/api' u...
{ "repo_name": "TBDM/ju", "path": "Log_Bot/tbdmLogReminder.py", "copies": "1", "size": "2006", "license": "mit", "hash": -7418674881510054000, "line_mean": 23.3670886076, "line_max": 75, "alpha_frac": 0.6477045908, "autogenerated": false, "ratio": 2.582474226804124, "config_test": false, "has_...
""" @author: anonymous """ import os import logging import logging.handlers def init_log(log_path, level=logging.INFO, when="D", backup=7, format="%(levelname)s: %(asctime)s: %(filename)s:%(lineno)d * %(thread)d %(message)s", datefmt="%m-%d %H:%M:%S"): """ init_log - initi...
{ "repo_name": "fivezh/Keepgoing", "path": "py_spider/logger.py", "copies": "1", "size": "2417", "license": "mit", "hash": 8848002680639293000, "line_mean": 37.6229508197, "line_max": 99, "alpha_frac": 0.4985519239, "autogenerated": false, "ratio": 4.492565055762082, "config_test": false, "has...
#!/bin/python # -*- coding: utf-8 -*- import sys, os import math import datetime import subprocess import csv import optparse def str2time(v): return datetime.datetime.strptime(v, "%Y-%m-%d") def daydifference(after, before): return (before - after).days def getdates(lines): datelis...
{ "repo_name": "crow-misia/bugspots", "path": "main.py", "copies": "1", "size": "2916", "license": "apache-2.0", "hash": -6042693604651871000, "line_mean": 25, "line_max": 173, "alpha_frac": 0.5768175583, "autogenerated": false, "ratio": 3.56479217603912, "config_test": false, "has_no_keywords...
#!/bin/python # Download wallpapers from Dead End Thrills random feed from optparse import OptionParser from bs4 import BeautifulSoup import urllib2 from decimal import Decimal import re import os import random URL = "http://deadendthrills.com/random/" OUTPUTDIR = "data" def save_image(imgurl): m = r...
{ "repo_name": "esabouraud/mmwall", "path": "src/detdownload_wallpaper.py", "copies": "1", "size": "2162", "license": "bsd-3-clause", "hash": -2437207872791394000, "line_mean": 30.2686567164, "line_max": 159, "alpha_frac": 0.6517113784, "autogenerated": false, "ratio": 2.949522510231924, "config...
#!/bin/python # Download wallpapers from Dead End Thrills random feed from optparse import OptionParser from bs4 import BeautifulSoup import urllib2 import re import os import random URL = "https://interfacelift.com/wallpaper/downloads/random/3_screens/4096x1024/" OUTPUTDIR = "data" def save_image(imgur...
{ "repo_name": "esabouraud/mmwall", "path": "src/ifldownload_wallpaper.py", "copies": "1", "size": "1679", "license": "bsd-3-clause", "hash": -4899765306961695000, "line_mean": 28.5272727273, "line_max": 159, "alpha_frac": 0.6694460989, "autogenerated": false, "ratio": 3.069469835466179, "config...
#!/bin/python # Download wallpapers from Dead End Thrills random feed from optparse import OptionParser from PIL import Image import os import glob import shutil import random from decimal import Decimal INPUTDIR = "wallpapers" OUTPUTDIR = "data" def save_image(imgpath): #print "%s_%s" % (m.group(1),...
{ "repo_name": "esabouraud/mmwall", "path": "src/localdownload_wallpaper.py", "copies": "1", "size": "1480", "license": "bsd-3-clause", "hash": -482350753351488450, "line_mean": 29.4893617021, "line_max": 159, "alpha_frac": 0.6804054054, "autogenerated": false, "ratio": 3.0578512396694215, "conf...
#!/bin/python # Download wallpapers from Triple Monitor Backgrounds random feed from optparse import OptionParser from bs4 import BeautifulSoup import urllib2 import re import os import random BASEURL = "http://www.triplemonitorbackgrounds.com" URL = BASEURL + "/random/" OUTPUTDIR = "data" def save_ima...
{ "repo_name": "esabouraud/mmwall", "path": "src/tmbdownload_wallpaper.py", "copies": "1", "size": "2146", "license": "bsd-3-clause", "hash": 1901716114316437000, "line_mean": 29.1014492754, "line_max": 159, "alpha_frac": 0.6458527493, "autogenerated": false, "ratio": 2.96, "config_test": false,...
#!/bin/python # Download wallpapers from Wallpaper Fusion search feed from optparse import OptionParser from bs4 import BeautifulSoup import urllib2 import re import os import random URL = "http://www.wallpaperfusion.com/RSS/?TagShow=videogames|&Monitors=3" OUTPUTDIR = "data" def save_image(imgurl): m...
{ "repo_name": "esabouraud/mmwall", "path": "src/wpfdownload_wallpaper.py", "copies": "1", "size": "1842", "license": "bsd-3-clause", "hash": -5120255880286850000, "line_mean": 29.2203389831, "line_max": 159, "alpha_frac": 0.6682953312, "autogenerated": false, "ratio": 3.0246305418719213, "confi...
#!/bin/python #Frame processing and distance estimation for #goal #------------------------------------------------------------------------------- # IMPORTS #------------------------------------------------------------------------------- import cv2 import math import numpy i...
{ "repo_name": "SMS-Raiders/First2016", "path": "vision_proc/proc_frame.py", "copies": "1", "size": "9139", "license": "bsd-3-clause", "hash": -5692052364017174000, "line_mean": 35.6090534979, "line_max": 134, "alpha_frac": 0.3927125506, "autogenerated": false, "ratio": 3.9562770562770564, "conf...
#!/bin/python #Goal finding and position estimation. #This file handles the i/o operations and hands #off image processing to proc_frame.py #------------------------------------------------------------------------------- # IMPORTS #----------------------------------------------...
{ "repo_name": "SMS-Raiders/First2016", "path": "vision_proc/goal_main.py", "copies": "1", "size": "4112", "license": "bsd-3-clause", "hash": -6219324743474375000, "line_mean": 36.7924528302, "line_max": 80, "alpha_frac": 0.3312256809, "autogenerated": false, "ratio": 5.424802110817942, "config_...
#!/bin/python import random class MYCLASS: id=\"\"; title=\"\"; text=\"\"; def __init__(self): self.id=int(random.random()*999999); self.title=\"DEFAULT\"; self.text=\"DEFAULT\"; def pad(self,string,length,char): i=len(string); final=\"\"; while i <= length: final+=char; i+=1...
{ "repo_name": "agancsos/python", "path": "testClass_in_Python.py", "copies": "1", "size": "1452", "license": "mit", "hash": -1213544649122701800, "line_mean": 21.0634920635, "line_max": 111, "alpha_frac": 0.555785124, "autogenerated": false, "ratio": 2.6115107913669067, "config_test": false, ...
#!/bin/python import re, io, os, sys, math, string, cgi, time #from os import curdir, sep from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer path = os.path.realpath('./') filename = 'index.html' isMobile = False httpPort = 8083 if len(sys.argv)>1: if sys.argv[1]=='true' or sys.argv[1]=='True...
{ "repo_name": "marcosbitetti/simple-blogger-simulator", "path": "blogger_simulator.py", "copies": "1", "size": "7305", "license": "artistic-2.0", "hash": 956982939335234800, "line_mean": 33.8088235294, "line_max": 87, "alpha_frac": 0.4235455168, "autogenerated": false, "ratio": 4.271929824561403,...
#!/bin/python import sys import binascii import struct import pprint import opcodes def addLineNums(codeatt, linenumatt): pc2ln = {} for lnt in linenumatt['04_line_number_table']: pc2ln[lnt['01_start_pc']] = '%4d' % lnt['02_line_number'] codes = [] for line in codeatt['06_code...
{ "repo_name": "joelhockey/classfile", "path": "classfile.py", "copies": "1", "size": "25300", "license": "mit", "hash": -8783852577967180000, "line_mean": 49.4227642276, "line_max": 150, "alpha_frac": 0.5215019763, "autogenerated": false, "ratio": 3.2200585465190277, "config_test": false, "ha...
#!/bin/python import sys class CHURCH_PROBLEM: function_str=\"\"; max_iter=0; def calculate_numerals(self): i=0; j=0; final=int(self.function_str[0]); final_str=str(final)+\"0\"; while (i < int(self.max_iter)): while (j< len(self.function_str)-1): buffer=self.function_str[j]; next...
{ "repo_name": "agancsos/python", "path": "church_problem_in_Python.py", "copies": "1", "size": "1400", "license": "mit", "hash": 1369997597087296800, "line_mean": 26.02, "line_max": 59, "alpha_frac": 0.5478571429, "autogenerated": false, "ratio": 3.056768558951965, "config_test": false, "has_...
#!/bin/python import sys def help(): print \"HELP MENU:\"; print \"python converter.py [b||d] [d|b] value\"; exit(); def dec_to_bin(dec): final=\"\"; temp_final=\"\"; while int(dec/2)>=0: if(int(dec%2)>0): temp_final=temp_final+\"1\" else: temp_final=temp_final+\"0\" dec=int(dec/2) ...
{ "repo_name": "agancsos/python", "path": "convertor_in_Python.py", "copies": "1", "size": "1277", "license": "mit", "hash": 6136694785668535000, "line_mean": 20.4210526316, "line_max": 53, "alpha_frac": 0.5653876273, "autogenerated": false, "ratio": 2.418560606060606, "config_test": false, "h...
#!/bin/python import sys ##Globals deck=\"AH\",\"AS\",\"AD\",\"AC\",\"KH\",\"KS\",\"KD\",\"KC\",\"JH\",\"JS\",\"JD\",\"JC\",\"QH\",\"QS\",\"QD\",\"QC\",\"10H\",\"10S\",\"10D\",\"10C\",\"9H\",\"9S\",\"9D\",\"9C\",\"8H\",\"8S\",\"8D\",\"8C\",\"7H\",\"7S\",\"7D\",\"7C\",\"6H\",\"6S\",\"6D\",\"6C\",\"5H\",\"5S\",\"5D\...
{ "repo_name": "agancsos/python", "path": "resume_questions_in_Python.py", "copies": "1", "size": "2943", "license": "mit", "hash": -6079581084409737000, "line_mean": 24.5765765766, "line_max": 373, "alpha_frac": 0.5643900782, "autogenerated": false, "ratio": 2.6754545454545453, "config_test": f...
#!/bin/python class linkedinSort: project_name=\"\"; project_month=\"\"; project_year=0; def month_to_int(self): month=self.project_month; if month == \"January\": return 1; if month == \"February\": return 2; if month == \"March\": return 3; if month == \"April\": return 4;...
{ "repo_name": "agancsos/python", "path": "Linkedinsort.py_v2_in_Python.py", "copies": "1", "size": "3104", "license": "mit", "hash": -2995705309202887700, "line_mean": 27.8557692308, "line_max": 129, "alpha_frac": 0.6568943299, "autogenerated": false, "ratio": 3.1227364185110664, "config_test":...
#!/bin/python from agilister import fillers, config, website, arguments from xml.dom.minidom import parse import os import sys def get_ads_files(directory): single_ad = os.path.join(directory, config.ADVERTISEMENT_FILE) if os.path.exists(single_ad): return [single_ad] retu...
{ "repo_name": "Adnn/agilister", "path": "bin/write_ad.py", "copies": "1", "size": "2268", "license": "mit", "hash": -887443861247366800, "line_mean": 37.1034482759, "line_max": 94, "alpha_frac": 0.6102292769, "autogenerated": false, "ratio": 3.6878048780487807, "config_test": false, "has_no_k...
#!/bin/python from bs4 import BeautifulSoup import urllib from dataParse import DataParse from dataSave import DataSave #gather every station from url urlStations = 'http://www.romma.fr/index.php' #TODO different path regarding location path = 'C:/Users/Ash/Desktop/AVML/src/dataSave/' #Permits differe...
{ "repo_name": "chxash/AVML", "path": "src/test_parse.py", "copies": "1", "size": "1880", "license": "apache-2.0", "hash": -922438825933990500, "line_mean": 32.8518518519, "line_max": 102, "alpha_frac": 0.6611702128, "autogenerated": false, "ratio": 3.629343629343629, "config_test": false, "ha...
#!/bin/python from __future__ import division from __future__ import print_function from __future__ import absolute_import import itertools from math import log import sys # Python 3 backwards compatibility tricks if sys.version_info.major > 2: def xrange(*args, **kwargs): return iter(rang...
{ "repo_name": "sameersingh/uci-statnlp", "path": "hw2/lm.py", "copies": "1", "size": "3681", "license": "apache-2.0", "hash": 2429478326171516400, "line_mean": 30.2894736842, "line_max": 88, "alpha_frac": 0.5984786743, "autogenerated": false, "ratio": 3.7522935779816513, "config_test": false, ...
#!/bin/python from __future__ import with_statement import re import sys import os.path import win32com.client import StringIO import platform import runpy import subprocess import itertools import posixpath import urllib from urlparse import urlparse # Disable early binding: full of race conditio...
{ "repo_name": "pombredanne/metamorphosys-desktop", "path": "metamorphosys/META/externals/common-scripts/gme.py", "copies": "2", "size": "19959", "license": "mit", "hash": 6454966758318614000, "line_mean": 35.0296846011, "line_max": 194, "alpha_frac": 0.6120046094, "autogenerated": false, "ratio":...
#!/bin/python from optparse import OptionParser from ftplib import FTP import os CURRENTDIR = "current" LOCALDIR = "local" REMOTEDIR = "wall" FILEPATTERN = "wall%d.bmp" def ftp_transfer(host, serve, screenid): if (False == os.path.isdir(LOCALDIR)): os.makedirs(LOCALDIR) ftp = FTP(host) ftp...
{ "repo_name": "esabouraud/mmwall", "path": "src/sandbox/ftpsync_wallpaper.py", "copies": "1", "size": "1447", "license": "bsd-3-clause", "hash": -955897664959793000, "line_mean": 30.1555555556, "line_max": 154, "alpha_frac": 0.6565307533, "autogenerated": false, "ratio": 3.0145833333333334, "co...
#!/bin/python from optparse import OptionParser import os import ast import sys import platform from PIL import Image LOCALDIR = "local" FILEPATTERN = "wall%d.bmp" CURRENT_SYSTEM = platform.system() def set_wallpaper_logon_windows(walldir, screenid, size): if sys.getwindowsversion().major < 6: retu...
{ "repo_name": "esabouraud/mmwall", "path": "src/set_wallpaper_logon.py", "copies": "1", "size": "1702", "license": "bsd-3-clause", "hash": -6398234298728724000, "line_mean": 38.5238095238, "line_max": 140, "alpha_frac": 0.71386604, "autogenerated": false, "ratio": 3.134438305709024, "config_tes...
#!/bin/python from optparse import OptionParser import os import platform import ctypes import subprocess LOCALDIR = "local" FILEPATTERN = "wall%d.bmp" SRC_PATH = os.path.dirname(os.path.abspath(__file__)) CURRENT_SYSTEM = platform.system() # set Linux (CentOS6 with gnome) background def set_wallpaper_...
{ "repo_name": "esabouraud/mmwall", "path": "src/set_wallpaper.py", "copies": "1", "size": "1888", "license": "bsd-3-clause", "hash": -1200172923117434600, "line_mean": 35.76, "line_max": 165, "alpha_frac": 0.7155720339, "autogenerated": false, "ratio": 3.0256410256410255, "config_test": false, ...
#!/bin/python from optparse import OptionParser import random import detdownload_wallpaper import tmbdownload_wallpaper import localdownload_wallpaper import wpfdownload_wallpaper import ifldownload_wallpaper DOWNLOADERS = [detdownload_wallpaper, tmbdownload_wallpaper, localdownload_wallpaper, wpfdownload_w...
{ "repo_name": "esabouraud/mmwall", "path": "src/randomdownload_wallpaper.py", "copies": "1", "size": "1256", "license": "bsd-3-clause", "hash": -5893554939736593000, "line_mean": 42.8571428571, "line_max": 166, "alpha_frac": 0.7308917197, "autogenerated": false, "ratio": 3.2371134020618557, "co...
#!/bin/python import common.log as logging import common.config as Conf import os, sys, signal, errno from time import localtime from datetime import datetime, date, timedelta, time from re import search from os import listdir, path, makedirs from exceptions import RuntimeWarning from warnings import simpl...
{ "repo_name": "stevehuang/GarageEye", "path": "classifier/predictImage.py", "copies": "2", "size": "7561", "license": "apache-2.0", "hash": -6891312291750213000, "line_mean": 28.3654618474, "line_max": 82, "alpha_frac": 0.6499140325, "autogenerated": false, "ratio": 3.13604313562837, "config_te...
#!/bin/python import csv import sys f = open(sys.argv[1], 'rb') ct = csv.reader(f) ct.next() lTeams = []; for row in ct: lTeams.append(row[0]) dFoulsForTeamHome = {}; dFoulsForTeamAway = {}; dYellowForTeamHome = {}; dYellowForTeamAway = {}; dRedForTeamHome = {}; dRedForTeamAway = {}; ...
{ "repo_name": "jsmithedin/Scottish-Football-Analysis", "path": "scripts/teams.py", "copies": "1", "size": "1415", "license": "mit", "hash": -173684756002822980, "line_mean": 21.5833333333, "line_max": 170, "alpha_frac": 0.577385159, "autogenerated": false, "ratio": 2.674858223062382, "config_te...
#!/bin/python import csv import sys lTeams = ["Inverness C", "Celtic", "Dundee United", "Kilmarnock", "Hibernian", "Ross County", "Motherwell", "St Mirren", "Hearts", "Partick", "St Johnstone", "Aberdeen"] inv = {}; cel = {}; du = {}; kil = {}; hib = {}; rc = {}; mot = {}; stm = {}; hea = {}; par...
{ "repo_name": "jsmithedin/Scottish-Football-Analysis", "path": "scripts/teamsVteams.py", "copies": "1", "size": "6862", "license": "mit", "hash": 7317723065438430000, "line_mean": 30.3679245283, "line_max": 169, "alpha_frac": 0.5447391431, "autogenerated": false, "ratio": 2.4094101123595504, "c...
#!/bin/python import sys def main(): # your code here print("hi") # Must find generous and stingy solution # Want to return index to get # of people total_lambs = 13 generous_result = generous(total_lambs, 0, 0) stingy_result = stingy(total_lambs, 0, 0, 0) print(generou...
{ "repo_name": "kyle8998/Practice-Coding-Questions", "path": "Google_Foobar/Lovely_Lucky_Lambs/test.py", "copies": "1", "size": "1429", "license": "unlicense", "hash": -7122365872860377000, "line_mean": 26.0196078431, "line_max": 89, "alpha_frac": 0.5731280616, "autogenerated": false, "ratio": 3.0...
#!/bin/python # mmwall launcher # mmwall currently only works on Windows and CentOS, for wallpaper local and remote setting: # Win32 API, network drive mount and psexec for Windows >= XP. # sftp, ssh and Gnome configuration tool for CentOS >= 5. import json import optparse import set_wallpaper import ...
{ "repo_name": "esabouraud/mmwall", "path": "src/mmwall.py", "copies": "1", "size": "2307", "license": "bsd-3-clause", "hash": -829338420641397400, "line_mean": 35.8196721311, "line_max": 144, "alpha_frac": 0.7030775899, "autogenerated": false, "ratio": 3.272340425531915, "config_test": false, ...
#!/bin/python """ mysql2s3.py: Pulls credentials from the files passed via command line. Then it calls the mysqldump command to backup databases. Finally, it syncs the backed up databases to an AWS S3 bucket How to call: sudo find /var/www -name wp-config.php | xargs sudo python mysql2s3.py """ import sys i...
{ "repo_name": "gary-dalton/my_support", "path": "scripts/mysql2s3.py", "copies": "1", "size": "1445", "license": "mit", "hash": 3181305464354454000, "line_mean": 29.4130434783, "line_max": 73, "alpha_frac": 0.646366782, "autogenerated": false, "ratio": 3.0357142857142856, "config_test": false, ...
#!/bin/python # # Polar Flow HTML to GPX parser/convertor - Thomas Martin Schmid, 2014. Public domain* # # * If public domain is not legally valid in your legal jurisdiction # the MIT licence applies. See the LICENCE file. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIE...
{ "repo_name": "thynnmas/polar-flow-gpx-export", "path": "polar_export.py", "copies": "1", "size": "3322", "license": "mit", "hash": -5336220677406739000, "line_mean": 30.568627451, "line_max": 249, "alpha_frac": 0.6372667068, "autogenerated": false, "ratio": 2.672566371681416, "config_test": fa...
# # Copyright (c) 2016 _andrewm_ at gmail.com, _elena.perchenko_ at gmail.com, # _ivan.e.bondar_ at gmail.com, _katia.a.bondar_ at gmail.com, # _mark.cepak_ at exemail.com.au, _wagner.esteban_ at gmail.com # (remove underscores from mail) # # Permission is hereby granted, free of charge, to any p...
{ "repo_name": "vashu11/asteroid_occultation", "path": "simulation/generate_data_noise.py", "copies": "1", "size": "6649", "license": "mit", "hash": 2634806388542652400, "line_mean": 33.1798941799, "line_max": 142, "alpha_frac": 0.6155812904, "autogenerated": false, "ratio": 3.0333029197080292, ...
#!/bin/python """ opmlparser.py David Janes BlogMatrix 2004.01.18 A pre-order depth-first OPML walker. Tags are stored as class attributes, values as unicode strings. Several useful functions for returning values are provided. See the __main__ section below for an example of how to use this. """ # ...
{ "repo_name": "rays/ipodderx-core", "path": "opmlparser.py", "copies": "1", "size": "8463", "license": "mit", "hash": 2467160278207323600, "line_mean": 26.7857142857, "line_max": 84, "alpha_frac": 0.6615857261, "autogenerated": false, "ratio": 3.287878787878788, "config_test": false, "has_no_...
#! /bin/python ######################################################### import sys, json import nltk from nltk.corpus import brown #from nltk.corpus import wordnet as wn #from __future__ import division from urllib import urlopen ######################################################### # Load the data ...
{ "repo_name": "applecool/MachineLearning", "path": "nltk/nltk.py", "copies": "1", "size": "2735", "license": "mit", "hash": -1007173042010360700, "line_mean": 26.1958762887, "line_max": 67, "alpha_frac": 0.5023765996, "autogenerated": false, "ratio": 3.7724137931034485, "config_test": false, ...
#! /bin/python ######################################################### import sys, json import nltk from nltk.corpus import brown from urllib import urlopen ######################################################### # Load the data that PHP sent us try: data = json.loads(sys.argv[1]) except: ...
{ "repo_name": "applecool/MachineLearning", "path": "movies/moviereviews.py", "copies": "1", "size": "1773", "license": "mit", "hash": 3808102510338098700, "line_mean": 24.0735294118, "line_max": 148, "alpha_frac": 0.5250987028, "autogenerated": false, "ratio": 4.2214285714285715, "config_test":...
''' The MIT License (MIT) Copyright (c) 2014 Santosh Sahoo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
{ "repo_name": "santoshsahoo/pinku", "path": "site.py", "copies": "1", "size": "2182", "license": "mit", "hash": -8271712242493104000, "line_mean": 31.6, "line_max": 78, "alpha_frac": 0.7181484876, "autogenerated": false, "ratio": 3.7235494880546076, "config_test": false, "has_no_keywords": fa...
#!/bin/python # Solution for https://www.hackerrank.com/challenges/bear-and-steady-gene n = int(raw_input().strip()) s = raw_input().strip() #n = 8 #s = 'GAAATAAA' #file = open('testCases\\input02.txt', 'r') #n = int(file.readline().strip()) #s = file.readline().strip() def get_letter_count(s): s_...
{ "repo_name": "ernestoalarcon/competitiveprogramming", "path": "bear-and-steady-gene.py", "copies": "1", "size": "2134", "license": "mit", "hash": -3570229501559010000, "line_mean": 26.8648648649, "line_max": 84, "alpha_frac": 0.5309278351, "autogenerated": false, "ratio": 3.538971807628524, "c...
#!/bin/python -u # -*- coding: utf-8 -*- import requests import os import time import getpass import difflib import logging from dateutil import parser from dateutil import relativedelta import os.path from datetime import datetime import md5 # Initialize global variables BASEDIR = "Lectio-Doc" # Mappe, hvor alle de ...
{ "repo_name": "MJoergen/lectio-dl", "path": "lectio.py", "copies": "1", "size": "26756", "license": "mit", "hash": -1438793737615133700, "line_mean": 36.0710306407, "line_max": 125, "alpha_frac": 0.598564827, "autogenerated": false, "ratio": 2.635085635085635, "config_test": false, "has_no_ke...
#!/bin/pytohn import sys i=0 for line in sys.stdin: i=i+1 bypipe = line.strip().split('|') # first line is kinda the general everything-keeper, it will contain the union of all reigons (e.g. the final region)... the purpose is to enable the bedmap operation to detect overlaps overall = bypipe[0] o...
{ "repo_name": "corcra/feabhsa-here", "path": "pipeline/preprocess_master.py", "copies": "1", "size": "1285", "license": "mit", "hash": -5475131521554445000, "line_mean": 36.7941176471, "line_max": 189, "alpha_frac": 0.6, "autogenerated": false, "ratio": 3.435828877005348, "config_test": false, ...
BIN_SCRIPT_TEMPLATE = """ #!/usr/bin/env {python_version} import os; activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 'exec'), dict(__file__=activate_this)); del os, activate_this import os bin_directory = os.path.dirna...
{ "repo_name": "toumorokoshi/uranium", "path": "uranium/executables.py", "copies": "1", "size": "3406", "license": "mit", "hash": 5637743443182302000, "line_mean": 30.8317757009, "line_max": 221, "alpha_frac": 0.6165590135, "autogenerated": false, "ratio": 3.9743290548424737, "config_test": fals...
#bins data in chunks of 10000 (averages data) import numpy as np import datetime import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys,time import math size = 1024 BP_SIZE = int(1E3) lst = [] window = [] checkDelims = [' ', '\t', '\n', ''] lstArray = np.zeros(1) def makePlot(file...
{ "repo_name": "ContinuumIO/Examples", "path": "1000Genomes/data_binner.py", "copies": "1", "size": "2285", "license": "mit", "hash": 5195236064760977000, "line_mean": 22.3163265306, "line_max": 100, "alpha_frac": 0.5238512035, "autogenerated": false, "ratio": 3.6327503974562796, "config_test": ...
#!/bin/sh /cvmfs/icecube.opensciencegrid.org/py2-v1/icetray-start #METAPROJECT /data/user/jbourbeau/metaprojects/icerec/V05-00-00/build from __future__ import division import numpy as np import pandas as pd import time import glob import argparse import os from collections import defaultdict from icecube.weighting.we...
{ "repo_name": "jrbourbeau/composition", "path": "save_sim/save_df.py", "copies": "1", "size": "6223", "license": "mit", "hash": -3278909498282474500, "line_mean": 41.6232876712, "line_max": 109, "alpha_frac": 0.6005142214, "autogenerated": false, "ratio": 3.3474986551909627, "config_test": fals...
#!/bin/sh /cvmfs/icecube.opensciencegrid.org/py2-v1/icetray-start #METAPROJECT /data/user/jbourbeau/metaprojects/icerec/V05-00-00/build import argparse import glob import os import numpy as np import composition as comp if __name__ == "__main__": # Set up global path names mypaths = comp.Paths() default...
{ "repo_name": "jrbourbeau/cr-composition", "path": "processing/legacy/level3_processing/test/merge.py", "copies": "1", "size": "2238", "license": "mit", "hash": -2118904927350958000, "line_mean": 35.0967741935, "line_max": 78, "alpha_frac": 0.5822162645, "autogenerated": false, "ratio": 3.6213592...
#!/bin/sh /cvmfs/icecube.opensciencegrid.org/py2-v1/icetray-start #METAPROJECT /data/user/jbourbeau/metaprojects/icerec/V05-00-00/build import numpy as np import pandas as pd import time import glob import argparse import os from collections import defaultdict from icecube.weighting.weighting import from_simprod from...
{ "repo_name": "jrbourbeau/cr-composition", "path": "processing/legacy/level3_processing/test/save_df.py", "copies": "1", "size": "7454", "license": "mit", "hash": -3669072048254367000, "line_mean": 45.5875, "line_max": 109, "alpha_frac": 0.5873356587, "autogenerated": false, "ratio": 3.2310359774...
#!/bin/sh -e '''echo' export PYTHONPATH=. export DJANGO_SETTINGS_MODULE=run_redisboard secret() { tr -cd "[:alnum:]" < /dev/urandom | head -c ${1:-8} } chmod u+x run_redisboard.py if [ "$1" = "--develop" ]; then shift REDISBOARD="-e ." else REDISBOARD="django-redisboard" fi if [ ! -e .redisboard.venv ]...
{ "repo_name": "jolks/django-redisboard", "path": "run_redisboard.py", "copies": "1", "size": "3744", "license": "bsd-2-clause", "hash": 8461823187204389000, "line_mean": 27.5801526718, "line_max": 130, "alpha_frac": 0.6025641026, "autogenerated": false, "ratio": 3.5421002838221383, "config_test...
#! /bin/sh/env python import sys import re import os python_out_folder = sys.argv[1] filematch = re.compile(r"(\w+)_stemmer\.py$") imports = [] languages = ['_languages = {'] for pyscript in os.listdir(python_out_folder): match = filematch.match(pyscript) if (match): langname = match.group(1) ...
{ "repo_name": "assem-ch/snowball", "path": "python/create_init.py", "copies": "7", "size": "1286", "license": "bsd-3-clause", "hash": 4441483706413669000, "line_mean": 24.2156862745, "line_max": 113, "alpha_frac": 0.6251944012, "autogenerated": false, "ratio": 3.1753086419753087, "config_test":...
#! /bin/sh/env python import sys import re import os python_out_folder = sys.argv[1] filematch = re.compile(r"(\w+)_stemmer\.py$") imports = [] languages = [] for pyscript in os.listdir(python_out_folder): match = filematch.match(pyscript) if (match): langname = match.group(1) titlecase = l...
{ "repo_name": "snowballstem/snowball", "path": "python/create_init.py", "copies": "1", "size": "1297", "license": "bsd-3-clause", "hash": -9078041726102373000, "line_mean": 23.0185185185, "line_max": 113, "alpha_frac": 0.6260601388, "autogenerated": false, "ratio": 3.1711491442542785, "config_t...
#!/bin/sh # -*- coding: utf-8 -*- ''''which python2 >/dev/null && exec python2 "$0" "$@" # ''' ''''which python >/dev/null && exec python "$0" "$@" # ''' T = [0]*50 cnt = 0 def mergeSort(left,right): if left+1 >= right: return mid = (left + right) / 2 mergeSort(left,mid) mergeSort(mid,right) #...
{ "repo_name": "atupal/oj", "path": "topcoder/contests/SRM_664/c.py", "copies": "1", "size": "1295", "license": "mit", "hash": 1493970943550563600, "line_mean": 22.962962963, "line_max": 90, "alpha_frac": 0.4914992272, "autogenerated": false, "ratio": 2.9815668202764978, "config_test": false, ...
# We want to run python in unbuffered mode; however shebangs on linux grab the # entire rest of the shebang line as a single argument, leading to errors like: # # /usr/bin/env: 'python2 -u': No such file or directory # # This little shell hack is a triple-quoted noop in python, but in sh it # evaluates to re-exec'in...
{ "repo_name": "google/skia", "path": "infra/bots/recipes.py", "copies": "12", "size": "8631", "license": "bsd-3-clause", "hash": -575188278373151500, "line_mean": 31.5698113208, "line_max": 92, "alpha_frac": 0.6473178079, "autogenerated": false, "ratio": 3.5042630937880634, "config_test": false...
# We want to run python in unbuffered mode; however shebangs on linux grab the # entire rest of the shebang line as a single argument, leading to errors like: # # /usr/bin/env: 'python -u': No such file or directory # # This little shell hack is a triple-quoted noop in python, but in sh it # evaluates to re-exec'ing...
{ "repo_name": "HalCanary/skia-hc", "path": "infra/bots/recipes.py", "copies": "6", "size": "7833", "license": "bsd-3-clause", "hash": -1282724221400996600, "line_mean": 31.367768595, "line_max": 94, "alpha_frac": 0.6504532108, "autogenerated": false, "ratio": 3.515709156193896, "config_test": f...
#!/bin/sh # encoding: utf-8 from __future__ import print_function ''''which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" # ''' ''''which python >/dev/null 2>&1 && exec python "$0" "$@" # ''' ''''exec echo "Error: I can't find python anywhere" # ''' # Author: Tim Pulver # Date: 2015 # https://github.com/t...
{ "repo_name": "dandrzejewski/dotfiles", "path": "todo.actions.d/graph/graph.py", "copies": "1", "size": "4934", "license": "mit", "hash": -495912999660503600, "line_mean": 28.7108433735, "line_max": 104, "alpha_frac": 0.5624493106, "autogenerated": false, "ratio": 3.225637671680837, "config_tes...
#!/bin/sh "exec" "`dirname $0`/opt/miniconda2/bin/python" "$0" "$@" import argparse import logging import os import sys logger = None def process_args(args): """main function Arguments: args: dictionary containing arguments Returns: None Raises: None """ outfile = args....
{ "repo_name": "bioinform/varsim", "path": "flip_map.py", "copies": "1", "size": "2753", "license": "bsd-2-clause", "hash": -661924925092944000, "line_mean": 40.7121212121, "line_max": 179, "alpha_frac": 0.6073374501, "autogenerated": false, "ratio": 3.5893089960886573, "config_test": false, "...
#!/bin/sh "exec" "`dirname $0`/opt/miniconda2/bin/python" "$0" "$@" import argparse import os import copy import sys import subprocess import logging import shutil import time import signal import itertools import glob import tempfile import re from distutils.version import LooseVersion from liftover_restricted_vcf_ma...
{ "repo_name": "bioinform/varsim", "path": "varsim_multi.py", "copies": "1", "size": "17821", "license": "bsd-2-clause", "hash": 8285925683393645000, "line_mean": 59.6156462585, "line_max": 249, "alpha_frac": 0.6120868638, "autogenerated": false, "ratio": 3.825069757458682, "config_test": false,...
#!/bin/sh "exec" "`dirname $0`/opt/miniconda2/bin/python" "$0" "$@" import argparse import os import sys import logging import utils import tempfile, shutil LOGGER = None def process(args): ''' main :param args: :return: ''' # Setup logging FORMAT = '%(levelname)s %(asctime)-15s %(name)-20...
{ "repo_name": "bioinform/varsim", "path": "combine_vcf.py", "copies": "1", "size": "3576", "license": "bsd-2-clause", "hash": -664738104374682600, "line_mean": 37.4516129032, "line_max": 173, "alpha_frac": 0.6062639821, "autogenerated": false, "ratio": 3.608476286579213, "config_test": false, ...
#!/bin/sh "exec" "`dirname $0`/opt/miniconda2/bin/python" "$0" "$@" import argparse import os import sys import subprocess import logging import shutil import time import signal import itertools import glob import tempfile import re import pysam from liftover_restricted_vcf_map import lift_vcfs, lift_maps from generat...
{ "repo_name": "bioinform/varsim", "path": "varsim.py", "copies": "1", "size": "38697", "license": "bsd-2-clause", "hash": -1205211813331259000, "line_mean": 52.6712898752, "line_max": 249, "alpha_frac": 0.5698891387, "autogenerated": false, "ratio": 3.6243326777184603, "config_test": false, "...
#!/bin/sh ''''exec python -- "$0" ${1+"$@"} # ''' from z3 import * import json import sys import traceback ################################################################################# # Complex numbers, see: http://leodemoura.github.io/blog/2013/01/26/complex.html ################################################...
{ "repo_name": "generic-group-analyzer/gga", "path": "scripts/ggt_z3.py", "copies": "1", "size": "10372", "license": "mit", "hash": 5787459674276793000, "line_mean": 28.6342857143, "line_max": 356, "alpha_frac": 0.4772464327, "autogenerated": false, "ratio": 2.9324286118179246, "config_test": fa...
''''exec python3 -u -- "$0" ${1+"$@"} # ''' # #! /usr/bin/env python3 # Copyright 2016 Euclidean Technologies Management LLC All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License...
{ "repo_name": "euclidjda/deep-quant", "path": "scripts/deep_quant.py", "copies": "1", "size": "10513", "license": "mit", "hash": 9156239842923948000, "line_mean": 57.0828729282, "line_max": 171, "alpha_frac": 0.6993246457, "autogenerated": false, "ratio": 3.729336644200071, "config_test": true,...
#!/bin/sh "exec" "python" "-B" "$0" "$@" import sys import grapeMenu from docopt.docopt import docopt class Documentation(object): def __init__(self, menu): super(Documentation, self).__init__() self._sections = [Tutorial()] for option in menu._options: self._sections.append...
{ "repo_name": "robinson96/GRAPE", "path": "vine/gendocs.py", "copies": "1", "size": "20191", "license": "bsd-3-clause", "hash": 6307339901374714000, "line_mean": 44.2713004484, "line_max": 146, "alpha_frac": 0.7528106582, "autogenerated": false, "ratio": 4.09886317498985, "config_test": true, ...
#!/bin/sh - "exec" "python" "-O" "$0" "$@" __doc__ = """Tiny HTTP Proxy. This module implements GET, HEAD, POST, PUT and DELETE methods on BaseHTTPServer, and behaves as an HTTP proxy. The CONNECT method is also implemented experimentally, but has not been tested yet. Any help will be greatly appreciated. SUZUKI H...
{ "repo_name": "jrmuizel/http-recording-proxy", "path": "TinyHTTPProxy.py", "copies": "1", "size": "6400", "license": "mit", "hash": 2646112506293857300, "line_mean": 33.2245989305, "line_max": 191, "alpha_frac": 0.55828125, "autogenerated": false, "ratio": 3.3126293995859215, "config_test": fal...
''''exec python -u "$0" "$@" #''' # $Id: alltests.py 4629 2006-06-22 19:03:06Z goodger $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. __doc__ = \ """ All modules named 'test_*.py' in the current directory, and recursively in subdirectories (packages) call...
{ "repo_name": "spreeker/democracygame", "path": "external_apps/docutils-snapshot/test/alltests.py", "copies": "1", "size": "2493", "license": "bsd-3-clause", "hash": -4510088686419827000, "line_mean": 28.3294117647, "line_max": 76, "alpha_frac": 0.5896510229, "autogenerated": false, "ratio": 3.66...
#!/bin/sh "exec" "python" "-u" "-B" "$0" "$@" import os, shutil, subprocess, sys pythonMajorVersion = sys.version_info[0] pythonMinorVersion = sys.version_info[1] if not (pythonMajorVersion == 2 and pythonMinorVersion > 6): print('Grape requires python 2.x, where x is greater than or equal to 7.') exit(1) f...
{ "repo_name": "robinson96/GRAPE", "path": "grape.py", "copies": "1", "size": "2336", "license": "bsd-3-clause", "hash": 8496572132695459000, "line_mean": 30.1466666667, "line_max": 103, "alpha_frac": 0.6502568493, "autogenerated": false, "ratio": 3.7376, "config_test": false, "has_no_keywords...
#!/bin/sh ''''exec sage -python -- "$0" ${1+"$@"} # ''' import json import sys import traceback from sage.all import * ############################################################################### # Infrastructure functions: Debugging, json conversion ################################################################...
{ "repo_name": "generic-group-analyzer/gga", "path": "scripts/ggt_Sage.py", "copies": "1", "size": "6509", "license": "mit", "hash": -7226853864859320000, "line_mean": 25.140562249, "line_max": 99, "alpha_frac": 0.5062221539, "autogenerated": false, "ratio": 2.941256213285133, "config_test": fal...
#! /bin/sh from flask import Flask, request, session, g, redirect, url_for, \ abort, render_template, flash, Response import redis redis = redis.StrictRedis(host='localhost', port=6379, db=0) app = Flask(__name__) app.debug = True def ip_delete_store(remoteip): app.logger.debug("delete {}".format(remoteip)...
{ "repo_name": "makefu/mycube-flask", "path": "mycube/websrv.py", "copies": "1", "size": "1244", "license": "apache-2.0", "hash": -1854465675734220800, "line_mean": 26.0434782609, "line_max": 66, "alpha_frac": 0.6599678457, "autogenerated": false, "ratio": 3.197943444730077, "config_test": false...
#!/bin/sh from glob import glob from optparse import OptionParser import re import sys import os parser = OptionParser() parser.add_option("-i", dest="input_target", type="string", help="rules files to remove thresholds from and stick in a file standard glob stuff supported") parser.add_option("-o", dest="output_targe...
{ "repo_name": "EmergingThreats/threshold_2_eventfilter", "path": "thresh2eventfilter.py", "copies": "1", "size": "4716", "license": "bsd-2-clause", "hash": 6243056110634476000, "line_mean": 36.728, "line_max": 159, "alpha_frac": 0.5627650551, "autogenerated": false, "ratio": 3.1864864864864866, ...
#!/bin/sh import os import sys from glob import glob import shutil THIS_RECIPE = os.getenv('RECIPE_DIR', '') conda_tools_dir = os.path.join(THIS_RECIPE, '..', 'conda_tools') print('conda_tools_dir', conda_tools_dir) sys.path.insert(0, conda_tools_dir) import utils # conda_tools import copy_ambertools def main(): ...
{ "repo_name": "Amber-MD/ambertools-conda-build", "path": "conda-ambertools-python-components/build_ambertools.py", "copies": "1", "size": "1463", "license": "mit", "hash": 5177989580061502000, "line_mean": 28.26, "line_max": 95, "alpha_frac": 0.6411483254, "autogenerated": false, "ratio": 2.90854...
#!/bin/sh import sys import os import pathlib sys.path[0:0] = [str(pathlib.Path( os.getcwd() ).parent)] import wb_scm_version import datetime args = {'WB_LOCALE': sys.argv[1]} if os.path.exists( 'scm_workbench_%(WB_LOCALE)s.po' % args ): print( 'Info: Update %(WB_LOCALE)s from scm_workbench.current.pot' % args ...
{ "repo_name": "barry-scott/scm-workbench", "path": "Source/Scm/I18N/make_po_file.py", "copies": "2", "size": "2178", "license": "apache-2.0", "hash": -7419623487037457000, "line_mean": 32.5076923077, "line_max": 105, "alpha_frac": 0.5794306703, "autogenerated": false, "ratio": 2.9876543209876543,...
#!/bin/sh # -*- mode: Python -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2....
{ "repo_name": "rogerchina/cassandra", "path": "bin/cqlsh.py", "copies": "1", "size": "101587", "license": "apache-2.0", "hash": 4132256971624700400, "line_mean": 36.9764485981, "line_max": 203, "alpha_frac": 0.5844547038, "autogenerated": false, "ratio": 4.1083431067254415, "config_test": true,...
# Copyright 2011,2012,2013 James McCauley # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
{ "repo_name": "andiwundsam/_of_normalize", "path": "pox/boot.py", "copies": "1", "size": "16678", "license": "apache-2.0", "hash": -5417977003014661000, "line_mean": 29.2686025408, "line_max": 75, "alpha_frac": 0.6060079146, "autogenerated": false, "ratio": 3.6598639455782314, "config_test": tr...
# Copyright 2011-2012 James McCauley # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
{ "repo_name": "kavitshah8/SDNDeveloper", "path": "pox.py", "copies": "1", "size": "1270", "license": "apache-2.0", "hash": 2217355044303222800, "line_mean": 27.8636363636, "line_max": 74, "alpha_frac": 0.6897637795, "autogenerated": false, "ratio": 3.198992443324937, "config_test": false, "ha...
magic='--calling-python-from-/bin/sh--' """exec" python -E "$0" "$@" """#$magic" if __name__ == '__main__': import sys if sys.argv[-1] == '#%s' % magic: del sys.argv[-1] del magic import netrc import optparse import os import re import sys import time import urllib2 from trace import SetTrace from git_comman...
{ "repo_name": "ossxp-com/repo", "path": "main.py", "copies": "3", "size": "10274", "license": "apache-2.0", "hash": -3193361342326652000, "line_mean": 27.9408450704, "line_max": 74, "alpha_frac": 0.6012263967, "autogenerated": false, "ratio": 3.4862572107227687, "config_test": true, "has_no_k...
magic='--calling-python-from-/bin/sh--' """exec" python -E "$0" "$@" """#$magic" if __name__ == '__main__': import sys if sys.argv[-1] == '#%s' % magic: del sys.argv[-1] del magic import optparse import os import re import sys from trace import SetTrace from git_config import close_ssh from command import In...
{ "repo_name": "abstrakraft/repo", "path": "main.py", "copies": "1", "size": "6602", "license": "apache-2.0", "hash": -3879413266391359000, "line_mean": 27.3347639485, "line_max": 74, "alpha_frac": 0.5996667676, "autogenerated": false, "ratio": 3.5437466451959208, "config_test": false, "has_no...
#! /bin/sh """:" exec python $0 ${1+"$@"} """ from optparse import OptionParser from tools import getCtVethIp, getGw import subprocess import pickle import ipcalc parser = OptionParser() parser.add_option("--ipadd", dest="ipadd") parser.add_option("--ipdel", dest="ipdel") parser.add_option("--save", dest="save", defa...
{ "repo_name": "oysnet/openvz-cluster", "path": "ressources/vzTools/vzexec.py", "copies": "1", "size": "4398", "license": "bsd-3-clause", "hash": -4583186385088464000, "line_mean": 30.6402877698, "line_max": 109, "alpha_frac": 0.519781719, "autogenerated": false, "ratio": 3.4013921113689096, "co...
#!/bin/sh """:" exec python $0 ${1+"$@"} """ """Basic regular expression demostration facility. This displays a window with two type-in boxes. In the top box, you enter a regular expression. In the bottom box, you enter a string. The first match in the string of the regular expression is highlighted with a yell...
{ "repo_name": "sniemi/SamPy", "path": "sandbox/src1/TCSE3-3rd-examples/src/tools/regexdemo_old.py", "copies": "1", "size": "3453", "license": "bsd-2-clause", "hash": -1371361925230324000, "line_mean": 31.2710280374, "line_max": 76, "alpha_frac": 0.6904141326, "autogenerated": false, "ratio": 3.26...
#!/bin/sh #Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may ...
{ "repo_name": "kevinlu1987/hadoop-1.1.2", "path": "src/contrib/hod/support/logcondense.py", "copies": "8", "size": "7095", "license": "apache-2.0", "hash": 472898167589464000, "line_mean": 32.4669811321, "line_max": 145, "alpha_frac": 0.5974630021, "autogenerated": false, "ratio": 3.3641536273115...
#!/bin/sh # # A script for turning a generic Ubuntu system into a master for # SCons development. import getopt import sys from Command import CommandRunner, Usage INITIAL_PACKAGES = [ 'subversion', ] INSTALL_PACKAGES = [ 'wget', ] PYTHON_PACKAGES = [ 'g++', 'gcc', 'make', 'zlib1g-dev', ] ...
{ "repo_name": "azverkan/scons", "path": "bin/scons_dev_master.py", "copies": "3", "size": "5767", "license": "mit", "hash": 3155065384149617000, "line_mean": 25.2136363636, "line_max": 84, "alpha_frac": 0.5311253685, "autogenerated": false, "ratio": 3.65, "config_test": true, "has_no_keywords...
#!/bin/sh """": if which python3 >/dev/null; then exec python3 "$0" "$@" elif which python >/dev/null; then exec python "$0" "$@" else echo "${0##*/}: python interpreter not found" >&2 exit 1 fi """ __doc__ = None import platform import os import sys def check_platform(): vi = sys.version_info...
{ "repo_name": "bachew/alpha", "path": "cunda/cunda.py", "copies": "1", "size": "13404", "license": "unlicense", "hash": -1735082035112991000, "line_mean": 25.8617234469, "line_max": 97, "alpha_frac": 0.5898985377, "autogenerated": false, "ratio": 3.798243128364976, "config_test": false, "has_...
#!/bin/sh # overwrite amber.sh import os import sys import shutil from glob import glob sys.path.insert(0, '../conda_tools') THIS_RECIPE = os.getenv('RECIPE_DIR', '') conda_tools_dir = os.path.join(THIS_RECIPE, '..', 'conda_tools') print('conda_tools_dir', conda_tools_dir) sys.path.insert(0, conda_tools_dir) import u...
{ "repo_name": "Amber-MD/ambertools-conda-build", "path": "conda-ambertools-combine-pythons/build_ambertools.py", "copies": "1", "size": "1361", "license": "mit", "hash": 842651914033330700, "line_mean": 27.3541666667, "line_max": 113, "alpha_frac": 0.6311535636, "autogenerated": false, "ratio": 3...
#!/bin/sh """:" PYTHONPATH=/home/wazoocom/www/pygame/libs exec /home/wazoocom/bin/python $0 ${1+"$@"} """ ################################################################################ # Std Libs import os # User Libs from pywebsite import * from helpers import relative_to, ResultsZip import process_results ####...
{ "repo_name": "museomix/2013_Quebec_thermoscope", "path": "raspberry/pygame-1.9.1release/test/util/build_page/upload_results/index.py", "copies": "5", "size": "1744", "license": "mit", "hash": -441374038714532300, "line_mean": 25.0447761194, "line_max": 85, "alpha_frac": 0.4891055046, "autogenerate...
# sudoku3.py # SudokuSolver # # Created by joe yuan on 3/6/11. # Copyright 2011 __MyCompanyName__. All rights reserved. import time import sys def rowbyrow(): d = [] for i in range(9): x = INPUT_PROCESS(i) d.append(x) for k,i in enumerate(d): for j,c in enumerate(i): ...
{ "repo_name": "joeyuan19/flaming-bear", "path": "PersonalSite/projects/scripts/sudoku3.py", "copies": "2", "size": "10898", "license": "apache-2.0", "hash": 7894035585780457000, "line_mean": 25.4514563107, "line_max": 113, "alpha_frac": 0.4465957056, "autogenerated": false, "ratio": 3.39819145618...
#!/bin/sh """ Thai met toNetcdf_1.py converts Thai met data from Excel files to netCDF format. It tries to follow the convention specified under Climate Forecast. Check the link below to get more information: http://cf-pcmdi.llnl.gov/ Met stations are sparsed in different locations in Thailand. So they do not form...
{ "repo_name": "jurnix/utils", "path": "excel_to_netcdf.py", "copies": "1", "size": "17997", "license": "unlicense", "hash": 3081874475607787500, "line_mean": 31.427027027, "line_max": 85, "alpha_frac": 0.5459243207, "autogenerated": false, "ratio": 3.4938846825859056, "config_test": true, "ha...
#!/bin/sh # Polyglot hack to ensure we execute the correct Python. ''':' pythons='python2.7 python2 python' for p in $pythons; do hash $p 2>/dev/null && exec $p "$0" "$@" done echo >&2 "None of $pythons found" exit 1 #''' import re import sys import json import os.path from PyQt4.QtCore import Qt from PyQt4.QtGui ...
{ "repo_name": "xiaq/chat", "path": "main.py", "copies": "1", "size": "14033", "license": "bsd-2-clause", "hash": 899870807859217200, "line_mean": 30.5348314607, "line_max": 78, "alpha_frac": 0.5323166821, "autogenerated": false, "ratio": 3.8733094120894287, "config_test": true, "has_no_keywor...
#!/bin/sh # spiboxmessenger.py # look for files in the capture directory then process them import os import subprocess import ConfigParser import time class spiboxMessenger: def init(self): spiboxConf = ConfigParser.ConfigParser() spiboxConf.read('/home/pi/rpi_mjpg_streamer/spibox/spibox.conf') ...
{ "repo_name": "etxahun/rpi_mjpg_streamer", "path": "spibox/spiboxmessenger.py", "copies": "1", "size": "1580", "license": "mit", "hash": 1567129904364283100, "line_mean": 32.6170212766, "line_max": 152, "alpha_frac": 0.6443037975, "autogenerated": false, "ratio": 3.590909090909091, "config_test...
#!/bin/sh # This code tests that your Python installation worked. # It generates a png image file that you should e-mail # to the address shown on the plot import scipy import numpy import matplotlib import matplotlib.pyplot as plt import platform import socket # If you are a student, please fill in your first a...
{ "repo_name": "a301-teaching/pyman", "path": "Book/apdx1/Supporting Materials/PyInstallTest.py", "copies": "3", "size": "1524", "license": "cc0-1.0", "hash": -6032192883085008000, "line_mean": 34.4418604651, "line_max": 65, "alpha_frac": 0.6666666667, "autogenerated": false, "ratio": 3.1293634496...
''''which python2 >/dev/null && exec python2 "$0" "$@" # ''' ''''which python >/dev/null && exec python "$0" "$@" # ''' # Copyright (C) 2014-2015 Nginx, Inc. # Example of an application working on port 9000 # To interact with nginx-ldap-auth-daemon this application # 1) accepts GET requests on /login and responds ...
{ "repo_name": "duduribeiro/nginx-ldap-auth", "path": "backend-sample-app.py", "copies": "2", "size": "4250", "license": "bsd-2-clause", "hash": 4701368933158285000, "line_mean": 30.0218978102, "line_max": 102, "alpha_frac": 0.5976470588, "autogenerated": false, "ratio": 3.96455223880597, "confi...
''''which python2 >/dev/null && exec python2 "$0" "$@" # ''' ''''which python >/dev/null && exec python "$0" "$@" # ''' # Copyright (C) 2014-2015 Nginx, Inc. import sys, os, signal, base64, ldap, Cookie from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler Listen = ('localhost', 8888) #Listen = "/tmp/auth....
{ "repo_name": "levisaya/nginx-ldap-auth", "path": "nginx-ldap-auth-daemon.py", "copies": "2", "size": "7548", "license": "bsd-2-clause", "hash": -6975319082734979000, "line_mean": 32.3982300885, "line_max": 81, "alpha_frac": 0.5251722311, "autogenerated": false, "ratio": 4.264406779661017, "con...