text
stringlengths
0
1.05M
meta
dict
import os, logging, fnmatch, shutil, json from types import * from datetime import datetime from pymongo import MongoClient from bson.objectid import ObjectId from bson import json_util from env_config import ENV # $ mongoimport --port 19981 -d mp_data -c event_logs data/events_raw_data.json #start the logger log =...
{ "repo_name": "cubefyre/audience-behavior-ui", "path": "app/server/mongo_service.py", "copies": "1", "size": "14364", "license": "apache-2.0", "hash": -497716153986738800, "line_mean": 25.0707803993, "line_max": 186, "alpha_frac": 0.6578947368, "autogenerated": false, "ratio": 2.82311320754717, ...
import os, logging, fnmatch, shutil, json import datetime import analytics from analytics import Client from env_config import ENV log = logging.getLogger(__name__) log.setLevel("DEBUG") # # Segment service for handling raw Event logs # class SegmentEventService(): def __init__(self): self.segme...
{ "repo_name": "cubefyre/audience-behavior-ui", "path": "app/server/segment_service.py", "copies": "1", "size": "4239", "license": "apache-2.0", "hash": -7615464045600361000, "line_mean": 33.185483871, "line_max": 187, "alpha_frac": 0.6008492569, "autogenerated": false, "ratio": 3.8747714808043874...
import os, requests, boto, json from boto.s3.connection import S3Connection from env_config import ENV import logging log = logging.getLogger(__name__) log.setLevel("DEBUG") # # S3 class and methods to read json, text and csv files # class S3FileReader: def download_file_from_s3(self, what_file, local_file_path...
{ "repo_name": "cubefyre/audience-behavior-ui", "path": "app/server/s3_service.py", "copies": "1", "size": "4591", "license": "apache-2.0", "hash": -6817760247206695000, "line_mean": 39.6283185841, "line_max": 137, "alpha_frac": 0.7240252668, "autogenerated": false, "ratio": 2.898358585858586, "...
import logging.config import os.path import socket LOGGING_CONF=os.path.join(os.path.dirname(__file__), "logging.ini") logging.config.fileConfig(LOGGING_CONF) HOST = socket.gethostname() if HOST == "MacBook.local": ENV = { "home": "/server", "mongo_db_host":"localhost" } else: # localhost settings ENV = { ...
{ "repo_name": "cubefyre/audience-behavior-ui", "path": "app/server/env_config.py", "copies": "1", "size": "1687", "license": "apache-2.0", "hash": 7772816571285046000, "line_mean": 22.1095890411, "line_max": 74, "alpha_frac": 0.6733847066, "autogenerated": false, "ratio": 2.9036144578313254, "c...
import os, logging, fnmatch, shutil, json, calendar from collections import defaultdict, Counter, OrderedDict from datetime import datetime, timedelta from mp_lib import Mixpanel from env_config import ENV #log = logging.getLogger(__name__) #log.setLevel("DEBUG") # # MixPanel service for handling mp APIs #...
{ "repo_name": "cubefyre/audience-behavior-ui", "path": "app/server/analytics_service.py", "copies": "1", "size": "14750", "license": "apache-2.0", "hash": 2664611777584721000, "line_mean": 36.5318066158, "line_max": 165, "alpha_frac": 0.5946440678, "autogenerated": false, "ratio": 3.6134247917687...
__author__="jitesh" #Minimal editor import Tkinter from Tkinter import * from ScrolledText import * import tkFileDialog import tkMessageBox root = Tkinter.Tk(className=" Just another Text Editor") textPad = ScrolledText(root, width=100, height=80) def open_command(): file = tkFileDialog.askopenfile(paren...
{ "repo_name": "jiteshjha/MyEditor", "path": "MyText.py", "copies": "1", "size": "1446", "license": "mit", "hash": 703411156389040900, "line_mean": 25.7777777778, "line_max": 84, "alpha_frac": 0.6742738589, "autogenerated": false, "ratio": 3.3317972350230414, "config_test": false, "has_no_keyw...
__author__ = 'jithinjustin' import sys sys.path.append("/Users/jithinjustin/spark-1.4.1-bin-hadoop2.6/python/") from operator import add from pyspark import SparkContext import re def wordCount(wordListRDD): wordCountRDD=wordListRDD.map(lambda x:(x,1)).reduceByKey(add) return wordCountRDD def removePunctuat...
{ "repo_name": "jithinjustin/ExploringSpark", "path": "src/org/spark/wordcount/WordCountTextFile.py", "copies": "1", "size": "1426", "license": "apache-2.0", "hash": 1326795827954114800, "line_mean": 30.6888888889, "line_max": 86, "alpha_frac": 0.6542776999, "autogenerated": false, "ratio": 3.2044...
__author__ = 'jithinjustin' import re import datetime import os import sys sys.path.append("/Users/jithinjustin/spark-1.4.1-bin-hadoop2.6/python/") from operator import add from pyspark import SparkContext from pyspark.sql import Row month_map = {'Jan': 1, 'Feb': 2, 'Mar':3, 'Apr':4, 'May':5, 'Jun':6, 'Jul':7, ...
{ "repo_name": "jithinjustin/ExploringSpark", "path": "src/org/spark/loganalysis/LogAnalysis.py", "copies": "1", "size": "3343", "license": "apache-2.0", "hash": 6185178351835648000, "line_mean": 30.2523364486, "line_max": 147, "alpha_frac": 0.5459168412, "autogenerated": false, "ratio": 3.3801820...
__author__ = 'jitrixis' class Toolkit: @staticmethod def buildIPv4(ip): build = "" ip_array = ip.split(".") for octet in ip_array: build += chr(int(octet)) return build @staticmethod def consumeIPv4(data): ip = "" for _ in range(4): ...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Factory/toolsheds.py", "copies": "1", "size": "1767", "license": "mit", "hash": 6690936690559202000, "line_mean": 23.2191780822, "line_max": 60, "alpha_frac": 0.4951895869, "autogenerated": false, "ratio": 3.7278481012658227, "config_te...
__author__ = 'jitrixis' from random import randint from TVpy.Layers.all import * class Forgery: def __init__(self, sHwr, hAddr): self.__sHwr = sHwr self.__sAddr = hAddr pass def generateIcmpRequest(self, dHwr, dAddr, seq=1, id=0): if id == 0: id = randint(0x0, 0xf...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Factory/forgery.py", "copies": "1", "size": "4058", "license": "mit", "hash": -2545289265725496300, "line_mean": 22.7368421053, "line_max": 73, "alpha_frac": 0.544356826, "autogenerated": false, "ratio": 3.185243328100471, "config_test"...
__author__ = 'jitrixis' from scapy.all import * from forgery import * from harvestery import * import time class Engine: def __init__(self, device): self.__device = device self.__forgery = Forgery(get_if_hwaddr(device), get_if_addr(device)) self.__arptable = {} pass def getArp...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Factory/machinery.py", "copies": "1", "size": "10081", "license": "mit", "hash": -9021599411829213000, "line_mean": 36.0625, "line_max": 185, "alpha_frac": 0.4236682869, "autogenerated": false, "ratio": 4.339647008179079, "config_test":...
__author__ = 'jitrixis' from sniffery import Sniffery class Harvest: def __init__(self): self.__sniffery = Sniffery() def check(self, pks, pkt): pks = self.__sniffery.sniff(str(pks)) pkt = self.__sniffery.sniff(str(pkt)) if pks is None or pkt is None: return False ...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Factory/harvestery.py", "copies": "1", "size": "2585", "license": "mit", "hash": -5602523490000212000, "line_mean": 28.0561797753, "line_max": 62, "alpha_frac": 0.4777562863, "autogenerated": false, "ratio": 3.7247838616714697, "config_...
__author__ = 'jitrixis' from TVpy.Factory.toolsheds import Toolkit class Tcp: def __init__(self): self.__sport = 0 self.__dport = 0 self.__seq = 0 self.__ack = 0 self.__reserved = 0x0 self.__flags = 0x0 self.__window = 0 self.__checksum = 0x0 ...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Layers/Segment/TCP.py", "copies": "1", "size": "5099", "license": "mit", "hash": 5432649836007839000, "line_mean": 24.6231155779, "line_max": 82, "alpha_frac": 0.5606981761, "autogenerated": false, "ratio": 3.7410124724871605, "config_t...
__author__ = 'jitrixis' from TVpy.Factory.toolsheds import Toolkit class Arp: def __init__(self): self.__hwtype = 0x1 self.__ptype = 0x800 self.__hwlen = 6 self.__plen = 4 self.__op = 0x1 self.__hwsrc = '00:00:00:00:00:00' self.__psrc = '0.0.0.0' se...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Layers/Packet/ARP.py", "copies": "1", "size": "4401", "license": "mit", "hash": -2323430382922605000, "line_mean": 21.6907216495, "line_max": 56, "alpha_frac": 0.5507839127, "autogenerated": false, "ratio": 3.4571877454831106, "config_t...
__author__ = 'jitrixis' from TVpy.Factory.toolsheds import Toolkit class Ethernet: def __init__(self): self.__src = '00:00:00:00:00:00' self.__dst = 'ff:ff:ff:ff:ff:ff' self.__type = 0x0 '''Destination MAC Address''' def getDst(self): return self.__dst def setDst(se...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Layers/Frame/Ethernet.py", "copies": "1", "size": "1628", "license": "mit", "hash": -3551453026710623000, "line_mean": 20.72, "line_max": 73, "alpha_frac": 0.5546683047, "autogenerated": false, "ratio": 3.6666666666666665, "config_test"...
__author__ = 'jitrixis' from TVpy.Factory.toolsheds import Toolkit class Icmp: def __init__(self): self.__type = 8 self.__code = 0 self.__checksum = 0x0 self.__id = 0x0 self.__seq = 0x0 '''Type''' def getType(self): return self.__type def setType(sel...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Layers/Packet/ICMP.py", "copies": "1", "size": "2808", "license": "mit", "hash": -772656382839468300, "line_mean": 21.464, "line_max": 60, "alpha_frac": 0.5427350427, "autogenerated": false, "ratio": 3.7590361445783134, "config_test": f...
__author__ = 'jitrixis' from TVpy.Factory.toolsheds import Toolkit class Ip: def __init__(self): self.__version = 0x45 self.__tos = 0x0 self.__len = 20 self.__id = 1 self.__flags = 0x0 self.__ttl = 64 self.__proto = 0x0 self.__checksum = 0x0 ...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Layers/Packet/IP.py", "copies": "1", "size": "5451", "license": "mit", "hash": 5892824227686564000, "line_mean": 23.0176211454, "line_max": 79, "alpha_frac": 0.5461383232, "autogenerated": false, "ratio": 3.7106875425459496, "config_tes...
__author__ = 'jitrixis' from TVpy.Layers.all import * class Sniffery: def __init__(self): self.__passed = True self.__type = "" pass def sniff(self, data): self.__passed = True packet = {} '''Ethernet''' valE = self.__sniffEthernet(data) packe...
{ "repo_name": "Jitrixis/2ARC-Network-stack", "path": "TVpy/Factory/sniffery.py", "copies": "1", "size": "2090", "license": "mit", "hash": 6512463191239376000, "line_mean": 23.6, "line_max": 58, "alpha_frac": 0.4550239234, "autogenerated": false, "ratio": 3.6538461538461537, "config_test": false...
__author__ = 'jjauhiainen' import RPi.GPIO as GPIO from robot import run_cli, run from utils.formatter import convert_int, convert_bool import time import sys class RasBot(object): red_led = None green_led = None auto_mode = True def __init__(self, red_led=40, green_led=38): self.red_led = conve...
{ "repo_name": "Atihinen/raspbot", "path": "raspbot.py", "copies": "1", "size": "1681", "license": "mit", "hash": 4570181597143675000, "line_mean": 27.4915254237, "line_max": 121, "alpha_frac": 0.5746579417, "autogenerated": false, "ratio": 3.296078431372549, "config_test": false, "has_no_keyw...
__author__ = 'jjauhiainen' import serial import time import traceback class SerialDataAdapter(object): port = None baudrate = None serial_connection = None def __init__(self, port, baudrate=9600): self.port = port self.baudrate = baudrate def open_connection(self, retry_times=3, ti...
{ "repo_name": "Atihinen/serial2sqlite", "path": "utils/serial_reader.py", "copies": "1", "size": "1489", "license": "mit", "hash": 8898885710482322000, "line_mean": 31.3695652174, "line_max": 118, "alpha_frac": 0.5829415715, "autogenerated": false, "ratio": 4.525835866261398, "config_test": fal...
__author__ = 'jjauhiainen' import unittest2 as unittest from models import Category, _empty_val, _not_integer, _too_long, _not_float class TestCategory(unittest.TestCase): def test_should_be_valid_with_valid_values(self): name = "" for i in range(15): name = "{}{}".format(name, chr(i))...
{ "repo_name": "Atihinen/ObjectToMap", "path": "test/test_category.py", "copies": "1", "size": "1474", "license": "mit", "hash": -6148956175436631000, "line_mean": 31.7555555556, "line_max": 76, "alpha_frac": 0.5535956581, "autogenerated": false, "ratio": 3.7698209718670075, "config_test": true,...
__author__ = 'jjauhiainen' from ConfigParser import ConfigParser from os import path, remove, walk, listdir import sys from getopt import getopt from utils.connector import Darwin class Manager(): def __init__(self, verbose=None): self._db_conf = "db_config.ini" self.evolutions = "evolutions" ...
{ "repo_name": "Atihinen/ObjectToMap", "path": "manage.py", "copies": "1", "size": "7317", "license": "mit", "hash": 324878223084749950, "line_mean": 30.8173913043, "line_max": 162, "alpha_frac": 0.5066283996, "autogenerated": false, "ratio": 3.9918166939443536, "config_test": true, "has_no_ke...
__author__ = 'jj' from rest_framework.viewsets import ModelViewSet from rest_framework.filters import SearchFilter, FilterSet, DjangoFilterBackend from rest_framework.generics import ListAPIView from .models_cycu import hfModel from .serializers import hfSerializer class hfFilterSet(FilterSet): """ Filter ...
{ "repo_name": "LowerSilesians/ferdas", "path": "cycu/api.py", "copies": "1", "size": "1287", "license": "apache-2.0", "hash": 2280288251287576000, "line_mean": 26.3829787234, "line_max": 119, "alpha_frac": 0.668997669, "autogenerated": false, "ratio": 3.29156010230179, "config_test": false, "...
__author__ = 'jjw' from sizefs.contents import Filler import re def test_simple(): filler = Filler(regenerate=False,pattern="0",max_random=128) contents = filler.fill(16) assert contents == "0000000000000000" def test_repeat(): filler = Filler(regenerate=False,pattern="ab",max_random=128) content...
{ "repo_name": "mmcardle/sizefs", "path": "sizefs/test/test_contents.py", "copies": "1", "size": "1357", "license": "bsd-3-clause", "hash": -6816806218511133000, "line_mean": 29.1555555556, "line_max": 80, "alpha_frac": 0.6735445836, "autogenerated": false, "ratio": 2.893390191897655, "config_te...
__author__ = 'jkessel' from bs4 import BeautifulSoup import os from urllib.error import HTTPError import urllib.request # Be sure to create the folder beforehand output_folder = 'd:\\microsoft_books_new' try: if not os.path.exists(output_folder): os.makedirs(output_folder) except OSError as ose: pri...
{ "repo_name": "jkessel/MSBooks", "path": "fetchBooks.py", "copies": "1", "size": "2767", "license": "mit", "hash": 137830467726530500, "line_mean": 34.4743589744, "line_max": 120, "alpha_frac": 0.6331767257, "autogenerated": false, "ratio": 3.374390243902439, "config_test": false, "has_no_key...
__author__ = 'jkf' from adengine.model import User, Ad, Comment def _add_resource(session, resource): session.add(resource) session.commit() return resource def _new_ad(user, text="ad-text"): ad = Ad(text=text, author_id=user.id) return ad def _new_user(name='Peter'): user = User(email='{...
{ "repo_name": "py-amigos/adengine", "path": "tests/models/test_comments.py", "copies": "1", "size": "1498", "license": "artistic-2.0", "hash": -2779977451793592300, "line_mean": 27.8076923077, "line_max": 79, "alpha_frac": 0.6074766355, "autogenerated": false, "ratio": 3.5330188679245285, "conf...
__author__ = 'jkf' import json from adengine.model import User, Ad, Comment def build_api_url(id_=None): if id_ is not None: return "/api/ads/{}".format(id_) return "/api/ads" def _add_resource(session, resource): session.add(resource) session.commit() return resource def _new_ad(use...
{ "repo_name": "py-amigos/adengine", "path": "tests/views/test_ads.py", "copies": "1", "size": "1519", "license": "artistic-2.0", "hash": 6631448246563283000, "line_mean": 26.125, "line_max": 75, "alpha_frac": 0.6175115207, "autogenerated": false, "ratio": 3.1978947368421053, "config_test": fals...
__author__ = 'jkg' import json import random from collections import defaultdict from collections import deque import csv from datetime import datetime import pytz from itertools import izip import calendar import simplejson import sys class CoordinateGenerator: __boundaries = [] __minLat = 99999999.0 __...
{ "repo_name": "ircflagship2/geo-scripts", "path": "googleflu-to-uk-map-mock-data-generator/genCoord.py", "copies": "1", "size": "6614", "license": "mit", "hash": 3037859856607414000, "line_mean": 35.1475409836, "line_max": 228, "alpha_frac": 0.5489869973, "autogenerated": false, "ratio": 3.865575...
from itertools import product from itertools import groupby from itertools import combinations_with_replacement as comb class Solver: def __init__(self, length, customers, get_the_first=False): self.impossible = False self.solutions = [] self.customers = customers self.length = length self.return_first = g...
{ "repo_name": "jkklapp/paintshop", "path": "solver.py", "copies": "1", "size": "3057", "license": "apache-2.0", "hash": -6042797130227314000, "line_mean": 21.984962406, "line_max": 69, "alpha_frac": 0.6790971541, "autogenerated": false, "ratio": 3.1678756476683936, "config_test": false, "has_...
from itertools import permutations class Tester: def __init__(self): self.impossible = False ''' Generates all possible permutations of customers Args: * solution: A list containing a solution. * customers: A list containing customers types. Returns: True if the solution satisfies the list of cu...
{ "repo_name": "jkklapp/paintshop", "path": "tester.py", "copies": "1", "size": "1406", "license": "apache-2.0", "hash": -2211319619744732700, "line_mean": 24.5636363636, "line_max": 64, "alpha_frac": 0.6970128023, "autogenerated": false, "ratio": 3.3238770685579198, "config_test": false, "has...
from random import randint from random import sample class Generator: ''' A case set generator. Generates test cases with maximum N and M Attrs: c: The cases to generate max_n: The maximum number of colors in the case max_m: The maximum number of customers in the case. ''' def __init__(self, max_...
{ "repo_name": "jkklapp/paintshop", "path": "generator.py", "copies": "1", "size": "2713", "license": "apache-2.0", "hash": -4312211295733704000, "line_mean": 22.188034188, "line_max": 63, "alpha_frac": 0.6240324364, "autogenerated": false, "ratio": 2.7348790322580645, "config_test": true, "ha...
import sys from random import randint class Parser: ''' Checks if a solution satisfies a provided test case. ''' def __init__(self, filename): self.f = open(filename, 'r') self.c = int(self.f.readline()) self.n = 0 ''' Close the file. ''' def finish(self): self.f.close() ''' Reads the next ...
{ "repo_name": "jkklapp/paintshop", "path": "parser.py", "copies": "1", "size": "1293", "license": "apache-2.0", "hash": 5705364497322616000, "line_mean": 20.1967213115, "line_max": 79, "alpha_frac": 0.6194895592, "autogenerated": false, "ratio": 2.7987012987012987, "config_test": false, "has_...
import unittest from solver import Solver class TestSolver(unittest.TestCase): def setUp(self): self.solver = Solver(0, []) def test_solver_small(self): self.solver.length = 2 self.solver.customers = [['1 1', '2 0'], ['1 0', '2 1']] s1 = ['0', '0'] s2 = ['1', '1'] self.solver.compute_solutions() sol...
{ "repo_name": "jkklapp/paintshop", "path": "solver_test.py", "copies": "1", "size": "2715", "license": "apache-2.0", "hash": -3422926210660555300, "line_mean": 27.8936170213, "line_max": 76, "alpha_frac": 0.5819521179, "autogenerated": false, "ratio": 2.5589066918001886, "config_test": true, ...
__author__ = 'jknair' from StringIO import StringIO from client import BoxClient import client import json import ntpath class BoxSyncClient: def __init__(self, oauth2_access_token): self._client = BoxClient(oauth2_access_token) self.folder_ids = {} def _get_parent_folder_id(self, path): ...
{ "repo_name": "allmyspace/allmyspace-client", "path": "space_providers/box/BoxSyncClient.py", "copies": "1", "size": "2405", "license": "mit", "hash": 7004843381405226000, "line_mean": 33.3571428571, "line_max": 112, "alpha_frac": 0.5920997921, "autogenerated": false, "ratio": 3.9621087314662273,...
__author__ = 'jkordish' # -*- coding: utf-8 -*- '''Compare the list of known ip/cve pairs and the ones pulled from cvedetails''' import csv import urllib2 from bs4 import BeautifulSoup old = tuple(csv.reader(open('data/old.csv', "rb"),dialect='excel')) new = tuple(csv.reader(open('data/new2.csv', "rb"),dialect='exc...
{ "repo_name": "jkordish/Python", "path": "CVE-compare.py", "copies": "1", "size": "1232", "license": "mit", "hash": 7621014072237954000, "line_mean": 29.8, "line_max": 95, "alpha_frac": 0.637987013, "autogenerated": false, "ratio": 2.9056603773584904, "config_test": false, "has_no_keywords": ...
__author__ = 'jkordish' # -*- coding: utf-8 -*- '''Experiment taking CVE data from MITRE and injecting it into a Riak cluster''' from lxml import etree import riak def main(): '''main''' mitre_xml_import() def mitre_xml_import(): '''Pull in the xml file from mitre containing all CVEs''' tree = etre...
{ "repo_name": "jkordish/Python", "path": "Mitre-CVE-XML-To-Riak.py", "copies": "1", "size": "1956", "license": "mit", "hash": 6559018173850729000, "line_mean": 26.1805555556, "line_max": 80, "alpha_frac": 0.5163599182, "autogenerated": false, "ratio": 3.4497354497354498, "config_test": false, ...
__author__ = 'jkordish' # -*- coding: utf-8 -*- '''Experiment taking CVE data from NVDCVE and injecting it into a Riak cluster Can't recall what this particular version of the script did - been a long time ''' from lxml import etree import os import riak import time def main(): start_time = time.time() parse_...
{ "repo_name": "jkordish/Python", "path": "nvdcve-xml-parser-new.py", "copies": "1", "size": "4816", "license": "mit", "hash": 3487599142043366400, "line_mean": 38.1544715447, "line_max": 130, "alpha_frac": 0.4647009967, "autogenerated": false, "ratio": 4.3, "config_test": false, "has_no_keywo...
__author__ = 'jkordish' # -*- coding: utf-8 -*- '''Experiment taking CVE data from NVDCVE and injecting it into a Riak cluster''' from lxml import etree import os import uuid import riak def main(): cve_get_cvss() # cve_get_refs() cve_get_version() def cve_get_cvss(): bucket='cve_cvss' for direct...
{ "repo_name": "jkordish/Python", "path": "nvdcve-XML-To-Riak.py", "copies": "1", "size": "4185", "license": "mit", "hash": -4453123988842329000, "line_mean": 33.0325203252, "line_max": 130, "alpha_frac": 0.5091995221, "autogenerated": false, "ratio": 3.8535911602209945, "config_test": false, ...
__author__ = 'jkruck' from flask import Flask, redirect, url_for, request, session,abort from strava import strava_utils Flask.get = lambda self, path: self.route(path, methods=['get']) Flask.put = lambda self, path: self.route(path, methods=['put']) Flask.post = lambda self, path: self.route(path, methods=['post']) F...
{ "repo_name": "krujos/strava-yoy", "path": "stravayoy.py", "copies": "1", "size": "1502", "license": "apache-2.0", "hash": 2466181122465811500, "line_mean": 32.3777777778, "line_max": 91, "alpha_frac": 0.6597869507, "autogenerated": false, "ratio": 3.315673289183223, "config_test": false, "ha...
__author__ = 'jkruck' import unittest from os import environ from mock import patch import flask #Setup the environment variables so the setup code executes. Seems like there should be a #way to mock with with patch, but I could not figure it out. environ['CLIENT_SECRET'] = 'secret' environ['CLIENT_ID'] = '12334' i...
{ "repo_name": "krujos/strava-yoy", "path": "test/test_app.py", "copies": "1", "size": "1588", "license": "apache-2.0", "hash": -9186471176995405000, "line_mean": 32.0833333333, "line_max": 117, "alpha_frac": 0.6366498741, "autogenerated": false, "ratio": 3.482456140350877, "config_test": true, ...
__author__ = 'jldaniel' from abc import ABCMeta from abc import abstractmethod from abc import abstractproperty class ModelBase(object): """ The optimization model abstract base class """ __metaclass__ = ABCMeta def __init__(self): """ Initialize the ModelBase. @return: N...
{ "repo_name": "jldaniel/Athena", "path": "AthenaOpt/model_base.py", "copies": "1", "size": "4278", "license": "mit", "hash": -15428631707869132, "line_mean": 23.5862068966, "line_max": 79, "alpha_frac": 0.579943899, "autogenerated": false, "ratio": 4.8668941979522184, "config_test": false, "h...
__author__ = 'jldaniel' from algorithm_base import AlgorithmBase from common import Individual from converger import Converger from history import History class Islands(AlgorithmBase): """ The Islands optimization algorithm. """ def __init__(self): """ Initialize the Islands algorithm...
{ "repo_name": "jldaniel/Athena", "path": "AthenaOpt/islands.py", "copies": "1", "size": "6334", "license": "mit", "hash": -733721720920086700, "line_mean": 34.9886363636, "line_max": 118, "alpha_frac": 0.568203347, "autogenerated": false, "ratio": 4.169848584595129, "config_test": false, "has...
__author__ = 'jldaniel' from common import Individual from json import dumps class History(object): """ The optimization run history. """ def __init__(self): """ Initialize the History. @return: None """ self._generations = [] def add_population(self, pop...
{ "repo_name": "jldaniel/Athena", "path": "AthenaOpt/history.py", "copies": "1", "size": "1190", "license": "mit", "hash": 2408701377584868000, "line_mean": 23.7916666667, "line_max": 92, "alpha_frac": 0.5949579832, "autogenerated": false, "ratio": 4.440298507462686, "config_test": false, "has...
__author__ = 'jldaniel' from sys import float_info from math import fabs from scipy.spatial.distance import euclidean # TODO (JLD): Compute difference in values for metrics # TODO (JLD): Include distance metric for decision space class Converger(object): """ Converger class that checks optimization run pr...
{ "repo_name": "jldaniel/Athena", "path": "AthenaOpt/converger.py", "copies": "1", "size": "10128", "license": "mit", "hash": -1152828291386859400, "line_mean": 34.914893617, "line_max": 119, "alpha_frac": 0.6250987362, "autogenerated": false, "ratio": 4.095430651031136, "config_test": false, ...
__author__ = 'jlegind' from urllib import parse, request import requests import json import collections import csv class SearchAPI(object): def __init__(self, url, read_path, write_path, suffix='', separator='\t'): """ :param url: JSON api url :param read_path: File that contains the sear...
{ "repo_name": "jlegind/GBIF-API-caller", "path": "searchAPI.py", "copies": "1", "size": "9454", "license": "cc0-1.0", "hash": -8881800756066462000, "line_mean": 41.2098214286, "line_max": 204, "alpha_frac": 0.5462238206, "autogenerated": false, "ratio": 3.7831132452981193, "config_test": false,...
__author__ = "J.L. Lanfranchi" __email__ = "jll1062@phys.psu.edu" __copyright__ = "Copyright 2014 J.L. Lanfranchi" __credits__ = ["J.L. Lanfranchi"] __license__ = """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": "jllanfranchi/pygeneric", "path": "author.py", "copies": "1", "size": "1192", "license": "mit", "hash": -8905888585386323000, "line_mean": 55.7619047619, "line_max": 78, "alpha_frac": 0.7768456376, "autogenerated": false, "ratio": 4.110344827586207, "config_test": false, "has_no...
__author__ = 'jludvice' # This is script for generating mapping between keyboard keycodes and symbols that should be printed. # It expects linux header file input.h and writes mapping as java properties file import re regex = re.compile('#define +KEY_(?P<key>\w+)[ \t]+(?P<code>\w+)') SOURCE_FILE_PATH = 'input.h' PRE...
{ "repo_name": "ludvicekj/keyboard-listener", "path": "key_mapping/mapping_generator.py", "copies": "1", "size": "1669", "license": "apache-2.0", "hash": 1545290450070855200, "line_mean": 38.7380952381, "line_max": 101, "alpha_frac": 0.5769922109, "autogenerated": false, "ratio": 3.725446428571428...
__author__ = 'jmartinez' __version__ = '1.0.2' import os import click import requests import requirements import shutil import subprocess import sys import tarfile import tempfile import zipfile from datetime import date from glob import glob as ls from jinja2 import Environment, FileSystemLoader from uuid import uui...
{ "repo_name": "ncode/spec-from-pypi", "path": "specfrompypi/__init__.py", "copies": "1", "size": "6993", "license": "apache-2.0", "hash": -756260713114412500, "line_mean": 31.9858490566, "line_max": 80, "alpha_frac": 0.5792935793, "autogenerated": false, "ratio": 3.9242424242424243, "config_tes...
import math class DescriptiveStatistics(object): def the_sum_of_scores_from_list(self, list_of_values): # SigmaX my_sum = sum(list_of_values) return my_sum def square_all_values_in_list(self, list_of_values): # X^2 squared_list = [X ** 2 for X in list_of_values] ...
{ "repo_name": "jmategk0/simpleStatistics", "path": "simpleStatistics.py", "copies": "1", "size": "15750", "license": "mit", "hash": 2352545865549315600, "line_mean": 43.7443181818, "line_max": 136, "alpha_frac": 0.6481269841, "autogenerated": false, "ratio": 3.723404255319149, "config_test": fa...
__author__ = 'jmatsen' import pandas as pd import seaborn as sns import aggregate_mummer_results import name_extractions import filter_aggregated_data import matplotlib.pyplot as plt import matplotlib as mpl def plot_identity_vs_len(filepath, save_path='./plots/'): """ Make a little scatter plot with a dot...
{ "repo_name": "JanetMatsen/meta4_bins_janalysis", "path": "compare_bins/support_files/plotting.py", "copies": "1", "size": "6174", "license": "bsd-2-clause", "hash": 3938784520679248400, "line_mean": 35.1052631579, "line_max": 82, "alpha_frac": 0.6086815679, "autogenerated": false, "ratio": 3.668...
__author__ = 'jmccrae' import unittest import sqlite3 import WNRDF class MyTestCase(unittest.TestCase): def test_synset(self): context = WNRDF.WNRDFContext("wordnet_3.1+.db") graph = WNRDF.synset(context, 100001740) print graph.serialize() assert(graph) def test_entry(self): ...
{ "repo_name": "jmccrae/wn-rdf", "path": "WNRDFTest.py", "copies": "1", "size": "1646", "license": "bsd-3-clause", "hash": -2280484318320305200, "line_mean": 28.3928571429, "line_max": 58, "alpha_frac": 0.6215066829, "autogenerated": false, "ratio": 3.4008264462809916, "config_test": true, "ha...
__author__ = 'jmeireles' from gi.repository import Gtk, Gdk from helper import Helper from browser import Browser from html import Html import os class Player: extra_links = [] def __init__(self): self.browser = Browser() self.html = Html() self.builder = Gtk.Builder() self....
{ "repo_name": "Faianca/Anime-Tv-shows-Scrapper", "path": "gui/player.py", "copies": "1", "size": "1723", "license": "apache-2.0", "hash": 8962775382850822000, "line_mean": 26.7903225806, "line_max": 88, "alpha_frac": 0.6210098665, "autogenerated": false, "ratio": 3.473790322580645, "config_test...
__author__ = 'jmeireles' from gi.repository import Gtk class Grid(): widget_list = [] WIDGET_SIZE = 100 COLS = 4 NUM = 100 grid = "" def __init__(self): grid = Gtk.Grid() grid.set_column_spacing(10) grid.set_row_spacing(10) grid.set_column_homogeneous(True) ...
{ "repo_name": "Faianca/Anime-Tv-shows-Scrapper", "path": "helpers/drawers.py", "copies": "1", "size": "1708", "license": "apache-2.0", "hash": -9197345798939844000, "line_mean": 22.7222222222, "line_max": 92, "alpha_frac": 0.5398126464, "autogenerated": false, "ratio": 3.492842535787321, "confi...
__author__ = 'jmeireles' import bs4 import requests import re import urllib import os class Href(): img = "" title = "" link = "" class Search(): domain = "http://www.animehere.com" href = [] def __init__(self): pass def search(self, keyword): self.href = [] ur...
{ "repo_name": "Faianca/Anime-Tv-shows-Scrapper", "path": "scrapper/search.py", "copies": "1", "size": "1056", "license": "apache-2.0", "hash": 1504789935937168600, "line_mean": 24.7804878049, "line_max": 100, "alpha_frac": 0.5075757576, "autogenerated": false, "ratio": 3.925650557620818, "confi...
__author__ = 'jmeireles' import os import requests from urllib import urlencode from urlparse import parse_qs, urlsplit, urlunsplit class Helper: codes = [ 200, 301, 302 ] @staticmethod def get_resource_path(rel_path): dir_of_py_file = os.path.dirname(__file__) ...
{ "repo_name": "Faianca/Anime-Tv-shows-Scrapper", "path": "gui/helper.py", "copies": "1", "size": "1178", "license": "apache-2.0", "hash": -8388999828388882000, "line_mean": 27.0714285714, "line_max": 85, "alpha_frac": 0.6281833616, "autogenerated": false, "ratio": 3.6134969325153374, "config_te...
__author__ = 'jmeireles' import re from fetcher import AbstractFetcher from urllib import unquote class Fetcher(AbstractFetcher): rootApi = "/api/player.api.php" keys = { "domain": "undefined", "file": "undefined", "filekey": "undefined", "cid": "undefined", } def fet...
{ "repo_name": "Faianca/video-spider", "path": "videospider/domains/videoweed.py", "copies": "1", "size": "1256", "license": "mit", "hash": 3932377586990110000, "line_mean": 26.9111111111, "line_max": 98, "alpha_frac": 0.527866242, "autogenerated": false, "ratio": 3.6091954022988504, "config_tes...
__author__ = 'jmeireles' import string from helper import Helper class Html: def __init__(self): self.html_page = "/home/jmeireles/Anime-Tv-shows-Scrapper/server/public/index.html"#Helper.get_resource_path("test.html") self.html = string.Template(''' <!DOCTYPE HTML> <html> <head> <tit...
{ "repo_name": "Faianca/Anime-Tv-shows-Scrapper", "path": "gui/html.py", "copies": "1", "size": "1647", "license": "apache-2.0", "hash": -5687234213242118000, "line_mean": 30.6923076923, "line_max": 137, "alpha_frac": 0.6187006679, "autogenerated": false, "ratio": 3.2294117647058824, "config_tes...
__author__ = 'jmeireles' from gi.repository import WebKit class Browser(): def __init__(self): self.browser = WebKit.WebView() self.browser.connect("load-finished", self.load_finished) browser_settings = WebKit.WebSettings() test = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X;...
{ "repo_name": "Faianca/Anime-Tv-shows-Scrapper", "path": "gui/browser.py", "copies": "1", "size": "1470", "license": "apache-2.0", "hash": 2169432130302117600, "line_mean": 38.7567567568, "line_max": 159, "alpha_frac": 0.6544217687, "autogenerated": false, "ratio": 3.168103448275862, "config_te...
__author__ = 'jmeireles' import bs4 import requests import re import urllib import os from gui.helper import Helper import json from tld import get_tld from series import Series from episode import Episode class Scrapper(): valid_extensions = ['.mp4', '.flv'] def __init__(self): self.title = "" ...
{ "repo_name": "Faianca/Anime-Tv-shows-Scrapper", "path": "scrapper/scrapper.py", "copies": "1", "size": "2305", "license": "apache-2.0", "hash": -5431757400775776000, "line_mean": 25.1931818182, "line_max": 117, "alpha_frac": 0.5739696312, "autogenerated": false, "ratio": 3.7297734627831716, "c...
__author__ = 'jmeline' from .. import serviceBase # from ...ODM2.models import * from ODM2PythonAPI.src.api.ODM2 import models # ################################################################################ # Annotations # ################################################################################ def conver...
{ "repo_name": "Castronova/ODM2PythonAPI", "path": "src/api/ODM2/services/deleteService.py", "copies": "1", "size": "6567", "license": "bsd-3-clause", "hash": 5940551970214300000, "line_mean": 28.1866666667, "line_max": 119, "alpha_frac": 0.3899802041, "autogenerated": false, "ratio": 5.5184873949...
__author__ = 'jmeline' from matplotlib.mlab import griddata import numpy as np import pandas as pd import matplotlib.pyplot as plt try: import flickrapi except ImportError as e: print(e) from geodata.JsonConfigHandler import JsonConfigHandler from common.termcolor import colored apikey = None secret = None...
{ "repo_name": "jmeline/geodata-mapper", "path": "example2.py", "copies": "1", "size": "1562", "license": "mit", "hash": 4694383630857697000, "line_mean": 24.6229508197, "line_max": 88, "alpha_frac": 0.6421254802, "autogenerated": false, "ratio": 3.227272727272727, "config_test": false, "has_n...
__author__ = 'jmeline' from sqlalchemy import func import pandas as pd from ...ODM2.models import * from .. import serviceBase from ODM2PythonAPI.src.api.ODM2 import models class ReadODM2( serviceBase ): ''' def __init__(self, session): self._session = session ''' # ###########################...
{ "repo_name": "Castronova/ODM2PythonAPI", "path": "src/api/ODM2/services/readService.py", "copies": "1", "size": "21883", "license": "bsd-3-clause", "hash": -54760110941138120, "line_mean": 27.7555847569, "line_max": 137, "alpha_frac": 0.5334734726, "autogenerated": false, "ratio": 4.890055865921...
__author__ = 'jm' import matplotlib as mp print "Testing my hello Wordl" #x = 15 #x = x +52 #print x #name = raw_input("Enter your name") #print "Hello " + name ## This first line is provided for you #hrs = raw_input("Enter Hours:") #rph = raw_input("Enter rate:") #fhrs = float(hrs) #frph = float(rph) #pay = fh...
{ "repo_name": "snajperro/R", "path": "Python-ProgEvOne/main.py", "copies": "4", "size": "2905", "license": "mit", "hash": 1535634059158205000, "line_mean": 23.4201680672, "line_max": 97, "alpha_frac": 0.613080895, "autogenerated": false, "ratio": 3.0355276907001043, "config_test": false, "has...
__author__ = 'jmoffitt' import requests import threading #needed for any streaming HTTP connection import json #TODO: header details (differences in GET/POST/DELETE/STREAM) ''' A generic class for POSTing requests to Gnip APIs. These include adding/deleting Rules, submitting Historical jobs, etc. ''' class pt...
{ "repo_name": "jimmoffitt/pyPowerTrack", "path": "ptHTTP.py", "copies": "1", "size": "3127", "license": "mit", "hash": 7261179202286483000, "line_mean": 27.1711711712, "line_max": 100, "alpha_frac": 0.6024944036, "autogenerated": false, "ratio": 3.7720144752714115, "config_test": false, "has_...
__author__ = 'jmoffitt' #TODO: add error handling. #TODO: return success/error flags. #TODO: add 'verbose' switch.... add logging? import json class Rules: MAX_API_BATCH = 5000 def __init__(self): #print "Creating Rules object..." pass ''' Determine the number of necessary req...
{ "repo_name": "jimmoffitt/pyPowerTrack", "path": "ptRules.py", "copies": "1", "size": "5407", "license": "mit", "hash": 3107542202227181000, "line_mean": 38.4744525547, "line_max": 119, "alpha_frac": 0.5663029406, "autogenerated": false, "ratio": 4.332532051282051, "config_test": false, "has_...
__author__ = 'jmoran' from Asteroids import MovingObject from Asteroids.Colors import * from random import getrandbits, randint from math import sin, cos, radians class Asteroid(MovingObject): def __init__(self, window, game, init_point, size): slope = (1 if getrandbits(1) else -1, 1 if getrandbits(1) el...
{ "repo_name": "waddedMeat/asteroids-ish", "path": "Asteroids/Asteroid.py", "copies": "1", "size": "1971", "license": "mit", "hash": 7075534629843141000, "line_mean": 35.5, "line_max": 93, "alpha_frac": 0.5449010654, "autogenerated": false, "ratio": 3.1435406698564594, "config_test": false, "h...
__author__ = 'jmoran' from Asteroids import MovingObject from Asteroids.Colors import * class Bullet(MovingObject): def __init__(self, window, game, init_point, slope): MovingObject.__init__(self, window, game, init_point, slope) self.frames = 0 def draw(self): if self.frames % 2 == ...
{ "repo_name": "waddedMeat/asteroids-ish", "path": "Asteroids/Bullet.py", "copies": "1", "size": "1362", "license": "mit", "hash": -1614798689031367200, "line_mean": 37.9142857143, "line_max": 80, "alpha_frac": 0.5587371512, "autogenerated": false, "ratio": 2.7023809523809526, "config_test": fal...
__author__ = 'jmoran' from Asteroids import Object, Asteroid from random import randint class AsteroidBelt(Object): def __init__(self, window, game, count): Object.__init__(self, window, game) self.asteroids = [] for i in range(0, count): init_point = (randint(0, self.wWidth),...
{ "repo_name": "waddedMeat/asteroids-ish", "path": "Asteroids/AsteroidBelt.py", "copies": "1", "size": "1028", "license": "mit", "hash": 4394836001021137000, "line_mean": 28.4, "line_max": 83, "alpha_frac": 0.5758754864, "autogenerated": false, "ratio": 3.4266666666666667, "config_test": false, ...
__author__ = 'jmoran' import pygame import sys from pygame.locals import * from Asteroids import * pygame.init() screen = pygame.display.set_mode((800, 600)) pygame.display.set_caption("Asteroids(ish)") pygame.key.set_repeat(30, 30) clock = pygame.time.Clock() ship = Ship(screen, pygame) bullet = None level = ...
{ "repo_name": "waddedMeat/asteroids-ish", "path": "main.py", "copies": "1", "size": "1405", "license": "mit", "hash": 9216613648065867000, "line_mean": 22.4166666667, "line_max": 75, "alpha_frac": 0.5551601423, "autogenerated": false, "ratio": 3.393719806763285, "config_test": false, "has_no_...
__author__ = 'jnelson' from thriftapi.shared.ttypes import Type from thriftapi.data.ttypes import TObject from types import * import struct import inspect def python_to_thrift(value): """ Serialize a value to its thrift representation. :param value: :return: the TObject representation """ if i...
{ "repo_name": "savanibharat/concourse", "path": "concourse-driver-python/concourse/utils.py", "copies": "7", "size": "4626", "license": "apache-2.0", "hash": -4275133207957916000, "line_mean": 32.7737226277, "line_max": 137, "alpha_frac": 0.6037613489, "autogenerated": false, "ratio": 3.569444444...
__author__ = 'jnelson' from thriftapi.shared.ttypes import Type from thriftapi.data.ttypes import TObject from types import * import struct import parsedatetime from time import mktime cal = parsedatetime.Calendar() def python_to_thrift(value): """ Serialize a value to its thrift representation. :param v...
{ "repo_name": "MattiasZurkovic/concourse", "path": "concourse-driver-python/concourse/utils.py", "copies": "2", "size": "2762", "license": "apache-2.0", "hash": 5854282097359818000, "line_mean": 28.3936170213, "line_max": 87, "alpha_frac": 0.6053584359, "autogenerated": false, "ratio": 3.76294277...
__author__ = 'jnelson' class Tag: """ A Tag is a String data type that does not get full-text indexed. Each Tag is equivalent to its String counterpart. Tags merely exist for the client to instruct Concourse not to full text index the data. Tags are stored as Strings within Concourse. And any val...
{ "repo_name": "MattiasZurkovic/concourse", "path": "concourse-driver-python/concourse/types.py", "copies": "2", "size": "1409", "license": "apache-2.0", "hash": -6768827133683281000, "line_mean": 25.0925925926, "line_max": 81, "alpha_frac": 0.6089425124, "autogenerated": false, "ratio": 4.2312312...
__author__ = 'j' # execfile("c:\\myfiles\\PCBM_SVA_1.py") # there are a few objects which are automatically visible in WxDiff Python scripts: # wx: module WxPython - so you can create Messages with wx.MessageBox('Hello there.'. 'Greeting') # wxdiff_api: this is the api exposed by the WxDiff program - all the good stu...
{ "repo_name": "PalmDr/XRD-Data-Analysis-Toolkit", "path": "Beta1.4/SQ_Pilatus.py", "copies": "1", "size": "2322", "license": "apache-2.0", "hash": 3775692105912675300, "line_mean": 46.4081632653, "line_max": 170, "alpha_frac": 0.6274763135, "autogenerated": false, "ratio": 3.3410071942446042, "...
__author__ = 'j' from tkinter import ttk from tkinter import * from TreeView import * def buildFrame(root): sub_1 = Frame(root) sub_1.pack(side=LEFT,anchor = 'w', fill='both', expand=True) sub_1_1 = Frame(sub_1) sub_1_1.pack(side=TOP, anchor='n',fill='both',expand=True) sub_1_2 = Frame(sub_1) ...
{ "repo_name": "PalmDr/XRD-Data-Analysis-Toolkit", "path": "Beta1.3/Builder.py", "copies": "1", "size": "2100", "license": "apache-2.0", "hash": 135369824063685820, "line_mean": 30.8333333333, "line_max": 91, "alpha_frac": 0.6519047619, "autogenerated": false, "ratio": 2.5925925925925926, "confi...
__author__ = 'J' import math import matplotlib.pyplot as plt def plot_squashing_functions(lin, neg_lin, log, neg_log, exp, neg_exp): x = [i*0.02 for i in range(-25, 75)] plt_y_min = -0.1 plt_y_max = 1.1 if lin: linear = [0 for i in x[:26]] [linear.append(i) for i in x[26:76]] ...
{ "repo_name": "dynamics-team/requirements-editor", "path": "sandbox/jklingler/scripts/make_plots.py", "copies": "1", "size": "3813", "license": "mit", "hash": 3151724139596540400, "line_mean": 34.6355140187, "line_max": 107, "alpha_frac": 0.5323891949, "autogenerated": false, "ratio": 2.820266272...
__author__ = 'j' import os from tkinter import * from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from Builder import * from TreeView import * from ConvertCSV import * from SQ_Pilatus import * class DataAnalysis(): def __init__(self)...
{ "repo_name": "PalmDr/XRD-Data-Analysis-Toolkit", "path": "Beta1.4/DataAnalysisClass.py", "copies": "1", "size": "4047", "license": "apache-2.0", "hash": 8234360858568452000, "line_mean": 33.8965517241, "line_max": 120, "alpha_frac": 0.6071163825, "autogenerated": false, "ratio": 3.39798488664987...
__author__ = 'joan.aguilar' from scapy.all import * from threading import Thread, Event import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up Scapy import random import sys import optparse class TimedFunct(Thread): def __init__(self, interval, function, repetitions=0, args=[], kwar...
{ "repo_name": "jag34/pydhcpc", "path": "dhcpc.py", "copies": "1", "size": "6716", "license": "bsd-3-clause", "hash": 1238540508517006800, "line_mean": 32.9191919192, "line_max": 118, "alpha_frac": 0.53871352, "autogenerated": false, "ratio": 3.8137421919363996, "config_test": false, "has_no_k...
from struct import Struct from collections import namedtuple from math import modf from datetime import datetime from os import SEEK_END import numpy as np from ...utils import warn def _read_teeg(f, teeg_offset): """ Read TEEG structure from an open CNT file. # from TEEG structure in http://paulbourk...
{ "repo_name": "olafhauk/mne-python", "path": "mne/io/cnt/_utils.py", "copies": "14", "size": "4901", "license": "bsd-3-clause", "hash": 8121528650666984000, "line_mean": 33.514084507, "line_max": 79, "alpha_frac": 0.5860028566, "autogenerated": false, "ratio": 3.721336370539104, "config_test": ...
from struct import Struct from collections import namedtuple from math import modf from datetime import datetime from ...utils import warn def _read_teeg(f, teeg_offset): """ Read TEEG structure from an open CNT file. # from TEEG structure in http://paulbourke.net/dataformats/eeg/ typedef struct { ...
{ "repo_name": "adykstra/mne-python", "path": "mne/io/cnt/_utils.py", "copies": "2", "size": "3329", "license": "bsd-3-clause", "hash": 2532147956077407000, "line_mean": 34.0421052632, "line_max": 79, "alpha_frac": 0.5743466506, "autogenerated": false, "ratio": 3.8574739281575896, "config_test":...
import numpy as np import os.path as op from io import BytesIO from ...annotations import Annotations from .res4 import _read_res4 from .info import _convert_time def _get_markers(fname): def consume(fid, predicate): # just a consumer to move around conveniently while(predicate(fid.readline())): ...
{ "repo_name": "rkmaddox/mne-python", "path": "mne/io/ctf/markers.py", "copies": "14", "size": "2886", "license": "bsd-3-clause", "hash": -6199053985705706000, "line_mean": 34.1951219512, "line_max": 79, "alpha_frac": 0.6077616078, "autogenerated": false, "ratio": 3.7431906614785992, "config_tes...
__author__ = "joanne cohn" __email__ = "jcohn@berkeley.edu" __version__= "1.0" def overview(): """ plots a simulated data set B-band luminsoity function (histogram) along with that in Beare et al (points) FILES NEEDED (3 including this one): import this file to run commands have file "Beare_15.txt" (in same dir...
{ "repo_name": "jdcphysics/validation", "path": "codes/Bband/BOOTES_lf.py", "copies": "2", "size": "8225", "license": "mit", "hash": 8960173083828847000, "line_mean": 31.7689243028, "line_max": 168, "alpha_frac": 0.6280851064, "autogenerated": false, "ratio": 2.5695095282724147, "config_test": f...
__author__ = "joanne cohn" __email__ = "jcohn@berkeley.edu" __version__= "1.1" def overview(): """ plots a simulated data set stellar mass function (histogram) along with that in Moustakas et al, 2013 (points plus error bars) for z<0.2, this is SDSS-GALEX data, for z>0.2 it is PRIMUS data FILES NEEDED (5 includin...
{ "repo_name": "joannedafna/validation", "path": "codes/StellarMass/PRIMUS_stellar.py", "copies": "2", "size": "12684", "license": "mit", "hash": -3976855069828594000, "line_mean": 42.7379310345, "line_max": 280, "alpha_frac": 0.6224377168, "autogenerated": false, "ratio": 2.343680709534368, "co...
__author__ = "joanne cohn" __email__ = "jcohn@berkeley.edu" __version__= "1.1" #updated BWC M*(Mh) from newer version of paper import numpy as N import matplotlib.pyplot as plt import matplotlib import matplotlib.cm as cm import matplotlib.mlab as mlab def comments(): """ Please do email me if you...
{ "repo_name": "joannedafna/validation", "path": "codes/vsuite/valid_suite.py", "copies": "2", "size": "59806", "license": "mit", "hash": -4876100090465493000, "line_mean": 40.4730113636, "line_max": 266, "alpha_frac": 0.5959165245, "autogenerated": false, "ratio": 2.497786316932587, "config_tes...
__author__ = 'Joao Goncalves' import os import re import math from numpy import array LOG_CPU_NAME = "velox_cpu_log" LOG_MEM_NAME = "velox_mem_log" # Where the log files can be found DIR_PRE = "/home/user/log_files/" # Subdirectories, in case you produced several measurements DIR = ["m1", "m2", "m3"] last_cpu_value ...
{ "repo_name": "OneSourceConsult/JavaProfiling-tool", "path": "LoggerParser/lp_sys.py", "copies": "1", "size": "5043", "license": "apache-2.0", "hash": -7162776935940551000, "line_mean": 31.5419354839, "line_max": 147, "alpha_frac": 0.570890343, "autogenerated": false, "ratio": 3.412043301759134, ...
__author__ = 'Joao Goncalves' import re import os import sys import math class Measurement: pass LOG_NAME = "log" # Where the log files can be found DIR_PRE = "/home/user/log_files/" # Subdirectories, in case you produced several measurements DIR = ["m1", "m2", "m3"] # Another branch of subdirectories inside wh...
{ "repo_name": "OneSourceConsult/JavaProfiling-tool", "path": "LoggerParser/lp.py", "copies": "1", "size": "7773", "license": "apache-2.0", "hash": -3642291735995741000, "line_mean": 30.096, "line_max": 178, "alpha_frac": 0.525923067, "autogenerated": false, "ratio": 3.731637061929909, "config_t...
__author__ = 'Jody Shumaker' from ctypes import * import win32con import win32gui import win32api import time import logging # noinspection PyPep8Naming class _point_t(Structure): _fields_ = [ ('x', c_long), ('y', c_long), ] class Mouse: @staticmethod def get_position(): p...
{ "repo_name": "jshumaker/LoA", "path": "utility/mouse.py", "copies": "1", "size": "2107", "license": "mit", "hash": 791416374235266600, "line_mean": 27.4864864865, "line_max": 66, "alpha_frac": 0.5923113431, "autogenerated": false, "ratio": 3.4597701149425286, "config_test": false, "has_no_ke...
__author__ = 'Jody Shumaker' from utility.mouse import * from utility.screen import * from utility.logconfig import * import argparse import os.path from loa import * script_dir = os.path.dirname(os.path.realpath(__file__)) parser = argparse.ArgumentParser(description='Automatically join world boss.', formatter_clas...
{ "repo_name": "jshumaker/LoA", "path": "worldboss.py", "copies": "1", "size": "5491", "license": "mit", "hash": -4977863175756313000, "line_mean": 33.7594936709, "line_max": 134, "alpha_frac": 0.6317610636, "autogenerated": false, "ratio": 3.3118214716525936, "config_test": false, "has_no_key...
__author__ = 'Jody Shumaker' import itertools import copy import sys import logging import time import random from multiprocessing import Pool, cpu_count import signal from utility.logconfig import * from PIL import ImageGrab from utility.mouse import * from utility.screen import * # Adjustment factor for each leve...
{ "repo_name": "jshumaker/LoA", "path": "grid.py", "copies": "1", "size": "25224", "license": "mit", "hash": -8047542252418626000, "line_mean": 36.8753753754, "line_max": 120, "alpha_frac": 0.5227164605, "autogenerated": false, "ratio": 3.896802101035069, "config_test": false, "has_no_keywords...
__author__ = 'Jody Shumaker' import logging import os import os.path import glob import datetime VERBOSE = 15 logging.addLevelName(VERBOSE, "VERBOSE") def logconfig(name, loglevel): logger = logging.getLogger('') logger.setLevel(loglevel) # Rotate logs and create new filename. if not os.path.exist...
{ "repo_name": "jshumaker/LoA", "path": "utility/logconfig.py", "copies": "1", "size": "1286", "license": "mit", "hash": 281179944354440740, "line_mean": 29.6428571429, "line_max": 116, "alpha_frac": 0.666407465, "autogenerated": false, "ratio": 3.6123595505617976, "config_test": false, "has_n...
__author__ = 'Jody Shumaker' import math import sys import logging import win32gui import win32con import win32ui import win32com.client from ctypes import * from PIL import ImageGrab, Image import time class Color: def __init__(self, r, g, b, a=0): self.r = r self.g = g self.b = b ...
{ "repo_name": "jshumaker/LoA", "path": "utility/screen.py", "copies": "1", "size": "11776", "license": "mit", "hash": -8526014965426437000, "line_mean": 35.803125, "line_max": 119, "alpha_frac": 0.5824558424, "autogenerated": false, "ratio": 3.5183746638780997, "config_test": false, "has_no_k...
__author__ = 'Jody Shumaker' import sys import glob import argparse import os.path from utility.mouse import * from utility.screen import * from utility.logconfig import * from PIL import ImageGrab, Image import logging import functools import math import operator import time # Level card positions. Positions are at ...
{ "repo_name": "jshumaker/LoA", "path": "tarot.py", "copies": "1", "size": "30804", "license": "mit", "hash": 8272526135568673000, "line_mean": 44.9076005961, "line_max": 132, "alpha_frac": 0.5148357356, "autogenerated": false, "ratio": 3.61931617906239, "config_test": false, "has_no_keywords"...
__author__ = 'joede' import paramiko import time # Perform common tasks for the whole pi farm # TODO clean up the cut and paste code and wrap the client creation into a single proc pilist = ['10.30.33.8', '10.30.33.9', '10.30.33.4','10.30.33.13', '10.30.32.245', '10.30.32.251', '10.30.32.249', '10.30.32.250'...
{ "repo_name": "joedeller/pymine", "path": "PiSSH-utility.py", "copies": "1", "size": "3828", "license": "mit", "hash": 1958465918207605800, "line_mean": 24.0196078431, "line_max": 97, "alpha_frac": 0.6361024033, "autogenerated": false, "ratio": 3.2141057934508814, "config_test": false, "has_n...
__author__ = 'JoeJoe' def b2i(byte_input): return int.from_bytes(byte_input, byteorder='little') def get_msg_length(byte_input): rtn = 0 for i in range(len(byte_input)): rtn |= (byte_input[i] & 0x7F) << (i * 7) return rtn def get_length_length(unzipped_data, pos): rtn = 1 while unzi...
{ "repo_name": "gaetjen/Blendorf", "path": "code/indie_scripts/helpers_ind.py", "copies": "1", "size": "2072", "license": "mit", "hash": 6918583555846460000, "line_mean": 33.55, "line_max": 91, "alpha_frac": 0.6095559846, "autogenerated": false, "ratio": 2.5485854858548587, "config_test": false,...
__author__ = 'JoeJoe' from enum import IntEnum class TerrainType(IntEnum): EMPTY = 0 FLOOR = 1 BOULDER = 2 PEBBLES = 3 WALL = 4 FORTIFICATION = 5 STAIR_UP = 6 STAIR_DOWN = 7 STAIR_UPDOWN = 8 RAMP = 9 RAMP_TOP = 10 BROOK_B...
{ "repo_name": "gaetjen/Blendorf", "path": "code/Terrain.py", "copies": "1", "size": "2447", "license": "mit", "hash": 5432661204490039000, "line_mean": 31.1973684211, "line_max": 96, "alpha_frac": 0.5472006539, "autogenerated": false, "ratio": 3.758832565284178, "config_test": false, "has_no_...
__author__ = 'JoeJoe' from Terrain import Terrain, TerrainType import bpy import bmesh import math from mathutils import Matrix from Direction import Direction import random from helpers import BROOK_DEPTH, TILE_HEIGHT, TILE_WIDTH from Ramp import Ramp, ConnectionType # TODO: maybe take care of ceilings near ramps #...
{ "repo_name": "gaetjen/Blendorf", "path": "code/BmeshFactory.py", "copies": "1", "size": "19991", "license": "mit", "hash": 5317393892571021000, "line_mean": 49.1027568922, "line_max": 130, "alpha_frac": 0.5920664299, "autogenerated": false, "ratio": 3.5207819654808032, "config_test": false, ...
__author__ = 'JoeJoe' import proto.Block_pb2 as Block_pb2 import proto.Map_pb2 as Map_pb2 import proto.Material_pb2 as Material_pb2 import proto.Plant_pb2 as Plant_pb2 import proto.Tile_pb2 as Tile_pb2 from Tile import Tile from Terrain import TerrainType from Terrain import Terrain import zlib import bpy import bmesh...
{ "repo_name": "gaetjen/Blendorf", "path": "code/obsolete/script_main.py", "copies": "1", "size": "9089", "license": "mit", "hash": 5131304472590175000, "line_mean": 33.0449438202, "line_max": 123, "alpha_frac": 0.5575970954, "autogenerated": false, "ratio": 3.1746419839329376, "config_test": fa...
__author__ = 'JoeJoe' import proto.Tile_pb2 from Terrain import Terrain, TerrainType import bpy import bmesh import math from mathutils import Matrix from BmeshFactory import BmeshFactory from Direction import Direction class Tile: """A class that contains information on a specific Tile in the map Attributes...
{ "repo_name": "gaetjen/Blendorf", "path": "code/Tile.py", "copies": "1", "size": "3627", "license": "mit", "hash": 2185819444210814000, "line_mean": 35.28, "line_max": 116, "alpha_frac": 0.6010476978, "autogenerated": false, "ratio": 3.805876180482686, "config_test": false, "has_no_keywords":...
__author__ = 'JoeJoe' import zlib import time import proto.Block_pb2 as Block_pb2 import proto.Map_pb2 as Map_pb2 from Tile import Tile from Terrain import TerrainType import bpy import bmesh from mathutils import Vector from helpers import b2i, get_msg_length, get_length_length from helpers import BROOK_DEPTH, TILE_...
{ "repo_name": "gaetjen/Blendorf", "path": "code/script_from_pydata.py", "copies": "1", "size": "6074", "license": "mit", "hash": 7698793159778217000, "line_mean": 28.0669856459, "line_max": 107, "alpha_frac": 0.6279222917, "autogenerated": false, "ratio": 3.0354822588705646, "config_test": fals...
__author__ = 'JoeJoe' #small script to automatically generate all the materials import zlib import time import proto.Block_pb2 as Block_pb2 import proto.Map_pb2 as Map_pb2 from Tile import Tile from Terrain import TerrainType import bpy import bmesh from mathutils import Vector from helpers import b2i, get_msg_length...
{ "repo_name": "gaetjen/Blendorf", "path": "code/matgen_script.py", "copies": "1", "size": "1686", "license": "mit", "hash": 5984832169177586000, "line_mean": 24.5454545455, "line_max": 63, "alpha_frac": 0.71886121, "autogenerated": false, "ratio": 2.8771331058020477, "config_test": false, "ha...
__author__ = 'joe krall' class Requirement(object): def __init__(self, c, v): #cost of the task self.cost = c #value of the task (priority) self.value = v #if the task is done or not self.done = False #if the task is visible (invisible tasks technically h...
{ "repo_name": "ase16-ta/performance", "path": "pom3/pom3_requirements_tree.py", "copies": "4", "size": "3067", "license": "mit", "hash": -7948599589387369000, "line_mean": 28.219047619, "line_max": 164, "alpha_frac": 0.5092924682, "autogenerated": false, "ratio": 3.7402439024390244, "config_tes...