text
stringlengths
0
1.05M
meta
dict
"""Log Parser for RTI Connext applications. The script parse a log generated from DDS application when the highest log verbosity is enabled. Then it will generate an output in human-readable format. Functions: + main: Main application entry. + print_header: Print the header information. + parse_log: Parse a log...
{ "repo_name": "iblancasa/rticonnextdds-logparser", "path": "src/rtilogparser.py", "copies": "1", "size": "11266", "license": "apache-2.0", "hash": 5996230832381747000, "line_mean": 38.1180555556, "line_max": 79, "alpha_frac": 0.6228475058, "autogenerated": false, "ratio": 4.048149478979519, "co...
#!/bin/python # lw.py # Create a Lone Wolf character. # System errors: # 1 - Erronous arguments given. # 2 - Command line syntax error. # 3 - Specified file already exists. import os import sys import argparse import wolfy_util import wolfy_config argparser = argparse.ArgumentParser(prog='lw', description= ...
{ "repo_name": "CaterHatterPillar/wolfy", "path": "lw.py", "copies": "1", "size": "2977", "license": "mit", "hash": 7376533410190246000, "line_mean": 39.2297297297, "line_max": 79, "alpha_frac": 0.5801142089, "autogenerated": false, "ratio": 3.841290322580645, "config_test": false, "has_no_key...
#!/bin/python # madbot functions, in pseudo pseudocode form (for now) import numpy as np def classify_insulting(tweets): """ Outputs whether a list of tweets is insulting. Using amueller's model. Test: >>> is_insulting('fuck you') 1 >>> is_insulting('hello') 0 """ cv = np.load(...
{ "repo_name": "corcra/troll-interconnector", "path": "madbot/madbot.py", "copies": "1", "size": "3811", "license": "mit", "hash": 1304753770549924600, "line_mean": 32.7256637168, "line_max": 162, "alpha_frac": 0.6531094201, "autogenerated": false, "ratio": 3.837865055387714, "config_test": fals...
#!/bin/python #Main for running the kaggle training and test data #Write in a list of files that you want to use for training and testing #TODO: Use cmdline arguments for specifying training and test data #Files will be in .mat format import numpy as np import scipy.io as sio import re import os from random import ran...
{ "repo_name": "drubinstein/kaggle_seizure", "path": "run.py", "copies": "1", "size": "4597", "license": "mit", "hash": 5229925057055785000, "line_mean": 34.6356589147, "line_max": 85, "alpha_frac": 0.5816837068, "autogenerated": false, "ratio": 3.2835714285714284, "config_test": false, "has_n...
#!/bin/python # Main functions/classes for bri-focal v2. import numpy as np # DO NOT PLAY NICE WITH NANS np.seterr(all='raise') np.seterr(under='warn') from copy import deepcopy import sys import gzip import time import re from copy import deepcopy #import pathos.multiprocessing as mp # yolo #from thresholds_fn import...
{ "repo_name": "corcra/bf2", "path": "src/bf2f.py", "copies": "1", "size": "51232", "license": "mit", "hash": 7387185651399476000, "line_mean": 39.5637371338, "line_max": 137, "alpha_frac": 0.4908455653, "autogenerated": false, "ratio": 3.4775997827857723, "config_test": false, "has_no_keyword...
#!/bin/python # Mars Team Client Example written in Python # Requires the following library to install: sudo pip install websocket-client # if you encounter errors with a Six import: # you can try: pip remove six; pip install six # Windows users: you may need to install the Microsoft Visual C++ Compiler for Python 2.7 ...
{ "repo_name": "VxRackNeutrino/Hero", "path": "clients/python/Hero-Client.py", "copies": "2", "size": "6183", "license": "apache-2.0", "hash": -6068965530055184000, "line_mean": 35.1578947368, "line_max": 126, "alpha_frac": 0.6221898755, "autogenerated": false, "ratio": 3.495195025438101, "confi...
#!/bin/python ACCEPTABLE = 864000 msgid = 'intersphinx' import sys import os import time import subprocess def interface(): try: f = sys.argv[1] except IndexError: exit('[%s]: the first argument to must be an existing file.' % (msgid, sys.argv[0])) try: s = sys.argv[2] ex...
{ "repo_name": "tychoish/dtf", "path": "docs/bin/intersphinx-download.py", "copies": "1", "size": "1786", "license": "apache-2.0", "hash": 4023348725868965400, "line_mean": 25.2647058824, "line_max": 92, "alpha_frac": 0.5352743561, "autogenerated": false, "ratio": 3.5088408644400784, "config_tes...
''' Adopted from https://github.com/brentp/bio-playground/blob/master/reads-utils/guess-encoding.py MIT License Copyright (c) 2009-2011 Brent Pedersen, Haibao Tang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal...
{ "repo_name": "clark-lab/ngsane", "path": "tools/GuessFastqEncoding.py", "copies": "3", "size": "4333", "license": "bsd-3-clause", "hash": -2009282659297650000, "line_mean": 41.067961165, "line_max": 460, "alpha_frac": 0.6265866605, "autogenerated": false, "ratio": 3.6970989761092152, "config_t...
#!/bin/python # A filter that converts the configuration file 'config.json' to a # 'make' format file 'config.mk' for inclusion by the main Makefile. # Input (stdin): config.json # Output (stdout): config.mk # Side effect: # - update config.json, if a field update was specified import sys, os, json, argparse, r...
{ "repo_name": "OpenTreeOfLife/reference-taxonomy", "path": "util/update_config.py", "copies": "1", "size": "4186", "license": "bsd-2-clause", "hash": -3776746872377215000, "line_mean": 29.1151079137, "line_max": 81, "alpha_frac": 0.5673674152, "autogenerated": false, "ratio": 3.4796342477140483, ...
#!/bin/python """ A module to handle 3D data with axes. colorview2d.Data consists of a 2d array and x and y axes. The class provides methods to rotate, flipp, copy and save the datafile. Example ------- :: file = Data(np.random.random(100, 100)) file.rotate_cw() file.report() file.save('newdata.dat'...
{ "repo_name": "Loisel/colorview2d", "path": "colorview2d/data.py", "copies": "1", "size": "19767", "license": "bsd-2-clause", "hash": -5405811063189030000, "line_mean": 34.5521582734, "line_max": 102, "alpha_frac": 0.5821318359, "autogenerated": false, "ratio": 3.695457094784072, "config_test":...
# assign_to_cluster_fpfh.py # voxels-at-lems # # Created by Maria Isabel Restrepo on 11/14/11. # Copyright (c) 2011 Brown University. All rights reserved. import dbrec3d_batch; import os; import optparse; dbrec3d_batch.register_processes(); dbrec3d_batch.register_datatypes(); class dbvalue: def __init__(self...
{ "repo_name": "mirestrepo/voxels-at-lems", "path": "dbrec3d/pcl/assign_to_cluster_fpfh.py", "copies": "1", "size": "1242", "license": "bsd-2-clause", "hash": 1825592385718179000, "line_mean": 30.8717948718, "line_max": 112, "alpha_frac": 0.729468599, "autogenerated": false, "ratio": 2.49397590361...
#!/bin/python """ A tool to insert institutions from CSV files. Requirements: - requests - gusregon - unicodecsv - tqdm Example usage: To run help text use: $ python insert_institution_generic.py -h """ import argparse import sys import requests import csv from gusregon import GUS from utils import environ fr...
{ "repo_name": "watchdogpolska/feder", "path": "api_examples/insert_institution_csv.py", "copies": "1", "size": "15737", "license": "mit", "hash": -6802936478755121000, "line_mean": 32.2684989429, "line_max": 88, "alpha_frac": 0.5060371124, "autogenerated": false, "ratio": 4.0957834461218114, "c...
__author__= 'bt3gl' import string import sys import operator FREQ_ENGLISH = [0.0749, 0.0129, 0.0354, 0.0362, 0.1400, 0.0218, 0.0174, 0.0422, 0.0665, 0.0027, 0.0047, 0.0357,0.0339, 0.0674, 0.0737, 0.0243, 0.0026, 0.0614, 0.0695, 0.0985, 0.0300, 0.0116, 0.0169, 0.0028, 0.0164, 0.0004] def find_frequency(msg): d...
{ "repo_name": "ksmaheshkumar/My-Gray-Hacker-Resources", "path": "CTFs_and_WarGames/WARGAMES/krypton/freq_count_vig.py", "copies": "4", "size": "1545", "license": "mit", "hash": -5818125640299363000, "line_mean": 29.2941176471, "line_max": 222, "alpha_frac": 0.5436893204, "autogenerated": false, "...
''' author: Jelle Hellemans copyright: Copyright (C) 2014 Jelle Hellemans HotterDeployer is a Liferay utility meant to ease development. It will monitor the resources (jsp,css,js) in your workspace for deployed portlets and hot-copy them on changes, without the need for a deployment. It also offers an alternative to...
{ "repo_name": "sueastside/liferay-hotterdeploy", "path": "hotterdeploy/app.py", "copies": "1", "size": "9161", "license": "bsd-3-clause", "hash": -7649247914985912000, "line_mean": 33.965648855, "line_max": 136, "alpha_frac": 0.6395590001, "autogenerated": false, "ratio": 3.817083333333333, "co...
__author__ = "Marius Lindauer" __copyright__ = "Copyright 2016, ML4AAD" __license__ = "3-clause BSD" __maintainer__ = "Marius Lindauer" __email__ = "lindauer@cs.uni-freiburg.de" __version__ = "0.0.2" import os import sys import inspect import logging import time import math from argparse import ArgumentParser, Argum...
{ "repo_name": "SgnJp/SMAC3", "path": "smac/parameter_importance/forward_selection.py", "copies": "1", "size": "6605", "license": "bsd-3-clause", "hash": 7107342693338207000, "line_mean": 32.025, "line_max": 83, "alpha_frac": 0.5249053747, "autogenerated": false, "ratio": 4.064615384615385, "con...
# Authors: Cedric Halbronn <cedric.halbronn@sogeti.com> # TAGS: Android, Device, HTC One, fastboot, read_emmc # # Reads flash using the read_emmc command # Convert the fastboot format into raw data # import serial, sys, time, binascii def debug(s, debug=False): if debug: print s #command format: read_mmc [emmc/s...
{ "repo_name": "sogeti-esec-lab/android-fde", "path": "pydroidfde/dump.py", "copies": "1", "size": "1287", "license": "bsd-3-clause", "hash": 1721002053855705900, "line_mean": 25.8125, "line_max": 94, "alpha_frac": 0.6402486402, "autogenerated": false, "ratio": 2.479768786127168, "config_test": ...
#!/bin/python # # Bing Image extractor # import urllib,urllib2,json import os,sys keyBing = 'wJYkWxwJfKoCUfh5L7xGeC6Q8YqIKHwKvKsvQ5Sfn/k=' # get Bing key from:https://datamarket.azure.com/account/keys credentialBing = 'Basic ' + (':%s' % keyBing).encode('base64')[:] #searchString = '%27Xbox+One%27' #top = 2...
{ "repo_name": "eokeeffe/Image_dataset_grabbers", "path": "BImages/downloader.py", "copies": "1", "size": "2224", "license": "mit", "hash": -7048518863243289000, "line_mean": 30.323943662, "line_max": 78, "alpha_frac": 0.5867805755, "autogenerated": false, "ratio": 3.2, "config_test": false, "...
bl_info = { "name": "ThreeJS", "author": "Devin Chen <d3vin.chen@gmail.com>", "version": (0, 0, 1), "blender": (2, 74, 0), "location": "Render > Engine > ThreeJS", "description": "WebGL render in Chrome", "warning": "", #"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"...
{ "repo_name": "sp-chenyang/bj101-online3d", "path": "blender/render_threejs/__init__.py", "copies": "1", "size": "1622", "license": "mit", "hash": 1644347218524565000, "line_mean": 28.5090909091, "line_max": 71, "alpha_frac": 0.5702836005, "autogenerated": false, "ratio": 3.290060851926978, "co...
#!/bin/python # bunch of tornado imports import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from tornado.options import define, options define("port", default=8000, help="run on the given port", type=int) # how define takes port input from command line? # tornado.options par...
{ "repo_name": "avinassh/learning-tornado", "path": "tornado-book/simple_web_services/hello.py", "copies": "1", "size": "2955", "license": "mit", "hash": -4413983162950718500, "line_mean": 38.9459459459, "line_max": 95, "alpha_frac": 0.6866328257, "autogenerated": false, "ratio": 3.993243243243243...
#!../bin/python """ Calling this module creates the client portion of the mediacenter. TODO: Split most ui components in a new yam/ui/ subfolder """ import logging import sys from PySide import QtDeclarative from PySide.QtCore import * import PySide.QtCore as QtCore from PySide.QtDeclarative import QDeclarativeView f...
{ "repo_name": "Aleksandre/YAM", "path": "yam/clientapp.py", "copies": "1", "size": "41354", "license": "mit", "hash": 5838726015086602000, "line_mean": 35.6947648625, "line_max": 148, "alpha_frac": 0.6021908401, "autogenerated": false, "ratio": 4.320760631073033, "config_test": true, "has_no_...
# deactivate interactive plotting import matplotlib matplotlib.use('Agg') import os, sys, re import traceback from optparse import OptionParser import fileinput import datetime from pytadbit import Chromosome ###################################### # Timestamp ###################################### def timeStamp(): ...
{ "repo_name": "BauerLab/ngsane", "path": "tools/fithic-fixedBins/callTADs.py", "copies": "3", "size": "4405", "license": "bsd-3-clause", "hash": 5220709935357745000, "line_mean": 40.9523809524, "line_max": 112, "alpha_frac": 0.5922814983, "autogenerated": false, "ratio": 4.059907834101383, "con...
#!/bin/python # change above line to point to local # python executable # #dependencies: Python # import sys from pprint import pprint, pformat def ensuredir(dir): import os if not os.path.exists(dir): os.makedirs(dir) def main(): import email, imaplib, os from email.parser import HeaderPars...
{ "repo_name": "sys0dm1n/DownMailAtt", "path": "DownAtt.py", "copies": "1", "size": "3791", "license": "mit", "hash": 2042590693109718800, "line_mean": 40.6593406593, "line_max": 154, "alpha_frac": 0.514376154, "autogenerated": false, "ratio": 4.475796930342385, "config_test": false, "has_no_k...
#!/bin/python # Classes to make it easier to deal with Uwyo LDAP server # Originally was going to work with ARCC LDAP too, # but the two servers are very different. # A lot of this code could be better. import ldap import re URL = 'ldaps://windows.uwyo.edu' BASE = 'dc=windows,dc=uwyo,dc=edu' USER = 'Person' USERS = U...
{ "repo_name": "WyoARCC/arcc_metrics", "path": "uwyoldap/uwyoldap.py", "copies": "1", "size": "9239", "license": "mit", "hash": 679069061759165300, "line_mean": 34.9494163424, "line_max": 112, "alpha_frac": 0.5463794783, "autogenerated": false, "ratio": 3.6779458598726116, "config_test": false, ...
#!/bin/python class Graph: def __init__(self, n): self.n = n self.nodes = [[] for _ in range(n)] def connect(self, a, b): self.nodes[a].append(b) self.nodes[b].append(a) def find_all_distances(self, s): distances = [-1 for _ in range(n)] dis...
{ "repo_name": "migafgarcia/programming-challenges", "path": "hackerrank/cracking_the_coding_interview/shortest_reach.py", "copies": "1", "size": "1195", "license": "mit", "hash": -33096643918461692, "line_mean": 22.9, "line_max": 54, "alpha_frac": 0.4343096234, "autogenerated": false, "ratio": 3....
#!/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; if month == "May": ret...
{ "repo_name": "agancsos/misc", "path": "linkedin_sort.py", "copies": "2", "size": "3032", "license": "mit", "hash": -3913870439926555000, "line_mean": 28.1538461538, "line_max": 140, "alpha_frac": 0.6738126649, "autogenerated": false, "ratio": 3.041123370110331, "config_test": false, "has_no_...
#!/bin/python class MenuItem(object): """ constructor @param {string} label @param {function} callback """ def __init__(self, label, cbk): self.label = label #label self.cbk = cbk #callback self.value = None #state that can be set for prompt or toggle options class...
{ "repo_name": "qwattash/AI", "path": "perceptron/menu.py", "copies": "1", "size": "4140", "license": "mit", "hash": -7898458988226110000, "line_mean": 28.5714285714, "line_max": 100, "alpha_frac": 0.5463768116, "autogenerated": false, "ratio": 4.2946058091286305, "config_test": false, "has_no...
#/bin/python class PhysicalParameters (object): """This class stores the physical properties of the simulations in a particular image directory. It has the following properties Properties: total_photons: The number of (scaled and added) photons generated to make this image low_energy:...
{ "repo_name": "woodmd/haloanalysis", "path": "simulation_reduction/parameter_set.py", "copies": "1", "size": "3090", "license": "bsd-3-clause", "hash": -7647794447220454000, "line_mean": 30.8556701031, "line_max": 92, "alpha_frac": 0.5385113269, "autogenerated": false, "ratio": 4.376770538243626,...
#!/bin/python class PlaceholderAction: ''' The placeholderaction . ''' def __init__(self, key): if not isinstance(key,str): raise TypeError("The key for Action is an str, not %s"%(type(str))) self.__key__ = key def __get_key__(self): return self.__key__...
{ "repo_name": "roomai/RoomAI", "path": "roomai/games/common/ActionRecord.py", "copies": "1", "size": "1254", "license": "mit", "hash": 2787134147005337000, "line_mean": 28.1627906977, "line_max": 132, "alpha_frac": 0.5869218501, "autogenerated": false, "ratio": 4.208053691275167, "config_test":...
#!/bin/python class QuickSort(object): def __init__(self, debugMode = False): self._debugMode = debugMode self._swapCount = 0 def partition(self, L, lo, hi): if hi - lo < 2: return lo i = j = lo v = hi - 1 while i < v: if L[i] < L[v]:...
{ "repo_name": "lilsweetcaligula/Online-Judges", "path": "hackerrank/algorithms/sorting/easy/running_time_of_quicksort/py/solution.py", "copies": "1", "size": "1578", "license": "mit", "hash": 8641646170123610000, "line_mean": 27.1785714286, "line_max": 56, "alpha_frac": 0.4651457541, "autogenerated...
#!/bin/python class striping_reader(): """A custom context manager that acts like open (from the standard library) but removes junk and strips every line using string.strip(). usage: >>> with striping_reader('example.txt', mode='r', buffering=0, junk='|') as f: ... for line in f: ...
{ "repo_name": "matthewmcarlson/python_utilities", "path": "striping_reader.py", "copies": "1", "size": "3480", "license": "mit", "hash": 224698370082734700, "line_mean": 41.4146341463, "line_max": 242, "alpha_frac": 0.4629097182, "autogenerated": false, "ratio": 5.301829268292683, "config_test"...
#!/bin/python # compiles and deploys "zerofucksgiven" to "/home/user/bin" # creating subdirectory "bin" if neccesary from os import path, environ, mkdir from subprocess import check_output, CalledProcessError def install(installdir): binaries = ["fuck", "fucksgiven", "forgiveme"] for binary in binaries: ...
{ "repo_name": "Fahrradkette/zerofucksgiven", "path": "install.py", "copies": "1", "size": "2154", "license": "mit", "hash": -1910506350614813700, "line_mean": 40.4230769231, "line_max": 100, "alpha_frac": 0.5933147632, "autogenerated": false, "ratio": 4.048872180451128, "config_test": false, ...
#!/bin/python # # compute_fdr_from_pepxml.py - parse any number of pepxml files matching a glob # pattern and compute fdr and q-value, then write to an output file. # # Uses linear combination of comet search engine scores by Philip Wilmarth, # based on the original method published by Keller, et al (2002). # standard...
{ "repo_name": "hweej/pilda", "path": "compute_fdr_from_pepxml.py", "copies": "1", "size": "20213", "license": "mit", "hash": -5449264424741317000, "line_mean": 40.7623966942, "line_max": 236, "alpha_frac": 0.6007025182, "autogenerated": false, "ratio": 3.7142594634325614, "config_test": false, ...
# comput_fpfh.py # voxels-at-lems # # Created by Maria Isabel Restrepo on 11/8/11. # Copyright (c) 2011 Brown University. All rights reserved. import os; import dbrec3d_batch import multiprocessing import Queue import time import random import optparse import sys from numpy import log, ceil from xml.etree.Elem...
{ "repo_name": "mirestrepo/voxels-at-lems", "path": "dbrec3d/pcl/compute_fpfh.py", "copies": "1", "size": "3520", "license": "bsd-2-clause", "hash": -8491138556184131000, "line_mean": 26.0769230769, "line_max": 108, "alpha_frac": 0.6355113636, "autogenerated": false, "ratio": 3.1178033658104516, ...
# Copyright 2012, Gregg Tavares. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and t...
{ "repo_name": "caraya/sunshine-markdown", "path": "prep.py", "copies": "1", "size": "4162", "license": "bsd-3-clause", "hash": -5144289535750332000, "line_mean": 31.2635658915, "line_max": 72, "alpha_frac": 0.6528111485, "autogenerated": false, "ratio": 3.702846975088968, "config_test": false, ...
import os import json import urllib2 import time hawkularEndpointPort = os.environ.get("HAWKULAR_METRICS_ENDPOINT_PORT") statusURL = "http://localhost:" + hawkularEndpointPort + "/hawkular/metrics/status" while True: try: response = urllib2.urlopen(statusURL) statusCode = response.getcode(); if (stat...
{ "repo_name": "spadgett/hawkular-metrics", "path": "containers/hawkular-metrics-docker-eap/src/main/docker/hawkular-metrics-poststart.py", "copies": "2", "size": "1572", "license": "apache-2.0", "hash": -2516040690322415600, "line_mean": 31.0816326531, "line_max": 84, "alpha_frac": 0.703562341, "au...
import os import json import urllib2 hawkularEndpointPort = os.environ.get("HAWKULAR_METRICS_ENDPOINT_PORT") statusURL = "http://localhost:" + hawkularEndpointPort + "/hawkular/metrics/status" response = urllib2.urlopen(statusURL) statusCode = response.getcode(); # if the status is 200, then continue if (statusCod...
{ "repo_name": "spadgett/hawkular-metrics", "path": "containers/hawkular-metrics-docker/src/main/docker/hawkular-metrics-liveness.py", "copies": "2", "size": "1269", "license": "apache-2.0", "hash": 6343318698719656000, "line_mean": 32.3947368421, "line_max": 84, "alpha_frac": 0.7501970055, "autogen...
# Copyright 2017 Google Inc. 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 at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agr...
{ "repo_name": "istio/distroless", "path": "examples/python3/hello.py", "copies": "4", "size": "1045", "license": "apache-2.0", "hash": -5241399982914486000, "line_mean": 32.7096774194, "line_max": 87, "alpha_frac": 0.7043062201, "autogenerated": false, "ratio": 4.019230769230769, "config_test":...
# Copyright 2018-2020 Arm Limited. # SPDX-License-Identifier: Apache-2.0 # # 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 require...
{ "repo_name": "ARM-software/bob-build", "path": "tests/transform_source/generator.py", "copies": "1", "size": "3301", "license": "apache-2.0", "hash": -6455107682873050000, "line_mean": 36.9425287356, "line_max": 98, "alpha_frac": 0.6307179643, "autogenerated": false, "ratio": 3.8563084112149535,...
# Copyright (c) 2013, Arvid Norberg # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
{ "repo_name": "majestrate/twister-core", "path": "libtorrent/tools/run_regression_tests.py", "copies": "15", "size": "3314", "license": "mit", "hash": 547283738744723800, "line_mean": 28.8558558559, "line_max": 80, "alpha_frac": 0.6888955944, "autogenerated": false, "ratio": 3.4520833333333334, ...
from subprocess import call from time import sleep class Panandtilt: pan_servo = 5 tilt_servo = 6 pan_default_position = 150 tilt_default_position = 150 pan_current_position = 0 tilt_current_position = 0 def servo_control(self, servo, pulsewidth): call(["echo "+str(servo)+"="+st...
{ "repo_name": "johnnyjacob/lazerdog", "path": "panandtilt.py", "copies": "1", "size": "3006", "license": "mit", "hash": -8245562400815924000, "line_mean": 41.9428571429, "line_max": 89, "alpha_frac": 0.7338656021, "autogenerated": false, "ratio": 3.639225181598063, "config_test": false, "has_...
# Line algorithm from : http://en.wikipedia.org/wiki/Bresenham's_line_algorithm def line(x0, y0, x1, y1): x = 0 y = y0 dx = x1 - x0 dy = y1 - y0 D = (2*dy) - dx yield x0, y0 for x in range(x0+1, x1+1): if (D > 0) : y = y +1 yield x, y D = D + (...
{ "repo_name": "johnnyjacob/lazerdog", "path": "line.py", "copies": "1", "size": "1571", "license": "mit", "hash": -8071119381372866000, "line_mean": 35.5348837209, "line_max": 79, "alpha_frac": 0.6779121579, "autogenerated": false, "ratio": 3.58675799086758, "config_test": false, "has_no_keyw...
#Copyright (c) 2013, Regents of the University of California #All rights reserved. # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: # #1. Redistributions of source code must retain the above copyright notice, #this list o...
{ "repo_name": "amplab/smash", "path": "test/test_helper.py", "copies": "1", "size": "2667", "license": "bsd-2-clause", "hash": -1318559419425340400, "line_mean": 37.6666666667, "line_max": 79, "alpha_frac": 0.7690288714, "autogenerated": false, "ratio": 3.541832669322709, "config_test": false, ...
# Copyright (C) 2014 Computer Architecture and Parallel Systems Laboratory (CAPSL) # # Original # author: Sergio Pino # E-mail: sergiop@udel.edu # # License # # Redistribution of this code is allowed only after an explicit permission is # given by the original author or CAPSL and this license should be i...
{ "repo_name": "spino327/dwarfs", "path": "dense_algebra/mxv_hadoop/src/python/MatrixGenerator.py", "copies": "1", "size": "2864", "license": "mit", "hash": 1582325977062765300, "line_mean": 34.8125, "line_max": 116, "alpha_frac": 0.6462988827, "autogenerated": false, "ratio": 3.2995391705069124, ...
#Copyright (c) 2015, Justin R. Klesmith #All rights reserved. #CodonSwap: Swap codons for synonymous mutations import argparse import os #Set the author information __author__ = "Justin R. Klesmith" __copyright__ = "Copyright 2015, Justin R. Klesmith" __credits__ = ["Justin R. Klesmith", "Timothy A. Whitehead"] __li...
{ "repo_name": "JKlesmith/Bioinformatics", "path": "CodonSwap.py", "copies": "1", "size": "3877", "license": "bsd-3-clause", "hash": -3987033264204612000, "line_mean": 38.5714285714, "line_max": 161, "alpha_frac": 0.5563580088, "autogenerated": false, "ratio": 2.458465440710209, "config_test": f...
# Copyright (c) 2015, Yaroslav Ganin (yaroslav.ganin@gmail.com) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, # th...
{ "repo_name": "chen1474147/Deep3DPose-1-skel", "path": "5-caffe/examples/adaptation/scripts/prepare_dirs.py", "copies": "2", "size": "5464", "license": "mit", "hash": -8049570458959009000, "line_mean": 32.1151515152, "line_max": 120, "alpha_frac": 0.6332357247, "autogenerated": false, "ratio": 3....
import cv2 #import numpy from apriltag import apriltag TAGTYPE = 'tagStandard41h12' imagepath = '/home/jony/Pictures/tag-detect-test.png' BBCOLOR = 255,0,255 FONT = cv2.FONT_HERSHEY_SIMPLEX if __name__ == '__main__': tag_detector = apriltag(TAGTYPE) cam = cv2.VideoCapture(2) while cv2.waitKey(1) != 0x1...
{ "repo_name": "johnnyjacob/lazerdog", "path": "perception/ground_plane/detector.py", "copies": "1", "size": "1964", "license": "mit", "hash": 7693875424320947000, "line_mean": 38.28, "line_max": 79, "alpha_frac": 0.700101833, "autogenerated": false, "ratio": 3.5387387387387386, "config_test": f...
# Copyright (c) 2020 PaddlePaddle Authors. 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 at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
{ "repo_name": "luotao1/Paddle", "path": "paddle/scripts/conda_build.py", "copies": "1", "size": "10011", "license": "apache-2.0", "hash": 1782764271552015600, "line_mean": 29.8981481481, "line_max": 105, "alpha_frac": 0.5564878634, "autogenerated": false, "ratio": 3.2779960707269153, "config_te...
#!/bin/python ''' crawls the youtube search results for terms specified in terms.txt (one per line). usage: controtube.py [starterm] [searchpage] starterm = the term to resume search searchpage = the last unfinished search page Requires a running elasticsearch instance on port 9200! ''' from youtube import *...
{ "repo_name": "ControCurator/controcurator", "path": "python_code/youtube_scraping/controtube.py", "copies": "1", "size": "2214", "license": "mit", "hash": -2301820053272476200, "line_mean": 28.9189189189, "line_max": 98, "alpha_frac": 0.6964769648, "autogenerated": false, "ratio": 3.158345221112...
#!/bin/python # Create a bar graph of the number of users on Mt Moran for each college. # The information comes from ARCC's ldap server and UWyo's AD server. # Requires ldap, matplotlib, numpy import uwyoldap import getpass import matplotlib.pyplot as plt import numpy as np import ldap from sys import exit # Whethe...
{ "repo_name": "WyoARCC/arcc_metrics", "path": "user_colleges.py", "copies": "1", "size": "3014", "license": "mit", "hash": -8417251753272694000, "line_mean": 25.6725663717, "line_max": 77, "alpha_frac": 0.6486396815, "autogenerated": false, "ratio": 3.123316062176166, "config_test": false, "h...
#!/bin/python # Creates two csv files for Gephi of groups and their users. # One contains data for the nodes, the other for the edges. # An input file needs to be given as an argument. # This file should be generated with the following command: # sacct --starttime MMDDYY -a -P -n -s CD -o User,Account,CPUTimeRAW > inp...
{ "repo_name": "WyoARCC/arcc_metrics", "path": "usernetplot/usernetplot.py", "copies": "1", "size": "6396", "license": "mit", "hash": 4936940659870129000, "line_mean": 30.5073891626, "line_max": 90, "alpha_frac": 0.6479049406, "autogenerated": false, "ratio": 3.382337387625595, "config_test": fa...
#!/bin/python def calculate_bid(player,pos,first_moves,second_moves): """your logic here""" ### import random bank = 100 win = True first_wins = [] for a, b in zip(first_moves, second_moves): if a == b: if win: first_wins.append(a) else: ...
{ "repo_name": "pbl64k/CodeSprints", "path": "CodeSlam-2012-10-13-SAP/TheBiddingGame/tbg.py", "copies": "1", "size": "1864", "license": "bsd-2-clause", "hash": 3487120839767941000, "line_mean": 20.9294117647, "line_max": 63, "alpha_frac": 0.5134120172, "autogenerated": false, "ratio": 3.2305025996...
#!/bin/python def CalculateProductAtIndex(index, number, length_to_use): product = 1 for i in range(index, index - length_to_use, -1): product *= int(number[i]) return product def LargestConsecutiveProduct(number, length_to_use): product = CalculateProductAtIndex(length_to_use - 1, number, length_to_use) ...
{ "repo_name": "aawc/ProjectEuler", "path": "08/largestConsecutiveProduct.py", "copies": "1", "size": "1969", "license": "mit", "hash": -4267529940776948700, "line_mean": 34.8, "line_max": 77, "alpha_frac": 0.8009141696, "autogenerated": false, "ratio": 2.6789115646258503, "config_test": false, ...
#!/bin/python def countingSort(L, lo, hi, key=lambda x : x): if lo >= hi: return maxKey = minKey = key(L[lo]) for i in range(lo, hi): item = L[i] itemKey = key(item) if itemKey > maxKey: maxKey = itemKey elif itemKey < minKey: mi...
{ "repo_name": "lilsweetcaligula/Online-Judges", "path": "hackerrank/algorithms/sorting/medium/the_full_counting_sort/py/solution.py", "copies": "1", "size": "1350", "license": "mit", "hash": 1075517593278288500, "line_mean": 21.8813559322, "line_max": 67, "alpha_frac": 0.4992592593, "autogenerated"...
#!/bin/python def last_key(node): return node.keys[-1] class Node: def __init__(self, data, parent): self.parent = parent self.keys = [data] self.max_keys = 2 self.max_children = 3 self.children = [] def add_key(self, key): self.keys.append(key) sel...
{ "repo_name": "chenthillrulz/fun_with_python", "path": "2_3_4_tree.py", "copies": "1", "size": "3346", "license": "apache-2.0", "hash": 2518993825348341000, "line_mean": 23.9701492537, "line_max": 98, "alpha_frac": 0.5508069337, "autogenerated": false, "ratio": 3.4212678936605316, "config_test"...
#!/bin/python def lesConfig(): adresser = [] sistoppdatert = [] navn = [] aPre = "address:" tPre = "last updated:" hPre = "title:" try: f = open("con.cfg", "r") for line in f: lst = line.strip() if (lst.startswith("#")): continue ...
{ "repo_name": "joards/simple-python-rss-to-mail", "path": "iorss.py", "copies": "1", "size": "1226", "license": "mit", "hash": -4418656313898921000, "line_mean": 23.0392156863, "line_max": 66, "alpha_frac": 0.4706362153, "autogenerated": false, "ratio": 3.3135135135135134, "config_test": false,...
#!/bin/python def read_files(tarfname): """Read the training and development data from the speech tar file. The returned object contains various fields that store the data, such as: train_data,dev_data: array of documents (array of words) train_fnames,dev_fnames: list of filenames of the doccuments (same length a...
{ "repo_name": "sameersingh/uci-statnlp", "path": "hw1/speech.py", "copies": "1", "size": "5793", "license": "apache-2.0", "hash": 1124437936350906900, "line_mean": 31.7288135593, "line_max": 106, "alpha_frac": 0.7163818402, "autogenerated": false, "ratio": 2.984544049459042, "config_test": fals...
#!/bin/python def swap(findex, sindex, ar): ar[findex], ar[sindex] = ar[sindex], ar[findex] def partition(ar, lo, hi): '''3 way djisktra partition method''' start = lo pivotIndex = (lo+hi)//2 # take the elemet @ hi as the pivot and swap it to pivotIndex position swap(pivotIndex, hi, ar) pi...
{ "repo_name": "codecakes/algorithms", "path": "algorithms/code30DaysImp/helper/quicksort.py", "copies": "1", "size": "1313", "license": "mit", "hash": 3221471562013456000, "line_mean": 26.375, "line_max": 74, "alpha_frac": 0.53541508, "autogenerated": false, "ratio": 3.1411483253588517, "config...
#!/bin/python # # DHash implementation for image matching # Optimized for mass image loads # Uses VP-tree for hash comparisons # from PIL import Image from fnmatch import filter from multiprocessing import Process from pylab import linspace, meshgrid, arange, imshow, show, zeros, asarray import os, re import argp...
{ "repo_name": "eokeeffe/ImageSimilarity-Python", "path": "main.py", "copies": "1", "size": "8242", "license": "mit", "hash": -2713259374688789000, "line_mean": 30.1018867925, "line_max": 102, "alpha_frac": 0.6020383402, "autogenerated": false, "ratio": 3.7109410175596578, "config_test": false, ...
#!/bin/python #File Crawling #Things that are done: # -Crawling of music files # -Inserting and storing in a local Database (Song_list.db) # -Database: ID, Title, Absolute file path(Storing is maybe wrong. Double Slash), # LengthofSong(Seconds),Artist, album, albumArt, albumArtType(3 - album cover) #...
{ "repo_name": "hanvo/MusicCloud", "path": "Crawler/Crawler-Src/crawling.py", "copies": "1", "size": "4304", "license": "bsd-3-clause", "hash": 6466057218992534000, "line_mean": 31.3609022556, "line_max": 224, "alpha_frac": 0.5436802974, "autogenerated": false, "ratio": 3.818988464951198, "confi...
#!/bin/python from argparse import (ArgumentParser, ArgumentDefaultsHelpFormatter) import logging from os import getcwd from os import path as ospath import sys from nbd.command import cd_if_necessary from nbd.const import PKG_NAME from nbd.diff import DiffGenerator from nbd.export import NotebookExporter from nbd.fi...
{ "repo_name": "lcary/nbd", "path": "nbd/main.py", "copies": "1", "size": "3419", "license": "mit", "hash": -3035200163251519000, "line_mean": 25.0992366412, "line_max": 70, "alpha_frac": 0.6814858146, "autogenerated": false, "ratio": 3.568893528183716, "config_test": false, "has_no_keywords":...
#!/bin/python from collections import defaultdict, deque from functools import wraps from functools import partial as ptl class Cacher(object): def __init__(self, func): self.func = func self.cache = {} def __call__(self, *args): if args not in self.cache: self.cache...
{ "repo_name": "codecakes/algorithms_monk", "path": "tries/contacts.py", "copies": "1", "size": "5768", "license": "mit", "hash": 2902106920213321000, "line_mean": 29.8502673797, "line_max": 214, "alpha_frac": 0.5249653259, "autogenerated": false, "ratio": 4.278931750741839, "config_test": false...
#!/bin/python from ctypes import * import asyncio import os from itertools import count, takewhile import struct from types import MethodType import concurrent import threading import time import platform from .utils import Logger, Event import sys # Enable this for better tracebacks in some cases #import tracemalloc...
{ "repo_name": "madcowswe/ODrive", "path": "tools/odrive/pyfibre/fibre/libfibre.py", "copies": "1", "size": "39468", "license": "mit", "hash": -3736350970461264400, "line_mean": 36.269121813, "line_max": 210, "alpha_frac": 0.6219975676, "autogenerated": false, "ratio": 3.631913131499034, "config...
#!/bin/python from datetime import timedelta from pprint import pprint as pp import json import Monstr.Core.Utils as Utils import Monstr.Core.DB as DB import Monstr.Core.BaseModule as BaseModule import pytz from Monstr.Core.DB import Column, Integer, String, DateTime, UniqueConstraint, func class CMSJobStatus(Bas...
{ "repo_name": "tier-one-monitoring/monstr", "path": "Monstr/Modules/CMSJobStatus/CMSJobStatus.py", "copies": "1", "size": "9424", "license": "apache-2.0", "hash": 2952674472958243300, "line_mean": 44.9756097561, "line_max": 379, "alpha_frac": 0.4978777589, "autogenerated": false, "ratio": 4.13696...
#!/bin/python from deap import tools import numpy as np epochStatisticsNames = { 'avg': 'Average profit', 'std': 'Profit variation', 'min': 'Minimum profit', 'max': 'Maximum profit', 'size': 'Population size', 'maxsize': 'Max population size', 'avgTrades': 'Avg trade number', 'sharpe':...
{ "repo_name": "Gab0/gekkoJaponicus", "path": "evaluation/gekko/statistics.py", "copies": "1", "size": "2549", "license": "mit", "hash": -2450411621466724000, "line_mean": 33.9178082192, "line_max": 81, "alpha_frac": 0.6335817968, "autogenerated": false, "ratio": 3.6676258992805755, "config_test...
#!/bin/python from flask import Flask import threading import time from datetime import datetime, timedelta import sys import RPi.GPIO as GPIO PIN = 25 app = Flask(__name__) GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(PIN, GPIO.OUT) led_status = False time_thread = None @app.route('/time/off') def ti...
{ "repo_name": "piotrgiedziun/university", "path": "embeded_systems_applications/server.py", "copies": "1", "size": "2180", "license": "mit", "hash": -2599922438706432000, "line_mean": 18.6486486486, "line_max": 77, "alpha_frac": 0.6495412844, "autogenerated": false, "ratio": 2.718204488778055, ...
#!/bin/python from __future__ import division import random import scipy from numpy.random import dirichlet, multinomial, randint from scipy import array, zeros, bincount, shape, logical_and from tictoc import tic, toc #from disthelper import dirrnd # let's first create some random topics # then mix them to create sa...
{ "repo_name": "hughperkins/pub-prototyping", "path": "py/test/testlda.py", "copies": "1", "size": "2885", "license": "apache-2.0", "hash": 981007383932452000, "line_mean": 21.8968253968, "line_max": 82, "alpha_frac": 0.5493934142, "autogenerated": false, "ratio": 2.7423954372623576, "config_tes...
#!/bin/python from __future__ import print_function from __future__ import division from random import random from random import randrange from random import choice from datetime import datetime from gmusicapi import Mobileclient from sys import exit api = Mobileclient() loggedin = api.login('lol', 'nope') if logged...
{ "repo_name": "Asky314159/jrayfm-controlboard", "path": "gmusic/gmusic.py", "copies": "1", "size": "3340", "license": "mit", "hash": 6475921885248431000, "line_mean": 26.3852459016, "line_max": 104, "alpha_frac": 0.6080838323, "autogenerated": false, "ratio": 3.5418875927889713, "config_test": ...
#!/bin/python from __future__ import print_function import sys import json import re import argparse argparser = argparse.ArgumentParser("Parse QSF to Json") argparser.add_argument('-q', '--qsf', help='Input QSF File') argparser.add_argument('-g', '--group', default=[], help='Signal Group', action='append') argparser...
{ "repo_name": "8l/connectal", "path": "scripts/parse_qsf.py", "copies": "1", "size": "2295", "license": "mit", "hash": -3013358133131020000, "line_mean": 28.0506329114, "line_max": 103, "alpha_frac": 0.5337690632, "autogenerated": false, "ratio": 3.591549295774648, "config_test": false, "has_...
#!/bin/python from __future__ import with_statement import os import re import logging import multiprocessing import hashlib from optparse import OptionParser from assetman.manifest import Manifest from assetman.tools import iter_template_paths, get_static_pattern, make_relative_static_path, make_absolute_static_p...
{ "repo_name": "bitly/assetman", "path": "assetman/compile.py", "copies": "2", "size": "19376", "license": "apache-2.0", "hash": -8718647905120259000, "line_mean": 39.7915789474, "line_max": 132, "alpha_frac": 0.6417217176, "autogenerated": false, "ratio": 3.9745641025641025, "config_test": true...
#!/bin/python from HTMLParser import HTMLParser from htmlentitydefs import name2codepoint import re import io file_data = [] class Dialogue: speaker = "" line = "" def check_tag(end_tag): global file_data #if end_tag == "table" or end_tag == "head": # print end_tag if end_tag == "...
{ "repo_name": "varunagrawal/Novella", "path": "Plays/Novella_Parser.py", "copies": "1", "size": "1961", "license": "mit", "hash": 6116908901314482000, "line_mean": 22.9146341463, "line_max": 81, "alpha_frac": 0.5594084651, "autogenerated": false, "ratio": 3.4104347826086956, "config_test": fals...
#!/bin/python from . import gekkoTrigger try: from . import assetAllocator except Exception: pass from dateutil import parser as dateparser import datetime import csv import re import random from subprocess import Popen, PIPE import pytoml import os import time import json def calculateMostIndicatedAssets...
{ "repo_name": "Gab0/gekkoJaponicus", "path": "livetrader/gekkoChecker.py", "copies": "1", "size": "7092", "license": "mit", "hash": 302065178427520700, "line_mean": 31.0904977376, "line_max": 83, "alpha_frac": 0.6159052453, "autogenerated": false, "ratio": 4.4325, "config_test": false, "has_n...
#!/bin/python from . import halt, Settings, interface from time import sleep import random from threading import Thread from .evolution_generations import Generations import datetime import os import waitress import promoterz from version import VERSION def launchWebEvolutionaryInfo(): print("WEBSERVER MOD...
{ "repo_name": "Gab0/gekkoJaponicus", "path": "japonicus/japonicus.py", "copies": "1", "size": "5398", "license": "mit", "hash": 1543889517382716700, "line_mean": 30.9408284024, "line_max": 93, "alpha_frac": 0.563171545, "autogenerated": false, "ratio": 4.601875532821825, "config_test": false, ...
#!/bin/python from itertools import cycle, tee, izip import requests from bs4 import BeautifulSoup import json url_base = 'http://www.etymonline.com' url_listing = '/search?q=' url_param_page = '&page=' letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's...
{ "repo_name": "arielallon/etymoffline", "path": "offliner/offliner.py", "copies": "1", "size": "1882", "license": "apache-2.0", "hash": 8195033039924357000, "line_mean": 29.3548387097, "line_max": 98, "alpha_frac": 0.5781083953, "autogenerated": false, "ratio": 3.1683501683501682, "config_test"...
#!/bin/python from itertools import groupby from flask import render_template from dateutil.tz import tzoffset from dateutil.tz import tzlocal from datetime import datetime from dateutil.relativedelta import relativedelta from webcronmon import api server_tz = tzoffset('server-timezone', api.utc_offset() * 3600) loc...
{ "repo_name": "seantis/webcronmon", "path": "webcronmon/views.py", "copies": "1", "size": "3983", "license": "mit", "hash": -5214976085826339000, "line_mean": 24.5320512821, "line_max": 79, "alpha_frac": 0.6013055486, "autogenerated": false, "ratio": 3.826128722382325, "config_test": true, "h...
#!/bin/python from lxml import objectify import pywikibot from pywikibot import pagegenerators, WikidataBot repo = pywikibot.Site().data_repository() namespaces = {'slim': 'http://www.loc.gov/MARC21/slim'} property_to_xpath = { 'P569': 'slim:datafield[@tag="046"]/slim:subfield[@code="f"]', # date of birth '...
{ "repo_name": "eranroz/marc_to_wikidata", "path": "marc_to_wikidata.py", "copies": "1", "size": "2845", "license": "mit", "hash": 6413354566416992000, "line_mean": 34.5625, "line_max": 110, "alpha_frac": 0.6200351494, "autogenerated": false, "ratio": 3.4526699029126213, "config_test": false, ...
#!/bin/python from majority_vote import MajorityVoteGrader from embedded_controls import ControlsGrader from troia_em import EMGrader import csv import sys from label_map import gold_labels, mturk_labels CSV_PATH = sys.argv[1] def map_tweet_id_to_tweet(): tweet_map = dict() for hit in csv.DictReader(open(CSV_PATH,...
{ "repo_name": "manosai/tweepy", "path": "assignment_4/quality_estimation.py", "copies": "1", "size": "2829", "license": "mit", "hash": -8964543366605863000, "line_mean": 40.6029411765, "line_max": 148, "alpha_frac": 0.7073170732, "autogenerated": false, "ratio": 2.86046511627907, "config_test":...
#!/bin/python from os import walk from os.path import join, relpath, normpath from json import load, dump from multiprocessing import Pool oldpath = "./experimental/translations" newpath = "./translations" substitutions = dict() with open(join(newpath, "substitutions.json"),"r") as f: substitutions = load(f) fi...
{ "repo_name": "MonsterNya/Starbound_RU", "path": "tools/copy_denied.py", "copies": "10", "size": "2420", "license": "apache-2.0", "hash": 3506003734280336400, "line_mean": 30.8421052632, "line_max": 74, "alpha_frac": 0.5685950413, "autogenerated": false, "ratio": 4.013266998341625, "config_test...
from PIL import Image, ImageDraw, ImageFont import textwrap """ The MIT License (MIT) Copyright (c) 2016 Saurabh Deochake 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, in...
{ "repo_name": "saurabh-deochake/air-bot", "path": "app/data.py", "copies": "1", "size": "2079", "license": "mit", "hash": 6848121348032555000, "line_mean": 36.1428571429, "line_max": 160, "alpha_frac": 0.7474747475, "autogenerated": false, "ratio": 3.5417376490630326, "config_test": false, "h...
#!/bin/python from PyQt5.QtCore import * from PyQt5.QtWidgets import * import subprocess, shlex import signal, atexit import os, sys def main(): stations = [ {"d":"nrk", "station":"p1_more_og_romsdal", "name":"NRK P1"}, {"d":"nrk", "station":"p2", "name":"NRK P2"}, {"d":"nrk", "station":"...
{ "repo_name": "chinatsu/dumbscripts", "path": "shitradio.py", "copies": "1", "size": "5676", "license": "mit", "hash": 1435736066827342600, "line_mean": 38.6783216783, "line_max": 97, "alpha_frac": 0.5824814945, "autogenerated": false, "ratio": 3.2571756601607347, "config_test": false, "has_n...
#!/bin/python from roomai.games.common import AbstractActionChance from roomai.games.bang import PlayingCard from roomai.games.bang import CharacterCard from roomai.games.bang import RoleCard from roomai.games.bang import AllPlayingCardsDict from roomai.games.bang import AllCharacterCardsDict from roomai.games.bang i...
{ "repo_name": "roomai/RoomAI", "path": "roomai/games/bang/BangActionChance.py", "copies": "1", "size": "3162", "license": "mit", "hash": -2031979268752747000, "line_mean": 44.1714285714, "line_max": 208, "alpha_frac": 0.6938646426, "autogenerated": false, "ratio": 3.626146788990826, "config_tes...
#!/bin/python from roomai.games.common import AbstractStatePublic class PublicPlayerInfo(object): def __init__(self): self.__num_hand_cards__ = 0 self.__character_card__ = None self.__equipment_cards__ = [] self.__is_alive__ = True def __get_num_hand_cards__(self): ...
{ "repo_name": "roomai/RoomAI", "path": "roomai/games/bang/BangStatePublic.py", "copies": "1", "size": "4475", "license": "mit", "hash": 6270638435126241000, "line_mean": 36.6050420168, "line_max": 153, "alpha_frac": 0.6020111732, "autogenerated": false, "ratio": 3.792372881355932, "config_test"...
#!bin/python from sys import stdin from sys import exit import logging from ConfigParser import SafeConfigParser from select import select from oyoyo.client import IRCClient from oyoyo.cmdhandler import DefaultCommandHandler from oyoyo import helpers from cmd import Cmd privmsg_handlers = [] channelmsg_handlers ...
{ "repo_name": "LeftyBC/lefty-pybot", "path": "bot.py", "copies": "1", "size": "4196", "license": "bsd-2-clause", "hash": 4355823870369033700, "line_mean": 26.6052631579, "line_max": 83, "alpha_frac": 0.5567206864, "autogenerated": false, "ratio": 4.089668615984405, "config_test": true, "has_n...
#!/bin/python from tls import * DEFAULT_CIPHERS = [TLS_RSA_WITH_RC4_128_MD5, TLS_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA2...
{ "repo_name": "WestpointLtd/tls_prober", "path": "prober_utils.py", "copies": "1", "size": "9078", "license": "mit", "hash": 4348938353494863000, "line_mean": 41.0277777778, "line_max": 73, "alpha_frac": 0.4777484027, "autogenerated": false, "ratio": 3.7825, "config_test": false, "has_no_keyw...
#!/bin/python from zeroos.core0.client import Client import sys import time """ This script expect you know the IP of the core0 and you can access it from the machine running this script. an easy way to do it is to build the initramfs with a customr zerotier network id (https://github.com/g8os/initramfs/tree/0.10.0#c...
{ "repo_name": "g8os/core0", "path": "docs/_archive/examples/mongodb.py", "copies": "1", "size": "3162", "license": "apache-2.0", "hash": -7193409144151055000, "line_mean": 33.7472527473, "line_max": 145, "alpha_frac": 0.6049968374, "autogenerated": false, "ratio": 3.4633077765607885, "config_te...
#! /bin/python """ Functions that construct random :py:class:`~achemkit.reactionnet.ReactionNetwork` instances by various methods. This is designed to provide null hypothesis data for various situations and metrics. As with random graphs, there is no single best way to generate a random reaction network. """ import ra...
{ "repo_name": "afaulconbridge/PyAChemKit", "path": "achemkit/randomnet.py", "copies": "1", "size": "11485", "license": "bsd-3-clause", "hash": -8233228743701772000, "line_mean": 39.7269503546, "line_max": 336, "alpha_frac": 0.6414453635, "autogenerated": false, "ratio": 4.0583038869257955, "con...
import os, sys, re import traceback from optparse import OptionParser import fileinput import datetime from readData import * from quicksect import IntervalTree import gzip from scipy.sparse import lil_matrix import numpy # manage option and arguments processing def main(): global options global args usag...
{ "repo_name": "aehrc/ngsane", "path": "tools/fithic-fixedBins/fithicCreate2DcontactMap.py", "copies": "3", "size": "11610", "license": "bsd-3-clause", "hash": -3822162497744411600, "line_mean": 46.7777777778, "line_max": 192, "alpha_frac": 0.6192075797, "autogenerated": false, "ratio": 3.96651861...
import os, sys, re import traceback from optparse import OptionParser import fileinput import datetime from readData import * from quicksect import IntervalTree import gzip import numpy as np import scipy.sparse as ss # manage option and arguments processing def main(): global options global args usage = ...
{ "repo_name": "BauerLab/ngsane", "path": "tools/fithic-fixedBins/fithicCountInteractions.py", "copies": "3", "size": "10145", "license": "bsd-3-clause", "hash": -171680718108003360, "line_mean": 47.3095238095, "line_max": 192, "alpha_frac": 0.637555446, "autogenerated": false, "ratio": 3.94133644...
#!/bin/python ## ## generate GCI tasks for fixing bugs ## import getopt import sys import os import subprocess def usage(): print "\ Usage: bugfix.py -[hy:p:]\n\ -h --help print this help\n\ " def get_mentor(n): cmd = os.path.join("..","get_mentor") + " " + str(n) proc = subprocess.Popen(cmd, stdou...
{ "repo_name": "joelsherrill/gci_tasks", "path": "2018/bugfix/bugfix.py", "copies": "2", "size": "2261", "license": "bsd-2-clause", "hash": -723021795884394200, "line_mean": 23.8461538462, "line_max": 121, "alpha_frac": 0.6138876603, "autogenerated": false, "ratio": 3.0554054054054056, "config_t...
#!/bin/python ## ## generate GCI tasks for fixing pages ## import getopt import sys import os import subprocess def usage(): print "\ Usage: bugfix.py -[hy:p:]\n\ -h --help print this help\n\ " def get_mentor(n): cmd = os.path.join("..","get_mentor") + " " + str(n) proc = subprocess.Popen(cmd, stdo...
{ "repo_name": "joelsherrill/gci_tasks", "path": "2018/TBR/TBR.py", "copies": "2", "size": "2269", "license": "bsd-2-clause", "hash": 5695787718482674000, "line_mean": 25.3837209302, "line_max": 121, "alpha_frac": 0.632437197, "autogenerated": false, "ratio": 3.001322751322751, "config_test": fa...
#!/bin/python ## ## generate GCI tasks for updating citations ## import getopt import sys import os import subprocess def usage(): print "\ Usage: citations.py -[hy:p:]\n\ -h --help print this help\n\ " def get_mentor(n): cmd = os.path.join("..","get_mentor") + " " + str(n) proc = subprocess.Popen(...
{ "repo_name": "gedare/gci_tasks", "path": "2013/examples-v2_waf/examples-v2_waf.py", "copies": "2", "size": "2000", "license": "bsd-2-clause", "hash": 567079925578168900, "line_mean": 25.6666666667, "line_max": 117, "alpha_frac": 0.6415, "autogenerated": false, "ratio": 3.252032520325203, "conf...
#!/bin/python # Generates an ansible inventory for a given list of libvirt guests import subprocess import libvirt import libxml2 import sys import re try: import json except: import simplejson as json # For now justrReturn just the first interface def getHWAddr(dom): xml = libxml2.parseDoc(dom.XMLDes...
{ "repo_name": "imcsk8/ansible-tools", "path": "livbirt_inventory.py", "copies": "1", "size": "1545", "license": "apache-2.0", "hash": -4111077118328507000, "line_mean": 21.7205882353, "line_max": 84, "alpha_frac": 0.6194174757, "autogenerated": false, "ratio": 3.259493670886076, "config_test": ...
#!/bin/python ''' Get Crowdynews articles for the controcurator project ''' import elasticsearch import requests import datetime import time from collections import Counter from pprint import pprint MAXTRIES = 5 ARTICLES = 'http://q.crowdynews.com/v1/articles/controcurator?count=100' SOURCE = 'guardian-vaccination' ...
{ "repo_name": "ControCurator/controcurator", "path": "python_code/crowdycrawl/get_crowdy_vaccination.py", "copies": "1", "size": "5223", "license": "mit", "hash": 5880179000361567000, "line_mean": 26.9304812834, "line_max": 115, "alpha_frac": 0.6678154317, "autogenerated": false, "ratio": 2.91624...
#!/bin/python # # Google Image extractor # import urllib, urllib2 import simplejson import cStringIO import os, sys fetcher = urllib2.build_opener() numberOfPages = int(sys.argv[1]) searchTerm = "" for i in xrange(2,len(sys.argv)): searchTerm += sys.argv[i]+"+" searchTerm = searchTerm[:-1] startIndex = 0 counter...
{ "repo_name": "eokeeffe/Image_dataset_grabbers", "path": "GImages/downloader.py", "copies": "1", "size": "1211", "license": "mit", "hash": 7835819529820566000, "line_mean": 27.1627906977, "line_max": 115, "alpha_frac": 0.6424442609, "autogenerated": false, "ratio": 3.272972972972973, "config_te...
#!/bin/python graph = {} def initialize(graph): with open("input9.txt") as f: for line in f: line = line[:-1].split(' ') if line[0] not in graph.keys(): graph[line[0]] = {} graph[line[0]][line[2]] = int(line[4]) if line[2] not in graph.keys()...
{ "repo_name": "seysn/my-aoc-solutions", "path": "src/not-working/NW_ex9.py", "copies": "1", "size": "1911", "license": "mit", "hash": 6719456181101572000, "line_mean": 27.9545454545, "line_max": 110, "alpha_frac": 0.4798534799, "autogenerated": false, "ratio": 3.732421875, "config_test": false,...
#!/bin/python # HackerLand University has the following grading policy: # # Every student receives a grade in the inclusive range from 0 to 100. # Any grade less than 40 is a failing grade. # # Sam is a professor at the university and likes to round each student's grade # according to these rules: # # If t...
{ "repo_name": "chinhtle/python_fun", "path": "hacker_rank/algorithms/implementation/gradingstudents.py", "copies": "1", "size": "2610", "license": "mit", "hash": 6100512322529629000, "line_mean": 29.7058823529, "line_max": 79, "alpha_frac": 0.5727969349, "autogenerated": false, "ratio": 3.6149584...
#!/bin/python # hack to get unicode working with jinja2 import sys reload(sys) sys.setdefaultencoding('utf-8') import glob import commands as c from jinja2 import Template, Environment, FileSystemLoader import os from tag_ontology import tag_synonyms, tag_implications from metadata import * site_dir = "_site/" tags_...
{ "repo_name": "riceissa/ssg-riceissa.com", "path": "ssg.py", "copies": "1", "size": "9345", "license": "bsd-2-clause", "hash": -3555716814746478000, "line_mean": 27.4042553191, "line_max": 132, "alpha_frac": 0.6088817549, "autogenerated": false, "ratio": 3.502623688155922, "config_test": false,...
#!/bin/python ### Handling Arrays and Reading Grib package import numpy as np import numpy.ma as ma import pandas as pd ### These are helper Fortran functions to speed things up from HandyMet import * ### Plotting packages from mpl_toolkits.basemap import Basemap , addcyclic from matplotlib import pyplot as plt fro...
{ "repo_name": "abtawfik/Single-Column-Model", "path": "tests/animation_of_single_profile.py", "copies": "1", "size": "9245", "license": "mit", "hash": 8745572847577670000, "line_mean": 35.6865079365, "line_max": 134, "alpha_frac": 0.542779881, "autogenerated": false, "ratio": 2.613058224985868, ...
#!/bin/python ### Handling Arrays and Reading Grib package import time import numpy as np from netCDF4 import Dataset ### Plotting packages import sys import math from HandyMet import evaluate_ci_plevels ################################################# ##### ##### Directories and time variables ##### ###########...
{ "repo_name": "abtawfik/Single-Column-Model", "path": "src/Single_Column_CI.py", "copies": "1", "size": "13524", "license": "mit", "hash": -4564554439691467000, "line_mean": 31.9853658537, "line_max": 212, "alpha_frac": 0.469609583, "autogenerated": false, "ratio": 2.897172236503856, "config_te...
#!/bin/python """ Hello World, but with more meat. """ import wx class HelloFrame(wx.Frame): """ A Frame that says Hello World """ def __init__(self, *args, **kw): # ensure the parent's __init__ is called super(HelloFrame, self).__init__(*args, **kw) # create a panel in the f...
{ "repo_name": "OSHI7/Learning1", "path": "WX_Stuff.py", "copies": "1", "size": "3163", "license": "mit", "hash": 6417119375486390000, "line_mean": 30.9494949495, "line_max": 75, "alpha_frac": 0.5975339867, "autogenerated": false, "ratio": 4.00379746835443, "config_test": false, "has_no_keywor...
#!bin/python # Helpful script for converting fixed point signed numbers to decimal def letter2num(x): if (x == "F" or x == "f"): return 15 elif (x == "E" or x == "e"): return 14 elif (x == "D" or x == "d"): return 13 elif (x == "C" or x == "c"): return 12 elif (x == "B" or x == "b"): return 11 elif (x...
{ "repo_name": "stanford-ppl/spatial-lang", "path": "utilities/converter.py", "copies": "1", "size": "2790", "license": "mit", "hash": 7497117871840579000, "line_mean": 17.6, "line_max": 110, "alpha_frac": 0.5555555556, "autogenerated": false, "ratio": 2.473404255319149, "config_test": false, ...