text
stringlengths
0
1.05M
meta
dict
__author__ = 'x1ang.li' from client.common import * import json import socket import re def checkip(): if clicfg['getIpFrom'] == 'ServerApi': r = reqget('/ip') if (r.status_code != 200): raise Exception('HTTP request error. HTTP status code %i' % r.status_code) rjson = r.json()...
{ "repo_name": "x1angli/pyDDNS", "path": "client/upstream.py", "copies": "2", "size": "1789", "license": "mit", "hash": -4702807515923548000, "line_mean": 33.4038461538, "line_max": 139, "alpha_frac": 0.5919508105, "autogenerated": false, "ratio": 3.41412213740458, "config_test": false, "has_n...
__author__ = 'x1ang.li' import pickle, re from os import path, makedirs from urllib.parse import urljoin from shutil import rmtree from zipfile import ZipFile import requests from bs4 import BeautifulSoup from .bookbase import BookBase cachefolder = path.expanduser(path.join('~', 'snapbook', 'cache')) outfolder = p...
{ "repo_name": "x1angli/snapbook", "path": "snapbook/books/mhbook.py", "copies": "1", "size": "11711", "license": "mit", "hash": 2863874321564379600, "line_mean": 33.9611940299, "line_max": 182, "alpha_frac": 0.5834685339, "autogenerated": false, "ratio": 3.420268691588785, "config_test": false,...
__author__ = 'x1ang.li' import sys, os from client.common import * def updateHostFile(): r = reqgetauth('/silos/'+clicfg['silo_id']) if (r.status_code != 200): raise Exception('HTTP request error. HTTP status code %i' % r.status_code) rjson = r.json() if not rjson: raise Exception('Un...
{ "repo_name": "x1angli/DDNS-chiasma", "path": "client/downstream.py", "copies": "2", "size": "1765", "license": "mit", "hash": -2785224201950758400, "line_mean": 31.0909090909, "line_max": 91, "alpha_frac": 0.6339943343, "autogenerated": false, "ratio": 3.6618257261410787, "config_test": false,...
__author__ = 'xana' from flask import request, jsonify, g qiniu_setting = { 'access_key' : 'iQ3ndG5uRpwdeln_gcrH3iiZ7E3KbMdJVkdYV9Im', 'secret_key' : 'AGsp6K7fu1NsH2DnsPi7hW3qa3JXb4dtfeGvkm-A', 'bucket_name' : 'image', 'bucket_domain' : 'https://oi3qt7c8d.qnssl.com/', 'callbakUrl' : 'http://139.1...
{ "repo_name": "imxana/toocool", "path": "apps/qiniu.py", "copies": "1", "size": "1780", "license": "mit", "hash": 4364947766977422000, "line_mean": 26.8125, "line_max": 74, "alpha_frac": 0.5280898876, "autogenerated": false, "ratio": 3.308550185873606, "config_test": false, "has_no_keywords":...
import numpy as np import os import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from matplotlib.ticker import MultipleLocator, FormatStrFormatter from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib import cm from numpy import ma def autocrop_img(filename): """Call epstools ...
{ "repo_name": "xparedesfortuny/pylines", "path": "plots.py", "copies": "1", "size": "29938", "license": "mit", "hash": -7082227597879846000, "line_mean": 34.1797884841, "line_max": 104, "alpha_frac": 0.5402164473, "autogenerated": false, "ratio": 3.021598708114655, "config_test": false, "has_...
import numpy as np import time import interpolation_methods as im from resamp_line import resamp_line def buffer_present_line(xc, yc, ic, jc, densc, epsc, vxc, vyc, divc, tracerc, tc, line_values): """Keeps track of all the line parameters""" line_values.append([xc, yc, ic, jc, densc...
{ "repo_name": "xparedesfortuny/pylines", "path": "compute_lines.py", "copies": "1", "size": "13457", "license": "mit", "hash": 5418452632903405000, "line_mean": 34.3202099738, "line_max": 118, "alpha_frac": 0.4974362785, "autogenerated": false, "ratio": 3.0591043418958854, "config_test": true, ...
import numpy as np def bilinear(xc, yc, ic, jc, x, y, z, nx, ny): """Bilinear interpolation z(x, y) at (xc, yc)""" if xc <= x[0] or xc >= x[nx-1] or yc <= y[0] or yc >= y[ny-1]: return z[ic, jc] if xc >= x[ic] and yc >= y[jc]: x1 = x[ic] y1 = y[jc] x2 = x[ic+1] y...
{ "repo_name": "xparedesfortuny/pylines", "path": "interpolation_methods.py", "copies": "1", "size": "3110", "license": "mit", "hash": 6987430548352392000, "line_mean": 23.4881889764, "line_max": 66, "alpha_frac": 0.4147909968, "autogenerated": false, "ratio": 2.114208021753909, "config_test": f...
import numpy as np def pulsar(i, j, i2, j2, R_b, rho_0a, xp, yp, xs, ys, densty, eps, velx, vely, xznl, yznl, gamma, c, gridlx, gridly, nx, ny, theo, rhowp, uwp, vwp, rhowi, uwi, vwi, rin, rins): """Computes some physical quantities for testing purposes""" t_b = R_b/c if theo == 1...
{ "repo_name": "xparedesfortuny/pylines", "path": "test_rhd.py", "copies": "1", "size": "6729", "license": "mit", "hash": -5919368530637377000, "line_mean": 33.1573604061, "line_max": 86, "alpha_frac": 0.5309852876, "autogenerated": false, "ratio": 2.3552677633881696, "config_test": false, "ha...
import numpy as np def read(input_file): """Reads a FORTRAN file as an input""" offset = 4 ints = np.array(np.memmap(input_file, dtype='<i4', mode='r', shape=(1, 10), order='F', offset=offset)) offset += ints.nbytes ints = zip(*ints) ints = [i[0] for i in ints]...
{ "repo_name": "xparedesfortuny/pylines", "path": "read_fortran.py", "copies": "1", "size": "12195", "license": "mit", "hash": -7878390417104153000, "line_mean": 37.9616613419, "line_max": 224, "alpha_frac": 0.4678146781, "autogenerated": false, "ratio": 3.1422313836640043, "config_test": false,...
import numpy as np def resamp_line(all_lines, resamp, a, CGS_units): """Downsamples the line to 'resamp' cells. All the lines should have the same lenght with a constant cell size. We are not averaging the data in the same bin because we are dealing with relativistic quantities. E.g. to average t...
{ "repo_name": "xparedesfortuny/pylines", "path": "resamp_line.py", "copies": "1", "size": "6769", "license": "mit", "hash": 992616962137860100, "line_mean": 33.3604060914, "line_max": 84, "alpha_frac": 0.4406854779, "autogenerated": false, "ratio": 3.4377856780091416, "config_test": false, "h...
import numpy as np from astropy.coordinates import SkyCoord from astropy import units as u import matplotlib.pyplot as plt import sys param = {} execfile(sys.argv[1]) def find_target(ra, dec, ra0, dec0, testing=0): tar = SkyCoord(ra0, dec0, unit=(u.hour, u.deg)) cat = SkyCoord(ra*u.degree, dec*u.degree) ...
{ "repo_name": "xparedesfortuny/Phot", "path": "analysis/differential_photometry.py", "copies": "1", "size": "11587", "license": "mit", "hash": -2684942786445494000, "line_mean": 41.9148148148, "line_max": 143, "alpha_frac": 0.5997238284, "autogenerated": false, "ratio": 2.868069306930693, "conf...
import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator, FormatStrFormatter from matplotlib.ticker import AutoMinorLocator from astropy.time import Time import itertools import sys import os import matplotlib param = {} execfile(sys.argv[1]) def auto_crop_img(filename): ...
{ "repo_name": "xparedesfortuny/Phot", "path": "plots/plots.py", "copies": "1", "size": "47343", "license": "mit", "hash": -2988465427837623000, "line_mean": 52.5554298643, "line_max": 352, "alpha_frac": 0.5853030015, "autogenerated": false, "ratio": 2.7357989020514304, "config_test": false, "...
import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator def compute_nightly_average(cat_mag): return np.asarray([[np.average(mag[:, i]) for i in xrange(len(mag[0, :]))] for mag in cat_mag]) def compute_statistics(cat_mag): avg_mag = [np.average(cat_mag[:, k]) for k...
{ "repo_name": "xparedesfortuny/Phot", "path": "analysis/multi_night_std_test.py", "copies": "1", "size": "2214", "license": "mit", "hash": 1029043583157024300, "line_mean": 34.7096774194, "line_max": 99, "alpha_frac": 0.5429087624, "autogenerated": false, "ratio": 2.774436090225564, "config_tes...
import numpy as np import os import shutil import source_extraction import quality_control import source_match import multi_night_std_test import differential_photometry # import xy_fit # import detrending import offset import sys param = {} execfile(sys.argv[1]) def make_output_folder(o): def check_and_make(fo...
{ "repo_name": "xparedesfortuny/Phot", "path": "analysis/analysis.py", "copies": "1", "size": "6528", "license": "mit", "hash": 8760947914701399000, "line_mean": 47.7164179104, "line_max": 206, "alpha_frac": 0.6246936275, "autogenerated": false, "ratio": 2.9849108367626886, "config_test": true, ...
import numpy as np import sys import matplotlib.pyplot as plt param = {} execfile(sys.argv[1]) def plot_nstars(cat_ra, cat_mjd, suff): nstars = [max([len(frame) for frame in ra]) for ra in cat_ra] mjd = [np.average(mjd) for mjd in cat_mjd] plt.rcdefaults() fig = plt.figure() ax = fig.add_subplot...
{ "repo_name": "xparedesfortuny/Phot", "path": "analysis/quality_control.py", "copies": "1", "size": "4278", "license": "mit", "hash": -6446808679337019000, "line_mean": 42.2121212121, "line_max": 160, "alpha_frac": 0.6388499299, "autogenerated": false, "ratio": 3.060085836909871, "config_test":...
import numpy as np import sys param = {} execfile(sys.argv[1]) def compute_averaged_mag(cat_mag, ind): return np.average([np.average(mag[:, ind]) for mag in cat_mag]) def apply_offset(cat_mag, offset): return [mag-offset for mag in cat_mag] def compute_final_magnitudes(cat_mag, ind): # nightly_avg_m...
{ "repo_name": "xparedesfortuny/Phot", "path": "analysis/offset.py", "copies": "1", "size": "2146", "license": "mit", "hash": -4520946164634989600, "line_mean": 34.1803278689, "line_max": 119, "alpha_frac": 0.6551724138, "autogenerated": false, "ratio": 2.772609819121447, "config_test": false, ...
import os from astropy import wcs from astropy import units as u from astropy.coordinates import SkyCoord import numpy as np from astropy.io import fits import sys param = {} execfile(sys.argv[1]) def make_image_list(i): t = [i+d for d in os.listdir(i) if d[-5:] == '.fits'] return t def check_saturation(i...
{ "repo_name": "xparedesfortuny/Phot", "path": "calibration/source_check.py", "copies": "1", "size": "1614", "license": "mit", "hash": 3461412296021103600, "line_mean": 27.8214285714, "line_max": 70, "alpha_frac": 0.614622057, "autogenerated": false, "ratio": 2.8216783216783217, "config_test": f...
import os from astropy.io import fits import shutil import sys param = {} execfile(sys.argv[1]) def make_output_folder(o): if os.path.exists(o): shutil.rmtree(o) os.makedirs(o) def make_file_list(i): file_list = [n for n in os.listdir(i) if n[-5:] == '.fits'] return file_list def crop(i, ...
{ "repo_name": "xparedesfortuny/Phot", "path": "calibration/crop.py", "copies": "1", "size": "1916", "license": "mit", "hash": -7801386208632561000, "line_mean": 26.768115942, "line_max": 78, "alpha_frac": 0.5704592902, "autogenerated": false, "ratio": 2.797080291970803, "config_test": false, ...
import os import numpy as np from pyraf import iraf iraf.imred(_doprint=0) iraf.ccdred(_doprint=0) import sys param = {} execfile(sys.argv[1]) def save_file_list(i): file_list = [i+n for n in os.listdir(i) if n[-5:] == '.fits'] np.savetxt(i+'input.dat', file_list, fmt="%s") return file_list def make_m...
{ "repo_name": "xparedesfortuny/Phot", "path": "calibration/bias_darks_flats.py", "copies": "1", "size": "12957", "license": "mit", "hash": 9198117870703268000, "line_mean": 44.4631578947, "line_max": 86, "alpha_frac": 0.658562939, "autogenerated": false, "ratio": 2.798488120950324, "config_test...
import os import shutil from astropy.io import fits import numpy as np import sys param = {} execfile(sys.argv[1]) def make_tmp_folder(o): if os.path.exists(o): shutil.rmtree(o) os.makedirs(o) def make_file_list(i): file_list = [n for n in os.listdir(i) if n[-5:] == '.fits'] return file_li...
{ "repo_name": "xparedesfortuny/Phot", "path": "calibration/shutter_map.py", "copies": "1", "size": "1613", "license": "mit", "hash": -8181229268405981000, "line_mean": 24.6031746032, "line_max": 74, "alpha_frac": 0.5939243645, "autogenerated": false, "ratio": 2.7109243697478993, "config_test": ...
import os import shutil from astropy.io import fits import sys param = {} execfile(sys.argv[1]) def make_tmp_folder(o): if os.path.exists(o): shutil.rmtree(o) os.makedirs(o) def make_file_list(i): file_list = [n for n in os.listdir(i) if n[-5:] == '.fits'] return file_list def nonlinear_...
{ "repo_name": "xparedesfortuny/Phot", "path": "calibration/linearity_map.py", "copies": "1", "size": "1397", "license": "mit", "hash": 8435547537459651000, "line_mean": 22.6779661017, "line_max": 74, "alpha_frac": 0.5926986399, "autogenerated": false, "ratio": 2.868583162217659, "config_test": ...
import os import shutil import subprocess import numpy as np from astropy.coordinates import SkyCoord from astropy import units as u import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator import sys import pyfits param = {} execfile(sys.argv[1]) def make_image_list(i): t = [d for d in os....
{ "repo_name": "xparedesfortuny/Phot", "path": "calibration/nightly_std_test.py", "copies": "1", "size": "4508", "license": "mit", "hash": -6465196468803862000, "line_mean": 31.4316546763, "line_max": 132, "alpha_frac": 0.5760869565, "autogenerated": false, "ratio": 2.738760631834751, "config_te...
import os import shutil import subprocess import sys import pyfits param = {} execfile(sys.argv[1]) def make_tmp_folder(o): if os.path.exists(o): shutil.rmtree(o) os.makedirs(o) def call_astrometry_dot_net(i, o, ra, dec, radius, scale_low, scale_high): """ -D: Output path -p: No plots ...
{ "repo_name": "xparedesfortuny/Phot", "path": "calibration/astrometry.py", "copies": "1", "size": "1958", "license": "mit", "hash": 6878539969006752000, "line_mean": 28.6666666667, "line_max": 93, "alpha_frac": 0.5781409602, "autogenerated": false, "ratio": 2.962178517397882, "config_test": fal...
import os import shutil import sys import numpy as np import subprocess from astropy.io import fits import pyfits param = {} execfile(sys.argv[1]) def make_folder_list(i): t = [i+d+'/' for d in sorted(os.listdir(i)) if d[:2] == '20' and os.path.exists(i+d+'/'+param['field_name'])] return t def make_cat_fo...
{ "repo_name": "xparedesfortuny/Phot", "path": "analysis/source_extraction.py", "copies": "1", "size": "3325", "license": "mit", "hash": -5807024446166244000, "line_mean": 29.504587156, "line_max": 162, "alpha_frac": 0.5957894737, "autogenerated": false, "ratio": 2.9013961605584644, "config_test...
import sys import numpy as np from astropy.coordinates import SkyCoord from astropy import units as u import itertools param = {} execfile(sys.argv[1]) def find_target(ra, dec, ra0, dec0, fl, testing=0): tar = SkyCoord(ra0, dec0, unit=(u.hour, u.deg)) cat = SkyCoord(ra*u.degree, dec*u.degree) ind, sep2d...
{ "repo_name": "xparedesfortuny/Phot", "path": "analysis/source_match.py", "copies": "1", "size": "6556", "license": "mit", "hash": 6264055926211983000, "line_mean": 38.9756097561, "line_max": 158, "alpha_frac": 0.5741305674, "autogenerated": false, "ratio": 3.251984126984127, "config_test": tru...
__author__ = 'xcbtrader' # -*- coding: utf-8 -*- import poloniex import time import sys def leer_operativa(): fOperativa = open('polo_pingpong_var_operativa.txt', 'r') op = fOperativa.readline() op = int(fOperativa.readline()) fOperativa.close() return op def leer_ordenes(): global polo try: openOrders = po...
{ "repo_name": "xcbtrader/polo_pigpong_var", "path": "polo_pingpong_var.py", "copies": "1", "size": "6360", "license": "mit", "hash": 1151172667130591000, "line_mean": 29, "line_max": 207, "alpha_frac": 0.6014150943, "autogenerated": false, "ratio": 2.6577517760133724, "config_test": false, "h...
_author__ = 'xebin' #from ..dao import av_dao import redisco from redisco import models import sys reload(sys) sys.setdefaultencoding('utf8') # r = redis.StrictRedis(host='120.27.30.239',port='6379') # pool = redis.ConnectionPool(host='120.27.30.239', port=6379, db=0) # r = redis.Redis(connection_pool=pool) # redisco...
{ "repo_name": "petchat/senz.dashboard.backend", "path": "test/redis_test.py", "copies": "1", "size": "2006", "license": "mit", "hash": 1257051215181358000, "line_mean": 32.4333333333, "line_max": 123, "alpha_frac": 0.6645064806, "autogenerated": false, "ratio": 2.882183908045977, "config_test":...
__author__ = 'xertrov' import logging from sqlalchemy import create_engine, Column, String, Integer, ForeignKey, Boolean, Index from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base engine = create_engine('sqlite:///temp.sqlite', connect_args={'timeout': 15})#, echo=True) Ba...
{ "repo_name": "XertroV/nvbtally", "path": "nvbtally/models.py", "copies": "1", "size": "3975", "license": "mit", "hash": 3726839515142611500, "line_mean": 25.8581081081, "line_max": 115, "alpha_frac": 0.6883018868, "autogenerated": false, "ratio": 3.505291005291005, "config_test": false, "has...
__author__ = 'Xev' class Tile: def __init__(self): pass Empty, Wall, Start, StartGhost = range(4) class Layout(object): def __init__(self): self.grid = [] self.shape = (0, 0) self.food = [] def load_from_file(self, filename): rows = 0 with open(filen...
{ "repo_name": "Xevaquor/aipac", "path": "layout.py", "copies": "1", "size": "1375", "license": "mit", "hash": -874683054921100000, "line_mean": 27.6458333333, "line_max": 78, "alpha_frac": 0.3723636364, "autogenerated": false, "ratio": 4.583333333333333, "config_test": false, "has_no_keywords...
__author__ = 'xiajie' from scipy.optimize import fmin_l_bfgs_b from sparseAutoencoderCost import J, mat2vec, vec2mat from sampleIMAGES import sample_images import numpy as np import math import scipy.io as sio def random_bound(levels): return math.sqrt(6./(levels[0]+levels[1]+1)) def initialization(levels): ...
{ "repo_name": "jayshonzs/UFLDL", "path": "SparseAutoencoderV/train.py", "copies": "1", "size": "1750", "license": "mit", "hash": 2534791054744048000, "line_mean": 25.1194029851, "line_max": 109, "alpha_frac": 0.5994285714, "autogenerated": false, "ratio": 3.0224525043177892, "config_test": fals...
__author__ = 'xiajie' import matplotlib.pyplot as plt import numpy as np epsilon = 0.00001 def load_data(filename=u'pcaData.txt'): res = np.genfromtxt(filename) plt.scatter(res[0, :], res[1, :]) plt.show() return res def pca(X): m = len(X[0]) avg = np.mean(X, axis=1).reshape((2, 1))*np.on...
{ "repo_name": "jayshonzs/UFLDL", "path": "PCAandWhitening/PCAin2D.py", "copies": "1", "size": "1261", "license": "mit", "hash": 5478398536260893000, "line_mean": 21.5178571429, "line_max": 60, "alpha_frac": 0.5733544806, "autogenerated": false, "ratio": 2.5526315789473686, "config_test": false,...
__author__ = 'xiajie' import numpy as np from MNISThelper import loader from SparseAutoencoderV.sparseAutoencoderCost import J, vec2mat from SparseAutoencoderV.train import initialization from scipy.optimize import fmin_l_bfgs_b import scipy.io as sio from SelfTaughtLearning.feedForwardAutoencoder import feed_forward ...
{ "repo_name": "jayshonzs/UFLDL", "path": "DeepNetworks/stackedAE.py", "copies": "1", "size": "4047", "license": "mit", "hash": -1916791437122655700, "line_mean": 33.2966101695, "line_max": 148, "alpha_frac": 0.6481344206, "autogenerated": false, "ratio": 2.9178082191780823, "config_test": false...
__author__ = 'xiajie' import numpy as np from scipy.optimize import fmin_l_bfgs_b from sparseAutoencoderLinearCost import J, mat2vec, vec2mat import math import scipy.io as sio imageChannels = 3 patchDim = 8 numPatches = 100000 visibleSize = patchDim*patchDim*imageChannels outputSize = visibleSize hiddenSize = 400 ...
{ "repo_name": "jayshonzs/UFLDL", "path": "LinearDecoder/train.py", "copies": "1", "size": "2780", "license": "mit", "hash": -3415788802816722000, "line_mean": 25.7307692308, "line_max": 129, "alpha_frac": 0.6183453237, "autogenerated": false, "ratio": 3.065049614112459, "config_test": false, ...
__author__ = 'xiajie' import numpy as np from scipy.signal import convolve2d def sigmoid(z): return 1./(1.+np.e**(-z)) def convolve(patch_dim, num_features, images, W, b, zca_white, avg): WT = W.dot(zca_white) num_images = images.shape[3] image_dim = images.shape[0] image_channels = images.shap...
{ "repo_name": "jayshonzs/UFLDL", "path": "ConvolutionandPooling/cnnConvolve.py", "copies": "1", "size": "1687", "license": "mit", "hash": -6834025728924711000, "line_mean": 36.4888888889, "line_max": 107, "alpha_frac": 0.6046235922, "autogenerated": false, "ratio": 3.353876739562624, "config_te...
__author__ = 'xiajie' import numpy as np from scipy.sparse import coo_matrix def stack_params(WBs, sr_mat): w_l1 = WBs[0][0] b_l1 = WBs[0][1] w_l2 = WBs[1][0] b_l2 = WBs[1][1] theta = w_l1.reshape(np.size(w_l1)).tolist() + b_l1.tolist() theta += w_l2.reshape(np.size(w_l2)).tolist() + b_l2.tol...
{ "repo_name": "jayshonzs/UFLDL", "path": "DeepNetworks/stackedAECost.py", "copies": "1", "size": "2375", "license": "mit", "hash": 7314570686863800000, "line_mean": 30.25, "line_max": 133, "alpha_frac": 0.5713684211, "autogenerated": false, "ratio": 2.6595744680851063, "config_test": false, "...
__author__ = 'xiajie' import numpy as np from softMaxCost import J, vec2mat from scipy.optimize import fmin_l_bfgs_b from MNISThelper.loader import load_train_imgs, load_train_labels from SoftmaxRegression.prediction import predict from computeNumericalGradient import compute_numerical_gradient def initialize_theta(...
{ "repo_name": "jayshonzs/UFLDL", "path": "SoftmaxRegression/train.py", "copies": "1", "size": "1862", "license": "mit", "hash": -2851466865995785000, "line_mean": 30.5593220339, "line_max": 123, "alpha_frac": 0.6482277121, "autogenerated": false, "ratio": 2.9602543720190777, "config_test": fals...
__author__ = 'xiajie' import numpy as np from sparseAutoencoderLinearCost import J from MNISThelper import loader EPSILON = 1e-4 def theta_plus(theta, i): global EPSILON ret = np.zeros(len(theta)) ret[i] += EPSILON return ret+theta def theta_minus(theta, i): global EPSILON ret = np.zeros(...
{ "repo_name": "jayshonzs/UFLDL", "path": "LinearDecoder/checkStackedAECost.py", "copies": "1", "size": "1471", "license": "mit", "hash": 1166723995976340500, "line_mean": 23.1147540984, "line_max": 75, "alpha_frac": 0.5975526852, "autogenerated": false, "ratio": 3.064583333333333, "config_test"...
__author__ = 'xiajie' import numpy as np from stackedAECost import stacked_cost from MNISThelper import loader EPSILON = 1e-4 def theta_plus(theta, i): global EPSILON ret = np.zeros(len(theta)) ret[i] += EPSILON return ret+theta def theta_minus(theta, i): global EPSILON ret = np.zeros(len...
{ "repo_name": "jayshonzs/UFLDL", "path": "DeepNetworks/checkStackedAECost.py", "copies": "1", "size": "1480", "license": "mit", "hash": 282801505806119460, "line_mean": 23.262295082, "line_max": 81, "alpha_frac": 0.5993243243, "autogenerated": false, "ratio": 3.0641821946169774, "config_test": ...
__author__ = 'xiajie' import numpy as np import scipy.io as sio import random from scipy import misc def load_data(N=10000, size=12, filename=u'IMAGES_RAW.mat'): res_mat = np.zeros((size**2, N)) data = sio.loadmat(filename) IMAGESr = data['IMAGESr'] # print IMAGESr.shape for n in range(N): ...
{ "repo_name": "jayshonzs/UFLDL", "path": "PCAandWhitening/PCAandWhiteningImage.py", "copies": "1", "size": "2385", "license": "mit", "hash": -3168600196297576400, "line_mean": 23.3367346939, "line_max": 108, "alpha_frac": 0.5647798742, "autogenerated": false, "ratio": 2.592391304347826, "config...
__author__ = 'xiajie' import numpy as np import struct def load_train_imgs(filename=u'../MNISThelper/train-images.idx3-ubyte'): train_file = open(filename, 'rb') buf = train_file.read() index = 0 magic, num_images, num_rows, num_columns = struct.unpack_from('>IIII', buf, index) # print magic...
{ "repo_name": "jayshonzs/UFLDL", "path": "MNISThelper/loader.py", "copies": "1", "size": "1316", "license": "mit", "hash": 3679254555553047000, "line_mean": 25.32, "line_max": 86, "alpha_frac": 0.5782674772, "autogenerated": false, "ratio": 3.357142857142857, "config_test": false, "has_no_key...
__author__ = 'xiajie' import numpy as np def mat2vec(WB): vec = [] for wb in WB: vec.extend(wb[0].reshape(wb[0].size)) vec.extend(wb[1]) return np.array(vec) def vec2mat(theta, levels): WB = [] off = 0 for i, si in enumerate(levels): if i == len(levels)-1: ...
{ "repo_name": "jayshonzs/UFLDL", "path": "SparseAutoencoderV/sparseAutoencoderCost.py", "copies": "1", "size": "1622", "license": "mit", "hash": -1899973225900009700, "line_mean": 24.746031746, "line_max": 123, "alpha_frac": 0.5339087546, "autogenerated": false, "ratio": 2.2748948106591866, "co...
__author__ = 'xiajie' import scipy.io as sio import numpy as np import random from scipy import misc def normalize(images): mat = np.mean(images, axis=0) mat = images - mat mstd = np.std(mat.reshape(mat.size))*3. mat = np.where(mat > mstd, mstd, mat) mat = np.where(mat < -mstd, -mstd, mat) ma...
{ "repo_name": "jayshonzs/UFLDL", "path": "SparseAutoencoderV/sampleIMAGES.py", "copies": "1", "size": "1031", "license": "mit", "hash": 131392108457833760, "line_mean": 26.8648648649, "line_max": 115, "alpha_frac": 0.5955383123, "autogenerated": false, "ratio": 2.8324175824175826, "config_test"...
import Queue import json, os from networkx.readwrite import json_graph import numpy as np def load_raw(path_raw): raw_file = np.load(open(path_raw, 'rb')) raw = dict() for key in raw_file.keys(): if key in ['mole_fraction','net_reaction_rate']: raw[key] = np.matrix(raw_file[key]) ...
{ "repo_name": "golsun/GPS", "path": "plot_flux_graph.py", "copies": "1", "size": "3299", "license": "mit", "hash": -2911853488077401000, "line_mean": 22.3971631206, "line_max": 96, "alpha_frac": 0.597756896, "autogenerated": false, "ratio": 2.587450980392157, "config_test": false, "has_no_key...
__author__ = 'Xiang-Guo Li' __copyright__ = 'Copyright 2018, The Materials Virtual Lab' __email__ = 'xil110@eng.ucsd.edu' __date__ = '07/30/18' from pymatgen.util.testing import PymatgenTest import os import unittest import numpy as np import warnings from pymatgen import Structure from pymatgen.analysis.gb.grain impo...
{ "repo_name": "gVallverdu/pymatgen", "path": "pymatgen/analysis/gb/tests/test_grain.py", "copies": "3", "size": "19404", "license": "mit", "hash": 3543441756198860000, "line_mean": 55.9032258065, "line_max": 118, "alpha_frac": 0.5447330447, "autogenerated": false, "ratio": 3.3414844153607715, "...
import os import cv2 import glob import numpy as np from PIL import Image from resizeimage import resizeimage #import pdb # reduce the size by the rate of alpha = 0.80 # (x,y) beta = 0.70 # number of slices #pdb.set_trace() rootpath = '/diskStation/LIDC/' readfolder = 'LIDC_NUMPY_3d/' savefolder = 'LIDC_NUMPY_3d_r...
{ "repo_name": "eglxiang/Med", "path": "resize_npy.py", "copies": "1", "size": "1293", "license": "bsd-2-clause", "hash": 8070535217595587000, "line_mean": 25.4081632653, "line_max": 123, "alpha_frac": 0.6658932715, "autogenerated": false, "ratio": 2.5553359683794468, "config_test": false, "ha...
__author__ = ['Xiaobo'] import time import httplib from pagrant.exceptions import VirtualBootstrapError from pagrant.provisioners import BaseProvisioner CHECK_TIMEOUT = 60 * 5 class HttpCheckerPrivisioner(BaseProvisioner): def __init__(self, machine, logger, provision_info, provider_info): super(HttpChe...
{ "repo_name": "markshao/pagrant", "path": "pagrant/provisioners/health/http.py", "copies": "1", "size": "1669", "license": "mit", "hash": 9166589740931248000, "line_mean": 41.7948717949, "line_max": 150, "alpha_frac": 0.6105452367, "autogenerated": false, "ratio": 4.0608272506082725, "config_te...
__author__ = 'xiaolongjia' import csv result = [] with open('docs.csv', 'rb') as csvfile: doc_reader = csv.reader(csvfile, delimiter=',') for row in doc_reader: numString = row[2] numString = numString.split(',') contains = False ad = False third_party = False ...
{ "repo_name": "mindbergh/PrivacyPolicyAnalyser", "path": "csv_parser.py", "copies": "1", "size": "1460", "license": "apache-2.0", "hash": 1605017667395815000, "line_mean": 23.3333333333, "line_max": 81, "alpha_frac": 0.452739726, "autogenerated": false, "ratio": 3.8120104438642297, "config_test...
__author__ = 'xiao' import io import struct import sys from ctypes import * def _from_bytes(input_bytes, byteorder='big'): length = len(input_bytes) if byteorder == 'big': parts = struct.unpack((">%dB" % length), input_bytes) parts = parts[0 : length] elif byteorder == 'little': pa...
{ "repo_name": "vtflute/TSParser", "path": "TSStruct.py", "copies": "1", "size": "24249", "license": "mit", "hash": -7494350626489804000, "line_mean": 35.9664634146, "line_max": 138, "alpha_frac": 0.5204338323, "autogenerated": false, "ratio": 3.699313501144165, "config_test": false, "has_no_k...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf def fcnn_layer(input_tensor, input_dim, output_dim, layer_name, wd=False, wd_collection=False, keep_prob=0.8, variable_collection=Fals...
{ "repo_name": "xiaotaw/chembl", "path": "dnn_model/dnn_model.py", "copies": "1", "size": "5030", "license": "apache-2.0", "hash": 1306517112609947100, "line_mean": 54.8888888889, "line_max": 174, "alpha_frac": 0.6896620278, "autogenerated": false, "ratio": 2.909196067090804, "config_test": fals...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import datetime import math import numpy import random import tensorflow as tf import pk_input as pki import dnn_model def train(target_list, train_from = 0): # dataset d = pki.Da...
{ "repo_name": "xiaotaw/chembl", "path": "dnn_model/pk_train.py", "copies": "1", "size": "8407", "license": "apache-2.0", "hash": 8764115865822751000, "line_mean": 43.4814814815, "line_max": 231, "alpha_frac": 0.6300701796, "autogenerated": false, "ratio": 2.9570875835385158, "config_test": fals...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import glob import time import numpy import cPickle import datetime import tensorflow as tf from scipy import sparse import dnn_model def virtual_screening(target_list, part_num): # ...
{ "repo_name": "xiaotaw/chembl", "path": "dnn_model/pk_virtual_screen.py", "copies": "1", "size": "6593", "license": "apache-2.0", "hash": -6331973186768511000, "line_mean": 25.4779116466, "line_max": 121, "alpha_frac": 0.6283937509, "autogenerated": false, "ratio": 3.0622387366465396, "config_t...
import os import sys import math import time import datetime import multiprocessing import numpy as np from scipy import sparse from collections import defaultdict # folders fp_dir = "fp_files" structure_dir = "structure_files" mask_dir = "mask_files" if not os.path.exists(mask_dir): os.mkdir(mask_dir) log_dir = "l...
{ "repo_name": "xiaotaw/chembl", "path": "data_files/chembl_cal_mask.py", "copies": "1", "size": "9368", "license": "apache-2.0", "hash": 2546938431615297000, "line_mean": 32.219858156, "line_max": 140, "alpha_frac": 0.6226515798, "autogenerated": false, "ratio": 2.976803304734668, "config_test"...
import os import sys import time import getpass import numpy as np from scipy import sparse from collections import defaultdict from matplotlib import pyplot as plt from sklearn.externals import joblib from sklearn.ensemble import RandomForestClassifier sys.path.append("/home/%s/Documents/chembl/data_files/" % getpas...
{ "repo_name": "xiaotaw/chembl", "path": "rf_model/chembl_rf_vs.py", "copies": "1", "size": "3129", "license": "apache-2.0", "hash": -7331059477715695000, "line_mean": 32.2872340426, "line_max": 103, "alpha_frac": 0.6248002557, "autogenerated": false, "ratio": 2.8265582655826558, "config_test": ...
import os import gzip import numpy as np from collections import defaultdict from rdkit import Chem from rdkit.Chem.AtomPairs.Pairs import GetAtomPairFingerprint def dict_2_str(d): keylist = d.keys() keylist.sort() kv_list = ["{}: {}".format(k, d[k]) for k in keylist] return ", ".join(kv_list) """ ## calcu...
{ "repo_name": "xiaotaw/chembl", "path": "data_files/chembl_cal_fp.py", "copies": "1", "size": "2051", "license": "apache-2.0", "hash": -6003566958170400000, "line_mean": 25.9868421053, "line_max": 149, "alpha_frac": 0.6791808874, "autogenerated": false, "ratio": 2.6027918781725887, "config_test...
import os import getpass import numpy as np import pandas as pd from scipy import sparse from collections import defaultdict data_dir = "/home/%s/Documents/chembl/data_files/" % getpass.getuser() fp_dir = os.path.join(data_dir, "fp_files") mask_dir = os.path.join(data_dir, "mask_files") structure_dir = os.path.join(d...
{ "repo_name": "xiaotaw/chembl", "path": "data_files/chembl_input.py", "copies": "1", "size": "13511", "license": "apache-2.0", "hash": 4678268535018519000, "line_mean": 37.9365994236, "line_max": 159, "alpha_frac": 0.6501369255, "autogenerated": false, "ratio": 3.0706818181818183, "config_test"...
import time import Queue import threading import pk_input as pki target_list = ["cdk2", "egfr_erbB1", "gsk3b", "hgfr", "map_k_p38a", "tpk_lck", "tpk_src", "vegfr2"] target = target_list[0] d = pki.Datasets(target_list) # using queue # producer thread class Producer(threading.Thread): def __init__(self, t_nam...
{ "repo_name": "xiaotaw/chembl", "path": "dnn_model/pk_queue.py", "copies": "1", "size": "1842", "license": "apache-2.0", "hash": 7259446142795516000, "line_mean": 23.2368421053, "line_max": 125, "alpha_frac": 0.6069489685, "autogenerated": false, "ratio": 2.93312101910828, "config_test": false,...
__author__ = 'xiezj' from DeltaCrawler import DeltaCrawler import lib.threadpool import copy from User import User from lib.progressbar import ProgressBar, Percentage, Bar progress_bar = None user_left = 0 user_failed = 0 class UserLeft(Percentage): def update(self, pbar): return "%s users left, %s user...
{ "repo_name": "ZaneXie/DeltaCrawler", "path": "run.py", "copies": "1", "size": "1761", "license": "mit", "hash": -4795871012256379000, "line_mean": 27.868852459, "line_max": 82, "alpha_frac": 0.6059057354, "autogenerated": false, "ratio": 3.4529411764705884, "config_test": false, "has_no_keyw...
__author__ = 'xiezj' from User import User import urllib import urllib2 class Crawler(object): DEBUG = False TIMEOUT = 5 def __init__(self, user=None): if user is None: self.user = User() else: self.user = user #enable cookie self.opener = urllib2...
{ "repo_name": "ZaneXie/DeltaCrawler", "path": "Crawler.py", "copies": "1", "size": "1303", "license": "mit", "hash": 1636939021840538400, "line_mean": 24.5490196078, "line_max": 73, "alpha_frac": 0.5548733691, "autogenerated": false, "ratio": 3.9011976047904193, "config_test": false, "has_no_...
__author__ = 'xiezj' class User(object): def __init__(self, line=None): self.type = "DL" self.login_name = "" self.password = "" self.miles = 0 self.current_miles = 0 self.MQM = 0 self.current_MQM = 0 self.status = "" self.expriration = "null...
{ "repo_name": "ZaneXie/DeltaCrawler", "path": "User.py", "copies": "1", "size": "1756", "license": "mit", "hash": 5133598020296904000, "line_mean": 26.0153846154, "line_max": 49, "alpha_frac": 0.4601366743, "autogenerated": false, "ratio": 3.809110629067245, "config_test": false, "has_no_keyw...
__author__ = 'Xing, Chang' from ast import * from template import * interface = ['printf'] primitive = ['+', '-', '*', '/', 'div', '#'] def funType(tycon): assert isinstance(tycon, tuple) if isinstance(tycon[1], TyCon): return "{} (i32*)*".format(IRTyName[tycon[1].name]) else: # resovled type ...
{ "repo_name": "pollow/CoreSML", "path": "src/codegen.py", "copies": "1", "size": "13647", "license": "mit", "hash": -5107518971015888000, "line_mean": 36.3890410959, "line_max": 114, "alpha_frac": 0.5284677951, "autogenerated": false, "ratio": 3.286849710982659, "config_test": false, "has_no_...
__author__ = "Xingwei Lin" __copyright__ = "Copyright 2018, The Argus-SAF Project" __license__ = "Apache v2.0" class TaintResolver(object): """ This class provides the architecture specific taint solutions. """ def __init__(self, project, analysis_center): self._project = project self...
{ "repo_name": "arguslab/Argus-SAF", "path": "nativedroid/nativedroid/analyses/resolver/taint_resolver.py", "copies": "1", "size": "1939", "license": "apache-2.0", "hash": -2308144845757323300, "line_mean": 31.3166666667, "line_max": 91, "alpha_frac": 0.6369262506, "autogenerated": false, "ratio":...
'''author Xinwei Ding''' # [START imports] import os import time import urllib import datetime import calendar from google.appengine.api import users from google.appengine.api import mail from google.appengine.ext import ndb from google.appengine.ext import db import jinja2 import webapp2 DEFAULT_ADMIN='test@example....
{ "repo_name": "xxdd13/TutorManagementSystem", "path": "main.py", "copies": "1", "size": "51771", "license": "apache-2.0", "hash": 7892310844056669000, "line_mean": 28.4488054608, "line_max": 221, "alpha_frac": 0.6009348863, "autogenerated": false, "ratio": 2.9973946271421954, "config_test": fal...
__author__ = 'xixi.xxx' import os,sys parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0,parentdir) import aliyunExtensionCliHandler class ProfileCmd: useProfile = 'useProfile' addProfile = 'addProfile' name = '--name' class ProfileHandler: def __init__(self): ...
{ "repo_name": "mruse/aliyun-cli", "path": "aliyuncli/advance/userProfileHandler.py", "copies": "11", "size": "2825", "license": "apache-2.0", "hash": -3996730375903153700, "line_mean": 43.8571428571, "line_max": 131, "alpha_frac": 0.6102654867, "autogenerated": false, "ratio": 4.029957203994294, ...
__author__ = 'XMB089' from selenium.webdriver.support.wait import WebDriverWait from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.support import expected_conditions as EC from common.CommonMethods import CommonMethods import logging import logging.config class BasePage(object): ...
{ "repo_name": "jchen7960/python_framework", "path": "pages/BasePage.py", "copies": "1", "size": "1891", "license": "mit", "hash": -8166583078034408000, "line_mean": 35.3846153846, "line_max": 105, "alpha_frac": 0.6541512427, "autogenerated": false, "ratio": 4.202222222222222, "config_test": fal...
__author__ = 'Xplore' # Cyberaom brute force Script import urllib import time import datetime import urllib2 import sys import xml.dom.minidom as XML trst = {} userid=[] start=int(raw_input("Enter the starting Roll:")) end=int(raw_input("Enter the last Roll:")) for s in range(start,end+1): userid.append(s) filen...
{ "repo_name": "somu1795/cyberoam-bruteforce", "path": "brute-multiple-word.py", "copies": "1", "size": "2302", "license": "mit", "hash": -8493303977014834000, "line_mean": 24.0217391304, "line_max": 94, "alpha_frac": 0.5938314509, "autogenerated": false, "ratio": 3.695024077046549, "config_test...
__author__ = 'Xplore' # Cyberaom brute force Script import urllib import time import datetime import urllib2 import sys import xml.dom.minidom as XML ''' #CountDown And Credits def countdown(num): for i in xrange(num,0,-1): time.sleep(1) sys.stdout.write(str(i%10)+'\r') sys.stdout.flush() ...
{ "repo_name": "somu1795/cyberoam-bruteforce", "path": "brute.py", "copies": "1", "size": "2006", "license": "mit", "hash": 4447401194199853600, "line_mean": 26.1081081081, "line_max": 86, "alpha_frac": 0.6086739781, "autogenerated": false, "ratio": 3.5316901408450705, "config_test": false, "h...
__author__ = 'Xplore' import os import sys print "this is a "+sys.platform+" platform" opt = int(raw_input("enter 1 for direct download or 2 for folder download:")) path = raw_input("enter the url(input the path within quotes):") fold = raw_input("enter the folder:") if opt==1: if 'linux' in sys.platfor...
{ "repo_name": "somu1795/wget", "path": "wget.py", "copies": "1", "size": "1212", "license": "mit", "hash": 7726731662638579000, "line_mean": 41.2857142857, "line_max": 110, "alpha_frac": 0.5569306931, "autogenerated": false, "ratio": 2.977886977886978, "config_test": false, "has_no_keywords":...
__author__ = 'Xsank' import socket import select import threading from pseduohttp.structure.tcpdata import TcpData from pseduohttp.structure.tcpcontroller import TcpController from pseduohttp.constant.settings import SERVER_IP from pseduohttp.constant.settings import SERVER_PORT from pseduohttp.constant.settings impor...
{ "repo_name": "xsank/pseudo-http", "path": "pseudohttp/core/server.py", "copies": "1", "size": "3019", "license": "mit", "hash": 5558791237448543000, "line_mean": 39.7972972973, "line_max": 79, "alpha_frac": 0.6018549188, "autogenerated": false, "ratio": 4.198887343532684, "config_test": false,...
__author__ = 'Xsank' import socket import thread import time from pseduohttp.structure.tcpdata import TcpData from pseduohttp.constant.settings import SERVER_IP from pseduohttp.constant.settings import SERVER_PORT from pseduohttp.constant.settings import IS_BLOCKING class TcpClient(object): def __init__(self,ip=...
{ "repo_name": "xsank/pseudo-http", "path": "pseudohttp/core/client.py", "copies": "1", "size": "1620", "license": "mit", "hash": 3005478819034658300, "line_mean": 28.4545454545, "line_max": 84, "alpha_frac": 0.6216049383, "autogenerated": false, "ratio": 3.894230769230769, "config_test": false,...
__author__ = 'Xsank' import thread from multiprocessing.pool import ThreadPool from threading import Condition from event import Event from taskpool import TaskPool from listener import Listener from util import Singleton from exception import EventTypeError from exception import ListenerTypeError from exception impor...
{ "repo_name": "xsank/Pyeventbus", "path": "eventbus/eventbus.py", "copies": "1", "size": "3664", "license": "mit", "hash": 7258296762876546000, "line_mean": 29.5416666667, "line_max": 85, "alpha_frac": 0.6189956332, "autogenerated": false, "ratio": 4.446601941747573, "config_test": false, "ha...
__author__ = 'xsank' import logging import tornado.web import tornado.websocket from daemon import Bridge from data import ClientData from utils import check_ip, check_port class IndexHandler(tornado.web.RequestHandler): def get(self): self.render("index.html") class WSHandler(tornado.websocket.WebS...
{ "repo_name": "jinjin123/devops2.0", "path": "devops/webssh/handlers.py", "copies": "1", "size": "2211", "license": "mit", "hash": -2129386758626962000, "line_mean": 28.48, "line_max": 77, "alpha_frac": 0.6069651741, "autogenerated": false, "ratio": 3.792452830188679, "config_test": false, "h...
__author__ = 'xsank' import logging import tornado.websocket from daemon import Bridge from data import ClientData from utils import check_ip, check_port class IndexHandler(tornado.web.RequestHandler): def get(self): self.render("index.html") class WSHandler(tornado.websocket.WebSocketHandler): c...
{ "repo_name": "xsank/webssh", "path": "handlers.py", "copies": "1", "size": "1650", "license": "mit", "hash": 2948261815209074700, "line_mean": 24.78125, "line_max": 76, "alpha_frac": 0.5915151515, "autogenerated": false, "ratio": 3.8551401869158877, "config_test": false, "has_no_keywords": f...
__author__ = 'xsank' import os.path import tornado.ioloop import tornado.web import tornado.httpserver import tornado.options from tornado.options import options from config import init_config from urls import handlers from ioloop import IOLoop settings = dict( template_path=os.path.join(os.path.dirname(__file_...
{ "repo_name": "xsank/webssh", "path": "main.py", "copies": "1", "size": "1182", "license": "mit", "hash": 8081320252570954000, "line_mean": 21.7307692308, "line_max": 71, "alpha_frac": 0.5862944162, "autogenerated": false, "ratio": 3.310924369747899, "config_test": false, "has_no_keywords": f...
__author__ = 'xsank' import paramiko from paramiko.ssh_exception import AuthenticationException, SSHException from tornado.websocket import WebSocketClosedError from ioloop import IOLoop from utils import routine class Bridge(object): def __init__(self, websocket): self._websocket = websocket s...
{ "repo_name": "Saberlion/docker-webssh", "path": "app/daemon.py", "copies": "1", "size": "2150", "license": "mit", "hash": 9100324790927929000, "line_mean": 26.5641025641, "line_max": 72, "alpha_frac": 0.5479069767, "autogenerated": false, "ratio": 4.663774403470716, "config_test": false, "ha...
__author__ = 'xsank' import paramiko from paramiko.ssh_exception import AuthenticationException, SSHException from data import ServerData from ioloop import IOLoop class Bridge(object): def __init__(self, websocket): self.websocket = websocket self.ssh = paramiko.SSHClient() self.shell ...
{ "repo_name": "sky-dream/webssh", "path": "daemon.py", "copies": "1", "size": "1556", "license": "mit", "hash": -2512396223334936000, "line_mean": 27.8148148148, "line_max": 72, "alpha_frac": 0.5706940874, "autogenerated": false, "ratio": 4.458452722063037, "config_test": false, "has_no_keywo...
__author__ = 'xsank' import select import socket import errno import logging from threading import Thread from tornado.websocket import WebSocketClosedError class IOLoop(Thread): def __init__(self): super(IOLoop, self).__init__() self.daemon = True self.select = select.epoll() s...
{ "repo_name": "sky-dream/webssh", "path": "ioloop.py", "copies": "1", "size": "1914", "license": "mit", "hash": -3821800596382700000, "line_mean": 30.3770491803, "line_max": 70, "alpha_frac": 0.4979101358, "autogenerated": false, "ratio": 4.8951406649616365, "config_test": false, "has_no_keyw...
__author__ = 'xsank' import select import socket import errno import logging from threading import Thread from utils import Platform MAX_DATA_BUFFER = 1024*1024 class IOLoop(Thread): READ = 0x001 WRITE = 0x004 ERROR = 0x008 | 0x010 def __init__(self, impl): super(IOLoop, self).__init__()...
{ "repo_name": "jinjin123/devops2.0", "path": "devops/webssh/ioloop.py", "copies": "2", "size": "5647", "license": "mit", "hash": 6981202296658620000, "line_mean": 31.4540229885, "line_max": 83, "alpha_frac": 0.4540463963, "autogenerated": false, "ratio": 4.651565074135091, "config_test": false,...
__author__ = 'xsank' import select import socket import errno import logging from threading import Thread class IOLoop(Thread): def __init__(self): super(IOLoop, self).__init__() self.daemon = True self.select = select.epoll() self.bridges = {} self.futures = {} @sta...
{ "repo_name": "Saberlion/docker-webssh", "path": "app/ioloop.py", "copies": "1", "size": "1841", "license": "mit", "hash": -3190777112652805600, "line_mean": 28.6935483871, "line_max": 70, "alpha_frac": 0.4698533406, "autogenerated": false, "ratio": 4.744845360824742, "config_test": false, "h...
__author__ = 'xsank' import paramiko from paramiko.ssh_exception import AuthenticationException, SSHException from tornado.websocket import WebSocketClosedError from ioloop import IOLoop try: from cStringIO import StringIO except ImportError: from StringIO import StringIO class Bridge(object)...
{ "repo_name": "xsank/webssh", "path": "daemon.py", "copies": "1", "size": "3034", "license": "mit", "hash": 1760938860555109400, "line_mean": 28.0396039604, "line_max": 93, "alpha_frac": 0.5247198418, "autogenerated": false, "ratio": 4.689335394126739, "config_test": false, "has_no_keywords":...
__author__ = 'xuanzhui' # http://docs.python-requests.org/en/latest/user/quickstart/ import requests, re def printDebugInfo(resp): print('respond status code : ', resp.status_code) print('respond cookies : ', resp.cookies) print('respond headers : ', resp.headers) print('respond content : ', resp.con...
{ "repo_name": "xuanzhui/SoochowOraWIFIPW", "path": "Python3/getFileSSORequests.py", "copies": "1", "size": "2330", "license": "apache-2.0", "hash": -1201422974821296600, "line_mean": 27.0843373494, "line_max": 103, "alpha_frac": 0.6871244635, "autogenerated": false, "ratio": 3.367052023121387, ...
__author__ = 'xuelu520' #coding=utf-8 #Evaluate the value of an arithmetic expression in Reverse Polish Notation. #Valid operators are +, -, *, /. Each operand may be an integer or another expression. #Some examples: # ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 # ["4", "13", "5", "/", "+"] -> (4 + (13 / 5)) -...
{ "repo_name": "xuelu520/leetcode", "path": "src/Evaluate Reverse Polish Notation.py", "copies": "1", "size": "1310", "license": "mit", "hash": -8437267186760035000, "line_mean": 21.8245614035, "line_max": 86, "alpha_frac": 0.4207692308, "autogenerated": false, "ratio": 2.9748283752860414, "conf...
import os import sys import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import time from common import * time_stamp = str(time.time()) time_stamp = time_stamp[0: time_stamp.find('.')] def read_buffer_profile(fp): res = [] for line in open(fp): ls = line.strip().spli...
{ "repo_name": "AthrunArthur/RTCLib", "path": "tools/parse_demo_data_buffer.py", "copies": "1", "size": "4792", "license": "mit", "hash": -5803109610133211000, "line_mean": 27.8674698795, "line_max": 74, "alpha_frac": 0.5619782972, "autogenerated": false, "ratio": 2.907766990291262, "config_test...
__author__ = 'xuhao' from dji_ros.msg import * from std_msgs.msg import String, Float32, UInt8 from nav_msgs.msg import Odometry from dji_ros.srv import * import time import rospy class DroneClient: """ SubscriberPair implention a pair save topic name and it's own data type, so we can easily subscribe al...
{ "repo_name": "xuhao1/DJIROS-Client", "path": "script/DroneClient.py", "copies": "1", "size": "3764", "license": "mit", "hash": 7473232501374974000, "line_mean": 29.3548387097, "line_max": 98, "alpha_frac": 0.6020191286, "autogenerated": false, "ratio": 3.6088207094918503, "config_test": false,...
__author__ = 'xu' #compile class import ast from llvm import * from llvm.core import * from llvm.ee import * from PFunction import PFunction from compiler import ast as yacc_ast class PClass: functions = None variable_types = None init_function = None variable_names = None variable_init = None def __init__(self...
{ "repo_name": "xu-wang11/Pyww", "path": "PClass.py", "copies": "1", "size": "1183", "license": "mit", "hash": -6952600738076124000, "line_mean": 21.75, "line_max": 68, "alpha_frac": 0.6939983094, "autogenerated": false, "ratio": 3.241095890410959, "config_test": false, "has_no_keywords": fals...
__author__ = 'xu' import ast from compiler import ast as yacc_ast from llvm import * from llvm.core import * from llvm.ee import * from llvm.passes import * from types import ListType import python_yacc class PFunction: variable = None builder = None node = None function = None vfunction = None compiler = ...
{ "repo_name": "xu-wang11/Pyww", "path": "PFunction.py", "copies": "1", "size": "4224", "license": "mit", "hash": 3282564519993572400, "line_mean": 27.16, "line_max": 90, "alpha_frac": 0.6991003788, "autogenerated": false, "ratio": 3.166416791604198, "config_test": false, "has_no_keywords": fa...
__author__ = 'xu' import ast from types import IntType, StringType, FloatType from compiler import ast as yacc_ast from llvm.core import * from llvm.ee import * from llvm import * from llvm.passes import * from PClass import PClass class NameManager: count = 0 prefix = "str" def __init__(self): print "nameMan...
{ "repo_name": "xu-wang11/Pyww", "path": "Compiler.py", "copies": "1", "size": "23370", "license": "mit", "hash": -3104672092906602500, "line_mean": 32.1019830028, "line_max": 111, "alpha_frac": 0.6998288404, "autogenerated": false, "ratio": 2.9969222877660937, "config_test": false, "has_no_ke...
__author__ = 'xyz' import sys import socket import urllib, urllib2 from xyz_lib import utils class ScanNetwork(object): """ plan next: op: o: one m: mulit f: """ def __init__(self, op=None, ip=None, port=None, **kwargs): self.op = op self.ip = ip self.port = po...
{ "repo_name": "noogel/xyzStudyPython", "path": "python/scannetwork.py", "copies": "1", "size": "2207", "license": "apache-2.0", "hash": 1749465565072264400, "line_mean": 24.9647058824, "line_max": 91, "alpha_frac": 0.5414589941, "autogenerated": false, "ratio": 3.41112828438949, "config_test": ...
__author__ = 'Yafit' import requests import json ip = 'http://xxxxxx' def loginApi(ip, username, password): myHeader = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'password': password} r = requests.get(ip + '/rest/v1/login/' + username, headers=myH...
{ "repo_name": "Smart-Green/needle", "path": "pyhaystack/mango/mango_api.py", "copies": "1", "size": "29050", "license": "apache-2.0", "hash": -4396345660515065300, "line_mean": 32.4292289988, "line_max": 141, "alpha_frac": 0.6346987952, "autogenerated": false, "ratio": 3.155893536121673, "confi...
__author__ = 'yagniks' import codecs import re ADD = 1 REMOVE = 2 OTHER = 3 LOOKFORNAME=1 LOOKFOREND=2 classPattern1 = " class [\w\d_: ]+ {$" classPattern2 = "^class [\w\d_: ]+ {$" #notClassPattern = "class.*;.*{" validClassNamePattern = "[\w\d_:]+" stringPattern = "\".*\"" commentPattern = "/\*.*\*/" commentPatte...
{ "repo_name": "Yagniksuchak/CodeParser", "path": "src/logChunk/logChunkToExcep.py", "copies": "1", "size": "9402", "license": "bsd-3-clause", "hash": 6369514428621480000, "line_mean": 30.5503355705, "line_max": 118, "alpha_frac": 0.5290363752, "autogenerated": false, "ratio": 3.383231378193595, ...
__author__ = 'yahor_hamaliy' class ListTree: def __str__(self): self.__visited = {} return '<Instance of {0}, address {1}:\n{2}{3}>'.format( self.__class__.__name__, id(self), self.__attrnames(self, 0), self.__listclass(self.__class__, 4)) def __listclass...
{ "repo_name": "egorhm/debugutils", "path": "listtree.py", "copies": "1", "size": "1690", "license": "mit", "hash": 5822195356891148000, "line_mean": 25.421875, "line_max": 102, "alpha_frac": 0.449112426, "autogenerated": false, "ratio": 3.763919821826281, "config_test": false, "has_no_keyword...
__author__ = 'yalnazov' try: import unittest2 as unittest except ImportError: import unittest from paymill.paymill_context import PaymillContext import paymill.models from paymill.models.paymill_list import PaymillList import datetime import calendar from . import test_config import uuid class TestClientServ...
{ "repo_name": "paymill/paymill-python", "path": "tests/test_client_service.py", "copies": "1", "size": "3006", "license": "mit", "hash": 6144339603777507000, "line_mean": 38.038961039, "line_max": 107, "alpha_frac": 0.6776447106, "autogenerated": false, "ratio": 3.3699551569506725, "config_test...
__author__ = 'yalnazov' try: import unittest2 as unittest except ImportError: import unittest from paymill.paymill_context import PaymillContext from . import test_config class TestRefundService(unittest.TestCase): amount = None currency = 'EUR' description = 'Test Python Refunds' def setUp...
{ "repo_name": "lukasklein/paymill-python", "path": "tests/test_refund_service.py", "copies": "2", "size": "1178", "license": "mit", "hash": 5031923753868343000, "line_mean": 37.0322580645, "line_max": 115, "alpha_frac": 0.5670628183, "autogenerated": false, "ratio": 4.712, "config_test": true, ...
__author__ = 'yalnazov' try: import unittest2 as unittest except ImportError: import unittest from paymill.paymill_context import PaymillContext from paymill.models.payment import Payment from . import test_config class TestPaymentService(unittest.TestCase): def setUp(self): self.p = PaymillCont...
{ "repo_name": "lukasklein/paymill-python", "path": "tests/test_payment_service.py", "copies": "2", "size": "1077", "license": "mit", "hash": -1696529867620254700, "line_mean": 30.7058823529, "line_max": 79, "alpha_frac": 0.6620241411, "autogenerated": false, "ratio": 3.5311475409836066, "config...
__author__ = 'Yanan Sun <yanansun7@gmail.com>' __version__ = '1.0' from SocketServer import ThreadingTCPServer from SimpleHTTPServer import SimpleHTTPRequestHandler from webbrowser import open_new_tab from json import dumps from urlparse import urlparse from os import environ from types import NoneType from linkedin....
{ "repo_name": "Capez/02-labormatch", "path": "labormatch/http_api.py", "copies": "2", "size": "3102", "license": "apache-2.0", "hash": -9019409616937986000, "line_mean": 36.8292682927, "line_max": 110, "alpha_frac": 0.6557059961, "autogenerated": false, "ratio": 3.732851985559567, "config_test"...
__author__ = 'YanDuarte' import pandas import numpy # Import the data set to memory data = pandas.read_csv("separatedData.csv", low_memory = False) # Print data set dimension print(len(data)) print(len(data.columns)) # Change data type among variables to numeric data["breastCancer100th"] = data["breastCancer100th"]...
{ "repo_name": "yan-duarte/yan-duarte.github.io", "path": "archives/assignment2.py", "copies": "1", "size": "2727", "license": "mit", "hash": -6245083012610176000, "line_mean": 49.5, "line_max": 180, "alpha_frac": 0.7825449212, "autogenerated": false, "ratio": 3.3215590742996346, "config_test": ...
__author__ = 'YanDuarte' import pandas import numpy import statistics import seaborn import matplotlib.pyplot as plt import scipy # Import the data set to memory data = pandas.read_csv("separatedData.csv", low_memory = False) # Change data type among variables to numeric data["breastCancer100th"] = data...
{ "repo_name": "yan-duarte/yan-duarte.github.io", "path": "archives/dat-assignment4.py", "copies": "1", "size": "3473", "license": "mit", "hash": -5751142240432724000, "line_mean": 46.9154929577, "line_max": 138, "alpha_frac": 0.7549668874, "autogenerated": false, "ratio": 3.171689497716895, "co...
__author__ = 'YanDuarte' import pandas import numpy import statistics import seaborn import matplotlib.pyplot as plt # Import the data set to memory data = pandas.read_csv("separatedData.csv", low_memory = False) # Change data type among variables to numeric data["breastCancer100th"] = data["breastCanc...
{ "repo_name": "yan-duarte/yan-duarte.github.io", "path": "archives/assignment4.py", "copies": "1", "size": "4271", "license": "mit", "hash": 4460416501742312000, "line_mean": 50.1097560976, "line_max": 174, "alpha_frac": 0.7501756029, "autogenerated": false, "ratio": 3.187313432835821, "config_...
__author__ = 'YanDuarte' import pandas import numpy import statistics import statsmodels.formula.api as smf import statsmodels.stats.multicomp as multi # Import the data set to memory data = pandas.read_csv("separatedData.csv", low_memory = False) # Change data type among variables to numeric data["breas...
{ "repo_name": "yan-duarte/yan-duarte.github.io", "path": "archives/dat-assignment1.py", "copies": "1", "size": "2287", "license": "mit", "hash": -4511341716471620600, "line_mean": 43.74, "line_max": 114, "alpha_frac": 0.7363358111, "autogenerated": false, "ratio": 3.2030812324929974, "config_te...
__author__ = 'YanDuarte' import pandas import numpy import statistics # Import the data set to memory data = pandas.read_csv("separatedData.csv", low_memory = False) # Change data type among variables to numeric data["breastCancer100th"] = data["breastCancer100th"].convert_objects(convert_numeric=True) da...
{ "repo_name": "yan-duarte/yan-duarte.github.io", "path": "archives/assignment3.py", "copies": "1", "size": "4335", "license": "mit", "hash": -6208389115253153000, "line_mean": 53.5769230769, "line_max": 181, "alpha_frac": 0.738638985, "autogenerated": false, "ratio": 3.1758241758241756, "config...
__author__ = 'YanDuarte' import pandas import numpy import scipy.stats import seaborn import matplotlib.pyplot as plt import statistics # Import the data set to memory data = pandas.read_csv("separatedData.csv", low_memory = False) # Change data type among variables to numeric data["breastCancer100th"...
{ "repo_name": "yan-duarte/yan-duarte.github.io", "path": "archives/dat-assignment2.py", "copies": "1", "size": "4418", "license": "mit", "hash": -2294182067916390400, "line_mean": 33.6290322581, "line_max": 146, "alpha_frac": 0.6258488004, "autogenerated": false, "ratio": 3.234260614934114, "co...