text
stringlengths
0
1.05M
meta
dict
__author__ = 'lloy3317' import re import pprint pp = pprint.PrettyPrinter(indent=4) fileToRead = "./library-before/3.9custom/esri/css/esri.css" saveToFile = "extract-urls-from-css.txt" itemsArr = [] try: with open(fileToRead, 'rb') as data: fileContent = "" for line in data: fileC...
{ "repo_name": "lheberlie/grunt-optimizer-cleanup", "path": "extract-urls.py", "copies": "1", "size": "1068", "license": "apache-2.0", "hash": 4365547295857204000, "line_mean": 23.2954545455, "line_max": 72, "alpha_frac": 0.6039325843, "autogenerated": false, "ratio": 3.4563106796116503, "config...
__author__ = 'lloy3317' import re, string apiDirectoryName = "3.9custom" #removeURL = "http://js.arcgis.com/3.9compact/" removeURL = "http://heb.esri.com/js/playground-js/esrijs-playground/reduce-optimizer-sample/" fileToRead = "app-traffic.har" fileToSave = "api-files-to-keep.txt" urlItems = [] try: with ope...
{ "repo_name": "lheberlie/grunt-optimizer-cleanup", "path": "parse_urls_from_har.py", "copies": "1", "size": "2106", "license": "apache-2.0", "hash": -4893123727009128000, "line_mean": 32.9838709677, "line_max": 110, "alpha_frac": 0.5788224122, "autogenerated": false, "ratio": 3.551433389544688, ...
'''@author: lockrecv@gmail.com''' import json from src.domain.Server import Server class PowerOn: '''Power On Configuration Utility''' def __init__(self, cfile): self.system_email = None self.system_cc = [] self.monitor_servers = [] self.load(cfile) def load(self, cfile):...
{ "repo_name": "ylcrow/poweron", "path": "src/util/PowerOn.py", "copies": "1", "size": "1024", "license": "mit", "hash": 956048694717747500, "line_mean": 26.7027027027, "line_max": 80, "alpha_frac": 0.55859375, "autogenerated": false, "ratio": 4.031496062992126, "config_test": false, "has_no_k...
__author__ = 'loliveira' from flask import g, jsonify from flask_restful import Resource from app import db from conf.auth import auth from app.resources import parser from app.models.UserModel import Task from datetime import date class TaskResource(Resource): @staticmethod @auth.login_required def ge...
{ "repo_name": "processos-2015-1/api", "path": "app/resources/task_resource.py", "copies": "1", "size": "4201", "license": "mit", "hash": -2022878918279510500, "line_mean": 30.3507462687, "line_max": 217, "alpha_frac": 0.5872411331, "autogenerated": false, "ratio": 4.039423076923077, "config_tes...
'''Author Lolmattylol Creation date 08/09/2017 Verion No 1.01 Contact info reddit:lolmattylol if you modify this for the better, please consider sharing with the community over at reddit.com/r/prisonarchitect Version No Date of Change Author Change 1.00 08/09/2017 ...
{ "repo_name": "lolmattylol/DeathRowPrison", "path": "DeathRowGUI.py", "copies": "1", "size": "2608", "license": "mit", "hash": -754029234337433500, "line_mean": 39.3968253968, "line_max": 351, "alpha_frac": 0.6211656442, "autogenerated": false, "ratio": 3.2118226600985222, "config_test": false,...
__author__ = 'lolo' """ Django settings for taskbuster project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/setti...
{ "repo_name": "jeuvreyl/taskbuster", "path": "taskbuster/settings/base.py", "copies": "1", "size": "3365", "license": "mit", "hash": -6114638933714500000, "line_mean": 24.6946564885, "line_max": 71, "alpha_frac": 0.6808320951, "autogenerated": false, "ratio": 3.5835995740149094, "config_test": ...
__author__ = "longboardtard" __email__ = "ltjbour at gmail.com" __copyright__ = "The MIT License (MIT)" __copyright_link__ = "http://opensource.org/licenses/MIT" from os.path import split, join, exists from os import mkdir class PurgeIRCLog(object): """This class allows you to remove certain lines from IRC logs...
{ "repo_name": "longboardtard/PurgeIRCLog", "path": "purgeirclog.py", "copies": "1", "size": "3510", "license": "mit", "hash": 5405957077437158000, "line_mean": 34.1, "line_max": 91, "alpha_frac": 0.6116809117, "autogenerated": false, "ratio": 4.228915662650603, "config_test": false, "has_no_k...
__author__ = "Loran425" class Node(object): def __init__(self, value, left=None, right=None): self.value = value self.left = left self.right = right def reverse(self, recursive=False): temp = self.left self.left = self.right self.right = temp if recursi...
{ "repo_name": "DakRomo/2017Challenges", "path": "challenge_4/python/Loran425/src/main.py", "copies": "5", "size": "1641", "license": "mit", "hash": -8306574628099491000, "line_mean": 29.3888888889, "line_max": 77, "alpha_frac": 0.578305911, "autogenerated": false, "ratio": 3.3421588594704685, "...
__author__ = 'lorcan' import string, httplib2 # Variables to hold file URLs SPEECH_URL = "http://mf2.dit.ie/gettysburg.txt" STOPWORDS_URL = "http://mf2.dit.ie/stopwords.txt" def makeWordList(gFile, stopWords): """Create a list of words from the file while excluding stop words.""" speech = [] # list of spee...
{ "repo_name": "Eurus90/arch-configs-programming", "path": "gettysburg/gettysburg.py", "copies": "1", "size": "3228", "license": "mit", "hash": 8501945330083896000, "line_mean": 38.3780487805, "line_max": 120, "alpha_frac": 0.6381660471, "autogenerated": false, "ratio": 4.175937904269081, "confi...
__author__ = 'lorcan' # get int from user # get a base from user to convert int to # get BASE_X string # convert BASE_X string back to integer # get int from user myStr = input("Enter an integer to convert binary: ") myInt = int(myStr) # get a base from user to convert int to baseStr = input("\nChoose Base 2,8,16 t...
{ "repo_name": "Eurus90/arch-configs-programming", "path": "Integer_Binary_conversion/integer_binary_conversion.py", "copies": "1", "size": "1288", "license": "mit", "hash": -1022023615629452400, "line_mean": 22.8518518519, "line_max": 55, "alpha_frac": 0.5760869565, "autogenerated": false, "ratio...
__author__ = 'lorenzo' from flankers.tagmeapi.tagMeService import TagMeService from flankers.tools import retrieve_json def find_related_concepts(text): """ Find related concept in taxonomy from a text :param text: a given abstract or title :return: a list of taxonomy keywords (see http://taxonomy.pr...
{ "repo_name": "mr-niels-christensen/rdfendpoints", "path": "flankers/textsemantics.py", "copies": "3", "size": "2503", "license": "apache-2.0", "hash": -1502121893421519400, "line_mean": 33.2876712329, "line_max": 111, "alpha_frac": 0.5960846984, "autogenerated": false, "ratio": 3.929356357927786...
__author__ = 'lorenzo' from pymongo import MongoClient from config.config import _CRAWLING_POST, _TEMP_SECRET def dump_articles(): connection = MongoClient('localhost', 27017) db = connection.PTEST_BACKUP results = db.crawling.find({}, {'_id': False}) """ { "_id" : ObjectId("54dd29...
{ "repo_name": "mr-niels-christensen/rdfendpoints", "path": "scripts/remote/uploadmongo.py", "copies": "3", "size": "1333", "license": "apache-2.0", "hash": -8516284729905603000, "line_mean": 30.023255814, "line_max": 114, "alpha_frac": 0.6166541635, "autogenerated": false, "ratio": 3.235436893203...
__author__ = 'lorenzo' import random import uuid from datagenerator.generator import generate_object class SubSystem(object): name = None def __init__(self, attrs): """ Factory for subsystems components :param attrs: a dictionary with the instance attributes """ for...
{ "repo_name": "Mec-iS/chronostriples-backup", "path": "scripts/factory.py", "copies": "3", "size": "6563", "license": "apache-2.0", "hash": 6567881947368565000, "line_mean": 31.1764705882, "line_max": 123, "alpha_frac": 0.5527959774, "autogenerated": false, "ratio": 4.0437461491065925, "config_...
__author__ = 'lorenzo' import webapp2 import json from flankers.errors import format_message from config.config import _HYDRA_VOCAB, _SERVICE _CONTENT_TYPE = 'application/ld+json' class HydraVocabulary(webapp2.RequestHandler): def get(self): """ publish the HYDRA ApiDocumentation vocabulary ...
{ "repo_name": "mr-niels-christensen/rdfendpoints", "path": "hydra/handlers.py", "copies": "3", "size": "5768", "license": "apache-2.0", "hash": -7147001760902149000, "line_mean": 44.0703125, "line_max": 161, "alpha_frac": 0.5806171983, "autogenerated": false, "ratio": 4.149640287769784, "config...
__author__ = 'Lothas' import sys import os # Get parent directory by joining this file's path [os.path.dirname(os.path.abspath(__file__))] with '..' [os.pardir] parentDir = os.path.abspath(os.path.dirname(os.path.abspath(__file__))+'\\'+os.pardir) sys.path.insert(0, parentDir) # Add the parent directory where 'vrep' ...
{ "repo_name": "lothas/vrep-python-ai", "path": "TEST-line-follower/RunTrial.py", "copies": "1", "size": "2990", "license": "mit", "hash": 304070548945291650, "line_mean": 32.2222222222, "line_max": 117, "alpha_frac": 0.6712374582, "autogenerated": false, "ratio": 2.786579683131407, "config_test...
__author__ = 'Lothilius' # coding: utf-8 from sqlalchemy import BigInteger, Column, Date, DateTime, Enum, Float, Index, Integer, Numeric, SmallInteger, String, Text, VARBINARY, text from sqlalchemy.ext.declarative import declarative_base from datetime import datetime, timedelta Base = declarative_base() metadata = Ba...
{ "repo_name": "Lothilius/oiPy", "path": "Pyoi.py", "copies": "1", "size": "44528", "license": "mit", "hash": -1676867831684835600, "line_mean": 42.484375, "line_max": 140, "alpha_frac": 0.6757096658, "autogenerated": false, "ratio": 3.327952167414051, "config_test": false, "has_no_keywords": ...
__author__ = 'Lothilius' from selenium import webdriver, common from authentication import salesforce_login_staging import sys baseurl = "https://cs13.salesforce.com/500W000000329Pb" browser = webdriver.Firefox() browser.get(baseurl) browser.maximize_window() username, pw = salesforce_login_staging() # Login func...
{ "repo_name": "Lothilius/BizApps_Se-Testing", "path": "base.py", "copies": "1", "size": "2449", "license": "mit", "hash": 853576611783827500, "line_mean": 28.5060240964, "line_max": 115, "alpha_frac": 0.6953858718, "autogenerated": false, "ratio": 3.382596685082873, "config_test": false, "has...
__author__ = 'Lothilius' from selenium.webdriver.support.select import Select from selenium import webdriver, common from authentication import salesforce_login_staging import sys import string import random baseurl = "https://cs13.salesforce.com/005?retURL=%2Fui%2Fsetup%2FSetup%3Fsetupid%3DUsers&setupid=ManageUsers"...
{ "repo_name": "Lothilius/BizApps_Se-Testing", "path": "contact_creation.py", "copies": "1", "size": "5144", "license": "mit", "hash": 9136601377198232000, "line_mean": 32.1870967742, "line_max": 110, "alpha_frac": 0.6518273717, "autogenerated": false, "ratio": 3.4523489932885907, "config_test":...
__author__ = 'Lothilius' from sqlalchemy.orm import sessionmaker from sqlalchemy import desc from Pyoi import * from authentication import mysql_engine_prod, mysql_engine_test import numpy as np import random import sys like_start = current_time.strftime('%Y-%m-%d %H:%M:%S') user_id = 13 def start_up_engine(enviro...
{ "repo_name": "Lothilius/oiPy", "path": "Event_count.py", "copies": "1", "size": "2139", "license": "mit", "hash": -1813891568590823700, "line_mean": 24.1647058824, "line_max": 92, "alpha_frac": 0.6428237494, "autogenerated": false, "ratio": 3.5413907284768213, "config_test": false, "has_no_k...
__author__ = 'Lothilius' import csv import os import numpy as np import matplotlib.pyplot as plt import skimage as ski import math import getpass import time from skimage import data, filter from skimage.color import rgb2gray from skimage.transform import hough_circle from skimage.feature import peak_local_max from s...
{ "repo_name": "Lothilius/thezeemancometh", "path": "Zeeman.py", "copies": "1", "size": "28380", "license": "mit", "hash": -717271526736205000, "line_mean": 33.568818514, "line_max": 136, "alpha_frac": 0.6187103594, "autogenerated": false, "ratio": 3.126928162185985, "config_test": false, "has...
__author__ = 'lothilius' import csv import os import numpy as np import matplotlib.pyplot as plt #Pull data from CSV file def arrayFromFile(filename): """Given an external file containing numbers, create an array from those numbers.""" dataArray = [] with open(filename, 'r+') as csvfile: ...
{ "repo_name": "Lothilius/ortho-positronium", "path": "monty.py", "copies": "1", "size": "4582", "license": "mit", "hash": -3029414494854184400, "line_mean": 24.8870056497, "line_max": 110, "alpha_frac": 0.6126145788, "autogenerated": false, "ratio": 3.5880971025841815, "config_test": false, "...
__author__ = 'Lothilius' import json import unicodedata import authentication as oath import re from datetime import datetime import urllib2 import numpy as np url = 'https://graph.facebook.com/v2.2/100004568139047/events/not_replied?fields=id&limit=200' response = oath.twitterreq(url) message = json.load(response) ...
{ "repo_name": "Lothilius/oiPy", "path": "fb_grab_events.py", "copies": "1", "size": "4485", "license": "mit", "hash": 3232095711468115000, "line_mean": 33.5, "line_max": 125, "alpha_frac": 0.5342251951, "autogenerated": false, "ratio": 4.092153284671533, "config_test": false, "has_no_keywords...
__author__ = 'lovci' from six.moves import urllib as urllib import sqlite3 import os class Scraper(object): base_url = None source = "unknown" def store(self, identifier, page, source=None): if source is None: source = self.source self.db_con.execute('INSERT INTO Webdata VAL...
{ "repo_name": "mlovci/bioscraping", "path": "bioscraping/_base.py", "copies": "1", "size": "1382", "license": "mit", "hash": 4319896766671592000, "line_mean": 28.4042553191, "line_max": 105, "alpha_frac": 0.6041968162, "autogenerated": false, "ratio": 3.971264367816092, "config_test": false, ...
__author__ = 'lovci' import Bio from diff_binding.core import encoding def maf2Dict(multipleAlignment, id = None): """ store multiple-alignment information in a dictionary """ data = dict() chrom = multipleAlignment[0].id.split(".")[1] genome_start = multipleAlignment[0].annotations['sta...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/conservation/maf_mucking.py", "copies": "1", "size": "1331", "license": "mit", "hash": -8937477054211451000, "line_mean": 34.0526315789, "line_max": 93, "alpha_frac": 0.6326070624, "autogenerated": false, "ratio": 3.6366120218579234, "config_te...
__author__ = 'lovci' """a tool to extract ranges from indexed .maf file, adapted from bx-python / scripts / maf_tile.py and \ http://biopython.org/wiki/Phylo_cookbook""" import bx import bx.align.maf from Bio import Phylo import pyfasta from collections import defaultdict import os, sys import socket if "tscc" in s...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/conservation/maf_handler.py", "copies": "1", "size": "7886", "license": "mit", "hash": 4474757115412179500, "line_mean": 37.8472906404, "line_max": 113, "alpha_frac": 0.5621354299, "autogenerated": false, "ratio": 3.4801412180052957, "config_te...
__author__ = 'lovci' import matplotlib import pylab import numpy as np import pandas as pd import itertools import seaborn seaborn.set_style({'axes.axisbelow': True, 'axes.edgecolor': '.15', 'axes.facecolor': 'white', 'axes.grid': False, 'axes.labelc...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/general/analysis_tools.py", "copies": "1", "size": "16605", "license": "mit", "hash": -6253131048799558000, "line_mean": 39.5, "line_max": 118, "alpha_frac": 0.5834387233, "autogenerated": false, "ratio": 4.07985257985258, "config_test": false,...
__author__ = 'lp1osti' from fJmodel.fJmodel import FJmodel from fJmodel.kindata import KinData from fJmodel.sauron import sauron import numpy as np import matplotlib.pylab as plt import matplotlib.gridspec as gridspec def plot3galaxies(): # get the data k1 = KinData('/Users/lp1osti/Dropbox/fJ_CALIFA/data/N...
{ "repo_name": "lposti/pyfJmod", "path": "plot.py", "copies": "1", "size": "5521", "license": "bsd-3-clause", "hash": -6950474143932455000, "line_mean": 44.2540983607, "line_max": 113, "alpha_frac": 0.5578699511, "autogenerated": false, "ratio": 2.7010763209393347, "config_test": false, "has_n...
__author__ = 'lqrz' import codecs import logging import glob import sys logger = logging.getLogger('') hdlr = logging.FileHandler('decompoundingEvaluation.log') formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') hdlr.setFormatter(formatter) logger.addHandler(hdlr) logger.setLevel(logging.DEBUG) if...
{ "repo_name": "jodaiber/semantic_compound_splitting", "path": "visualization_and_test/evaluateDecompounding.py", "copies": "1", "size": "6816", "license": "apache-2.0", "hash": 5682791659761857000, "line_mean": 37.2921348315, "line_max": 172, "alpha_frac": 0.5790786385, "autogenerated": false, "r...
__author__ = 'lqrz' import codecs import logging # import glob import sys logger = logging.getLogger('') hdlr = logging.FileHandler('decompoundingEvaluation.log') formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') hdlr.setFormatter(formatter) logger.addHandler(hdlr) logger.setLevel(logging.DEBUG) ...
{ "repo_name": "jodaiber/semantic_compound_splitting", "path": "visualization_and_test/evaluateMosesDecompounding.py", "copies": "1", "size": "4246", "license": "apache-2.0", "hash": 4365826757861938700, "line_mean": 36.9196428571, "line_max": 142, "alpha_frac": 0.5984455959, "autogenerated": false,...
__author__ = 'lqrz' import codecs import sys if __name__ == '__main__': # mosesResults = 'MT/mosesCompound_full_results' #TODO:hardcoded # outFile = 'MT/pastedResults_mod' #TODO:hardcoded if len(sys.argv)==3: mosesResults = sys.argv[1] outFile = sys.argv[2] elif len(sys.argv)>1: ...
{ "repo_name": "jodaiber/semantic_compound_splitting", "path": "visualization_and_test/preprocessMosesDecompounding.py", "copies": "1", "size": "1104", "license": "apache-2.0", "hash": -95343220095210740, "line_mean": 28.8648648649, "line_max": 68, "alpha_frac": 0.5226449275, "autogenerated": false,...
__author__ = 'lqrz' import cPickle as pickle import gensim import itertools import random from annoy import AnnoyIndex import sys import argparse import time import datetime import numpy as np import threading import Queue def timestamp(): return datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H...
{ "repo_name": "jodaiber/semantic_compound_splitting", "path": "visualization_and_test/evaluate_candidates_mt.py", "copies": "1", "size": "5396", "license": "apache-2.0", "hash": 6509282020002703000, "line_mean": 31.703030303, "line_max": 138, "alpha_frac": 0.6375092661, "autogenerated": false, "r...
__author__ = 'lqrz' import os import sys from sklearn.decomposition import PCA as sklearnPCA from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d import proj3d import numpy as np import pickle import random from nltk import FreqDist from nltk.corpus import PlaintextCor...
{ "repo_name": "jodaiber/semantic_compound_splitting", "path": "visualization_and_test/pca.py", "copies": "1", "size": "6611", "license": "apache-2.0", "hash": -6017394135225718000, "line_mean": 26.8945147679, "line_max": 103, "alpha_frac": 0.5906821963, "autogenerated": false, "ratio": 3.13020833...
__author__ = 'lren' from apiclient.discovery import build import base64 class sourceServer(object): SOURCE_DISCOVERY_SERVICE_URL = "https://annoserver-test.appspot.com/_ah/api/discovery/v1/apis/copy_api/v1/rest" source_server = build("copy_api", "v1", discoveryServiceUrl=SOURCE_DISCOVERY_SERVICE_URL) ite...
{ "repo_name": "usersource/tasks", "path": "tasks_phonegap/Tasks/cordova/plugins/io.usersource.anno/tools/copytool3/copytool2.py", "copies": "3", "size": "5284", "license": "mpl-2.0", "hash": 8235259084837916000, "line_mean": 40.6062992126, "line_max": 125, "alpha_frac": 0.6118470855, "autogenerated...
__author__ = 'lselvy' from data_services.models import BaseFactData, DimExecution, DimRun, DimReplication, DimChannel from django.core.exceptions import ObjectDoesNotExist from django.db.models.query import QuerySet import json import time import itertools class RunData(object): """ This is the RunData Class....
{ "repo_name": "vecnet/vnetsource", "path": "data_services/utils/run_data.py", "copies": "2", "size": "20025", "license": "mpl-2.0", "hash": -8341748405936263000, "line_mean": 43.5, "line_max": 164, "alpha_frac": 0.5375780275, "autogenerated": false, "ratio": 4.551136363636363, "config_test": fa...
__author__ = 'lsteng' # Copyright 2015 SICS Swedish ICT AB # # 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 applic...
{ "repo_name": "nigsics/perf-kvm", "path": "guest-client/command_parse.py", "copies": "1", "size": "3504", "license": "apache-2.0", "hash": 3721598719651088400, "line_mean": 32.380952381, "line_max": 264, "alpha_frac": 0.6198630137, "autogenerated": false, "ratio": 3.727659574468085, "config_tes...
__author__ = 'Lstevens' import os import errno import re import argparse import textwrap from PIL import ImageFont from PIL import Image from PIL import ImageDraw from xlrd import open_workbook """ Creates image files with xlsform question text. Run on command line with "-f" parameter which is path to xlsform file. ...
{ "repo_name": "VinACE/openclinica_scripts", "path": "xlsform_images/xlsform_images.py", "copies": "1", "size": "9789", "license": "mit", "hash": -2213388204877450500, "line_mean": 38.3172690763, "line_max": 80, "alpha_frac": 0.6122177955, "autogenerated": false, "ratio": 3.890699523052464, "con...
__author__ = 'Lstevens' # stdlib modules from xml.etree import ElementTree as et import hashlib import re import logging # pypi modules import requests import xmltodict logging.basicConfig( filename='webservices.log', format='%(asctime)s | %(levelname)s | %(name)s | %(funcName)s | Line:%(lineno)d | %...
{ "repo_name": "VinACE/openclinica_scripts", "path": "webservices/python/oc_webservices.py", "copies": "2", "size": "24311", "license": "mit", "hash": 2464724185090012700, "line_mean": 40.4173764906, "line_max": 103, "alpha_frac": 0.6017852001, "autogenerated": false, "ratio": 3.861340533672173, ...
__author__ = 'Lstevens' # stdlib import unittest import collections import datetime import uuid # local import oc_webservices """ These objects are used by oc_ws_test to create common tests and set common value used by the oc_ws_test tests. The GenericCallFailures TestCase will not run on its own, it requires that t...
{ "repo_name": "lindsay-stevens-kirby/openclinica_scripts", "path": "webservices/python/oc_ws_test_generic.py", "copies": "2", "size": "14951", "license": "mit", "hash": -8049799275842070000, "line_mean": 42.9764705882, "line_max": 98, "alpha_frac": 0.5947428266, "autogenerated": false, "ratio": 3...
__author__ = 'Lstevens' import os import errno import re import argparse import textwrap from PIL import ImageFont from PIL import Image from PIL import ImageDraw from xlrd import open_workbook """ Creates image files with xlsform question text. Run on command line with "-f" parameter which is path to...
{ "repo_name": "lindsay-stevens-kirby/openclinica_scripts", "path": "xlsform_images/xlsform_images.py", "copies": "1", "size": "10117", "license": "mit", "hash": -5853454334801502000, "line_mean": 38.476, "line_max": 80, "alpha_frac": 0.5983987348, "autogenerated": false, "ratio": 3.96123727486296...
__author__ = "Luc Anselin luc.anselin@asu.edu, \ Pedro V. Amaral pedro.amaral@asu.edu, \ David C. Folch david.folch@asu.edu" import numpy as np import numpy.linalg as la from pysal import lag_spatial from utils import spdot, spbroadcast from user_output import check_constant def robust_vm(reg, gwk=Non...
{ "repo_name": "google-code-export/pysal", "path": "pysal/spreg/robust.py", "copies": "5", "size": "5079", "license": "bsd-3-clause", "hash": 1925723912866846200, "line_mean": 30.3518518519, "line_max": 117, "alpha_frac": 0.5369167159, "autogenerated": false, "ratio": 2.9511911679256246, "config...
__author__ = "Luc Anselin luc.anselin@asu.edu, \ Pedro V. Amaral pedro.amaral@asu.edu, \ David C. Folch david.folch@asu.edu" import numpy as np import numpy.linalg as la from pysal.lib.weights.spatial_lag import lag_spatial from .utils import spdot, spbroadcast from .user_output import check_constant ...
{ "repo_name": "lixun910/pysal", "path": "pysal/model/spreg/robust.py", "copies": "1", "size": "5306", "license": "bsd-3-clause", "hash": -6143841669241517000, "line_mean": 30.3964497041, "line_max": 132, "alpha_frac": 0.5422163588, "autogenerated": false, "ratio": 2.9105869445968184, "config_te...
from math import sqrt from numbers import Number from sys import exit # Define the class. class Quadratic: def __add__(self, other): # Add quadratics. a,b,c = [m + n for m,n in zip(self.coeffs, other.coeffs)] return Quadratic(a, b, c) def f(self, x): a,b,c = [n for n in self.coeffs] return ...
{ "repo_name": "h93xV2/Miscellaneous", "path": "Math/Quadratic/quadratic.py", "copies": "1", "size": "2459", "license": "mit", "hash": -8735423609211299000, "line_mean": 31.3552631579, "line_max": 71, "alpha_frac": 0.5851972346, "autogenerated": false, "ratio": 2.769144144144144, "config_test": ...
__author__ = 'Lucas Ou-Yang' # -*- coding: utf-8 -*- import json from django.shortcuts import render_to_response, RequestContext from django.http import HttpResponse, Http404 from link.models import Link from socialrank.settings import get_root_url LINK_DELIM = "&$$" def render_with_context(request, template, co...
{ "repo_name": "codelucas/socialrank", "path": "link/views.py", "copies": "1", "size": "2169", "license": "apache-2.0", "hash": -5226822411086594000, "line_mean": 23.9425287356, "line_max": 66, "alpha_frac": 0.5638543107, "autogenerated": false, "ratio": 4.203488372093023, "config_test": false, ...
__author__ = 'Lucas Ou-Yang' from django.db import models from django.utils import timezone from datetime import datetime # -*- coding: utf-8 -*- class Link(models.Model): """ abstraction of a web link likes are the # of facebook shares that any particular url has. located @: http://graph.facebo...
{ "repo_name": "codelucas/socialrank", "path": "link/models.py", "copies": "1", "size": "3156", "license": "apache-2.0", "hash": -861039630756139100, "line_mean": 27.1875, "line_max": 66, "alpha_frac": 0.5560836502, "autogenerated": false, "ratio": 3.905940594059406, "config_test": false, "has...
__author__ = 'Lucas Schuermann' from baseneuron import BaseNeuron import numpy as np import pycuda.gpuarray as garray from pycuda.tools import dtype_to_ctype import pycuda.driver as cuda from pycuda.compiler import SourceModule import os.path import neurokernel.LPU.neurons as neurons class HodgkinHuxley_Euler(BaseNe...
{ "repo_name": "cerrno/neurokernel", "path": "neurokernel/LPU/neurons/HodgkinHuxley_Euler.py", "copies": "1", "size": "3774", "license": "bsd-3-clause", "hash": -7837788410782808000, "line_mean": 38.3125, "line_max": 83, "alpha_frac": 0.59936407, "autogenerated": false, "ratio": 3.050929668552951,...
__author__ = 'luchenhua' EtoF = {'bread': 'du pain', 'wine': 'du vin', 'eats': 'mange', 'drinks': 'bois', 'likes': 'aime', 1: 'un', '6.00': '6.00'} print(EtoF) print(EtoF.keys()) print(EtoF.keys) del EtoF[1] print(EtoF) def translateWord(word, dictionary): if word in dictionary: return dictionary...
{ "repo_name": "luchenhua/MIT-OCW-600", "path": "src/lect06.py", "copies": "1", "size": "2011", "license": "mit", "hash": 6120141481359215000, "line_mean": 17.2818181818, "line_max": 106, "alpha_frac": 0.5251118846, "autogenerated": false, "ratio": 2.785318559556787, "config_test": false, "has...
__author__ = 'luchenhua' def withinEpsilon(x, y, epsilon): return abs(x - y) <= epsilon print(withinEpsilon(2, 3, 1)) def f(x): x += 1 print('x = ', x) return x x = 3 z = f(x) print('z =', z) print('x =', x) def f1(x): def g(): x = 'abc' print('x =', x) x += 1 prin...
{ "repo_name": "luchenhua/MIT-OCW-600", "path": "src/lect04.py", "copies": "1", "size": "1294", "license": "mit", "hash": -6690646528331457000, "line_mean": 16.0263157895, "line_max": 77, "alpha_frac": 0.4899536321, "autogenerated": false, "ratio": 2.88195991091314, "config_test": false, "has_...
__author__ = 'luchenhua' x = 100 divisors = () print(divisors) for i in range(1, x): if x % i == 0: divisors = divisors + (i,) print(divisors) print(divisors) print(divisors[0] + divisors[1]) print(divisors[2:4]) Techs = ['MIT', 'Cal Tech'] Ivys = ['Harvard', 'Yale', 'Brown'] Univs = [] Univs.app...
{ "repo_name": "luchenhua/MIT-OCW-600", "path": "src/lect05.py", "copies": "1", "size": "2132", "license": "mit", "hash": 4648036331703998000, "line_mean": 16.1935483871, "line_max": 106, "alpha_frac": 0.5530018762, "autogenerated": false, "ratio": 2.302375809935205, "config_test": false, "has...
__author__ = 'Lucian' from const import values, fibonacci_weight # intel quad core i7 3770k, average speed of check 56000 combinations of cards per second # For proper operation of these methods need to sort descending cards (method sort_high_to_low into sort.py) # No checks for invalid or missing card, you shoul...
{ "repo_name": "nodermann/holdem_poker_combinations", "path": "poker_combinations.py", "copies": "1", "size": "4844", "license": "mit", "hash": 8314471976923660000, "line_mean": 30.9659863946, "line_max": 128, "alpha_frac": 0.4948389761, "autogenerated": false, "ratio": 3.3545706371191137, "conf...
__author__ = 'Ludmal.DESILVA' from lxml import html import re import image_parser import logging extract_patterns = 'id:articleImage|' \ 'id:displayFrame|' \ 'class:cnnArticleGalleryPhotoContainer|' \ 'class:article-entry|' \ 'class:storyBody...
{ "repo_name": "ludmal/pylib", "path": "html_parser.py", "copies": "1", "size": "4453", "license": "mit", "hash": -330531368095289860, "line_mean": 24.591954023, "line_max": 85, "alpha_frac": 0.5187514035, "autogenerated": false, "ratio": 3.59983831851253, "config_test": false, "has_no_keyword...
__author__ = 'Ludmal.DESILVA' import os, email, smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication path = os.path.dirname(__file__) #modify this to change the Template Directory TEMPLATE_DIR = '/templates/' class EmailTempla...
{ "repo_name": "ludmal/pylib", "path": "mail.py", "copies": "1", "size": "3499", "license": "mit", "hash": -7846322134993492000, "line_mean": 34.3434343434, "line_max": 132, "alpha_frac": 0.6133180909, "autogenerated": false, "ratio": 3.9536723163841807, "config_test": false, "has_no_keywords"...
__author__ = 'lugan' class EightQueen(): def __init__(self): self.chess = [] self.nextLevel = True self.count = 0 def isConflict(self, sourceIndex, targetIndex, targetValue): if sourceIndex == targetIndex: return True if self.chess[sourceIndex] == targetV...
{ "repo_name": "linewx/anticyclone", "path": "anticyclone/exam/eightqueen.py", "copies": "1", "size": "2842", "license": "apache-2.0", "hash": -5724218385081544000, "line_mean": 23.9298245614, "line_max": 88, "alpha_frac": 0.5024630542, "autogenerated": false, "ratio": 3.9472222222222224, "confi...
__author__ = 'lugan' class Vertex(): def __init__(self, value): self.value = value self.processed = False self.discovered = False self.distance = float('Inf') self.startTime = None self.endTime = None def clean(self): self.processed = False self....
{ "repo_name": "linewx/anticyclone", "path": "anticyclone/clrs/graph.py", "copies": "1", "size": "6311", "license": "apache-2.0", "hash": -8068544641987877000, "line_mean": 25.8553191489, "line_max": 95, "alpha_frac": 0.5764538108, "autogenerated": false, "ratio": 3.893275755706354, "config_test...
__author__ = 'lugan' from datetime import datetime def steps(n:int): if n == 1: return 1 if n == 2: return 2 else: return steps(n-1) + steps(n-2) def bottomUpSteps(n:int): steps = {1:1, 2:2} for i in range(3,n+1): steps[i] = steps[i-1] + steps[i-2] return ste...
{ "repo_name": "linewx/anticyclone", "path": "anticyclone/exam/dp.py", "copies": "1", "size": "1081", "license": "apache-2.0", "hash": -2931330706203512000, "line_mean": 17.3220338983, "line_max": 42, "alpha_frac": 0.5078630897, "autogenerated": false, "ratio": 3.0195530726256985, "config_test":...
__author__ = 'lugan' import math class Sort(): def sort(self, list_object:list, reverse:bool=False): pass class InsertionSort(Sort): def sort(self, list_object:list, reverse:bool=False): toSortList = list(list_object) for x in range(1, len(toSortList)): key = toSortList[x...
{ "repo_name": "linewx/anticyclone", "path": "anticyclone/clrs/sort.py", "copies": "1", "size": "6306", "license": "apache-2.0", "hash": 5893880584696796000, "line_mean": 29.4685990338, "line_max": 84, "alpha_frac": 0.5444021567, "autogenerated": false, "ratio": 3.6303972366148534, "config_test"...
__author__ = 'lugan' """ """ class MergeSort(): def sort(self, list_object:list, reversePair:list): if len(list_object) <= 1: return list(list_object) else: n = int(len(list_object)/2) pSortedList = self.sort(list_object[:n], reversePair) sSortedLi...
{ "repo_name": "linewx/anticyclone", "path": "anticyclone/exam/chapter2_4.py", "copies": "1", "size": "1233", "license": "apache-2.0", "hash": 4699558116383562000, "line_mean": 26.4222222222, "line_max": 78, "alpha_frac": 0.5166261152, "autogenerated": false, "ratio": 3.3505434782608696, "config...
__author__ = 'luigolas' from package.image_set import ImageSet import re from sklearn.cross_validation import ShuffleSplit from itertools import chain from sklearn.utils import safe_indexing import numpy as np class Dataset(object): """ :param probe: :param gallery: :param train_size: :param test...
{ "repo_name": "Luigolas/PyReID", "path": "package/dataset.py", "copies": "1", "size": "6818", "license": "mit", "hash": 3127932456547076000, "line_mean": 35.6559139785, "line_max": 120, "alpha_frac": 0.5775887357, "autogenerated": false, "ratio": 3.5017976373908577, "config_test": true, "has_...
__author__ = 'luigolas' import numpy as np from itertools import islice, takewhile, count import sys import time def safe_ln(x, minval=0.0000000001): return np.log(x.clip(min=minval)) def status(percent, flush=True): sys.stdout.write("%3d%%\r" % percent) if flush: sys.stdout.flush() else: ...
{ "repo_name": "Luigolas/PyReID", "path": "package/utilities.py", "copies": "1", "size": "2474", "license": "mit", "hash": -129015082243109090, "line_mean": 20.5217391304, "line_max": 82, "alpha_frac": 0.5578011318, "autogenerated": false, "ratio": 3.4171270718232045, "config_test": false, "ha...
__author__ = 'luigolas' import numpy as np from scipy.stats import cumfreq class Statistics(): """ Position List: for each element in probe, find its same ids in gallery. Format: np.array([[2,14],[1,2],...]) Mean List: Calculate means of position list by axis 0. Format: np.array([1.52, 4.89]) Mode_li...
{ "repo_name": "Luigolas/PyReID", "path": "package/statistics.py", "copies": "1", "size": "4681", "license": "mit", "hash": -4135605483136304000, "line_mean": 36.448, "line_max": 120, "alpha_frac": 0.5671864986, "autogenerated": false, "ratio": 3.5515933232169954, "config_test": true, "has_no_...
__author__ = 'luigolas' import numpy as np import cv2 from package.utilities import safe_ln, FileNotFoundError # from package.app import DB CS_IIP = 1 CS_BGR = 2 CS_HSV = 3 CS_YCrCb = 4 colorspace_name = ["", "IIP", "BGR", "HSV", "YCrCb"] iipA = np.asarray([[27.07439, -0.2280783, -1.806681], [-5....
{ "repo_name": "Luigolas/PyReID", "path": "package/image.py", "copies": "1", "size": "6013", "license": "mit", "hash": 3063440526375903000, "line_mean": 31.8579234973, "line_max": 96, "alpha_frac": 0.5762514552, "autogenerated": false, "ratio": 3.1865394806571277, "config_test": false, "has_no...
__author__ = 'luigolas' import os from package.image import Image from package.utilities import ImagesNotFoundError, NotADirectoryError class ImageSet(object): def __init__(self, folder_name, name_ids=2): self.path = ImageSet._valid_directory(folder_name) self.name = "_".join(self.path.split("/")...
{ "repo_name": "Luigolas/PyReID", "path": "package/image_set.py", "copies": "1", "size": "2387", "license": "mit", "hash": -825669467288118400, "line_mean": 30.4078947368, "line_max": 82, "alpha_frac": 0.5643066611, "autogenerated": false, "ratio": 3.776898734177215, "config_test": true, "has_...
__author__ = 'luissaguas' import frappe from frappe import _ from jasper_erpnext_report.utils.utils import jaspersession_get_value,get_expiry_in_seconds,\ get_jasper_data, get_jasper_session_expiry_seconds, getFrappeVersion from jasper_erpnext_report.utils.file import remove_directory #call from bench frappe --pyth...
{ "repo_name": "saguas/jasper_erpnext_report", "path": "jasper_erpnext_report/utils/scheduler.py", "copies": "1", "size": "9611", "license": "mit", "hash": 5201823479195407000, "line_mean": 27.4378698225, "line_max": 147, "alpha_frac": 0.7021121631, "autogenerated": false, "ratio": 2.8638259833134...
__author__ = 'luissaguas' import frappe, os, re import fluorine as fluor """ client file loader for each module read files with extension js special atention to files in client/compatibility ignore files in tests, in public in private and server files in lib first and inside lib alphabetic order other folders deepest...
{ "repo_name": "saguas/fluorine", "path": "fluorine/utils/react_file_loader.py", "copies": "1", "size": "5052", "license": "mit", "hash": -1551541359308046300, "line_mean": 30.1851851852, "line_max": 162, "alpha_frac": 0.674584323, "autogenerated": false, "ratio": 2.7927031509121063, "config_tes...
__author__ = 'luissaguas' import re, telnetlib class MemcachedStats: _client = None _key_regex = re.compile(ur'ITEM (.*) \[(.*); (.*)\]') _slab_regex = re.compile(ur'STAT items:(.*):number') _stat_regex = re.compile(ur"STAT (.*) (.*)\r") def __init__(self, host='localhost', port='11211'): self._host = host ...
{ "repo_name": "saguas/jasper_erpnext_report", "path": "jasper_erpnext_report/utils/memcache_stats.py", "copies": "1", "size": "1412", "license": "mit", "hash": -4394721600494989300, "line_mean": 27.24, "line_max": 71, "alpha_frac": 0.6635977337, "autogenerated": false, "ratio": 2.9233954451345756...
__author__ = 'luissaguas' #import json from jnius import PythonJavaClass, java_method import frappe, re, os class FrappeTask(PythonJavaClass): __javainterfaces__ = ['IFrappeTask'] def read_config(self): config = frappe.get_conf() or {} curr_site = os.path.join("currentsite.txt") config.default_site = frapp...
{ "repo_name": "saguas/jasper_erpnext_report", "path": "jasper_erpnext_report/core/FrappeTask.py", "copies": "1", "size": "2201", "license": "mit", "hash": 4014088926257898000, "line_mean": 22.9347826087, "line_max": 93, "alpha_frac": 0.6778736938, "autogenerated": false, "ratio": 2.95833333333333...
__author__ = 'luissaguas' #from fluorine.utils.packages_path import get_package_path from jinja2 import FileSystemLoader, TemplateNotFound import re, os, frappe def delimeter_match(m): #print m.group(0) if m.group(0).startswith("{{%"): #print m.group(2) source = "{% endraw %}\n{{"+ m.group(2) +"}}{% raw %}\n...
{ "repo_name": "saguas/fluorine", "path": "fluorine/utils/fjinja.py", "copies": "1", "size": "2206", "license": "mit", "hash": -7992195068647324000, "line_mean": 35.1803278689, "line_max": 188, "alpha_frac": 0.6314596555, "autogenerated": false, "ratio": 2.906455862977602, "config_test": false, ...
__author__ = "Luka Avbreht" import queue class Node(): # TODO Probably havinf left and right node in init is kinda stupid, idk def __init__(self, value, parent=None): """ Class that creates the structure for Avl to work on (only called once) """ self.value = value sel...
{ "repo_name": "jO-Osko/PSA2", "path": "naloge/dn1/tree/LukaAvbreht/Node.py", "copies": "1", "size": "2693", "license": "mit", "hash": -7904417687996097000, "line_mean": 30.3139534884, "line_max": 141, "alpha_frac": 0.4756776829, "autogenerated": false, "ratio": 3.581117021276596, "config_test":...
__author__ = 'LukaAvbreht, SamoKralj' from tkinter import * from igra import * from PIL import ImageTk,Image import threading import time import random class tkmlin(): def __init__(self,master): self.master = master self.master.minsize(width=1300, height=700) self.bg = 'LightYellow2' #'Lem...
{ "repo_name": "LukaAvbreht/Nine-Mens-Morris", "path": "Main.py", "copies": "1", "size": "42601", "license": "mit", "hash": 671384022358815200, "line_mean": 47.3526734926, "line_max": 178, "alpha_frac": 0.5488918169, "autogenerated": false, "ratio": 2.9411113417756556, "config_test": true, "ha...
__author__ = 'LukaAvbreht, SamoKralj' IGRALEC_ENA = "B" IGRALEC_DVA = "C" def nasprotnik(igralec): """ Pove nasprotnega igralca. Koristno pri metodi poteza. """ if igralec == IGRALEC_ENA: return IGRALEC_DVA elif igralec == IGRALEC_DVA: return IGRALEC_ENA else: 1/0 #Sesuje igro,...
{ "repo_name": "LukaAvbreht/Nine-Mens-Morris", "path": "igra.py", "copies": "1", "size": "12171", "license": "mit", "hash": 4034851588597075000, "line_mean": 40.3367346939, "line_max": 125, "alpha_frac": 0.4424786043, "autogenerated": false, "ratio": 2.831314072693383, "config_test": false, "h...
__author__ = 'lukas.bitter', 'Nicloas Gonin', 'Nils Ryter' # !/usr/bin/env python # -*- coding: utf-8 -*- import cv2 import numpy as np import sys from matplotlib import pyplot as plt # Definition of feature postition on the trackbar: numHarrisCorner = 1 numSIFT = 2 numSURF = 3 numORB = 4 def nothing(x): pass de...
{ "repo_name": "LukasBitter/Wooden-Forsaken-Wrench", "path": "featuresVisualisation.py", "copies": "1", "size": "3632", "license": "apache-2.0", "hash": -9126736634902727000, "line_mean": 29.0165289256, "line_max": 92, "alpha_frac": 0.5864537445, "autogenerated": false, "ratio": 3.455756422454805,...
import json from httplib2 import Http import BaseHTTPServer from BaseHTTPServer import * # Users will be used for a very basic authorization: # Whenever a user authorizes, well check whether his chosen nickname is available. # If it is available, well grant him permisson to use the chat under that nickname, # and if ...
{ "repo_name": "vergilius/hive-demo", "path": "hive-backend/backend.py", "copies": "2", "size": "3540", "license": "bsd-3-clause", "hash": -385435992118254200, "line_mean": 31.4770642202, "line_max": 106, "alpha_frac": 0.5624293785, "autogenerated": false, "ratio": 3.5649546827794563, "config_te...
__author__ = 'lukasz' class WebParser(object): def __init__(self): self.nested = False @staticmethod def getParser(source_id): if source_id == 'cnn': from backend.parsers.cnn import CNNParser return CNNParser() elif source_id == 'gua': from backend.parsers.guardian import GuardianP...
{ "repo_name": "ldrozdz/Webforming", "path": "backend/parsers/__init__.py", "copies": "1", "size": "1048", "license": "apache-2.0", "hash": 1851812334962265900, "line_mean": 30.7878787879, "line_max": 62, "alpha_frac": 0.679389313, "autogenerated": false, "ratio": 3.8529411764705883, "config_tes...
__author__ = 'luke.beer' import subprocess import threading import logging import socket import time import questions import states class Executor(threading.Thread): def __init__(self, r, channel): threading.Thread.__init__(self) self.redis = r self.channel = channel self.pubsub =...
{ "repo_name": "lukebeer/budweiser", "path": "budweiser/budweiser.py", "copies": "1", "size": "2185", "license": "mit", "hash": 1665179541357204200, "line_mean": 31.6119402985, "line_max": 113, "alpha_frac": 0.576201373, "autogenerated": false, "ratio": 3.9087656529516996, "config_test": false, ...
__author__ = 'luke Berezynskyj <eat.lemons@gmail.com>' import logging import nltk.corpus import nltk.tokenize.punkt import nltk.stem.snowball import string class Verify: def __init__(self, threshold=0.5): self.threshold = threshold def setup(self): try: self.stopwords = nltk.co...
{ "repo_name": "lukebeer/SIPCallRecordVerify", "path": "src/verify.py", "copies": "1", "size": "1519", "license": "mit", "hash": -4772211471105906000, "line_mean": 37, "line_max": 112, "alpha_frac": 0.6385780118, "autogenerated": false, "ratio": 3.75990099009901, "config_test": false, "has_no_...
__author__ = 'luke Berezynskyj <eat.lemons@gmail.com>' import os import sys import json import urllib import urllib2 import logging as logger import subprocess def wav_to_flac(wav=None): if os.path.isfile(wav): logger.info("Converting %s to flac" % wav) flac = '%s.flac' % wav[:-4] subpro...
{ "repo_name": "lukebeer/SIPCallRecordVerify", "path": "src/speechtools.py", "copies": "1", "size": "1355", "license": "mit", "hash": 4101838582170735000, "line_mean": 28.4782608696, "line_max": 95, "alpha_frac": 0.6280442804, "autogenerated": false, "ratio": 3.1957547169811322, "config_test": f...
__author__ = 'luke Berezynskyj <eat.lemons@gmail.com>' import re import logging import subprocess import pjsua as pj from time import sleep class CallHandler(pj.CallCallback): def __init__(self, call=None): self.lib = pj.Lib.instance() pj.CallCallback.__init__(self, call) self.wait_for_h...
{ "repo_name": "lukebeer/SIPCallRecordVerify", "path": "src/callhandler.py", "copies": "1", "size": "2569", "license": "mit", "hash": 7357118698749728000, "line_mean": 37.9393939394, "line_max": 97, "alpha_frac": 0.5496302063, "autogenerated": false, "ratio": 3.8573573573573574, "config_test": f...
__author__ = 'luke Berezynskyj <eat.lemons@gmail.com>' import re import logging import threading import pjsua as pj from time import sleep from callhandler import CallHandler class AccountHandler(pj.AccountCallback): sem = None def __init__(self, account): self.lib = pj.Lib.instance() self....
{ "repo_name": "lukebeer/SIPCallRecordVerify", "path": "src/accounthandler.py", "copies": "1", "size": "1943", "license": "mit", "hash": 5292704775264743000, "line_mean": 32.5172413793, "line_max": 75, "alpha_frac": 0.5800308801, "autogenerated": false, "ratio": 3.545620437956204, "config_test":...
import numpy as np import os.path as op import datetime import calendar from .utils import _load_mne_locs from ...utils import logger, warn from ..utils import _read_segments_file from ..base import BaseRaw from ..meas_info import _empty_info from ..constants import FIFF def read_raw_artemis123(input_fname, preload...
{ "repo_name": "nicproulx/mne-python", "path": "mne/io/artemis123/artemis123.py", "copies": "2", "size": "10688", "license": "bsd-3-clause", "hash": -1372411386760608800, "line_mean": 38.1501831502, "line_max": 79, "alpha_frac": 0.5567926647, "autogenerated": false, "ratio": 3.887959257911968, "...
import numpy as np import os.path as op import datetime import calendar from .utils import _load_mne_locs, _read_pos from ...utils import logger, warn from ..utils import _read_segments_file from ..base import BaseRaw from ..meas_info import _empty_info, _make_dig_points from ..constants import FIFF from ...chpi impo...
{ "repo_name": "jaeilepp/mne-python", "path": "mne/io/artemis123/artemis123.py", "copies": "1", "size": "17812", "license": "bsd-3-clause", "hash": -4046031667826443300, "line_mean": 39.5740318907, "line_max": 79, "alpha_frac": 0.5200426679, "autogenerated": false, "ratio": 3.8747008918860124, "...
import numpy as np import os.path as op import datetime import calendar from .utils import _load_mne_locs, _read_pos from ...utils import logger, warn, verbose, _check_fname from ..utils import _read_segments_file from ..base import BaseRaw from ..meas_info import _empty_info from .._digitization import _make_dig_poi...
{ "repo_name": "mne-tools/mne-python", "path": "mne/io/artemis123/artemis123.py", "copies": "7", "size": "18633", "license": "bsd-3-clause", "hash": -5283901014423896000, "line_mean": 39.3311688312, "line_max": 79, "alpha_frac": 0.5037836097, "autogenerated": false, "ratio": 3.8198031980319804, ...
import numpy as np import os.path as op import datetime import calendar from .utils import _load_mne_locs, _read_pos from ...utils import logger, warn, verbose from ..utils import _read_segments_file from ..base import BaseRaw from ..meas_info import _empty_info, _make_dig_points from ..constants import FIFF from ......
{ "repo_name": "teonlamont/mne-python", "path": "mne/io/artemis123/artemis123.py", "copies": "2", "size": "17831", "license": "bsd-3-clause", "hash": -4335025033146626600, "line_mean": 39.433106576, "line_max": 79, "alpha_frac": 0.520441927, "autogenerated": false, "ratio": 3.8796779808529154, "...
__author__ = 'Luke Cossey' import os import re def print_list(list): for i in list: print i bad_names = ['AUX', 'PRN', 'NUL', 'CON', 'COM0', 'COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'LPT0', 'LPT1', 'LPT2', 'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9'] bad_chars = ...
{ "repo_name": "Numerical-Brass/skydrivepro-validation", "path": "validate_skydrive.py", "copies": "1", "size": "3757", "license": "mit", "hash": 2813079974252257300, "line_mean": 48.4473684211, "line_max": 200, "alpha_frac": 0.4788394996, "autogenerated": false, "ratio": 3.7987866531850356, "co...
__author__ = 'Luke Merrett' from EnvironmentObjects.environment import Environment from PetObjects.pet import Pet console_options = None environment = None myPet = None def run_option(x): if x in console_options: console_options[x]() else: print("You didn\'t enter an option") wait() ...
{ "repo_name": "lukemerrett/PythonPet", "path": "pythonpet.py", "copies": "1", "size": "1676", "license": "mit", "hash": 48464378870653200, "line_mean": 23.6617647059, "line_max": 91, "alpha_frac": 0.5960620525, "autogenerated": false, "ratio": 3.1742424242424243, "config_test": false, "has_no...
__author__ = 'Luke Merrett' from random import randint from Helpers import datehelper class Age: __minimum_potential_lifespan_in_seconds = 86400 # 1 day __total_potential_lifespan_in_seconds = 31536000 # 1 year __birth_date = None __lifespan_in_seconds = None def __init__(self): self.__...
{ "repo_name": "lukemerrett/PythonPet", "path": "PetObjects/age.py", "copies": "1", "size": "1727", "license": "mit", "hash": 3704107637654240000, "line_mean": 37.4, "line_max": 110, "alpha_frac": 0.6340474812, "autogenerated": false, "ratio": 3.6588983050847457, "config_test": false, "has_no_...
__author__ = 'Luke Merrett' import random import settings from clients.steamapi import SteamApiClient from clients import installed_games def get_total_playtime_for_last_two_weeks(): """ Calculates the total time in minutes played in the last two weeks :return: The total playtime in minutes for the last t...
{ "repo_name": "lukemerrett/SteamProgress", "path": "analytics/playtime.py", "copies": "1", "size": "1983", "license": "mit", "hash": 1447511661056062200, "line_mean": 29.0454545455, "line_max": 72, "alpha_frac": 0.636913767, "autogenerated": false, "ratio": 3.6186131386861313, "config_test": fa...
__author__ = 'Luke Merrett' import settings from evernote.api.client import EvernoteClient import evernote.edam.type.ttypes as Types class EvernoteOperations: __client = None def __init__(self): self.__client = EvernoteClient(token=settings.developer_token, sandbox=settings.sandbox) def print_li...
{ "repo_name": "lukemerrett/EvernotePy", "path": "evernoteclient/operations.py", "copies": "1", "size": "1354", "license": "mit", "hash": -5149916850017991000, "line_mean": 30.511627907, "line_max": 96, "alpha_frac": 0.623338257, "autogenerated": false, "ratio": 3.6495956873315363, "config_test"...
__author__ = 'Luke Merrett' import settings import datetime import pygal import webbrowser from peewee import * from clients.steamapi import SteamApiClient from collections import defaultdict, OrderedDict from datetime import date from dateutil.relativedelta import relativedelta db = SqliteDatabase(settings.sqlite_da...
{ "repo_name": "lukemerrett/SteamProgress", "path": "database/playtime_operations.py", "copies": "1", "size": "3289", "license": "mit", "hash": -9154200304903423000, "line_mean": 34.3655913978, "line_max": 117, "alpha_frac": 0.6460930374, "autogenerated": false, "ratio": 3.7804597701149425, "con...
__author__ = 'Luke Merrett' import settings valid_interfaces = { 'ISteamUser': [ 'GetPlayerSummaries' ], 'IPlayerService': [ 'GetOwnedGames' ] } def get_player_summary(): return __get_url('ISteamUser', 'GetPlayerSummaries', 'v0002', { 'steamids': settings.steam_user_id ...
{ "repo_name": "lukemerrett/SteamProgress", "path": "builders/urlbuilder.py", "copies": "1", "size": "1279", "license": "mit", "hash": -5699415490222892000, "line_mean": 28.0909090909, "line_max": 90, "alpha_frac": 0.6426896013, "autogenerated": false, "ratio": 3.739766081871345, "config_test": ...
__author__ = 'Luke Merrett' import unittest from analytics import playtime class PlaytimeTests(unittest.TestCase): def test_get_total_playtime_for_last_two_weeks_returns_playtime(self): playtime_in_minutes = playtime.get_total_playtime_for_last_two_weeks() self.assertTrue(playtime_in_minutes > 0) ...
{ "repo_name": "lukemerrett/SteamProgress", "path": "unittests/playtimetests.py", "copies": "1", "size": "1658", "license": "mit", "hash": -4045462117138670600, "line_mean": 39.4390243902, "line_max": 86, "alpha_frac": 0.6604342581, "autogenerated": false, "ratio": 3.283168316831683, "config_tes...
__author__ = 'Luke Merrett' steam_webapi_key = 'Get your key here http://steamcommunity.com/dev' registered_domain = 'The domain used to register above' steam_user_id = 'Enter your user id here' steam_user_folder = 'Enter your user folder here, eg C:\\Program Files (x86)\\Steam\\userdata\\22222222' # Maybe you brough...
{ "repo_name": "lukemerrett/SteamProgress", "path": "settings.py", "copies": "1", "size": "1276", "license": "mit", "hash": 1208464840595486500, "line_mean": 34.4444444444, "line_max": 118, "alpha_frac": 0.75, "autogenerated": false, "ratio": 3.4768392370572205, "config_test": false, "has_no_k...
__author__ = 'Luke' import numpy as np import time import http.client, urllib.parse from pprint import pprint API_KEY = "H671BFO41N0TP246" n_spine = 8.0 fields = list(map(lambda x: "field"+x, map(str, range(1, 9)))) headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"} def m...
{ "repo_name": "jcuroboclub/White-Roofs", "path": "fakeUpdate.py", "copies": "1", "size": "1326", "license": "mit", "hash": -2232769110665545200, "line_mean": 34.8648648649, "line_max": 81, "alpha_frac": 0.5490196078, "autogenerated": false, "ratio": 3.970059880239521, "config_test": false, "h...
__author__ = "Luke" import numpy as np import time import httplib, urllib from pprint import pprint import os SERVER_UPDATE_LIMIT = 16 MAX_RETRIES = 25 lastSentList = {} def uploadData(data, APIKey): try: lastSent = lastSentList[APIKey] if ((time.time() - lastSent) < SERVER_UPDATE_LIMIT): ...
{ "repo_name": "jcuroboclub/White-Roofs", "path": "Pi/ThingSpeak.py", "copies": "1", "size": "2225", "license": "mit", "hash": 1318788846648294400, "line_mean": 30.338028169, "line_max": 78, "alpha_frac": 0.5608988764, "autogenerated": false, "ratio": 4.075091575091575, "config_test": false, "...
__author__ = 'luke' from boto.kinesis.exceptions import ResourceInUseException, ResourceNotFoundException import time class Stream(object): active = 'ACTIVE' def __init__(self, conn, stream_name='dervish', shard_count=1, timeout=-1, retry_pause=1): self.conn = conn self.stream_name = stream...
{ "repo_name": "lsamaha/dervisher", "path": "dervisher/stream.py", "copies": "1", "size": "2048", "license": "bsd-3-clause", "hash": -7733880312788726000, "line_mean": 31.5079365079, "line_max": 94, "alpha_frac": 0.5966796875, "autogenerated": false, "ratio": 4.031496062992126, "config_test": fa...
_author_ = 'Luke' from price_parsing import * def normalize(xTrain, yTrain, xTest, yTest): # time factor to normalize time data to firstTime = xTrain[0] for i in range(0, len(xTrain)): xTrain[i] = xTrain[i] - firstTime for i in range(0, len(xTest)): xTest[i] = xTest[i] - firstTime ...
{ "repo_name": "will-cromar/needy", "path": "normalizer.py", "copies": "1", "size": "1718", "license": "mit", "hash": -2914093002310429000, "line_mean": 27.6333333333, "line_max": 117, "alpha_frac": 0.6257275902, "autogenerated": false, "ratio": 3.0140350877192983, "config_test": true, "has_no...
import ts3 from pathlib import Path import time import random user = 'serveradmin' # server query password password = '' # server query user host = '' # server query host port = 10011 # server query port interval = 600 # Joke, insult interval - (secon...
{ "repo_name": "LukeBob/teamspeak-tools", "path": "Joke-bot.py", "copies": "1", "size": "2360", "license": "mit", "hash": -3085730035313520600, "line_mean": 28.8734177215, "line_max": 120, "alpha_frac": 0.5724576271, "autogenerated": false, "ratio": 3.704866562009419, "config_test": false, "ha...
__author__ = 'Luk' from unittest import TestCase from hs_core.hydroshare import utils from hs_core.models import GenericResource from django.contrib.auth.models import User import importlib class TestGetSerializer(TestCase): def setUp(self): pass def tearDown(self): User.objects.all().delet...
{ "repo_name": "hydroshare/hydroshare_temp", "path": "hs_core/tests/api/native/test_get_serializer.py", "copies": "1", "size": "1266", "license": "bsd-3-clause", "hash": 3374903916680725500, "line_mean": 27.1333333333, "line_max": 114, "alpha_frac": 0.6548183254, "autogenerated": false, "ratio": 4...
__author__ = 'Lunzhy' from bs4 import BeautifulSoup import re import json import datetime _Chinese_number = {'一': '1', '二': '2', '三': '3', '四': '4', '五': '5', '六': '6', '七': '7', '八': '8', '九': '9', '十': '10', '十一': '11', '十二': '12'} def _get_number_out(href): patt = re.compile(r'\d+') mat...
{ "repo_name": "lunzhy/PyShanbay", "path": "pyshanbay/page_parser.py", "copies": "1", "size": "7550", "license": "mit", "hash": 4403033068201856500, "line_mean": 31.9691629956, "line_max": 96, "alpha_frac": 0.5589257082, "autogenerated": false, "ratio": 3.2824561403508774, "config_test": false, ...
__author__ = 'Lunzhy' from pyshanbay.shanbay import VisitShanbay from pyshanbay import page_parser as parser import json def test_bs(): shanbay = VisitShanbay() shanbay.login() page_members = shanbay.members() total_page = parser.total_page_members(page_members) members_names = [] for page i...
{ "repo_name": "lunzhy/PyShanbay", "path": "tests/test_parse.py", "copies": "1", "size": "1635", "license": "mit", "hash": -8124875305947776000, "line_mean": 23.7878787879, "line_max": 61, "alpha_frac": 0.650764526, "autogenerated": false, "ratio": 3.193359375, "config_test": false, "has_no_ke...
__author__ = 'Lunzhy' import urllib.parse import urllib.request import http.cookiejar import copy from urllib.parse import urlsplit from urllib.parse import urljoin from urllib import request import datetime import json from pyshanbay.utils import ShanbayConnectException class VisitShanbay: def __init__(self, use...
{ "repo_name": "lunzhy/PyShanbay", "path": "pyshanbay/shanbay.py", "copies": "1", "size": "7822", "license": "mit", "hash": 5275939351292206000, "line_mean": 37.9154228856, "line_max": 100, "alpha_frac": 0.6025313219, "autogenerated": false, "ratio": 3.61460258780037, "config_test": false, "ha...
import eventlet import time from oslo.config import cfg from models import Instance from bcec_vm_ha.utils import green_ping as ping VMHA_OPTIONS = [ cfg.StrOpt('default_gateway', deprecated_group="DEFAULT", default='', help='Default Gateway to check the connectivity....
{ "repo_name": "luogangyi/bcec-vm-ha", "path": "bcec_vm_ha/ping_ckeck.py", "copies": "1", "size": "3286", "license": "apache-2.0", "hash": 138684238353478450, "line_mean": 26.8474576271, "line_max": 76, "alpha_frac": 0.5416920268, "autogenerated": false, "ratio": 3.8432748538011694, "config_test...