text
stringlengths
0
1.05M
meta
dict
__author__ = "Sean Toner" __license__ = "Apache License 2.0" __version__ = "0.1" __email__ = "stoner@redhat.com" __status__ = "Alpha" from iridium.core.exceptions import ArgumentError from iridium import add_client_to_path from iridium.plugins.inspector import Plugin DEBUG = False add_client_to_path(debug=DEBUG) fro...
{ "repo_name": "Toure/Iridium", "path": "iridium/libs/openstack/glance.py", "copies": "1", "size": "1321", "license": "apache-2.0", "hash": -7127819385637517000, "line_mean": 32.025, "line_max": 96, "alpha_frac": 0.6404239213, "autogenerated": false, "ratio": 3.8289855072463768, "config_test": f...
__author__ = "Sean Toner" __license__ = "Apache License 2.0" __version__ = "0.1" __email__ = "stoner@redhat.com" __status__ = "Alpha" from subprocess import Popen, PIPE, STDOUT import threading import os import shlex from functools import wraps try: import queue except ImportError: import Queue as queue from ...
{ "repo_name": "Toure/Iridium", "path": "iridium/core/commander.py", "copies": "1", "size": "15770", "license": "apache-2.0", "hash": -428666828272073200, "line_mean": 31.6501035197, "line_max": 83, "alpha_frac": 0.5500317058, "autogenerated": false, "ratio": 4.3672112988091945, "config_test": f...
__author__ = "Sean Toner" __license__ = "Apache License 2.0" __version__ = "0.1" __email__ = "stoner@redhat.com" __status__ = "Alpha" try: from urllib.request import urlopen from urllib.parse import urlparse as urlparse except ImportError: from urllib2 import urlopen from urlparse import urlparse impo...
{ "repo_name": "Toure/Iridium", "path": "iridium/core/downloader.py", "copies": "1", "size": "4103", "license": "apache-2.0", "hash": 4971387560622160000, "line_mean": 31.3149606299, "line_max": 128, "alpha_frac": 0.581769437, "autogenerated": false, "ratio": 3.9990253411306043, "config_test": f...
__author__ = 'Sean Yu' '''created @2015/10/12''' import unittest import os import sys import time import subprocess, signal if os.name =='nt': pass#import win32api def handler_ctrl_c(sig, func=None): return True def signal_handler(signal, frame): time.sleep(1) print 'Ctrl+C received in wrapper.py' #signal...
{ "repo_name": "try-dash-now/gDasH", "path": "lib/shell.py", "copies": "1", "size": "3998", "license": "mit", "hash": 905525778407139700, "line_mean": 38.1960784314, "line_max": 153, "alpha_frac": 0.5012506253, "autogenerated": false, "ratio": 4.134436401240952, "config_test": false, "has_no_k...
__author__ = 'Sean Yu' '''created @2015/10/12''' import unittest import os import sys pardir =os.path.dirname(os.path.realpath(os.getcwd())) sys.path.append(os.path.sep.join([pardir,'lib'])) from dut import dut import time import subprocess try: from Queue import Queue, Empty except ImportError: from queue impo...
{ "repo_name": "try-dash-now/idash", "path": "dut/powershell.py", "copies": "1", "size": "6342", "license": "mit", "hash": -7058938450336117000, "line_mean": 29.9365853659, "line_max": 144, "alpha_frac": 0.4867549669, "autogenerated": false, "ratio": 3.8389830508474576, "config_test": false, "...
__author__ = 'Sean Yu' '''created @2015/11/25''' import cmd, sys from turtle import * import re reSSHcmd = re.compile('ssh\s+(([\w.]+)@([\w.]+)|(\w+)@([\w.]+)\s*:\s*(\d+))', re.I) s1 = 'root@test.com' s2 = 'root2@test2.com:22' m1 = re.match(reSSHcmd,s1) m2= re.match(reSSHcmd,s2) str = '2d22h13m20s' a=re.sub('\d\[mh]',...
{ "repo_name": "try-dash-now/idash", "path": "test.py", "copies": "1", "size": "3657", "license": "mit", "hash": -3089837739549093400, "line_mean": 28.7317073171, "line_max": 86, "alpha_frac": 0.5887339349, "autogenerated": false, "ratio": 3.2593582887700534, "config_test": false, "has_no_keyw...
__author__ = 'Sean Yu' '''created @2015/12/4''' import os, sys,time , traceback pardir =os.path.dirname(os.path.realpath(os.getcwd())) subfolder = ['lib', 'dut'] for sub in subfolder: libpath = os.path.sep.join([pardir,sub]) if libpath not in sys.path: sys.path.insert(0,libpath) import paramiko as ss...
{ "repo_name": "try-dash-now/idash", "path": "lib/SSH.py", "copies": "1", "size": "4915", "license": "mit", "hash": -253672250482170900, "line_mean": 36.5190839695, "line_max": 165, "alpha_frac": 0.5163784334, "autogenerated": false, "ratio": 4.031993437243642, "config_test": false, "has_no_ke...
__author__ = 'Sean Yu' '''created @2015/5/28''' import telnetlib import WinSession # for py2exe bin distribution import traceback import sys,os import threading from Case import Case from common import bench2dict import json import re import time from cmd import Cmd class IAshell(Cmd, object): tabend='enable' ...
{ "repo_name": "try-dash-now/dash-ia", "path": "lib/IAshell.py", "copies": "1", "size": "18072", "license": "mit", "hash": 2134951994781691600, "line_mean": 33.9555125725, "line_max": 160, "alpha_frac": 0.4836764055, "autogenerated": false, "ratio": 3.9074594594594596, "config_test": false, "h...
__author__ = 'Sean Yu' '''created @2015/6/11''' import subprocess import re, string import os, sys import telnetlib import time #import urllib2 #import urllib #import cookielib from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select # from seleni...
{ "repo_name": "try-dash-now/dash-ia", "path": "lib/WebSession.py", "copies": "1", "size": "9071", "license": "mit", "hash": 5410339834412521000, "line_mean": 32.8470149254, "line_max": 99, "alpha_frac": 0.6019182009, "autogenerated": false, "ratio": 3.7529995862639636, "config_test": false, "...
__author__ = 'Sean Yu' '''created @2015/6/16''' import os, sys pardir =os.path.dirname(os.path.realpath(os.getcwd())) libpath = os.path.sep.join([pardir,'lib']) if libpath not in sys.path: sys.path.insert(0,libpath) import inspect from Case import Case caseInit = inspect.getsource(Case.__init__) print(caseInit) ...
{ "repo_name": "try-dash-now/dash-ia", "path": "test/dumpFunctionDefine.py", "copies": "1", "size": "1254", "license": "mit", "hash": 1689059560467019300, "line_mean": 21, "line_max": 54, "alpha_frac": 0.5749601276, "autogenerated": false, "ratio": 3.207161125319693, "config_test": false, "has...
__author__ = 'Sean Yu' '''created @2015/7/2''' import os,sys pardir =os.path.dirname(os.path.realpath(__file__)) pardir= os.path.sep.join(pardir.split(os.path.sep)[:-1]) sys.path.append(os.path.sep.join([pardir,'lib'])) sys.path.append(os.path.sep.join([pardir,'test'])) sys.path.append(os.path.sep.join([pardir,'dut']))...
{ "repo_name": "try-dash-now/idash", "path": "bin/ImportModule.py", "copies": "1", "size": "2267", "license": "mit", "hash": -8966367436945665000, "line_mean": 22.1326530612, "line_max": 67, "alpha_frac": 0.6762240847, "autogenerated": false, "ratio": 3.0969945355191255, "config_test": false, ...
__author__ = 'Sean Yu' '''created @2015/7/2''' import time import re as sre class baseSession(object): fSending = False sutname=None attrs =None seslog=None loginstep =None argvs=None kwargvs =None InteractionBuffer=None fInteractionMode=False InteractionMatch =None FailFlag=...
{ "repo_name": "try-dash-now/dash-ia", "path": "lib/baseSession.py", "copies": "1", "size": "5115", "license": "mit", "hash": 9058554098386461000, "line_mean": 34.275862069, "line_max": 134, "alpha_frac": 0.5456500489, "autogenerated": false, "ratio": 3.8372093023255816, "config_test": false, ...
__author__ = 'Sean Yu' '''created @2015/7/3''' from Tkinter import Tk,Tcl from baseSession import baseSession class TclInter(baseSession): tclInter=None def __init__(self, name,attrs,logger=None, logpath=None): baseSession.__init__(self, name, attrs, logger, logpath) def __del__(self): try:...
{ "repo_name": "try-dash-now/dash-ia", "path": "lib/TclInter.py", "copies": "1", "size": "1441", "license": "mit", "hash": -8964200370703402000, "line_mean": 27.82, "line_max": 64, "alpha_frac": 0.559333796, "autogenerated": false, "ratio": 3.5492610837438425, "config_test": false, "has_no_key...
__author__ = 'Sean Yu' '''created @2015/7/3''' from Tkinter import Tk,Tcl from dut import dut class TclInter(dut): tclInter=None def __init__(self, name,attrs,logger=None, logpath=None, shareData=None): dut.__init__(self, name, attrs, logger, logpath,shareData) import threading self.loc...
{ "repo_name": "try-dash-now/idash", "path": "lib/TclInter.py", "copies": "1", "size": "3212", "license": "mit", "hash": 3333104341592808000, "line_mean": 31.12, "line_max": 105, "alpha_frac": 0.5258405978, "autogenerated": false, "ratio": 4.00498753117207, "config_test": false, "has_no_keywor...
__author__ = 'Sean Yu' '''created @2015/9/14''' import unittest import os import sys pardir =os.path.dirname(os.path.realpath(os.getcwd())) #pardir= os.path.sep.join(pardir.split(os.path.sep)[:-1]) sys.path.append(os.path.sep.join([pardir,'lib'])) logpath = './log' cmd = 'telnet 192.168.1.113' #cmd = 'telnet cdc-da...
{ "repo_name": "try-dash-now/idash", "path": "test/ut_winTelnet.py", "copies": "1", "size": "2558", "license": "mit", "hash": 905118086518038800, "line_mean": 25.9368421053, "line_max": 103, "alpha_frac": 0.5789679437, "autogenerated": false, "ratio": 3.304909560723514, "config_test": true, "h...
__author__ = 'Sean Yu' '''created @2015/9/14''' ''' a term is an interface to interoperate with Software/Device Under Test/Used provides: 1. command sent to software/device 2. show the output, just the updated recently 3. searching given pattern from a given range, e.g. right after last command entered ''' import trace...
{ "repo_name": "try-dash-now/idash", "path": "lib/dut.py", "copies": "1", "size": "28543", "license": "mit", "hash": -6599012134945049000, "line_mean": 35.0847029077, "line_max": 196, "alpha_frac": 0.5171845987, "autogenerated": false, "ratio": 4.077571428571429, "config_test": false, "has_no_...
__author__ = 'Sean Yu' '''created @2015/9/29''' import unittest import os import sys import re, datetime pardir =os.path.dirname(os.path.realpath(os.getcwd())) subfolder = ['lib', 'dut'] for sub in subfolder: libpath = os.path.sep.join([pardir,sub]) if libpath not in sys.path: sys.path.insert(0,libpath...
{ "repo_name": "try-dash-now/idash", "path": "lib/runner.py", "copies": "1", "size": "27897", "license": "mit", "hash": 8545875575581184000, "line_mean": 36.749661705, "line_max": 278, "alpha_frac": 0.5407391476, "autogenerated": false, "ratio": 3.7325394701632324, "config_test": false, "has_n...
__author__ = 'Sean Yu' '''created @2016/4/22''' from dut import dut from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from pprint import pformat as pp g_retry_counter = 10 def retry(fun): def inner(*arg, **kwargs): retry_counter ...
{ "repo_name": "try-dash-now/idash", "path": "lib/webgui.py", "copies": "1", "size": "5713", "license": "mit", "hash": -1963963538589199400, "line_mean": 32.2151162791, "line_max": 110, "alpha_frac": 0.5711535095, "autogenerated": false, "ratio": 3.8010645375914835, "config_test": false, "has_...
__author__ = 'Sean Yu' '''created @2016/4/26''' import datetime,os, pprint from common import bench2dict from runner import createLogDir, createLogger, releaseDUTs, initDUT class case(object): error_message = None fail_flag = False bench_file = None bench = None log_dir = None name = None ...
{ "repo_name": "try-dash-now/idash", "path": "lib/case.py", "copies": "1", "size": "4611", "license": "mit", "hash": 6722576809293344000, "line_mean": 32.1726618705, "line_max": 134, "alpha_frac": 0.5480373021, "autogenerated": false, "ratio": 3.544196771714066, "config_test": false, "has_no_k...
__author__ = 'Sean Yu' '''created @2017/10/09''' from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select import threading import shlex import traceback class dash_web(object): driver= None output_buffer = None output_locker = None ...
{ "repo_name": "try-dash-now/gDasH", "path": "lib/dash_web.py", "copies": "1", "size": "7325", "license": "mit", "hash": 3716251214222477000, "line_mean": 39.0273224044, "line_max": 149, "alpha_frac": 0.5533105802, "autogenerated": false, "ratio": 4.296187683284457, "config_test": false, "has_...
__author__ = 'Sean Yu' '''created @2017/8/7''' '''a telnet session''' from telnetlib import Telnet as spawn import socket import select # Tunable parameters DEBUGLEVEL = 0 # Telnet protocol defaults TELNET_PORT = 23 # Telnet protocol characters (don't change) IAC = chr(255) # "Interpret As Command" DONT = chr(254) D...
{ "repo_name": "try-dash-now/gDasH", "path": "lib/TELNET.py", "copies": "1", "size": "11627", "license": "mit", "hash": -574499804879632400, "line_mean": 31.568627451, "line_max": 77, "alpha_frac": 0.5371118947, "autogenerated": false, "ratio": 3.4086778070946937, "config_test": false, "has_no...
__author__ = 'Sean Yu' __mail__ = 'try.dash.now@gmail.com' import shlex import re as sre import csv import io#StringIO import sys,traceback class csv2case(object): Debug= False Var = [] Setup = [] Run = [] Teardown=[] OnFail =[] FileName ="" CaseName ="" reCaseName = None # last...
{ "repo_name": "try-dash-now/dash-ia", "path": "lib/csv2case.py", "copies": "1", "size": "11629", "license": "mit", "hash": 6896543540418098000, "line_mean": 34.7815384615, "line_max": 180, "alpha_frac": 0.4796629117, "autogenerated": false, "ratio": 3.55735698990517, "config_test": false, "ha...
__author__ = "Sebastian Haase <haase@msg.ucsf.edu>" __license__ = "BSD license - see LICENSE file" # from wxPython.grid import * import wx import wx.grid # from wx import grid import numpy as N #--------------------------------------------------------------------------- class HugeTable(wx.grid.PyGridTableBase): ...
{ "repo_name": "macronucleus/chromagnon", "path": "Chromagnon/Priithon/gridviewer.py", "copies": "1", "size": "6919", "license": "mit", "hash": -5820316425162990000, "line_mean": 29.2139737991, "line_max": 111, "alpha_frac": 0.5438647203, "autogenerated": false, "ratio": 3.4979777553083924, "con...
__author__ = "Sebastian Haase <haase@msg.ucsf.edu>" __license__ = "BSD license - see LICENSE file" import numpy as N log2 = N.log(2) class viewerRubberbandMode: def __init__(self, id=-1, rubberWhat='box', color=(0,1,0), gfxWhenDone='hide', roiName='1'): """ id can be a viewerID...
{ "repo_name": "macronucleus/chromagnon", "path": "Chromagnon/Priithon/viewerRubberbandMode.py", "copies": "1", "size": "9915", "license": "mit", "hash": 3402990342947097600, "line_mean": 30.576433121, "line_max": 121, "alpha_frac": 0.505799294, "autogenerated": false, "ratio": 3.131711939355654, ...
__author__ = "Sebastian Haase <haase@msg.ucsf.edu>" __license__ = "BSD license - see LICENSE file" import Priithon_bin.CCG_d as _CCG_d import Priithon_bin.CCG_s as _CCG_s import numpy as _N """ ccg ChangeLog * starting out with ccg essentially from GPL Eden version (2/24/95) Author: Erik M. Johansson, transl...
{ "repo_name": "macronucleus/chromagnon", "path": "Chromagnon/Priithon/ccg.py", "copies": "1", "size": "7339", "license": "mit", "hash": 8523245898463570000, "line_mean": 35.695, "line_max": 105, "alpha_frac": 0.6207930236, "autogenerated": false, "ratio": 3.578254509995124, "config_test": false...
__author__ = "Sebastian Haase <haase@msg.ucsf.edu>" __license__ = "BSD license - see LICENSE file" import wx #---------------------------------------------------------------------- class ClipTextPanel(wx.Panel): def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1) #self.SetFont(...
{ "repo_name": "macronucleus/chromagnon", "path": "Chromagnon/Priithon/DragAndDrop.py", "copies": "1", "size": "6761", "license": "mit", "hash": -3246994324937063400, "line_mean": 35.1550802139, "line_max": 93, "alpha_frac": 0.5411921313, "autogenerated": false, "ratio": 3.8154627539503387, "con...
__author__ = 'Sebastian Haenisch' from robotide.pluginapi import Plugin from robotide.pluginapi import ActionInfo from robotide.pluginapi import RideLogMessage from robotide.widgets.popupmenu import PopupMenuItem import subprocess import os class ClearCasePlugin(Plugin): """ This plugin for RIDE implements C...
{ "repo_name": "TKCen/RobotFramework.RIDE.ClearCasePlugin", "path": "ccplugin.py", "copies": "1", "size": "2178", "license": "apache-2.0", "hash": -7614722223355450000, "line_mean": 33.5873015873, "line_max": 88, "alpha_frac": 0.6455463728, "autogenerated": false, "ratio": 3.854867256637168, "co...
__author__ = "Sebastian Kurscheid (sebastian.kurscheid@anu.edu.au)" __license__ = "MIT" __date__ = "2016-02-27" # vim: syntax=python tabstop=4 expandtab # coding: utf-8 """ Rules for trimming reads with cutadapt (http://cutadapt.readthedocs.org/en/latest/guide.html#illumina-truseq) For usage, include this in your w...
{ "repo_name": "JCSMR-Tremethick-Lab/HP1-alpha", "path": "snakemake/rules/perform_cutadapt.py", "copies": "1", "size": "1520", "license": "mit", "hash": -1432164387142760700, "line_mean": 42.4285714286, "line_max": 178, "alpha_frac": 0.5572368421, "autogenerated": false, "ratio": 3.478260869565217...
__author__ = "Sebastian Kurscheid (sebastian.kurscheid@anu.edu.au)" __license__ = "MIT" __date__ = "2016-04-22" __modified__ = "2017-5-11" from snakemake.exceptions import MissingInputException import os wrapper_dir = os.environ['HOME'] + "/Development/snakemake-wrappers/bio" rule star_align_full: version: ...
{ "repo_name": "JCSMR-Tremethick-Lab/HP1-alpha", "path": "snakemake/rules/run_STAR.py", "copies": "1", "size": "1729", "license": "mit", "hash": -5383893149516759000, "line_mean": 35.0208333333, "line_max": 106, "alpha_frac": 0.5731636784, "autogenerated": false, "ratio": 3.4510978043912175, "co...
__author__ = 'sebastian' import sys import time import scipy.io as si def load_label(in_path): f = open(in_path, 'rb') lines = f.readlines() uselines = [] for line in lines: useline = line.strip() uselines.append(useline) f.close() return uselines def load_matrix(in_path): ...
{ "repo_name": "surchs/brainbox", "path": "dump_to_csv.py", "copies": "1", "size": "2053", "license": "mit", "hash": 8027534821559406000, "line_mean": 26.0131578947, "line_max": 79, "alpha_frac": 0.5396980029, "autogenerated": false, "ratio": 3.0102639296187683, "config_test": false, "has_no_k...
__author__ = 'Sebastian' from collections import OrderedDict from datetime import datetime import matplotlib.pyplot as plt import matplotlib.dates as mdates import matplotlib.cbook as cbook def parse_commit_dates(filename, dates=dict()): """ needs date file * one line per date * format: YYYY-mm-dd ...
{ "repo_name": "skyborla/timeline", "path": "timeline.py", "copies": "1", "size": "1450", "license": "unlicense", "hash": 1741621995028492300, "line_mean": 22.7868852459, "line_max": 77, "alpha_frac": 0.6020689655, "autogenerated": false, "ratio": 3.4523809523809526, "config_test": false, "has...
__author__ = 'Sebastian Poreba (sebastian@smashinglabs.pl)' class Board(object): """Keeps information about surroundings - items and walls""" def __init__(self): self.walls_ = [[]] self.width = 0 self.height = 0 self.pxScale = 32 self.readMapFile('assets/map1.txt') ...
{ "repo_name": "fridek/uj-gamedev-pygame", "path": "board.py", "copies": "1", "size": "1052", "license": "mit", "hash": -4527948079465819000, "line_mean": 21.3829787234, "line_max": 64, "alpha_frac": 0.5019011407, "autogenerated": false, "ratio": 3.4719471947194718, "config_test": false, "has_...
__author__ = 'Sebastian Poreba (sebastian@smashinglabs.pl)' import pygame import sys, os, math sys.path.append('./third_party') from pygame.locals import * from random import randint, choice from vec2d import vec2d from player import Player from creep import Creep from board import Board SCREEN_WIDTH, SCREEN_HEIGH...
{ "repo_name": "fridek/uj-gamedev-pygame", "path": "init.py", "copies": "1", "size": "3746", "license": "mit", "hash": -8565700841768130000, "line_mean": 26.3430656934, "line_max": 82, "alpha_frac": 0.6147891084, "autogenerated": false, "ratio": 3.2917398945518452, "config_test": false, "has_n...
# Send the current open image over to MATLAB using ReadImage6D.m --> has to be on the MATLAB path !!! from System.Runtime.InteropServices import Marshal from System.IO import Path, File, Directory, FileInfo import os CZIfiles_short = [] CZIdict = {} # get all open documents opendocs = Zen.Application.Documen...
{ "repo_name": "sebi06/ZEN_Matlab", "path": "ML_SendCZI_Dialog.py", "copies": "1", "size": "1782", "license": "bsd-2-clause", "hash": 8417540726732056000, "line_mean": 31.6226415094, "line_max": 101, "alpha_frac": 0.6790123457, "autogenerated": false, "ratio": 3.1099476439790577, "config_test": ...
__author__ = 'sebastians' # PyMOL Animation Tutorials -- 04 - Animation # This tutorial will show you how to connect the scenes and thus animate the movie. # Import all necessary modules import pymol from pymol import cmd # The custom viewpoint closeup = ''' -0.775189936, 0.267432511, -0.572329581,\ 0....
{ "repo_name": "ssalentin/pymol-animations", "path": "tutorials/basics/04-animation.py", "copies": "1", "size": "2972", "license": "mit", "hash": 2035280441460718300, "line_mean": 41.4571428571, "line_max": 115, "alpha_frac": 0.6968371467, "autogenerated": false, "ratio": 3.195698924731183, "con...
__author__ = 'sebastians' # PyMOL Animation Tutorials -- 05 - Camera Movements # This tutorial will show you how to add more camera movements to your animation # Import all necessary modules import pymol from pymol import cmd # The custom viewpoint closeup = ''' -0.775189936, 0.267432511, -0.572329581,\ ...
{ "repo_name": "ssalentin/pymol-animations", "path": "tutorials/basics/05-camera-movements.py", "copies": "1", "size": "3349", "license": "mit", "hash": -2735350421233252000, "line_mean": 37.4942528736, "line_max": 108, "alpha_frac": 0.6900567334, "autogenerated": false, "ratio": 3.171401515151515...
__author__ = 'sebastians' # PyMOL Animation Tutorials -- 06 - Finish # This tutorial will show you how to pretty up your animation and output a movie # Import all necessary modules import pymol from pymol import cmd # The custom viewpoint closeup = ''' -0.775189936, 0.267432511, -0.572329581,\ 0.387867...
{ "repo_name": "ssalentin/pymol-animations", "path": "tutorials/basics/06-finish.py", "copies": "1", "size": "3869", "license": "mit", "hash": 8731634831465251000, "line_mean": 33.8558558559, "line_max": 118, "alpha_frac": 0.6828637891, "autogenerated": false, "ratio": 3.135332252836305, "config...
__author__ = 'Sebastian Urchs' # Imports import os import re import sys import glob import copy import numpy as np import nibabel as nib from .. import tools as to if sys.version_info >= (3, 0): from builtins import any as b_any else: from __builtin__ import any as b_any def grab_files(path, ext, sub=None, d...
{ "repo_name": "surchs/brainbox", "path": "load/base.py", "copies": "1", "size": "8969", "license": "mit", "hash": 4009156347374286000, "line_mean": 36.375, "line_max": 117, "alpha_frac": 0.5523469729, "autogenerated": false, "ratio": 3.662311147407105, "config_test": false, "has_no_keywords":...
__author__ = 'Sebsebeleb' import numpy as np import cocos.tiles import _pathfinding pathf = None tw = 0 th = 0 class MapCollider(cocos.tiles.RectMapCollider): """Makes sure entities confirm to the map. Is equivalent to cocos2d's RectMapCollider except it does not check for tile properties (the map should...
{ "repo_name": "BadlybadGames/RPGame-3.0", "path": "src/game/collision.py", "copies": "1", "size": "2500", "license": "mit", "hash": 1771992608159316700, "line_mean": 28.7619047619, "line_max": 110, "alpha_frac": 0.5972, "autogenerated": false, "ratio": 3.2851511169513796, "config_test": false, ...
__author__ = 'Security' import urllib.request as r import json from pprint import pprint ACCESS_TOKEN = "822117162.e9ef95d.16e81916674b46f9a9988a052a53fe7c" """ ### ^^ ^^ ### ПЕП-8 идет нахуй 00 00 ### \___/ """ def pictures_by_locat...
{ "repo_name": "IKholopov/HackUPC2017", "path": "hackupc/instagram_scrabber.py", "copies": "1", "size": "2876", "license": "apache-2.0", "hash": 6015163305110155000, "line_mean": 33.5060240964, "line_max": 154, "alpha_frac": 0.5715782123, "autogenerated": false, "ratio": 3.116430903155604, "conf...
### the "optimal"/chosen parameters are (can be modify when desi_qso_mgii_afterburner is called): ### lambda_width = 250 ### max_sigma = 200 ### min_sigma = 10 ### min_deltachi2 = 16 ### min_signifiance_A = 3 ### min_A = 0 import sys import numpy as np from astropy.table import Ta...
{ "repo_name": "desihub/desispec", "path": "py/desispec/mgii_afterburner.py", "copies": "1", "size": "20179", "license": "bsd-3-clause", "hash": 322786158664513340, "line_mean": 44.2443946188, "line_max": 180, "alpha_frac": 0.5504732643, "autogenerated": false, "ratio": 3.941980855635866, "confi...
__author__ = 'sei' from PIStage._base import Controller import math class E545(Controller): def __init__(self, ip=None, port=None, coordinate_mapping = None, z_correction_angle = None): #super(E545, self).__init__() super().__init__(ip=ip,port=port,coordinate_mapping=coordinate_mapping,z_correctio...
{ "repo_name": "sdickreuter/python-pistage", "path": "PIStage/Controllers/E545.py", "copies": "1", "size": "5348", "license": "mit", "hash": 4417371481470983700, "line_mean": 32.8544303797, "line_max": 117, "alpha_frac": 0.4446522064, "autogenerated": false, "ratio": 3.367758186397985, "config_t...
__author__ = 'sei' from PIStage._base import Controller class E545(Controller): def __init__(self, ip=None, port=None): #super(E545, self).__init__() super().__init__(ip=ip,port=port) self._sock.send(bytes('ONL 1 1 2 1 3 1\n','UTF-8')) self._sock.send(bytes('SVO A 1 B 1 C 1\n','UT...
{ "repo_name": "sdickreuter/python-pistage", "path": "build/lib/PIStage/Controllers/E545.py", "copies": "1", "size": "4150", "license": "mit", "hash": -6281580722169150000, "line_mean": 31.6850393701, "line_max": 102, "alpha_frac": 0.4421686747, "autogenerated": false, "ratio": 3.493265993265993, ...
__author__ = 'sei' import socket import sys import time def recv_timeout(the_socket, timeout=2): # make socket non blocking the_socket.setblocking(0) #total data partwise in an array total_data = [] addr = None #beginning time begin = time.time() while 1: #if you got some da...
{ "repo_name": "sdickreuter/python-pistage", "path": "test/test2.py", "copies": "1", "size": "2118", "license": "mit", "hash": 1921987502020703700, "line_mean": 23.0681818182, "line_max": 75, "alpha_frac": 0.6232294618, "autogenerated": false, "ratio": 3.5477386934673367, "config_test": false, ...
__author__ = 'sei' import socket import time import sys import multiprocessing class Controller(object): def __init__(self, ip=None, port=None, coordinate_mapping = None, z_correction_angle = None): self.is_initialized = False received = None self._lock = multiprocessing.Lock() sel...
{ "repo_name": "sdickreuter/python-pistage", "path": "PIStage/_base.py", "copies": "1", "size": "6433", "license": "mit", "hash": -7343854233628242000, "line_mean": 30.8465346535, "line_max": 108, "alpha_frac": 0.4871755013, "autogenerated": false, "ratio": 4.134318766066838, "config_test": fals...
__author__ = 'sei' import socket import time import sys import multiprocessing class Controller(object): def __init__(self, ip=None, port=None): self._lock = multiprocessing.Lock() self._x = multiprocessing.Value('d', 0.) self._y = multiprocessing.Value('d', 0.) self._z = multiproc...
{ "repo_name": "sdickreuter/python-pistage", "path": "build/lib/PIStage/_base.py", "copies": "1", "size": "3713", "license": "mit", "hash": 1879786013865457200, "line_mean": 29.1869918699, "line_max": 83, "alpha_frac": 0.5084837059, "autogenerated": false, "ratio": 4.352872215709262, "config_tes...
__author__ = 'sei' import time import multiprocessing from PIStage._base import Controller class Dummy(Controller): def __init__(self): self._lock = multiprocessing.Lock() self._x = multiprocessing.Value('d', 10.) self._y = multiprocessing.Value('d', 10.) self._z = multiprocessin...
{ "repo_name": "sdickreuter/python-pistage", "path": "PIStage/Controllers/Dummy.py", "copies": "2", "size": "1604", "license": "mit", "hash": -1166832514069354000, "line_mean": 26.2033898305, "line_max": 58, "alpha_frac": 0.5205735661, "autogenerated": false, "ratio": 3.427350427350427, "config_...
__author__ = 'sei' _number_of_samples = 100 _integration_time = 0.01 _cycle_time = 0 # cycle duration in s _cycle_time_start = 3 * _integration_time * 1000 / 10 # cycle duration in s, starting value _cycle_factor = -float(180) / _number_of_samples # cycle time is calculated using this factor _amplitude = 5 def _...
{ "repo_name": "sdickreuter/python-pistage", "path": "test/test.py", "copies": "1", "size": "1311", "license": "mit", "hash": -6387681439084677000, "line_mean": 27.5, "line_max": 124, "alpha_frac": 0.5881006865, "autogenerated": false, "ratio": 2.530888030888031, "config_test": false, "has_no_...
__author__ = 'sekely' ''' collecting, ordering, searching and presenting data is very important in computer science and programming. keeping the data in a variable is nice, but how can you find it later? examples: 1) if you are reading 1 million phone book entries, will you keep each record as a variable? 2) the user...
{ "repo_name": "idosekely/python-lessons", "path": "lesson_3/data_structures.py", "copies": "1", "size": "3135", "license": "mit", "hash": 9119589332612021000, "line_mean": 26.5, "line_max": 116, "alpha_frac": 0.5837320574, "autogenerated": false, "ratio": 3.0173243503368625, "config_test": fals...
__author__ = 'sekely' ''' most of our programs are based on some decision making. but how do we decide what to do? how can we tell a certain piece of code to run few times? ''' # we are using booleans to make a decision # if... then... else x = input("please enter number: ") x = int(x) x = 3 if x > 3: print(x) ...
{ "repo_name": "idosekely/python-lessons", "path": "lesson_2/control_flow.py", "copies": "1", "size": "1035", "license": "mit", "hash": 8581212764206263000, "line_mean": 18.9038461538, "line_max": 72, "alpha_frac": 0.6251207729, "autogenerated": false, "ratio": 3.1846153846153844, "config_test":...
__author__ = 'sekely' ''' One of the biggest programming approaches today is the OOP - Object Oriented Programming. when we are talking about object, we are referring to 2 things - the class and the instance. objects can give attributes to instances, and can inherit attributes from other objects. think of that: a cl...
{ "repo_name": "idosekely/python-lessons", "path": "lesson_4/objects.py", "copies": "1", "size": "1995", "license": "mit", "hash": 1296571758090981600, "line_mean": 27.0985915493, "line_max": 99, "alpha_frac": 0.6756892231, "autogenerated": false, "ratio": 3.556149732620321, "config_test": false...
__author__ = 'Sekou Diao' from os.path import isfile, getsize from collections import OrderedDict import sqlite3 def _update(obj, entrees, decode=False): """ Recursively checks if key is in dic. If key is not in dic, it updates the dic with {key : value}. If key is in dic, it appends '#' to the key...
{ "repo_name": "SekouD/PYLexique380", "path": "PYLexique/parser.py", "copies": "1", "size": "13279", "license": "cc0-1.0", "hash": -18349899453765080, "line_mean": 36.4152542373, "line_max": 119, "alpha_frac": 0.5293318233, "autogenerated": false, "ratio": 3.299701046337818, "config_test": false...
__author__ = 'Sekou Diao' import sqlite3 from bs4 import BeautifulSoup as BS from urllib import request, parse, error def _update_nbrdef(obj): """ :param obj: :return: """ if isinstance(obj, sqlite3.Connection): curs = obj.cursor() curs.execute("PRAGMA table_info(lemmes)") ...
{ "repo_name": "SekouD/PYLexique380", "path": "PYLexique/fetch_def.py", "copies": "1", "size": "8824", "license": "cc0-1.0", "hash": -1483744965042103800, "line_mean": 48.8192090395, "line_max": 194, "alpha_frac": 0.5040825584, "autogenerated": false, "ratio": 4.199047619047619, "config_test": f...
__author__ = 'Sekou Diao' import sqlite3 def to_csv(obj, filename): """ :param obj: :param filename: :return: """ if isinstance(obj, sqlite3.Connection): lexique380 = obj.cursor() lexique380.execute("SELECT name FROM sqlite_master WHERE type='table'") tables = [table[0...
{ "repo_name": "SekouD/PYLexique380", "path": "PYLexique/dump.py", "copies": "1", "size": "1758", "license": "cc0-1.0", "hash": -6593013724740442000, "line_mean": 30.9636363636, "line_max": 79, "alpha_frac": 0.523890785, "autogenerated": false, "ratio": 3.6024590163934427, "config_test": false, ...
__author__ = 'Sekou Diao' from bs4 import BeautifulSoup as BS def generate_xml(dic): """ Takes a list of dictionaries and returns a bs4 xml object. Each entry of the list is a dictionary of the form {syntagm: answer list}. :param dict_list: list :rtype : bs4 xml object """ doc_xml = BS('<...
{ "repo_name": "SekouD/PYLexique380", "path": "PYLexique/xmldump.py", "copies": "1", "size": "1574", "license": "cc0-1.0", "hash": 1364852472853970400, "line_mean": 32.4893617021, "line_max": 78, "alpha_frac": 0.5785123967, "autogenerated": false, "ratio": 3.3900862068965516, "config_test": fals...
__author__ = 'Sekou Diao' import PYLexique dbname = 'Databases/lexique380_brut.db' lexique380_brutdb = PYLexique.open(dbname) lexique380_brut = lexique380_brutdb.cursor() # dbname1 = 'Databases/lexique380_decode.db' # lexique380decodedb = PYLexique.open(dbname1) # lexique380decode = lexique380decodedb.cursor() # # d...
{ "repo_name": "SekouD/PYLexique380", "path": "compare lemmes.py", "copies": "1", "size": "4010", "license": "cc0-1.0", "hash": -7033214658080053000, "line_mean": 54.7083333333, "line_max": 180, "alpha_frac": 0.7167082294, "autogenerated": false, "ratio": 2.590439276485788, "config_test": false,...
__author__ = 'selcuk' import struct FINAL = 128 TEXT = 1 CONT = 15 MASKED = 128 frag = {} def decode(client,data): totalSize = len(data) masked = False final = False text = False cont = False msg = 'long' # print "len:", len(data[:2]) a,b = struct.unpack('BB',data[:2]) # print "a:", a,...
{ "repo_name": "selcukgun/SGwebsocket", "path": "websocketCoding.py", "copies": "1", "size": "2601", "license": "mit", "hash": -1037223266632456000, "line_mean": 25.01, "line_max": 72, "alpha_frac": 0.5297962322, "autogenerated": false, "ratio": 3.55327868852459, "config_test": false, "has_no_...
########################################################################## ## Imports ########################################################################## import os import csv from BeautifulSoup import BeautifulSoup import urllib2 ########################################################################## ##...
{ "repo_name": "Pythonsgo/DP-Tutorial", "path": "WikiDownloads.py", "copies": "1", "size": "3112", "license": "mit", "hash": -2791799962174411000, "line_mean": 31.7578947368, "line_max": 85, "alpha_frac": 0.5482005141, "autogenerated": false, "ratio": 3.9144654088050315, "config_test": false, ...
########################################################################## ## Imports ########################################################################## import os import csv import requests import bz2 from bz2 import decompress import time ###################################################################...
{ "repo_name": "Pythonsgo/DP-Tutorial", "path": "ingestWikisCSV.py", "copies": "1", "size": "2586", "license": "mit", "hash": -2249241143164295400, "line_mean": 31.325, "line_max": 86, "alpha_frac": 0.5494972931, "autogenerated": false, "ratio": 4.274380165289256, "config_test": false, "has_no...
########################################################################## ## Imports ########################################################################## import os import pandas as pd import xlrd import requests import bz2 from bz2 import decompress import time ##############################################...
{ "repo_name": "Pythonsgo/DP-Tutorial", "path": "ingestWikis.py", "copies": "1", "size": "1883", "license": "mit", "hash": 6006365764024234000, "line_mean": 27.5303030303, "line_max": 95, "alpha_frac": 0.5390334572, "autogenerated": false, "ratio": 4.212527964205816, "config_test": false, "has...
########################################################################## ## Imports ########################################################################## import os import pandas as pd import numpy as np import xlrd from sklearn.cross_validation import train_test_split as tts from sklearn import linear_model fro...
{ "repo_name": "georgetown-analytics/bike-psychics", "path": "GitCapBikeFeatures.py", "copies": "1", "size": "3354", "license": "mit", "hash": 8226652162596466000, "line_mean": 26.2764227642, "line_max": 80, "alpha_frac": 0.6288014311, "autogenerated": false, "ratio": 3.188212927756654, "config_...
########################################################################## ## Imports ########################################################################## import os import xlrd import pandas as pd DIRNAME = os.path.dirname(__file__) DATAPATH = os.path.join(DIRNAME, "Starbucks.xlsx") OUTPATH = os.path.join(DIRNA...
{ "repo_name": "georgetown-analytics/bike-psychics", "path": "GitCapAddress.py", "copies": "1", "size": "1547", "license": "mit", "hash": 6686182606065352000, "line_mean": 26.1403508772, "line_max": 92, "alpha_frac": 0.5048480931, "autogenerated": false, "ratio": 4.136363636363637, "config_test"...
########################################################################## ## Imports ########################################################################## import os import pandas as pd import numpy as np import xlrd from sklearn.cross_validation import train_test_split as tts from sklearn import linear_model fr...
{ "repo_name": "georgetown-analytics/bike-psychics", "path": "GitCapBikeMachinePlot.py", "copies": "1", "size": "3938", "license": "mit", "hash": -7610770542129546000, "line_mean": 25.9794520548, "line_max": 84, "alpha_frac": 0.6356018283, "autogenerated": false, "ratio": 3.2762063227953413, "co...
########################################################################## ## Imports ########################################################################## import re import itertools from itertools import product import nltk from nltk import word_tokenize import numpy as np import matplotlib.pyplot as plt ###...
{ "repo_name": "Pythonsgo/DP-Tutorial", "path": "Get_Language_Corpus_Stats.py", "copies": "1", "size": "3870", "license": "mit", "hash": -8275577557297312000, "line_mean": 28.1052631579, "line_max": 95, "alpha_frac": 0.4100775194, "autogenerated": false, "ratio": 4.60166468489893, "config_test":...
########################################################################## ## Imports ########################################################################## import re import itertools from itertools import product ########################################################################## ## Module Constants #...
{ "repo_name": "Pythonsgo/DP-Tutorial", "path": "Language_SK_Corpus.py", "copies": "1", "size": "2850", "license": "mit", "hash": 6026652467791675000, "line_mean": 29.329787234, "line_max": 110, "alpha_frac": 0.4014035088, "autogenerated": false, "ratio": 4.596774193548387, "config_test": false,...
########################################################################## ## Imports ########################################################################## import os import csv import requests import bz2 from bz2 import decompress import time ###################################################################...
{ "repo_name": "Pythonsgo/DP-Tutorial", "path": "ingest_Single_Language_Wiki.py", "copies": "1", "size": "2683", "license": "mit", "hash": -1189207777021128400, "line_mean": 32.9620253165, "line_max": 110, "alpha_frac": 0.574357063, "autogenerated": false, "ratio": 4.320450885668277, "config_tes...
__author__ = 'Seman' import sys sys.path.append('.') import unittest import flask from nose.plugins.attrib import attr import main from service_api import ServiceApi import random from common import * @attr('UNIT') class DataProductIntTest(unittest.TestCase): def setUp(self): self.org_name = "CI Bench T...
{ "repo_name": "ooici/ion-ux", "path": "tests/test_create_new_data_product.py", "copies": "1", "size": "3761", "license": "bsd-2-clause", "hash": -7274532937424148000, "line_mean": 42.7325581395, "line_max": 163, "alpha_frac": 0.647434193, "autogenerated": false, "ratio": 4.031082529474812, "con...
__author__ = 'Seman' import sys sys.path.append('.') import unittest import main from service_api import ServiceApi import flask import random from common import * class SignIntTest(unittest.TestCase): def setUp(self): self.user = "Beta Operator User" self.app_client = main.app.test_client() ...
{ "repo_name": "ooici/ion-ux", "path": "tests/test_user_info.py", "copies": "1", "size": "2254", "license": "bsd-2-clause", "hash": 1161110125711000800, "line_mean": 32.6417910448, "line_max": 100, "alpha_frac": 0.6007098492, "autogenerated": false, "ratio": 3.9405594405594404, "config_test": tr...
__author__ = 'semih' from random import randint class Astator: """ Core astator class """ welcome_messages = ['Hi!', 'Hey', 'Wow! It\'s you', 'Good to see you!', 'Voila!', 'Hello my friend!', 'Yes!', 'I was just thinking about you!', 'Wow, I missed you!', 'I knew you would ' ...
{ "repo_name": "astator/astator", "path": "Astator.py", "copies": "1", "size": "5031", "license": "mit", "hash": 2490161899492849700, "line_mean": 39.9105691057, "line_max": 139, "alpha_frac": 0.5450208706, "autogenerated": false, "ratio": 4.037720706260032, "config_test": false, "has_no_keywo...
import numpy as np from numpy.testing import assert_allclose from scipy.signal import filtfilt from scipy.special import sph_harm from numpy.testing import assert_array_equal from mne.utils import run_tests_if_main, requires_version from mne.fixes import _sosfiltfilt as mne_sosfiltfilt, _sph_harm def test_filtfilt...
{ "repo_name": "teonlamont/mne-python", "path": "mne/tests/test_fixes.py", "copies": "2", "size": "1342", "license": "bsd-3-clause", "hash": -4199282290310256600, "line_mean": 32.55, "line_max": 73, "alpha_frac": 0.6497764531, "autogenerated": false, "ratio": 2.923747276688453, "config_test": tr...
# These files where extracted from the scikit-learn project # (http://scikit-learn.org/). # Scikit-learn is a Python module for machine learning built on top # of SciPy and distributed under the 3-Clause BSD license. # New BSD License # # Copyright (c) 2007--2013 The scikit-learn developers. # All rights reserved. #...
{ "repo_name": "omangin/multimodal", "path": "multimodal/lib/sklearn_utils.py", "copies": "1", "size": "4212", "license": "bsd-3-clause", "hash": -758606125963012100, "line_mean": 37.2909090909, "line_max": 78, "alpha_frac": 0.6932573599, "autogenerated": false, "ratio": 3.7406749555950265, "con...
import numpy as np import scipy as sp from scipy import ndimage from scipy.sparse.csgraph import connected_components from numpy.testing import assert_raises from sklearn.feature_extraction.image import ( img_to_graph, grid_to_graph, extract_patches_2d, reconstruct_from_patches_2d, PatchExtractor, extract_pa...
{ "repo_name": "themrmax/scikit-learn", "path": "sklearn/feature_extraction/tests/test_image.py", "copies": "17", "size": "10937", "license": "bsd-3-clause", "hash": -2840352025370388000, "line_mean": 34.6254071661, "line_max": 79, "alpha_frac": 0.5965072689, "autogenerated": false, "ratio": 2.859...
import numpy as np import scipy as sp from scipy import ndimage from scipy.sparse.csgraph import connected_components from sklearn.feature_extraction.image import ( img_to_graph, grid_to_graph, extract_patches_2d, reconstruct_from_patches_2d, PatchExtractor, extract_patches) from sklearn.utils.testing import ...
{ "repo_name": "chrsrds/scikit-learn", "path": "sklearn/feature_extraction/tests/test_image.py", "copies": "1", "size": "11692", "license": "bsd-3-clause", "hash": 358927215658166000, "line_mean": 34.2168674699, "line_max": 78, "alpha_frac": 0.5981867944, "autogenerated": false, "ratio": 2.8919119...
import numpy as np import scipy as sp from scipy import ndimage from nose.tools import assert_equal, assert_true from numpy.testing import assert_raises from sklearn.feature_extraction.image import ( img_to_graph, grid_to_graph, extract_patches_2d, reconstruct_from_patches_2d, PatchExtractor, extract_patches...
{ "repo_name": "lbishal/scikit-learn", "path": "sklearn/feature_extraction/tests/test_image.py", "copies": "28", "size": "10384", "license": "bsd-3-clause", "hash": -1397338264750991600, "line_mean": 34.8068965517, "line_max": 80, "alpha_frac": 0.5963983051, "autogenerated": false, "ratio": 2.7133...
import numpy as np import scipy as sp from scipy import ndimage from numpy.testing import assert_raises from sklearn.feature_extraction.image import ( img_to_graph, grid_to_graph, extract_patches_2d, reconstruct_from_patches_2d, PatchExtractor, extract_patches) from sklearn.utils.graph import connected_compo...
{ "repo_name": "RPGOne/Skynet", "path": "scikit-learn-0.18.1/sklearn/feature_extraction/tests/test_image.py", "copies": "38", "size": "11165", "license": "bsd-3-clause", "hash": -4443593579778033000, "line_mean": 34.7852564103, "line_max": 79, "alpha_frac": 0.5981191223, "autogenerated": false, "r...
import numpy as np import scipy as sp from scipy import ndimage from nose.tools import assert_equal, assert_true from numpy.testing import assert_raises from ..image import img_to_graph, grid_to_graph from ..image import extract_patches_2d, reconstruct_from_patches_2d, \ PatchExtractor, extract_p...
{ "repo_name": "seckcoder/lang-learn", "path": "python/sklearn/sklearn/feature_extraction/tests/test_image.py", "copies": "1", "size": "9781", "license": "unlicense", "hash": 8388236657880103000, "line_mean": 34.4384057971, "line_max": 79, "alpha_frac": 0.5875677334, "autogenerated": false, "ratio...
import numpy as np import scipy as sp from scipy import ndimage from nose.tools import assert_equal from numpy.testing import assert_raises from ..image import img_to_graph, grid_to_graph from ..image import extract_patches_2d, reconstruct_from_patches_2d, \ PatchExtractor from ...utils.graph imp...
{ "repo_name": "joshbohde/scikit-learn", "path": "sklearn/feature_extraction/tests/test_image.py", "copies": "1", "size": "7058", "license": "bsd-3-clause", "hash": 8765769419823663000, "line_mean": 32.6095238095, "line_max": 78, "alpha_frac": 0.6034287334, "autogenerated": false, "ratio": 2.74097...
__author__ = 'sen' import doctest import six from selenium import webdriver from sunshine.mixin import browser class Firefox(browser.SunnyWebdriverMixin, webdriver.Firefox): """ Sunshine's Firefox class supports context managers:: >>> from sunshine import webdriver >>> with webdriver.Firefo...
{ "repo_name": "gardiac2002/sunshine", "path": "sunshine/webdriver.py", "copies": "1", "size": "2931", "license": "mit", "hash": -5176573370710360000, "line_mean": 37.0779220779, "line_max": 115, "alpha_frac": 0.5349709997, "autogenerated": false, "ratio": 4.750405186385738, "config_test": false...
__author__ = 'sen' import doctest import string from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException import six from sunshine.webelement.webelement ...
{ "repo_name": "gardiac2002/sunshine", "path": "sunshine/mixin/browser.py", "copies": "1", "size": "5616", "license": "mit", "hash": -306753085185336900, "line_mean": 26.6699507389, "line_max": 92, "alpha_frac": 0.5528846154, "autogenerated": false, "ratio": 4.022922636103152, "config_test": fal...
__author__ = 'sensun' import networkx as nx from django.contrib.gis.geos import Polygon, LineString, GeometryCollection, Point def transform_convex_hull(convexHullAsGeom, convexHullAsGraph, hole, edge): verticesInHole = [] commonEdgeGeom = convexHullAsGeom[0].intersection(hole) for vertex in edge: ...
{ "repo_name": "sunForest/path_calculator_public", "path": "graphGeneration/core/convex_oo.py", "copies": "1", "size": "11328", "license": "mit", "hash": 5412260429640079000, "line_mean": 37.0167785235, "line_max": 111, "alpha_frac": 0.6175847458, "autogenerated": false, "ratio": 3.547760726589414...
__author__ = 'Seqian Wang' # A class for each scan session class ScanSession: def __init__(self, study, rid, scan_type, scan_date, scan_time, s_identifier, i_identifier, download_folder, raw_folder, file_type, moved=0): self.study = study self.rid = rid self.scan_type = s...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Recursor/ScanSession.py", "copies": "1", "size": "2139", "license": "apache-2.0", "hash": -884934229676361200, "line_mean": 40.1346153846, "line_max": 100, "alpha_frac": 0.5493221131, "autogenerated": false, "ratio": 3.4278846153846154, ...
__author__ = 'Seqian Wang' import glob import os import re from xml.dom import minidom import xmltodict import Config.ADNI_RecurserConfig as arc import Config.StudyConfig as sc from Recursor.ScanSession import ScanSession from Utils.PipelineLogger import PipelineLogger """ Parse ADNI Data Structure from Monica Down...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Recursor/ADNI/ADNIRecursor.py", "copies": "1", "size": "7387", "license": "apache-2.0", "hash": 8754495834436452000, "line_mean": 49.9517241379, "line_max": 170, "alpha_frac": 0.5760119128, "autogenerated": false, "ratio": 3.9397333333333...
__author__ = 'Seqian Wang' import os import re import Config.ADNI_RecurserConfig as arc import Config.StudyConfig as sc from Recursor.ScanSession import ScanSession from Utils.PipelineLogger import PipelineLogger """ Parse ADNI Data Structure from Monica Download and return a list of instances with scans' informatio...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Recursor/ADNI/ADNIRecursorFromOldData.py", "copies": "1", "size": "4578", "license": "apache-2.0", "hash": 6438621122953157000, "line_mean": 46.1958762887, "line_max": 166, "alpha_frac": 0.5987330712, "autogenerated": false, "ratio": 4.06...
__author__ = 'Sergei' from model.contact import Contact class ContactHelper: def __init__(self, app): self.app = app def fill_contact_first_last(self, Contact): wd = self.app.wd wd.find_element_by_name("firstname").click() wd.find_element_by_name("firstname").clear() w...
{ "repo_name": "serglit/python_traning", "path": "fixture/contact.py", "copies": "1", "size": "5572", "license": "apache-2.0", "hash": 6140519148121514000, "line_mean": 37.1643835616, "line_max": 86, "alpha_frac": 0.6073223259, "autogenerated": false, "ratio": 3.3872340425531915, "config_test": ...
__author__ = 'Sergei' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_groups_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...
{ "repo_name": "serglit/python_traning", "path": "fixture/group.py", "copies": "1", "size": "4115", "license": "apache-2.0", "hash": 7511161637187458000, "line_mean": 33.5798319328, "line_max": 100, "alpha_frac": 0.5970838396, "autogenerated": false, "ratio": 3.3239095315024234, "config_test": f...
__author__ = 'Sergei' from sys import maxsize class Contact: def __init__(self, first_n=None, mid_n=None, last_n=None, nick_n=None, company=None, address=None, home_ph=None, cell_ph=None, email=None, id=None): self.first_n=first_n self.mid_n=mid_n self.last_n=last_n self.nick_n=nick...
{ "repo_name": "serglit/python_traning", "path": "model/contact.py", "copies": "1", "size": "1430", "license": "apache-2.0", "hash": 732574373564740700, "line_mean": 36.8529411765, "line_max": 152, "alpha_frac": 0.6254856255, "autogenerated": false, "ratio": 2.5843373493975905, "config_test": fa...
__author__ = 'sergei' 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": "SergKitler/python_training", "path": "fixture/session.py", "copies": "1", "size": "1503", "license": "apache-2.0", "hash": -2306435571137993700, "line_mean": 29.6734693878, "line_max": 77, "alpha_frac": 0.5668662675, "autogenerated": false, "ratio": 3.34, "config_test": false, ...
__author__ = 'Sergei' from model.contact import Contact from random import randrange def test_contact_modify(app): cont = Contact(first_n= "FIRST",last_n= "LAST") if app.contact.count() == 0: app.contact.create_c(Contact(first_n= "first",mid_n= "middle",last_n= "last",nick_n= "kuk",company= "adda",add...
{ "repo_name": "serglit/python_traning", "path": "test/test_modify_contact.py", "copies": "1", "size": "1395", "license": "apache-2.0", "hash": 3152949935912661500, "line_mean": 44.0322580645, "line_max": 174, "alpha_frac": 0.6817204301, "autogenerated": false, "ratio": 2.8822314049586777, "conf...
__author__ = 'sergei' from model.group import Group from model.user import User import random def test_del_user_from_group(app, orm): if len(orm.get_contact_list()) == 0: app.user.add(User(firstname="Jeck", lastname="Antonio")) if len(orm.get_group_list()) == 0: app.group.create(Group(name="T...
{ "repo_name": "SergKitler/python_training", "path": "test/test_del_user_from_group.py", "copies": "1", "size": "1267", "license": "apache-2.0", "hash": 936905218582549600, "line_mean": 39.8709677419, "line_max": 99, "alpha_frac": 0.6400947119, "autogenerated": false, "ratio": 2.8536036036036037, ...
__author__ = 'sergei' from model.group import Group class GroupHelper: def __init__(self,app): self.app = app def open_groups_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_t...
{ "repo_name": "SergKitler/python_training", "path": "fixture/group.py", "copies": "1", "size": "3840", "license": "apache-2.0", "hash": 6008738280029747000, "line_mean": 31.8290598291, "line_max": 100, "alpha_frac": 0.5872395833, "autogenerated": false, "ratio": 3.3773087071240107, "config_test...
__author__ = 'sergei' from model.user import User import random def test_edit_user_via_details(app, db, check_ui): if len(db.get_user_list()) == 0: app.user.add(User(firstname="Jeck", lastname="Antonio")) old_user = db.get_user_list() user = random.choice(old_user) user_change = User(firstname...
{ "repo_name": "SergKitler/python_training", "path": "test/test_edit_user.py", "copies": "1", "size": "1765", "license": "apache-2.0", "hash": 5561010372309139000, "line_mean": 41.0238095238, "line_max": 101, "alpha_frac": 0.5932011331, "autogenerated": false, "ratio": 3.1517857142857144, "confi...
__author__ = 'sergei' from model.user import User import re class UserHelper: def __init__(self,app): self.app = app def add(self, user): wd = self.app.wd # init new user creation wd.find_element_by_link_text("add new").click() self.fill_user_form(user) wd.fin...
{ "repo_name": "SergKitler/python_training", "path": "fixture/user.py", "copies": "1", "size": "9720", "license": "apache-2.0", "hash": 7306490585704377000, "line_mean": 40.0168776371, "line_max": 131, "alpha_frac": 0.5939300412, "autogenerated": false, "ratio": 3.2904536222071767, "config_test"...
__author__ = 'sergei' from pony.orm import * from datetime import datetime from model.group import Group from model.user import User from pymysql.converters import encoders, decoders, convert_mysql_timestamp class ORMFixture: db = Database() class ORMGroup(db.Entity): _table_ = 'group_list' ...
{ "repo_name": "SergKitler/python_training", "path": "fixture/orm.py", "copies": "1", "size": "2709", "license": "apache-2.0", "hash": 8058316557910564000, "line_mean": 38.2608695652, "line_max": 147, "alpha_frac": 0.6467331118, "autogenerated": false, "ratio": 3.7625, "config_test": false, "h...
__author__ = 'sergei' from selenium import webdriver from fixture.session import SessionHelper from fixture.group import GroupHelper from fixture.user import UserHelper class Application: def __init__(self, browser,base_url): if browser == "firefox": self.wd = webdriver.Firefox(capabilities={"...
{ "repo_name": "SergKitler/python_training", "path": "fixture/application.py", "copies": "1", "size": "1049", "license": "apache-2.0", "hash": -9022775037763064000, "line_mean": 27.3783783784, "line_max": 75, "alpha_frac": 0.5843660629, "autogenerated": false, "ratio": 4.146245059288537, "config...
__author__ = 'sergei' from sys import maxsize class User: def __init__(self,firstname=None,middlename=None,lastname=None,nickname=None, title=None,company=None,address=None,home=None,mobile=None, work=None,fax=None,email=None,email2=None,email3=None, homepage=Non...
{ "repo_name": "SergKitler/python_training", "path": "model/user.py", "copies": "1", "size": "1651", "license": "apache-2.0", "hash": -7346837144956723000, "line_mean": 35.7111111111, "line_max": 183, "alpha_frac": 0.5857056329, "autogenerated": false, "ratio": 3.6285714285714286, "config_test":...
__author__ = 'sergei' import mysql.connector from model.group import Group from model.user import User class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection = mysql.conne...
{ "repo_name": "SergKitler/python_training", "path": "fixture/db.py", "copies": "1", "size": "1795", "license": "apache-2.0", "hash": 5538142022714392000, "line_mean": 37.1914893617, "line_max": 175, "alpha_frac": 0.5504178273, "autogenerated": false, "ratio": 4.294258373205742, "config_test": f...
__author__ = 'sergei' import pytest import json import os.path import importlib import jsonpickle from fixture.application import Application from fixture.db import DbFixture from fixture.orm import ORMFixture fixture = None target = None def load_config(file): global target if target is None: con...
{ "repo_name": "SergKitler/python_training", "path": "conftest.py", "copies": "1", "size": "2892", "license": "apache-2.0", "hash": 9110862939056386000, "line_mean": 31.1333333333, "line_max": 100, "alpha_frac": 0.6459197787, "autogenerated": false, "ratio": 3.8153034300791555, "config_test": tr...
__author__ = 'sergei' import re from model.user import User def test_contact_info_on_home_page(app, db): contact_from_home_page = sorted(app.user.get_user_list(), key=User.id_or_max) contact_from_db = sorted(db.get_user_list(), key=User.id_or_max) phones_from_db = list(merge_phones_like_on_home_page(co...
{ "repo_name": "SergKitler/python_training", "path": "test/test_contact.py", "copies": "1", "size": "1473", "license": "apache-2.0", "hash": 2142890329798749400, "line_mean": 46.5483870968, "line_max": 124, "alpha_frac": 0.6082824168, "autogenerated": false, "ratio": 3.1207627118644066, "config_...
__author__ = 'Sergei' 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_b...
{ "repo_name": "serglit/python_traning", "path": "fixture/session.py", "copies": "1", "size": "1338", "license": "apache-2.0", "hash": 5427732035753430000, "line_mean": 29.4090909091, "line_max": 88, "alpha_frac": 0.5605381166, "autogenerated": false, "ratio": 3.370277078085642, "config_test": f...
__author__ = 'Serge' import pymel.core as pmc import advutils as adv from splitter import Splitter from stretchy import stretchySplineIk def GUI(): winName = 'squishy_ik_win' if pmc.window(winName, exists=1): pmc.deleteUI(winName) win = pmc.window(winName, t='Squishy IK') pmc.formLayout(num...
{ "repo_name": "taozenforce/cogswelladvancedrigging", "path": "primitives.py", "copies": "2", "size": "8360", "license": "mit", "hash": -8030219567628233000, "line_mean": 36.8325791855, "line_max": 120, "alpha_frac": 0.6875598086, "autogenerated": false, "ratio": 3.0180505415162453, "config_test...