text stringlengths 0 1.05M | meta dict |
|---|---|
__author__ = 'Yin'
# Standard imports
from dateutil import parser
# Our imports
import emission.analysis.modelling.home as eamh
import emission.core.common as ec
import emission.core.get_database as edb
def detect_work_office(user_id):
Sections=edb.get_section_db()
office_candidate=[]
home=eamh.detect_ho... | {
"repo_name": "yw374cornell/e-mission-server",
"path": "emission/analysis/modelling/work_place.py",
"copies": "2",
"size": "4290",
"license": "bsd-3-clause",
"hash": 4734457714556581000,
"line_mean": 46.1428571429,
"line_max": 117,
"alpha_frac": 0.6524475524,
"autogenerated": false,
"ratio": 3.36... |
__author__ = 'Yin'
# Standard imports
from pymongo import MongoClient
from dateutil import parser
# Our imports
import emission.analysis.modelling.home as eamh
import emission.analysis.modelling.work_place as eamw
import emission.core.get_database as edb
import emission.core.common as ec
#############################... | {
"repo_name": "yw374cornell/e-mission-server",
"path": "emission/analysis/classification/inference/commute.py",
"copies": "2",
"size": "5049",
"license": "bsd-3-clause",
"hash": 1825258477646164000,
"line_mean": 48.0194174757,
"line_max": 176,
"alpha_frac": 0.5347593583,
"autogenerated": false,
"... |
__author__ = 'Yin'
# Standard imports
import logging
from uuid import UUID
# Our imports
from emission.analysis.result.carbon import getModeCarbonFootprint, carbonFootprintForMode
from emission.core.common import Inside_polygon,berkeley_area,getConfirmationModeQuery
from emission.core.get_database import get_section_d... | {
"repo_name": "yw374cornell/e-mission-server",
"path": "emission/net/api/visualize.py",
"copies": "1",
"size": "3499",
"license": "bsd-3-clause",
"hash": 5390636134610862000,
"line_mean": 41.156626506,
"line_max": 136,
"alpha_frac": 0.6593312375,
"autogenerated": false,
"ratio": 3.326045627376426... |
__author__ = 'Yin'
# Standard imports
import logging
# Our imports
from emission.analysis.result.carbon import getModeCarbonFootprint, carbonFootprintForMode
from emission.core.common import Inside_polygon,berkeley_area,getConfirmationModeQuery
from emission.core.get_database import get_section_db,get_profile_db
impor... | {
"repo_name": "joshzarrabi/e-mission-server",
"path": "emission/net/api/visualize.py",
"copies": "1",
"size": "3086",
"license": "bsd-3-clause",
"hash": 1680516433879648800,
"line_mean": 40.1466666667,
"line_max": 90,
"alpha_frac": 0.6140635126,
"autogenerated": false,
"ratio": 3.6178194607268463... |
__author__ = 'Yin'
# Standard imports
# Our imports
import emission.core.get_database as edb
import work_place as wp
import emission.core.common as ec
time_list = [[0,2],[2,4],[4,6],[6,8], [8,10], [10,12], [12,14], [14,16], [16,18], [18,20],[20,22],[22,24]]
def get_work_start_time(user_id,day):
# day should be fr... | {
"repo_name": "joshzarrabi/e-mission-server",
"path": "emission/analysis/modelling/work_time.py",
"copies": "2",
"size": "4066",
"license": "bsd-3-clause",
"hash": -4151310823274973700,
"line_mean": 37,
"line_max": 130,
"alpha_frac": 0.5782095425,
"autogenerated": false,
"ratio": 3.07099697885196... |
__author__ = 'Yin'
from ast import literal_eval
import pygmaps
POINTS = 'points'
PATH = 'path'
ALL = 'all'
COLOR = {1:"#0000FF", #walking - blue
2:"#00FF00", #running - green
3:"#FFFF00", #cycling - yellow
4:"#FF0000", #transport - red
5:"#00FFFF",... | {
"repo_name": "joshzarrabi/e-mission-server",
"path": "emission/analysis/plotting/gmaps/display_trip_moves_format_unused.py",
"copies": "2",
"size": "1889",
"license": "bsd-3-clause",
"hash": -1007709604085739800,
"line_mean": 32.3454545455,
"line_max": 70,
"alpha_frac": 0.4695606141,
"autogenerate... |
__author__ = 'yjxiong'
import cv2
import os
from multiprocessing import Pool, current_process
import argparse
out_path = ''
def dump_frames(vid_path):
video = cv2.VideoCapture(vid_path)
vid_name = vid_path.split('/')[-1].split('.')[0]
out_full_path = os.path.join(out_path, vid_name)
fcount = int(vi... | {
"repo_name": "gss-ucas/dense_flow",
"path": "build_of.py",
"copies": "1",
"size": "2979",
"license": "mit",
"hash": 3678196837415836700,
"line_mean": 29.7113402062,
"line_max": 147,
"alpha_frac": 0.5975159449,
"autogenerated": false,
"ratio": 2.883833494675702,
"config_test": false,
"has_no_... |
__author__ = 'yjxiong'
import os
import glob
import sys
from pipes import quote
from multiprocessing import Pool, current_process
import argparse
out_path = ''
def dump_frames(vid_path):
import cv2
video = cv2.VideoCapture(vid_path)
vid_name = vid_path.split('/')[-1].split('.')[0]
out_full_path = os... | {
"repo_name": "ZhanningGao/temporal-segment-networks",
"path": "tools/build_of.py",
"copies": "1",
"size": "4180",
"license": "bsd-2-clause",
"hash": -885762630298799400,
"line_mean": 33.5454545455,
"line_max": 129,
"alpha_frac": 0.604784689,
"autogenerated": false,
"ratio": 2.994269340974212,
... |
__author__ = 'ykhoma'
import serial
import struct
import numpy as np
from scipy import signal
from biosppy.signals.ecg import hamilton_segmenter
def preprocessing(data):
# create bandpass filter
fs = 277.0 # sampling rate (in Hz)
freq_pass = np.array([4.0, 35.0]) / (fs / 2.0)
freq_stop = np.array([1.... | {
"repo_name": "YuriyKhoma/ecg-identification",
"path": "ecg_tools.py",
"copies": "1",
"size": "3760",
"license": "apache-2.0",
"hash": 4359962099553919500,
"line_mean": 35.5048543689,
"line_max": 105,
"alpha_frac": 0.5821808511,
"autogenerated": false,
"ratio": 2.9513343799058083,
"config_test"... |
__author__ = 'ykhoma'
import sys
import os
import time
import numpy as np
from matplotlib import pyplot as plt
from config import BASIC_DIR, ECG_eHEALTH_DATA_DIR
import ecg_tools as ecg
ECG_RECORDS_DIR = ECG_eHEALTH_DATA_DIR
SERIAL_PORT = '/dev/ttyACM0'
BAUD_RATE = 115200
SAMPLES_NUM = 3000 # number of samples to re... | {
"repo_name": "YuriyKhoma/ecg-identification",
"path": "ecg_data_recording.py",
"copies": "1",
"size": "1531",
"license": "apache-2.0",
"hash": 7895083110738414000,
"line_mean": 24.5166666667,
"line_max": 80,
"alpha_frac": 0.6577400392,
"autogenerated": false,
"ratio": 3.013779527559055,
"confi... |
__author__ = 'ykk'
#coding=utf-8
# 在 goog.closure 找到一个父类的所有的子类
# 1. 读取所有的内容
# all_the_text = open(folder + filename).read();
# 2. 逐行读取,匹配对应的文本并且显示
def findLine(f,inheritStr,searchStr):
file=open(f)
line=file.readline()
count=0
childrenList = []
while line:
count += 1
# print line
... | {
"repo_name": "userYKK/pythonTry",
"path": "python27/application/findChild_JS.py",
"copies": "1",
"size": "2341",
"license": "apache-2.0",
"hash": -6299827263594194000,
"line_mean": 24.0375,
"line_max": 71,
"alpha_frac": 0.5641537693,
"autogenerated": false,
"ratio": 2.5418781725888326,
"config... |
__author__ = 'yl'
import pymongo
def connect(ip='localhost', port=27017):
con = pymongo.Connection(ip, port)
db = con.tagdb # db
tagtb = db.tags # collections
return tagtb
# update single tag info
def updateTag(name, path):
try:
tagtb = connect()
# if exist: update
... | {
"repo_name": "wenqf11/FSE",
"path": "facesearch/facesearch/tag.py",
"copies": "1",
"size": "1646",
"license": "mit",
"hash": 5018737241058573000,
"line_mean": 25.5483870968,
"line_max": 121,
"alpha_frac": 0.5455650061,
"autogenerated": false,
"ratio": 3.827906976744186,
"config_test": false,
... |
__author__ = 'ynagai'
import htmlmin
import jinja2
import os
import shutil
BUILD_PATH = '_build'
class StaPy:
def __init__(self):
self._root = os.path.realpath(os.path.dirname(__name__))
self._dst = os.path.join(self._root, BUILD_PATH)
def build(self):
self._prepare()
self._... | {
"repo_name": "uny/stapy",
"path": "build.py",
"copies": "1",
"size": "2431",
"license": "mit",
"hash": -342467416733049340,
"line_mean": 34.75,
"line_max": 107,
"alpha_frac": 0.5421637186,
"autogenerated": false,
"ratio": 3.6014814814814815,
"config_test": false,
"has_no_keywords": false,
... |
__author__ = 'yoavschatzberg'
import datetime
import json
import mock
import siftpartner
import unittest
import sys
import requests.exceptions
def valid_create_new_account_response_json():
return {
"production":{
"api_keys":[
{
"id":"54125bfee4b0b... | {
"repo_name": "SiftScience/sift-partner-python",
"path": "tests/client_test.py",
"copies": "1",
"size": "26576",
"license": "mit",
"hash": 8192152565853304000,
"line_mean": 45.873015873,
"line_max": 139,
"alpha_frac": 0.53243528,
"autogenerated": false,
"ratio": 4.130556419023935,
"config_test"... |
__author__ = 'yoavschatzberg'
import json
class Response(object):
def __init__(self, http_response):
self.body = http_response.json()
self.http_status_code = http_response.status_code
# if it's an error, grab the associated fields
if self.http_status_code != 200:
self.e... | {
"repo_name": "SiftScience/sift-partner-python",
"path": "siftpartner/response.py",
"copies": "1",
"size": "1063",
"license": "mit",
"hash": -3757845221316761000,
"line_mean": 34.4666666667,
"line_max": 88,
"alpha_frac": 0.5587958608,
"autogenerated": false,
"ratio": 3.742957746478873,
"config_... |
# Socket Introduction and API
'''
1. Create a socket object
s = socket.socket (socket_family, socket_type, protocol=0)
socket_family: This is either AF_UNIX or AF_INET.
socket_type: This is either SOCK_STREAM or SOCK_DGRAM.
protocol: This is usually left out, defaulting to 0.
2. Server Socket Metho... | {
"repo_name": "Yogendra0Sharma/Python-Network-Programming",
"path": "Module 2 Server and Client Socket/Echo Server.py",
"copies": "1",
"size": "1452",
"license": "apache-2.0",
"hash": 5635530787193821000,
"line_mean": 27.4705882353,
"line_max": 105,
"alpha_frac": 0.7183195592,
"autogenerated": fals... |
import requests
from lxml import html
import openpyxl
import pprint
from collections import OrderedDict
import sys
BASE_URL = 'http://results.vtu.ac.in'
def get_result(usn):
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0',
'X-Requeste... | {
"repo_name": "yogeshojha/vtu_improved_result",
"path": "app.py",
"copies": "1",
"size": "9687",
"license": "mit",
"hash": 7795633110770063000,
"line_mean": 42.2455357143,
"line_max": 178,
"alpha_frac": 0.5331888097,
"autogenerated": false,
"ratio": 3.246313672922252,
"config_test": false,
"h... |
#1 Count the number of (Enabled's) in the field [connect]
#2 Find the sum of the values in the field [number] more than or equal to (20057)
#3 What percentage of the numbers in [reading] are greater than or equal to ( 129.9)
#4 What percentage of the numbers in [age] are... | {
"repo_name": "andrewdami11/Completed-projects",
"path": "2016/Yohannes - Python/Stage 3 - GUI/Stage1.py",
"copies": "1",
"size": "4811",
"license": "mit",
"hash": 8944030484058495000,
"line_mean": 37.4344262295,
"line_max": 104,
"alpha_frac": 0.5161089171,
"autogenerated": false,
"ratio": 3.6364... |
#Q1 Count the number of (Enabled's) in the field [connect]
#Q2 Find the sum of the values in the field [number] more than or equal to (20057)
#Q3 What percentage of the numbers in [reading] are greater than or equal to ( 129.9)
#Q4 What percentage of the numbers in [age]... | {
"repo_name": "andrewdami11/Completed-projects",
"path": "2016/Yohannes - Python/Stage 1 - Functions/Stage 1.py",
"copies": "1",
"size": "4265",
"license": "mit",
"hash": 5608116022356684000,
"line_mean": 30.0676691729,
"line_max": 97,
"alpha_frac": 0.5606096131,
"autogenerated": false,
"ratio": ... |
__author__ = 'yongkang'
#coding=utf-8
# import _thread
# import time
#
# def print_time(threadName,delay):
# count = 0
# while count < 5:
# time.sleep(delay)
# count += 1
# print("%s:%s"%(threadName,time.ctime(time.time())))
#
# try:
# _thread.start_new_thread( print_time, ("Thread-... | {
"repo_name": "yongkanggao/test",
"path": "test/test3.py",
"copies": "1",
"size": "1242",
"license": "epl-1.0",
"hash": -44412362386334720,
"line_mean": 21.6,
"line_max": 64,
"alpha_frac": 0.5853462158,
"autogenerated": false,
"ratio": 3.1846153846153844,
"config_test": false,
"has_no_keyword... |
__author__ = 'yoni.bmesh@gmail.com (Yoni Ben-Meshulam)'
from xml.etree import ElementTree
import gdata.spreadsheet.service
import gdata.service
import atom.service
import gdata.spreadsheet
import atom
import getopt
import sys
import string
class SimpleCRUD:
def __init__(self, email, password):
self.gd_client =... | {
"repo_name": "yoni/csv_wordcount_analyzer",
"path": "google_spreadsheet_wordcounts.py",
"copies": "1",
"size": "2677",
"license": "mit",
"hash": -1282014045975148500,
"line_mean": 31.6463414634,
"line_max": 74,
"alpha_frac": 0.6544639522,
"autogenerated": false,
"ratio": 3.5131233595800526,
"c... |
__author__ = 'yosefderay'
from board import Point
class ConsoleOutput(object):
def welcome(self, battleship_board):
print "Welcome to mini_battleship! You have ten turns \
to guess where my battleship is on this", battleship_board.width, "by", battleship_board.height, "square by guessing a row a... | {
"repo_name": "reuvenderay/PythonProjects",
"path": "mini_battleship/output.py",
"copies": "1",
"size": "1128",
"license": "mit",
"hash": 1807567277269720800,
"line_mean": 24.0888888889,
"line_max": 145,
"alpha_frac": 0.5877659574,
"autogenerated": false,
"ratio": 3.5923566878980893,
"config_te... |
__author__ = 'yossiadi'
import os
import sys
import shutil
import argparse
from subprocess import call
# run system commands
def easy_call(command):
try:
call(command, shell=True)
except Exception as exception:
print "Error: could not execute the following"
print ">>", command
... | {
"repo_name": "adiyoss/AutoVowelDuration",
"path": "utils/run_back_end.py",
"copies": "1",
"size": "2261",
"license": "mit",
"hash": 3925342458779049000,
"line_mean": 27.2625,
"line_max": 76,
"alpha_frac": 0.6284829721,
"autogenerated": false,
"ratio": 3.3847305389221556,
"config_test": false,
... |
__author__ = 'Yossi'
import os
from optparse import OptionParser
from lib.textgrid import *
# this script shorten the wav file and its TextGrid
# it's shorten the file according to the vowel onset and offset
# 150 millisecond from the onset and 400 millisecond from the offset
if __name__ == "__main__":
# parse t... | {
"repo_name": "adiyoss/DeepWDM",
"path": "front_end/lib/ShortenFiles.py",
"copies": "1",
"size": "2735",
"license": "mit",
"hash": -5092091810406890000,
"line_mean": 41.734375,
"line_max": 117,
"alpha_frac": 0.5813528336,
"autogenerated": false,
"ratio": 3.9580318379160637,
"config_test": false... |
"""@author: Young
@license: (C) Copyright 2013-2017
@contact: aidabloc@163.com
@file: agent.py
@time: 2018/1/17 9:25
"""
from copy import deepcopy
import numpy as np
import torch
import torch.nn.functional as nf
from torch.autograd import Variable
from torch.optim import Adam
from agent.memory import Memory
from agen... | {
"repo_name": "AlphaSmartDog/DeepLearningNotes",
"path": "Torch-1 DDPG/Torch-1 DDPG CPU/agent/agent.py",
"copies": "1",
"size": "3598",
"license": "mit",
"hash": 1101209193062799400,
"line_mean": 33.6057692308,
"line_max": 70,
"alpha_frac": 0.6372984992,
"autogenerated": false,
"ratio": 3.4830590... |
"""@author: Young
@license: (C) Copyright 2013-2017
@contact: aidabloc@163.com
@file: main.py
@time: 2018/1/17 10:02
"""
import gc
import gym
from agent.agent import Agent
MAX_EPISODES = 5000
env = gym.make('BipedalWalker-v2')
state_size = env.observation_space.shape[0]
action_size = env.action_space.shape[0]
agen... | {
"repo_name": "AlphaSmartDog/DeepLearningNotes",
"path": "Torch-1 DDPG/Torch-1 DDPG CPU/main.py",
"copies": "1",
"size": "1172",
"license": "mit",
"hash": -7642396325510956000,
"line_mean": 22.9183673469,
"line_max": 61,
"alpha_frac": 0.6134812287,
"autogenerated": false,
"ratio": 3.2197802197802... |
__author__ = "Your Name"
__copyright__ = "Copyright 2016, Your Name"
__email__ = "your@email.edu"
__license__ = "MIT"
# include any imports that will be needed, example below
from snakemake.shell import shell
# Use this block to support arbitrary arguments to be passed in to the shell
# call without raising an error ... | {
"repo_name": "lcdb/lcdb-workflows",
"path": "wrappers/boilerplate/wrapper.py",
"copies": "1",
"size": "1074",
"license": "mit",
"hash": 5404757140276808000,
"line_mean": 31.5454545455,
"line_max": 77,
"alpha_frac": 0.7011173184,
"autogenerated": false,
"ratio": 3.6530612244897958,
"config_test... |
__author__ = 'YS1003'
print(' Boolean & Integer ')
boolData = True
print(boolData)
# Boolean sometimes is same as int
intData = 10
print(type(boolData))
print(boolData + intData)
print(boolData + boolData)
def is_it_true(anything):
if anything:
print('Yes, it is true. ' + str(anything) )
else:
... | {
"repo_name": "GiTechLab/LearnPython3",
"path": "SyntaxLab/datatypes.py",
"copies": "1",
"size": "1799",
"license": "mit",
"hash": -5528602521798692000,
"line_mean": 21.4375,
"line_max": 113,
"alpha_frac": 0.6830083565,
"autogenerated": false,
"ratio": 2.699248120300752,
"config_test": false,
... |
__author__ = 'ysahn'
import logging
from taskmator.task.core import Task
import subprocess
import sys
import string
class CommandLineTask(Task):
"""
Task that runs a Shell Command line
The param must contain "command"
The command are OS specific.
"""
logger = logging.getLogger(__name__)
d... | {
"repo_name": "altenia/taskmator",
"path": "taskmator/task/util.py",
"copies": "1",
"size": "4582",
"license": "mit",
"hash": -7053682302945309000,
"line_mean": 32.9407407407,
"line_max": 97,
"alpha_frac": 0.5691837625,
"autogenerated": false,
"ratio": 4.142857142857143,
"config_test": false,
... |
__author__ = 'ysahn'
import logging
import json
import os
import glob
import collections
from mako.lookup import TemplateLookup
from mako.template import Template
from taskmator.task.core import Task
class TransformTask(Task):
"""
Class that transform a json into code using a template
Uses mako as temp... | {
"repo_name": "altenia/taskmator",
"path": "taskmator/task/text.py",
"copies": "1",
"size": "4755",
"license": "mit",
"hash": -8118377834073049000,
"line_mean": 33.7080291971,
"line_max": 99,
"alpha_frac": 0.5991587802,
"autogenerated": false,
"ratio": 3.9135802469135803,
"config_test": false,
... |
__author__ = 'yubo'
import simplejson as json
from pymongo import MongoClient
from pymongo import errors
import os
from connection import establish_remote_connection
import thread
LOCAL_HOST = "mongodb://localhost:27017/"
REMOTE_CONNECTION = "mongodb://localhost:22"
def LoadData(path, collection):
for file_name... | {
"repo_name": "TextMiningToolKitTeam/MiningUtils",
"path": "mongodb_interface.py",
"copies": "1",
"size": "1637",
"license": "isc",
"hash": -1633675219434831600,
"line_mean": 33.829787234,
"line_max": 103,
"alpha_frac": 0.6548564447,
"autogenerated": false,
"ratio": 3.8427230046948355,
"config_... |
from __future__ import division
from megaman.geometry.utils import RegisterSubclasses
def init_optimizer(**kwargs):
optimizer = kwargs.get('step_method', 'fixed')
return BaseOptimizer.init(optimizer, **kwargs)
class BaseOptimizer(RegisterSubclasses):
"""
Base class for the optimizer.
BaseOptimiz... | {
"repo_name": "mmp2/megaman",
"path": "megaman/relaxation/optimizer.py",
"copies": "1",
"size": "5049",
"license": "bsd-2-clause",
"hash": -4567088936358563300,
"line_mean": 38.1395348837,
"line_max": 79,
"alpha_frac": 0.6026936027,
"autogenerated": false,
"ratio": 4.2788135593220336,
"config_t... |
from __future__ import division
import numpy as np
import scipy as sp
from scipy import sparse
from megaman.geometry import RiemannMetric
from megaman.geometry.utils import RegisterSubclasses
from .trace_variable import TracingVariable
from .precomputed import *
from .optimizer import init_optimizer
from .utils impo... | {
"repo_name": "mmp2/megaman",
"path": "megaman/relaxation/riemannian_relaxation.py",
"copies": "1",
"size": "13357",
"license": "bsd-2-clause",
"hash": -1400819343400378000,
"line_mean": 37.1628571429,
"line_max": 81,
"alpha_frac": 0.6152579172,
"autogenerated": false,
"ratio": 3.269767441860465,... |
from __future__ import division
import numpy as np
import time, os, warnings
default_basedir = os.path.join(os.getcwd(), 'backup')
def split_kwargs(relaxation_kwds):
"""Split relaxation keywords to keywords for optimizer and others"""
optimizer_keys_list = [
'step_method',
'linesearch',
... | {
"repo_name": "mmp2/megaman",
"path": "megaman/relaxation/utils.py",
"copies": "1",
"size": "5674",
"license": "bsd-2-clause",
"hash": -8762542718328540000,
"line_mean": 36.5761589404,
"line_max": 104,
"alpha_frac": 0.6228410293,
"autogenerated": false,
"ratio": 3.760106030483764,
"config_test"... |
import numpy as np
from .utils import _check_backend
@_check_backend('matplotlib')
def scatter_plot3d_matplotlib(embedding, coloring=None, fig=None,
subplot=False, subplot_grid=None, **kwargs):
from mpl_toolkits.mplot3d import art3d, Axes3D
if fig is None:
import matplotl... | {
"repo_name": "mmp2/megaman",
"path": "megaman/plotter/scatter_3d.py",
"copies": "1",
"size": "2598",
"license": "bsd-2-clause",
"hash": -6979444349208037000,
"line_mean": 30.6829268293,
"line_max": 78,
"alpha_frac": 0.5750577367,
"autogenerated": false,
"ratio": 3.187730061349693,
"config_test... |
import numpy as np
from .utils import *
from .utils import _check_backend
from .scatter_3d import scatter_plot3d_plotly, scatter_plot3d_matplotlib
from .covar_plotter3 import covar_plotter3d_plotly, covar_plotter3d_matplotlib
@_check_backend('plotly')
def plot_with_plotly( embedding, rieman_metric, nstd=2,
... | {
"repo_name": "mmp2/megaman",
"path": "megaman/plotter/plotter.py",
"copies": "1",
"size": "2199",
"license": "bsd-2-clause",
"hash": 617912419413741600,
"line_mean": 43.8775510204,
"line_max": 84,
"alpha_frac": 0.6612096407,
"autogenerated": false,
"ratio": 3.2577777777777777,
"config_test": f... |
import numpy as np
import os, pickle, pprint, copy
from .utils import *
class TracingVariable(object):
"""
The TracingVariable is the class to store the variables to trace and
print relaxation reports in each 'printiter' iteration.
"""
def __init__(self,n,s,relaxation_kwds,precomputed_kwds,**kwar... | {
"repo_name": "mmp2/megaman",
"path": "megaman/relaxation/trace_variable.py",
"copies": "1",
"size": "4537",
"license": "bsd-2-clause",
"hash": -4990521068433286000,
"line_mean": 39.1504424779,
"line_max": 77,
"alpha_frac": 0.5953273088,
"autogenerated": false,
"ratio": 3.5473025801407347,
"con... |
import numpy as np
import scipy as sp
import scipy.sparse
def precompute_optimzation_Y(laplacian_matrix, n_samples, relaxation_kwds):
"""compute Lk, neighbors and subset to index map for projected == False"""
relaxation_kwds.setdefault('presave',False)
relaxation_kwds.setdefault('presave_name','pre_comp_c... | {
"repo_name": "mmp2/megaman",
"path": "megaman/relaxation/precomputed.py",
"copies": "1",
"size": "6259",
"license": "bsd-2-clause",
"hash": -5805378873805534000,
"line_mean": 37.8757763975,
"line_max": 79,
"alpha_frac": 0.621025723,
"autogenerated": false,
"ratio": 3.1836215666327567,
"config_... |
import numpy as np
def _check_backend(backend):
def decorator(func):
def wrapper(*args,**kwargs):
import warnings
warnings.warn(
'Be careful in using megaman.plotter modules'
' API will change in the next release.',
FutureWarning
... | {
"repo_name": "mmp2/megaman",
"path": "megaman/plotter/utils.py",
"copies": "1",
"size": "3244",
"license": "bsd-2-clause",
"hash": -6178681955120300000,
"line_mean": 34.2608695652,
"line_max": 86,
"alpha_frac": 0.5826140567,
"autogenerated": false,
"ratio": 3.6821793416572075,
"config_test": f... |
import numpy as np
from .utils import _check_backend
def covar_plotter3d_matplotlib(embedding, rieman_metric, inspect_points_idx, ax,
colors):
"""3 Dimensional Covariance plotter using matplotlib backend."""
for pts_idx in inspect_points_idx:
plot_ellipse_matplotlib( cov... | {
"repo_name": "mmp2/megaman",
"path": "megaman/plotter/covar_plotter3.py",
"copies": "1",
"size": "6390",
"license": "bsd-2-clause",
"hash": -1835040957917812500,
"line_mean": 35.1016949153,
"line_max": 128,
"alpha_frac": 0.6215962441,
"autogenerated": false,
"ratio": 3.1934032983508245,
"confi... |
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111,aspect='equal')
# ================================ Draw Ver Rods ===========================
a = 0
with open("2dplotv.txt", "r") as file:
for... | {
"repo_name": "Aieener/SUS_2D",
"path": "2d.py",
"copies": "2",
"size": "1779",
"license": "mit",
"hash": -4141203429108287000,
"line_mean": 19.6976744186,
"line_max": 76,
"alpha_frac": 0.4541877459,
"autogenerated": false,
"ratio": 3,
"config_test": false,
"has_no_keywords": false,
"few_as... |
import numpy as np
import matplotlib.pyplot as plt
N1 = [] # Ver
N2 = [] # Hor
Q = [] # Q
Run = []
with open("dataplot.dat", "r") as file:
for line in file:
words = line.split()
r = float(words[0]) # Runs
n1 = float(words[2]) # Ver
n2 = float(words[3]) # Hor
q = float(words[1]) # Q
Run.append(r);
N1.... | {
"repo_name": "Aieener/HRE",
"path": "NvsR.py",
"copies": "2",
"size": "1562",
"license": "mit",
"hash": 4455201231367885300,
"line_mean": 23.421875,
"line_max": 76,
"alpha_frac": 0.6453265045,
"autogenerated": false,
"ratio": 2.267053701015965,
"config_test": false,
"has_no_keywords": false,... |
__author__ = 'yueeong'
#import testing infrastructure
import logging
import os, sys
import time
import yaml
from datetime import datetime
import unittest
from proboscis.asserts import assert_equal
from proboscis.asserts import assert_false
from proboscis.asserts import assert_raises
from proboscis.asserts import asse... | {
"repo_name": "yueeong/helios",
"path": "Tests/example.py",
"copies": "1",
"size": "2220",
"license": "mit",
"hash": 599072114837775100,
"line_mean": 32.1343283582,
"line_max": 222,
"alpha_frac": 0.7,
"autogenerated": false,
"ratio": 3.3789954337899544,
"config_test": true,
"has_no_keywords":... |
import scrapy
from scrapy.selector import Selector
from basicspider.items import F10Item
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
class MyTest(scrapy.Spider):
name="f10"
# start_urls = ['http://f10.eastmoney.com/f10_v2/BusinessAnalysis.aspx?code='+l.strip() for l in open('allcodes','r').readli... | {
"repo_name": "myownstory/FinSpider",
"path": "basicspider/spiders/BasicSpider.py",
"copies": "1",
"size": "2884",
"license": "mit",
"hash": -4999103788806410000,
"line_mean": 40.6811594203,
"line_max": 134,
"alpha_frac": 0.5747566064,
"autogenerated": false,
"ratio": 3.227833894500561,
"config... |
__author__ = 'yuehao'
import scipy.special as spefunc
import scipy.interpolate as itp
import numpy as np
import cmath as math
def beambeam_Gaussian_grid(sigmax, sigmay, rangex=10.0, rangey=10.0, epsilon=1e-3, gridpoints=10, sdds_file=None):
if abs(sigmax-sigmay)/(sigmax+sigmay) < epsilon:
xlist=np.linspac... | {
"repo_name": "YueHao/PyEPIC",
"path": "beambeam.py",
"copies": "1",
"size": "4207",
"license": "mit",
"hash": 2197501883476504600,
"line_mean": 32.9274193548,
"line_max": 114,
"alpha_frac": 0.5909198954,
"autogenerated": false,
"ratio": 2.5527912621359223,
"config_test": false,
"has_no_keywo... |
__author__ = "yulya"
from model.contact import Contact
import re
class ContactHelper:
def __init__(self, app):
self.app = app
def change_field_value(self, field_mame, text):
wd = self.app.wd
if text is not None:
wd.find_element_by_name(field_mame).click()
wd.... | {
"repo_name": "Coriolan8/python_traning",
"path": "fixture/contact.py",
"copies": "1",
"size": "3016",
"license": "apache-2.0",
"hash": -6332664221708240000,
"line_mean": 42.0857142857,
"line_max": 159,
"alpha_frac": 0.6153846154,
"autogenerated": false,
"ratio": 3.3215859030837005,
"config_tes... |
__author__ = "yulya"
from model.group import Group
class GroupHelper:
def __init__(self, app):
self.app = app
def open_group_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new"))>0):
wd.find_element_by_link_tex... | {
"repo_name": "Coriolan8/python_traning",
"path": "fixture/group.py",
"copies": "1",
"size": "3147",
"license": "apache-2.0",
"hash": 2021218750999575800,
"line_mean": 29.8529411765,
"line_max": 98,
"alpha_frac": 0.5843660629,
"autogenerated": false,
"ratio": 3.454445664105379,
"config_test": f... |
__author__ = 'Yunxi Lin'
from selenium import webdriver
from locators.OutOfWalletPageLocators import OutOfWalletPageLocators as OOWL
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from pages.BasePage import BasePage
from selenium.webdriver.common... | {
"repo_name": "jchen7960/python_framework",
"path": "pages/OutOfWalletPage.py",
"copies": "1",
"size": "2295",
"license": "mit",
"hash": 5925614808921840000,
"line_mean": 38.5862068966,
"line_max": 140,
"alpha_frac": 0.5468409586,
"autogenerated": false,
"ratio": 3.7808896210873146,
"config_tes... |
__author__ = 'Yunxi Lin'
import os
from selenium import webdriver
from selenium.webdriver.remote import webelement
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui... | {
"repo_name": "jchen7960/python_framework",
"path": "common/CommonMethods.py",
"copies": "1",
"size": "8030",
"license": "mit",
"hash": 7379070194962626000,
"line_mean": 35.5,
"line_max": 110,
"alpha_frac": 0.597758406,
"autogenerated": false,
"ratio": 4.067882472137791,
"config_test": false,
... |
import os
import sys
if os.environ['TERM'] == 'xterm':
os.environ['TERM'] = 'vt100'
# Now it's OK to import readline :)
# Import ROOT libraries
import ROOT
from ROOT import TH1F
import array
from sklearn import datasets
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import AdaBoostClassif... | {
"repo_name": "yuraic/koza4ok",
"path": "test/run1/apply_bdt_tmva_electrons.py",
"copies": "1",
"size": "3668",
"license": "mit",
"hash": 1360115120883123500,
"line_mean": 31.75,
"line_max": 122,
"alpha_frac": 0.6960196292,
"autogenerated": false,
"ratio": 2.4767049291019583,
"config_test": fal... |
import os
import sys
if os.environ['TERM'] == 'xterm':
os.environ['TERM'] = 'vt100'
# Now it's OK to import readline :)
# Import ROOT libraries
import ROOT
import array
from sklearn import datasets
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.metri... | {
"repo_name": "yuraic/koza4ok",
"path": "test/run1/apply_dt_tmva.py",
"copies": "1",
"size": "2546",
"license": "mit",
"hash": -2206865733156429300,
"line_mean": 26.085106383,
"line_max": 118,
"alpha_frac": 0.6736056559,
"autogenerated": false,
"ratio": 2.590030518819939,
"config_test": false,
... |
import os
import sys
if os.environ['TERM'] == 'xterm':
os.environ['TERM'] = 'vt100'
# Now it's OK to import readline :)
# Import ROOT libraries
import ROOT
from ROOT import TH1F
import array
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets
from sklearn.tree import DecisionTreeCla... | {
"repo_name": "yuraic/koza4ok",
"path": "test/run1/apply_bdt_basic_predict_electrons.py",
"copies": "1",
"size": "4201",
"license": "mit",
"hash": 5757574329393141000,
"line_mean": 27.3851351351,
"line_max": 122,
"alpha_frac": 0.6943584861,
"autogenerated": false,
"ratio": 2.6012383900928793,
"... |
import os
import sys
if os.environ['TERM'] == 'xterm':
os.environ['TERM'] = 'vt100'
# Now it's OK to import readline :)
# Import ROOT libraries
import ROOT
import array
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.metrics import roc_curve
from sk... | {
"repo_name": "yuraic/koza4ok",
"path": "examples/draw.py",
"copies": "2",
"size": "4678",
"license": "mit",
"hash": -3488663077255613400,
"line_mean": 23.6210526316,
"line_max": 81,
"alpha_frac": 0.6780675502,
"autogenerated": false,
"ratio": 2.52319309600863,
"config_test": true,
"has_no_ke... |
import os
import sys
if os.environ['TERM'] == 'xterm':
os.environ['TERM'] = 'vt100'
# Now it's OK to import readline :)
# Import ROOT libraries
import ROOT
import array
reader = ROOT.TMVA.Reader()
m_el_pt = array.array('f',[0]); reader.AddVariable("m_el_pt", m_el_pt)
m_el_eta = array.array('f',[0]); reader.AddV... | {
"repo_name": "yuraic/koza4ok",
"path": "test/run1/apply_bdt.py",
"copies": "1",
"size": "2580",
"license": "mit",
"hash": -378804726379706700,
"line_mean": 32.0769230769,
"line_max": 131,
"alpha_frac": 0.6759689922,
"autogenerated": false,
"ratio": 2.464183381088825,
"config_test": false,
"h... |
__author__ = "Yuriy"
# -*- coding: utf-8 -*-
import pytest
import json
import os.path
import importlib
import jsonpickle
from add_group.fixture.application import Application
fixture = None #глобальная переменная типа пустышка
target = None
@pytest.fixture
def app(request):
global fixture #гл... | {
"repo_name": "YuriyJurayev/pythonproject",
"path": "add_group/conftest.py",
"copies": "1",
"size": "3015",
"license": "apache-2.0",
"hash": -366774558217407500,
"line_mean": 45.3448275862,
"line_max": 196,
"alpha_frac": 0.6806847786,
"autogenerated": false,
"ratio": 2.9366120218579237,
"config... |
__author__ = "Yuriy"
from add_group.fixture.session import SessionHelper
from selenium import webdriver
from add_group.fixture.group import GroupHelper
from add_group.fixture.contact import ContactHelper
class Application:
def __init__(self, browser, base_url): #создание фикстуры
if brow... | {
"repo_name": "YuriyJurayev/pythonproject",
"path": "add_group/fixture/application.py",
"copies": "1",
"size": "1359",
"license": "apache-2.0",
"hash": -5386652941709357000,
"line_mean": 33.3333333333,
"line_max": 91,
"alpha_frac": 0.6,
"autogenerated": false,
"ratio": 3.25,
"config_test": fals... |
__author__ = 'yuriy'
import os, config
# Global Variables
d = config.getConfigDir()
errors = []
cwd = os.getcwd()
schemaDict = {'string': {'SYNTAX': '1.3.6.1.4.1.1466.115.121.1.15',
'SUBSTR': 'caseIgnoreSubstringsMatch',
'EQUALITY': 'caseIgnore... | {
"repo_name": "GluuFederation/install",
"path": "schema.py",
"copies": "1",
"size": "66137",
"license": "mit",
"hash": 2045113661882462500,
"line_mean": 56.8120629371,
"line_max": 160,
"alpha_frac": 0.505602008,
"autogenerated": false,
"ratio": 4.355990252255812,
"config_test": true,
"has_no_... |
__author__ = "Yuriy"
import time
class ContactHelper:
def __init__(self, app):
self.app = app
def giving_names(self, names):
wd = self.app.wd
wd.find_element_by_link_text("add new").click()
self.fill_text(field_name="firstname", text=names.firstname)
self.fill_text(fie... | {
"repo_name": "YuriyJurayev/pythonproject",
"path": "add_contact/fixture/contact.py",
"copies": "1",
"size": "3386",
"license": "apache-2.0",
"hash": -4801642120978647000,
"line_mean": 42.987012987,
"line_max": 106,
"alpha_frac": 0.628765505,
"autogenerated": false,
"ratio": 3.2003780718336485,
... |
__author__ = "Yuriy"
import time
class GroupHelper:
def __init__(self, app):
self.app = app
def open_groups_page(self):
wd = self.app.wd
wd.find_element_by_link_text("groups").click()
def create(self, text):
wd = self.app.wd
self.open_groups_page()
# init g... | {
"repo_name": "YuriyJurayev/pythonproject",
"path": "add_contact/fixture/group.py",
"copies": "1",
"size": "1446",
"license": "apache-2.0",
"hash": 25220951110881188,
"line_mean": 29.7659574468,
"line_max": 67,
"alpha_frac": 0.5836791148,
"autogenerated": false,
"ratio": 3.386416861826698,
"con... |
__author__ = "Yuriy"
class ContactHelper:
def __init__(self, app):
self.app = app
def giving_names(self, wd, names):
wd.find_element_by_link_text("add new").click()
wd.find_element_by_name("firstname").click()
wd.find_element_by_name("firstname").clear()
wd.find_elemen... | {
"repo_name": "YuriyJurayev/pythonproject",
"path": "1Python_training/add_contact1/fixture/contact.py",
"copies": "1",
"size": "4672",
"license": "apache-2.0",
"hash": 910289695565174500,
"line_mean": 49.247311828,
"line_max": 106,
"alpha_frac": 0.6264982877,
"autogenerated": false,
"ratio": 3.17... |
__author__ = "Yuriy"
class SessionHelper:
def __init__(self, app):
self.app = app
def login(self, username, password):
wd = self.app.wd
self.app.open_home_page()
wd.find_element_by_name("user").click()
wd.find_element_by_name("user").clear()
wd.find_element_by_... | {
"repo_name": "YuriyJurayev/pythonproject",
"path": "add_group/fixture/session.py",
"copies": "1",
"size": "2014",
"license": "apache-2.0",
"hash": -627633718286594000,
"line_mean": 36.4255319149,
"line_max": 128,
"alpha_frac": 0.5929505401,
"autogenerated": false,
"ratio": 2.669195751138088,
"... |
__author__ = 'yuriy'
import os, util, config
def cleanUp(d):
cleanUpPreviousRun(d)
cleanUpTomcat(d)
def cleanUpTomcat(d):
tomcatConf = os.path.join(d['tomcatHome'], "conf")
tomcatBin = os.path.join(d['tomcatHome'], "bin")
tomcatWebapps = os.path.join(d['tomcatHome'], "webapps")
tomcatConf =... | {
"repo_name": "GluuFederation/install",
"path": "clean.py",
"copies": "1",
"size": "1588",
"license": "mit",
"hash": -7554492010342007000,
"line_mean": 30.76,
"line_max": 84,
"alpha_frac": 0.5610831234,
"autogenerated": false,
"ratio": 3.0597302504816954,
"config_test": true,
"has_no_keywords... |
__author__ = 'yuriy'
import schema, config, random
d = config.getConfigDir()
# These will be used to print sample attr metadata
sampleMetaDataObjectclasses = {'gluuPerson': schema.gluuPerson,
'inetOrgPerson': schema.inetOrgPerson,
'eduPerson': schema.eduP... | {
"repo_name": "GluuFederation/install",
"path": "generateData.py",
"copies": "1",
"size": "8038",
"license": "mit",
"hash": -5002036831326984000,
"line_mean": 36.9150943396,
"line_max": 128,
"alpha_frac": 0.609231152,
"autogenerated": false,
"ratio": 3.4601808006887644,
"config_test": false,
... |
__author__ = 'yuriy'
import util, os
def configureDirectoryServer(config):
dsType = config['dsType']
if dsType == 'opendj' or dsType == 'opends':
configureOpenDJ(config)
else:
print 'Currently only opendj and opends is supported. Exit from DS configuration.'
def configureOpenDJ(d):
... | {
"repo_name": "GluuFederation/install",
"path": "configureDS.py",
"copies": "1",
"size": "2523",
"license": "mit",
"hash": 3764643635733222400,
"line_mean": 60.5365853659,
"line_max": 196,
"alpha_frac": 0.5683709869,
"autogenerated": false,
"ratio": 2.916763005780347,
"config_test": true,
"ha... |
__author__ = 'yusaira-khan'
import os
import requests
import un_iife_ize as main
current_dir = os.path.dirname(os.path.realpath(__file__))
proj_dir = os.path.dirname(current_dir)
def get_file():
speex_path = os.path.join(proj_dir, 'speex/')
try:
os.mkdir(speex_path)
except OSError:
pass... | {
"repo_name": "AmiApp/un-iife-ize",
"path": "tests/fetch_speex.py",
"copies": "2",
"size": "1026",
"license": "mit",
"hash": 1570801296849044500,
"line_mean": 24.0243902439,
"line_max": 115,
"alpha_frac": 0.6130604288,
"autogenerated": false,
"ratio": 3.0087976539589443,
"config_test": false,
... |
__author__ = 'Yusaira Khan'
import OpenBCI_Python.open_bci_v3 as bci
import sys
import time
import atexit
import threading
import timeit
import sender
start_time = None
board = None
main_thread = None
CSV_FILE_NAME = 'OpenBCI-RAW-PHIL.txt'
CSV_DELIM = ", "
pause = None
def clean_up():
board.stop()
board.di... | {
"repo_name": "yusaira-khan/Brain-Soother",
"path": "brain_connector.py",
"copies": "2",
"size": "1766",
"license": "mit",
"hash": -5600894715082734000,
"line_mean": 17.9892473118,
"line_max": 86,
"alpha_frac": 0.5821064553,
"autogenerated": false,
"ratio": 3.2643253234750462,
"config_test": fa... |
__author__ = 'yusaira-khan'
import re
import argparse
import signal
import sys
import os
import shutil
class Stack():
def __init__(self, num=0):
self.count = num
def push(self, num=1):
self.count += num
def pop(self, num=1):
self.count -= num
fun = "-FUN"
nonfun = "-OUT"
var =... | {
"repo_name": "yusaira-khan/un-iife-ize",
"path": "un_iife_ize/un_iife_ize.py",
"copies": "1",
"size": "11394",
"license": "mit",
"hash": -4388275781933894700,
"line_mean": 31.186440678,
"line_max": 110,
"alpha_frac": 0.5755660874,
"autogenerated": false,
"ratio": 3.6636655948553054,
"config_te... |
__author__ = 'Yusaira Khan'
import socket
import json
#import csvMat
import brain_connector
import time
import soundGenerator
import os
import multiprocessing
import threading
import csvMat
import freq_FFT
UDP_PORT=8888
HOST="127.0.0.1"
target_freq = 15
brain_freq = 10
current_duration = 1
server=None
pool = None... | {
"repo_name": "yusaira-khan/Brain-Soother",
"path": "sender.py",
"copies": "2",
"size": "1384",
"license": "mit",
"hash": 3239596983832312300,
"line_mean": 20.9682539683,
"line_max": 111,
"alpha_frac": 0.7037572254,
"autogenerated": false,
"ratio": 3.2336448598130842,
"config_test": false,
"h... |
__author__ = 'yusaira-khan'
import unittest
import un_iife_ize.un_iife_ize as un_iife_ize
class functionModification(unittest.TestCase):
def test_sections(self):
statement = 'function hello(){}\nhello();\nfunction world(){}'
f = un_iife_ize.Function(statement)
exp = 'hello=function(){};w... | {
"repo_name": "yusaira-khan/un-iife-ize",
"path": "tests/functionModification.py",
"copies": "1",
"size": "1289",
"license": "mit",
"hash": -9139151091628938000,
"line_mean": 29.6904761905,
"line_max": 104,
"alpha_frac": 0.575640031,
"autogenerated": false,
"ratio": 3.330749354005168,
"config_t... |
__author__ = 'yusaira-khan'
import unittest
import un_iife_ize
class functionModification(unittest.TestCase):
def test_sections(self):
statement = 'function hello(){}\nhello();\nfunction world(){}'
f = un_iife_ize.Function(statement)
exp = 'hello=function(){};world=function(){};'
... | {
"repo_name": "AmiApp/un_iife_ize",
"path": "tests/functionModification.py",
"copies": "2",
"size": "1263",
"license": "mit",
"hash": 3955729438333810000,
"line_mean": 28.3720930233,
"line_max": 104,
"alpha_frac": 0.5716547902,
"autogenerated": false,
"ratio": 3.377005347593583,
"config_test": ... |
from urllib2 import urlopen, Request
from urllib import urlencode
from dateutil import parser
import os
import re
try:
import cPickle as pickle
except ImportError:
import pickle
import time
try:
import simplejson as json
except ImportError:
import json
USER_AGENT = "reappy application/0.1"
hashtag_reg... | {
"repo_name": "yuvipanda/reappy",
"path": "reappy.py",
"copies": "1",
"size": "3003",
"license": "bsd-3-clause",
"hash": -725917893324747500,
"line_mean": 30.9468085106,
"line_max": 83,
"alpha_frac": 0.5827505828,
"autogenerated": false,
"ratio": 3.508177570093458,
"config_test": false,
"has_... |
__author__ = 'yuvv'
import json
from sys import exit as sys_exit
import plane
import pygame
from pygame.locals import *
# global variables
SCREEN_W, SCREEN_H = 480, 768
# pygame init
pygame.mixer.init()
pygame.init()
screen = pygame.display.set_mode((SCREEN_W, SCREEN_H),
pygame.FULL... | {
"repo_name": "Yuvv/LearnTestDemoTempMini",
"path": "py-pygame/Plain/main.py",
"copies": "1",
"size": "2775",
"license": "mit",
"hash": -2445878509540963000,
"line_mean": 29.2613636364,
"line_max": 114,
"alpha_frac": 0.5993240706,
"autogenerated": false,
"ratio": 2.812038014783527,
"config_test... |
__author__ = 'yuvv'
import pygame
from util import MyRect
class Plane(pygame.sprite.Sprite):
"""self plane"""
def __init__(self, img, origin_pos=(0, 0), speed=0.3):
pygame.sprite.Sprite.__init__(self) # pre init
self.image = img
img_rect = img.get_rect()
self.rect = MyRect(... | {
"repo_name": "Yuvv/LearnTestDemoTempMini",
"path": "py-pygame/Plain/plane.py",
"copies": "1",
"size": "1805",
"license": "mit",
"hash": -737438729364002700,
"line_mean": 30.3157894737,
"line_max": 80,
"alpha_frac": 0.5585434174,
"autogenerated": false,
"ratio": 2.9310344827586206,
"config_test... |
__author__ = 'Yuvv'
import tkinter
import tkinter.colorchooser
class MainWindow:
def __init__(self, title='MainWindow', geometry=None):
self.master = tkinter.Tk()
self.master.title = title
self.master.geometry = geometry
# tkinter.Frame.__init__(self, root)
self.create_wi... | {
"repo_name": "Yuvv/LearnTestDemoTempMini",
"path": "py-tkinter/iTkinter/mainframe.py",
"copies": "1",
"size": "1041",
"license": "mit",
"hash": -5735942936988065000,
"line_mean": 27.5277777778,
"line_max": 95,
"alpha_frac": 0.6260954236,
"autogenerated": false,
"ratio": 3.4347826086956523,
"co... |
__author__ = 'Yuvv'
from tkinter import *
from tkinter import ttk
def calculate(*args):
try:
value = float(feet.get())
meters.set((0.3048 * value * 10000.0 + 0.5) / 10000.0)
except ValueError:
pass
root = Tk()
root.title("Feet to Meters")
mainframe = ttk.Frame(root, ... | {
"repo_name": "Yuvv/LearnTestDemoTempMini",
"path": "py-tkinter/iTkinter/learn.py",
"copies": "1",
"size": "1178",
"license": "mit",
"hash": -5264236497628724000,
"line_mean": 27.45,
"line_max": 90,
"alpha_frac": 0.6697792869,
"autogenerated": false,
"ratio": 2.8047619047619046,
"config_test": ... |
__author__ = 'yuxiang, davidmichelman'
import os
import datasets
import datasets.imdb
import cPickle
import numpy as np
import cv2
class sintel_albedo(datasets.imdb):
def __init__(self, image_set, sintel_path=None):
self._image_set = image_set
if image_set == "train":
datasets.imdb.__... | {
"repo_name": "daweim0/Just-some-image-features",
"path": "lib/datasets/sintel_albedo.py",
"copies": "1",
"size": "12363",
"license": "mit",
"hash": -964894892606216200,
"line_mean": 34.5287356322,
"line_max": 122,
"alpha_frac": 0.5497856507,
"autogenerated": false,
"ratio": 3.4963235294117645,
... |
__author__ = 'yuxiang, davidmichelman'
import os
import datasets
import datasets.imdb
import cPickle
import numpy as np
import cv2
class sintel_clean(datasets.imdb):
def __init__(self, image_set, sintel_path=None):
self._image_set = image_set
if image_set == "train":
datasets.imdb.__i... | {
"repo_name": "daweim0/Just-some-image-features",
"path": "lib/datasets/sintel_clean.py",
"copies": "1",
"size": "12357",
"license": "mit",
"hash": -1987463386189499600,
"line_mean": 34.5086206897,
"line_max": 122,
"alpha_frac": 0.5494861212,
"autogenerated": false,
"ratio": 3.507521998296906,
... |
__author__ = 'yuxiang, davidmichelman'
import os
import datasets
import datasets.linemod_ape
import datasets.imdb
import cPickle
import numpy as np
import cv2
class linemod_ape(datasets.imdb):
def __init__(self, image_set, linemod_path=None):
datasets.imdb.__init__(self, 'linemod_ape_' + image_set)
... | {
"repo_name": "daweim0/Just-some-image-features",
"path": "lib/datasets/linemod_ape.py",
"copies": "1",
"size": "11160",
"license": "mit",
"hash": 9032520264682208000,
"line_mean": 33.4475308642,
"line_max": 100,
"alpha_frac": 0.5539426523,
"autogenerated": false,
"ratio": 3.5930457179652286,
"... |
__author__ = 'yuxiang' # derived from honda.py by fyang
import datasets
import datasets.imagenet3d
import os
import PIL
import datasets.imdb
import numpy as np
import scipy.sparse
from utils.cython_bbox import bbox_overlaps
from utils.boxes_grid import get_boxes_grid
import subprocess
import cPickle
from fast_rcnn.con... | {
"repo_name": "Yuliang-Zou/Automatic_Group_Photography_Enhancement",
"path": "lib/datasets/imagenet3d.py",
"copies": "1",
"size": "22471",
"license": "mit",
"hash": 852938896562641400,
"line_mean": 46.4071729958,
"line_max": 136,
"alpha_frac": 0.5326865738,
"autogenerated": false,
"ratio": 3.6016... |
__author__ = 'yuxiang' # derived from honda.py by fyang
import datasets
import datasets.kitti
import os
import PIL
import datasets.imdb
import numpy as np
import scipy.sparse
from utils.cython_bbox import bbox_overlaps
from utils.boxes_grid import get_boxes_grid
import subprocess
import cPickle
from fast_rcnn.config i... | {
"repo_name": "Yuliang-Zou/Automatic_Group_Photography_Enhancement",
"path": "lib/datasets/kitti.py",
"copies": "1",
"size": "31328",
"license": "mit",
"hash": 2326574629328442400,
"line_mean": 42.3905817175,
"line_max": 130,
"alpha_frac": 0.5122254852,
"autogenerated": false,
"ratio": 3.75005985... |
__author__ = 'yuxiang'
import datasets
import datasets.kitti_tracking
import os
import PIL
import datasets.imdb
import numpy as np
import scipy.sparse
from utils.cython_bbox import bbox_overlaps
from utils.boxes_grid import get_boxes_grid
import subprocess
import cPickle
from fast_rcnn.config import cfg
import math
fr... | {
"repo_name": "Yuliang-Zou/Automatic_Group_Photography_Enhancement",
"path": "lib/datasets/kitti_tracking.py",
"copies": "1",
"size": "21960",
"license": "mit",
"hash": -7820926106721366000,
"line_mean": 42.5714285714,
"line_max": 130,
"alpha_frac": 0.516575592,
"autogenerated": false,
"ratio": 3... |
__author__ = 'yuxiang'
import datasets
import datasets.nissan
import os
import PIL
import datasets.imdb
import numpy as np
import scipy.sparse
from utils.cython_bbox import bbox_overlaps
from utils.boxes_grid import get_boxes_grid
import subprocess
import cPickle
from fast_rcnn.config import cfg
import math
from rpn_m... | {
"repo_name": "Yuliang-Zou/Automatic_Group_Photography_Enhancement",
"path": "lib/datasets/nissan.py",
"copies": "1",
"size": "10202",
"license": "mit",
"hash": 1593996624592213500,
"line_mean": 39.4841269841,
"line_max": 127,
"alpha_frac": 0.5297000588,
"autogenerated": false,
"ratio": 3.7138696... |
__author__ = 'yuxiang'
import datasets
import datasets.nthu
import os
import PIL
import datasets.imdb
import numpy as np
import scipy.sparse
from utils.cython_bbox import bbox_overlaps
from utils.boxes_grid import get_boxes_grid
import subprocess
import cPickle
from fast_rcnn.config import cfg
import math
from rpn_msr... | {
"repo_name": "Yuliang-Zou/Automatic_Group_Photography_Enhancement",
"path": "lib/datasets/nthu.py",
"copies": "1",
"size": "10141",
"license": "mit",
"hash": -452285961329274600,
"line_mean": 39.2420634921,
"line_max": 127,
"alpha_frac": 0.5273641653,
"autogenerated": false,
"ratio": 3.725569434... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.gmu_scene
import datasets.imdb
import cPickle
import numpy as np
import cv2
class gmu_scene(datasets.imdb):
def __init__(self, image_set, gmu_scene_path = None):
datasets.imdb.__init__(self, 'gmu_scene_' + image_set)
self._image_set ... | {
"repo_name": "yuxng/DA-RNN",
"path": "lib/datasets/gmu_scene.py",
"copies": "2",
"size": "10685",
"license": "mit",
"hash": 228940064065288960,
"line_mean": 35.343537415,
"line_max": 135,
"alpha_frac": 0.5522695367,
"autogenerated": false,
"ratio": 3.4986902423051736,
"config_test": false,
"... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.lov
import datasets.imdb
import cPickle
import numpy as np
import cv2
from fcn.config import cfg
class lov(datasets.imdb):
def __init__(self, image_set, lov_path = None):
datasets.imdb.__init__(self, 'lov_' + image_set)
self._image_s... | {
"repo_name": "daweim0/Just-some-image-features",
"path": "lib/datasets/lov.py",
"copies": "1",
"size": "12244",
"license": "mit",
"hash": -6593482372348832000,
"line_mean": 35.4404761905,
"line_max": 148,
"alpha_frac": 0.5403462921,
"autogenerated": false,
"ratio": 3.468555240793201,
"config_t... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.lov
import datasets.imdb
import cPickle
import numpy as np
import cv2
class lov(datasets.imdb):
def __init__(self, image_set, lov_path = None):
datasets.imdb.__init__(self, 'lov_' + image_set)
self._image_set = image_set
self... | {
"repo_name": "yuxng/Deep_ISM",
"path": "ISM/lib/datasets/lov.py",
"copies": "1",
"size": "11534",
"license": "mit",
"hash": -7415637134123091000,
"line_mean": 35.04375,
"line_max": 148,
"alpha_frac": 0.5398820877,
"autogenerated": false,
"ratio": 3.504709814646004,
"config_test": false,
"has... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.rgbd_scene
import datasets.imdb
import cPickle
import numpy as np
import cv2
class rgbd_scene(datasets.imdb):
def __init__(self, image_set, rgbd_scene_path = None):
datasets.imdb.__init__(self, 'rgbd_scene_' + image_set)
self._image_... | {
"repo_name": "yuxng/DA-RNN",
"path": "lib/datasets/rgbd_scene.py",
"copies": "2",
"size": "10057",
"license": "mit",
"hash": 2387848484206673000,
"line_mean": 34.2877192982,
"line_max": 169,
"alpha_frac": 0.5518544298,
"autogenerated": false,
"ratio": 3.5512005649717513,
"config_test": false,
... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.rgbd_scenes
import datasets.imdb
import numpy as np
import subprocess
import cPickle
class rgbd_scenes(datasets.imdb):
def __init__(self, image_set, rgbd_scenes_path=None):
datasets.imdb.__init__(self, 'rgbd_scenes_' + image_set)
sel... | {
"repo_name": "yuxng/Deep_ISM",
"path": "ISM/lib/datasets/rgbd_scenes.py",
"copies": "1",
"size": "4957",
"license": "mit",
"hash": 4309803643525051000,
"line_mean": 33.1862068966,
"line_max": 146,
"alpha_frac": 0.5761549324,
"autogenerated": false,
"ratio": 3.626188734455011,
"config_test": fa... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.scenenet
import datasets.imdb
import cPickle
import numpy as np
import cv2
class scenenet(datasets.imdb):
def __init__(self, image_set, scenenet_path = None):
datasets.imdb.__init__(self, 'scenenet_' + image_set)
self._image_set = im... | {
"repo_name": "yuxng/Deep_ISM",
"path": "FCN/lib/datasets/scenenet.py",
"copies": "1",
"size": "7411",
"license": "mit",
"hash": -13986534960919420,
"line_mean": 33.6308411215,
"line_max": 126,
"alpha_frac": 0.5630819053,
"autogenerated": false,
"ratio": 3.6561420818944255,
"config_test": false... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.shapenet
import datasets.imdb
import numpy as np
import subprocess
import cPickle
import cv2
import PIL
from utils.cython_bbox import bbox_overlaps
from ism.config import cfg
from rpn_msr.generate_anchors import generate_anchors
g_shape_synset_name_pair... | {
"repo_name": "yuxng/Deep_ISM",
"path": "ISM/lib/datasets/shapenet.py",
"copies": "1",
"size": "12540",
"license": "mit",
"hash": 6124462401045924000,
"line_mean": 40.8,
"line_max": 126,
"alpha_frac": 0.5097288676,
"autogenerated": false,
"ratio": 3.718861209964413,
"config_test": false,
"has... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.shapenet_scene
import datasets.imdb
import cPickle
import numpy as np
import cv2
class shapenet_scene(datasets.imdb):
def __init__(self, image_set, shapenet_scene_path = None):
datasets.imdb.__init__(self, 'shapenet_scene_' + image_set)
... | {
"repo_name": "yuxng/Deep_ISM",
"path": "ISM/lib/datasets/shapenet_scene.py",
"copies": "1",
"size": "7906",
"license": "mit",
"hash": -4949582841784440000,
"line_mean": 34.1377777778,
"line_max": 106,
"alpha_frac": 0.5684290412,
"autogenerated": false,
"ratio": 3.585487528344671,
"config_test"... |
__author__ = 'yuxiang'
import os
import datasets
import datasets.shapenet_single
import datasets.imdb
import cPickle
import numpy as np
import cv2
class shapenet_single(datasets.imdb):
def __init__(self, image_set, shapenet_single_path = None):
datasets.imdb.__init__(self, 'shapenet_single_' + image_set)
... | {
"repo_name": "yuxng/DA-RNN",
"path": "lib/datasets/shapenet_single.py",
"copies": "2",
"size": "11071",
"license": "mit",
"hash": -3426152562345855500,
"line_mean": 33.1697530864,
"line_max": 95,
"alpha_frac": 0.5592990696,
"autogenerated": false,
"ratio": 3.5956479376420916,
"config_test": fa... |
__author__ = 'yuya'
from urllib.error import *
import time
import rbn
class LatestRBN:
def __init__(self, watch_callsigns):
self.rbn_list = list()
self.watch_callsigns = list()
self.last_id_set = dict()
self.set_watch_callsign(watch_callsigns)
'''
監視コールサインの設定
''... | {
"repo_name": "yuya167/RBN-Crawler",
"path": "latest.py",
"copies": "1",
"size": "1288",
"license": "mit",
"hash": 4410271011739074000,
"line_mean": 27.1333333333,
"line_max": 94,
"alpha_frac": 0.5142180095,
"autogenerated": false,
"ratio": 3.7566765578635013,
"config_test": false,
"has_no_ke... |
__author__ = 'yuya'
import sys
from PyQt5 import uic, QtWidgets, QtCore, QtGui
import rbn
window = None
band_table = None
band_scene = None
band_graphics = None
def create_window():
global window, band_table, band_scene, band_graphics
if window is None:
window = uic.loadUi("main.ui")
band_t... | {
"repo_name": "yuya167/RBN-Crawler",
"path": "main_window.py",
"copies": "1",
"size": "3368",
"license": "mit",
"hash": -5656924447966617000,
"line_mean": 30.1111111111,
"line_max": 83,
"alpha_frac": 0.6023809524,
"autogenerated": false,
"ratio": 3.1343283582089554,
"config_test": false,
"has... |
__author__ = 'Yves Bonjour'
from math import log10
from Proxies import IndexProxy
def create_vector_calculator(index_url):
index_service = IndexProxy(index_url)
return VectorCalculator(index_service)
class VectorCalculator:
def __init__(self, index_service):
self.index_service = index_service
... | {
"repo_name": "ybonjour/nuus",
"path": "services/clustering/VectorCalculator.py",
"copies": "1",
"size": "1203",
"license": "mit",
"hash": 8184713963793579000,
"line_mean": 29.1,
"line_max": 91,
"alpha_frac": 0.6284289277,
"autogenerated": false,
"ratio": 3.3792134831460676,
"config_test": fals... |
__author__ = 'Yves Bonjour'
from math import sqrt
from VectorCalculator import create_vector_calculator
import uuid
import redis
def create_clusterer(redis_host, redis_port, clustering_threshold, index_url):
redis_db = redis.Redis(redis_host, redis_port)
store = RedisClusterStore(redis_db, clustering_threshol... | {
"repo_name": "ybonjour/nuus",
"path": "services/clustering/Clusterer.py",
"copies": "1",
"size": "5122",
"license": "mit",
"hash": -234607008600791940,
"line_mean": 33.3758389262,
"line_max": 101,
"alpha_frac": 0.6526747364,
"autogenerated": false,
"ratio": 3.687544996400288,
"config_test": fa... |
__author__ = 'Yves Bonjour'
from Proxies import FeedProxy
from OPMLReader import OPMLReader
import uuid
import os
import sys
import ConfigParser
USAGE = "USAGE: python Service.py [config_file] [subscriptions_file]"
def create_feedimporter(feed_url):
reader = OPMLReader()
feed_proxy = FeedProxy(feed_url)
... | {
"repo_name": "ybonjour/nuus",
"path": "feedimport/FeedImporter.py",
"copies": "1",
"size": "1276",
"license": "mit",
"hash": -8073152073309762000,
"line_mean": 25.6041666667,
"line_max": 81,
"alpha_frac": 0.670846395,
"autogenerated": false,
"ratio": 3.554317548746518,
"config_test": true,
"... |
__author__ = 'Yves Bonjour'
from Proxies import IndexProxy
from Proxies import ClusterProxy
from Proxies import FeedProxy
from Proxies import ArticleProxy
from NuusFeedParser import FeedParser
def create_feed_collector(index_url, cluster_url, feed_url, article_url):
index_proxy = IndexProxy(index_url)
cluste... | {
"repo_name": "ybonjour/nuus",
"path": "feedcollector/FeedCollector.py",
"copies": "1",
"size": "1662",
"license": "mit",
"hash": 6358169474942442000,
"line_mean": 35.9555555556,
"line_max": 110,
"alpha_frac": 0.6606498195,
"autogenerated": false,
"ratio": 3.9477434679334915,
"config_test": fal... |
__author__ = 'Yves Bonjour'
import couchdb
def article_to_dict(article):
d = {
"title": article.title,
"text": article.text,
"updated_on": article.updated_on,
"feed": article.feed
}
if article.identifier: d["id"] = article.identifier
return d
class Article(object):
... | {
"repo_name": "ybonjour/nuus",
"path": "services/articles/Articles.py",
"copies": "1",
"size": "1527",
"license": "mit",
"hash": -5712671230687423000,
"line_mean": 27.2962962963,
"line_max": 99,
"alpha_frac": 0.6044531762,
"autogenerated": false,
"ratio": 3.567757009345794,
"config_test": false... |
__author__ = 'Yves Bonjour'
import json
from werkzeug.exceptions import HTTPException
import werkzeug.serving
from werkzeug.wsgi import SharedDataMiddleware
from werkzeug.wrappers import Request, Response
class WerkzeugService(object):
def __init__(self, server, port, url_map, static_folders=None, debug=True):
... | {
"repo_name": "ybonjour/nuus",
"path": "common/WerkzeugService.py",
"copies": "1",
"size": "1678",
"license": "mit",
"hash": -6621138976130854000,
"line_mean": 31.9019607843,
"line_max": 115,
"alpha_frac": 0.678784267,
"autogenerated": false,
"ratio": 3.8932714617169375,
"config_test": false,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.