index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
55,657
open-sourcepad/python-testing-framework
refs/heads/master
/helpers/datetime_helper.py
from datetime import datetime as DT def str_to_date(value, format='%Y-%m-%d %H:%M:%S.%f'): return DT.strptime(value, format) def get_beginning_of_week(**kwargs): day = kwargs['datetime'] if type(kwargs['datetime']) == str: day = convert_to_datetime(kwargs['datetime']) result = day - timedelta(...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,658
open-sourcepad/python-testing-framework
refs/heads/master
/procedures.py
from importlib import import_module class Procedures: def __init__(self, **kwargs): self.kwargs = kwargs self.test = kwargs.get('test') def run(self): if self.test: return self._run(self.test) def run_all(self): result = [] for module in self._module_li...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,659
open-sourcepad/python-testing-framework
refs/heads/master
/models/base.py
# -*- coding: utf-8 -*- from peewee import * from config import Database as DB from datetime import datetime as DT from decimal import Decimal class Base(Model): class Meta: database = DB().instance def get_all_keys(self): return list(self._meta.fields.keys()) def get_data(self, **kwargs...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,660
open-sourcepad/python-testing-framework
refs/heads/master
/main.py
from config import Config from procedures import Procedures from middleware import * class Main: def __init__(self, **kwargs): self.kwargs = kwargs self._middleware() # test kwargs is required def run(self): return Procedures(**self.kwargs).run() def run_all(self): ret...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,661
open-sourcepad/python-testing-framework
refs/heads/master
/libs/callback.py
import requests from .logger import Logger class Callback: def __init__(self, method='post', url='', data={}, json={}, headers={}): self.req = getattr(requests, method) self.url = url self.data = data self.json = json self.headers = headers def request(self): tr...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,662
open-sourcepad/python-testing-framework
refs/heads/master
/config.py
import yaml from pathlib import Path from peewee import * from playhouse.pool import PooledMySQLDatabase from helpers.typecast_helper import to_int class Config: def __init__(self, file='app'): pwd = str(Path(__file__).parent) with open(f"{ pwd }/configs/{ file }.yml") as stream: try: ...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,663
open-sourcepad/python-testing-framework
refs/heads/master
/helpers/list_helper.py
def pluck(**kwargs): values = kwargs['values'] key = kwargs['key'] if type(values) == dict: result = [value[key] for value in values] else: result = [getattr(value, key) for value in values] return result def compact(list_data): return [x for x in list_data if x is not None] ...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,664
open-sourcepad/python-testing-framework
refs/heads/master
/modules/sample.py
from libs.csv_reader import CsvReader from .base import CallBackBase class Sample(CallBackBase): def __init__(self, **kwargs): super().__init__(**kwargs) self.method = 'get' # self.json = self._set_json() # self.headers = self._set_headers() # self.data = self._set_data() ...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,665
open-sourcepad/python-testing-framework
refs/heads/master
/middleware/db.py
from peewee import ModelSelect class Db(object): def __init__(self): def sort(self, **kwargs): return self.order_by(getattr(getattr(self.model, kwargs['column']), kwargs['order'])()) def iterable(self): return list(self) setattr(ModelSelect, 'sort', sort) s...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,666
open-sourcepad/python-testing-framework
refs/heads/master
/libs/selenium_request.py
from selenium import webdriver from seleniumrequests import Firefox from selenium.webdriver.firefox.options import Options from seleniumrequests.request import headers class SeleniumError(Exception): pass class Selenium: def __init__(self, **kwargs): self.method = kwargs.get('method', 'get') s...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,667
open-sourcepad/python-testing-framework
refs/heads/master
/modules/base.py
import unittest from libs.selenium import Selenium from config import Config from libs.callback import Callback class Base: def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) self.test_url = Config().get('test_url') self.print_results = kwargs.get('pr...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,668
open-sourcepad/python-testing-framework
refs/heads/master
/libs/csv_reader.py
import csv from pathlib import Path from config import Config from .logger import Logger class CsvReader: def __init__(self, **kwargs): self.config = Config() pwd = self.config.get('root_url') file = f"{ pwd }" self.file = f"{ pwd }/assets/{kwargs.get('file')}.csv" def read(sel...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,669
open-sourcepad/python-testing-framework
refs/heads/master
/libs/thread_base.py
from .logger import Logger from threading import Thread class ThreadBase: def __init__(self, **kwargs): self.thread = Thread(target=self.perform, kwargs=kwargs) def run(self): try: self.thread.start() except Exception as e: self.log_error(message=str(e.__class_...
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,670
open-sourcepad/python-testing-framework
refs/heads/master
/helpers/string_helper.py
import json def from_json(value): try: return json.loads(value) except Exception as e: return value def to_json(value): try: return json.dumps(value) except Exception as e: return value
{"/models/base.py": ["/config.py"], "/main.py": ["/config.py", "/procedures.py"], "/config.py": ["/helpers/typecast_helper.py"], "/modules/sample.py": ["/libs/csv_reader.py", "/modules/base.py"], "/modules/base.py": ["/libs/selenium.py", "/config.py", "/libs/callback.py"], "/libs/csv_reader.py": ["/config.py"]}
55,672
deepweaver/1MillionQueens
refs/heads/master
/testmultiprocess.py
import random from time import sleep def worker(i, quit, foundit): print "%d started" % i while not quit.is_set(): x = random.random() if x > 0.7: print '%d found %g' % (i, x) foundit.set() break sleep(0.1) print "%d is done" % i if __name__...
{"/multiprocessingmain.py": ["/board.py"], "/board.py": ["/progressbar.py"], "/main.py": ["/board.py"]}
55,673
deepweaver/1MillionQueens
refs/heads/master
/multiprocessingmain.py
from board import * import time import os # from multiprocessing import Pool, cpu_count import multiprocessing as mp # np.random.seed(0) # collision = [] bdsize = 100000 # fastest = None # print(bd.collisions) # def run(seed): # np.random.seed(seed) # bd = board(bdsize, randinit=False,threshold=10) # ...
{"/multiprocessingmain.py": ["/board.py"], "/board.py": ["/progressbar.py"], "/main.py": ["/board.py"]}
55,674
deepweaver/1MillionQueens
refs/heads/master
/board.py
import numpy as np # from nqueens_bak import nQueens from progressbar import update_progress # np.random.seed(0) class board: def __init__(self, size=8, C1=0.45, C2=32, randinit=True, threshold=20,with_progressbar_when_initializing=False): self.N = size # self.threshold = threshold ### TOD...
{"/multiprocessingmain.py": ["/board.py"], "/board.py": ["/progressbar.py"], "/main.py": ["/board.py"]}
55,675
deepweaver/1MillionQueens
refs/heads/master
/main.py
from board import * import time import numpy as np np.random.seed(0) # collision = [] bdsize = 1000 # fastest = None # print(bd.collisions) # def run(seed): # np.random.seed(seed) # bd = board(bdsize, randinit=False,threshold=10) # bd.repair(withprogressbar=False) board_sizes = [] with open ("./nqueen...
{"/multiprocessingmain.py": ["/board.py"], "/board.py": ["/progressbar.py"], "/main.py": ["/board.py"]}
55,676
deepweaver/1MillionQueens
refs/heads/master
/progressbar.py
import sys,time import random def update_progress(progress): barLength = 100 # Modify this to change the length of the progress bar status = "" if isinstance(progress, int): progress = float(progress) if not isinstance(progress, float): progress = 0 status = "error: progress var ...
{"/multiprocessingmain.py": ["/board.py"], "/board.py": ["/progressbar.py"], "/main.py": ["/board.py"]}
55,679
stefanlester/PythonPassword-STEFAN
refs/heads/master
/User.py
class User: name = "default" hashed_pw = "default" def set_name(self, name): self.name = name def get_name(self): return self.name def set_password(self, pw): self.hashed_pw = pw def get_password(self): return self.hashed_pw
{"/testPassword.py": ["/Password.py", "/User.py"], "/start.py": ["/User.py", "/Password.py"]}
55,680
stefanlester/PythonPassword-STEFAN
refs/heads/master
/testPassword.py
import unittest from Password import passwordTester as Password from User import User class TestPassword(unittest.TestCase): def setUp(self): self.password = '123_x&5s'.encode() def test_user(self): User.set_name(self, name = "Stefan") response = User.get_name(self) self.asser...
{"/testPassword.py": ["/Password.py", "/User.py"], "/start.py": ["/User.py", "/Password.py"]}
55,681
stefanlester/PythonPassword-STEFAN
refs/heads/master
/start.py
from User import User from Password import passwordTester import hashlib import os import bcrypt password=os.getenv("123_x&5s") hash_object = bcrypt.hashpw((b'123_x32&'),bcrypt.gensalt()) password = "bobo".encode() user1 = User() user1.set_name("Bert") p = passwordTester() hashed_password = p.hash_password(passwor...
{"/testPassword.py": ["/Password.py", "/User.py"], "/start.py": ["/User.py", "/Password.py"]}
55,682
stefanlester/PythonPassword-STEFAN
refs/heads/master
/Password.py
#adopted from: https://paragonie.com/blog/2016/02/how-safely-store-password-in-2016 import hmac import hashlib import os import bcrypt class PasswordTester: @staticmethod def hash_password(password_string): hashed_password = bcrypt.hashpw(password_string, bcrypt.gensalt()) return hashed_passw...
{"/testPassword.py": ["/Password.py", "/User.py"], "/start.py": ["/User.py", "/Password.py"]}
55,685
elfprince13/FreeBuild
refs/heads/master
/scripts/prefs/keymaps/default.py
# This little module maps glfw key definitions to libRocket key definitions # Change if you have a nonstandard keyboard layout # Or if one of those two components is replaced in the engine def getKeyMap(): return keymap def getEffectiveKeyNames(): return rocket_by_name def getEffectiveKeyIndices(): return rocket_...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,686
elfprince13/FreeBuild
refs/heads/master
/scripts/prefs/__init__.py
print "Importing %s..."%(__name__), import os.path from scripts.util.package_utils import determine_package path = os.path.abspath(__file__) dir_path = os.path.dirname(path) __all__=determine_package(dir_path) print "Success!" print " Contains these submodules: %s"%(", ".join(__all__))
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,687
elfprince13/FreeBuild
refs/heads/master
/scripts/editor/shaderUI.py
from net.cemetech.sfgp.glsl.editor import GLSLEditorPane import os, os.path from java.awt import EventQueue, BorderLayout from java.awt.event import ActionEvent, KeyEvent, ActionListener from java.lang import Runnable, IllegalStateException from javax.swing import JMenu, JMenuBar, JMenuItem, KeyStroke, JSeparator,...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,688
elfprince13/FreeBuild
refs/heads/master
/scripts/gfx/framebuffer_builder.py
from org.lwjgl import BufferUtils, LWJGLException from org.lwjgl.opengl import Display from net.cemetech.sfgp.freebuild.gfx import FBO, BufferObject, Texture, GFX from constants import attachment_points, tex_targets, formats, internal_formats, types import json from scala import Option # Each framebuffer we deseria...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,689
elfprince13/FreeBuild
refs/heads/master
/scripts/prefs/fonts/__init__.py
print "Importing %s..."%(__name__), import os.path from scripts.util.package_utils import determine_package,export_symbols from net.cemetech.sfgp.freebuild.drivers import Drivers path = os.path.abspath(__file__) dir_path = os.path.dirname(path) __all__=determine_package(dir_path) export_symbols(Drivers.getMainDriver()...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,690
elfprince13/FreeBuild
refs/heads/master
/scripts/util/nuparser.py
from org.fit.cssbox.io import DOMSource from nu.validator.htmlparser.dom import HtmlDocumentBuilder from org.xml.sax import InputSource class NUDomSource(DOMSource): def __init__(self, src): DOMSource.__init__(self, src) def parse(self): dbuilder = HtmlDocumentBuilder() return ...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,691
elfprince13/FreeBuild
refs/heads/master
/main.py
import sys import os,os.path from net.cemetech.sfgp.freebuild.drivers import Drivers from net.cemetech.sfgp.ldraw import LDManager from java.lang import System from org.lwjgl import LWJGLException def common_setup(driver,*argv): # Here we should explicitly load a settings file import json with open("data/prefs/de...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,692
elfprince13/FreeBuild
refs/heads/master
/scripts/util/package_utils.py
import os.path def is_package_dir(parent,path): rpath = os.path.join(parent,path) return path if (os.path.exists(rpath) and \ os.path.isdir(rpath) and \ os.path.exists(os.path.join(rpath,"__init__.py"))) else "" def is_python_module(path): lp = len(path) if (lp ...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,693
elfprince13/FreeBuild
refs/heads/master
/scripts/gfx/pipeline_builder.py
import json from framebuffer_builder import framebuffer_from_description from scripts.util.graphs import topsort import os, os.path from net.cemetech.sfgp.freebuild.gfx import Shader from scala import Option def shader_from_bundle(bundle_path,suppress_unbind=False): bundle_contents = os.listdir(bundle_path) ...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,694
elfprince13/FreeBuild
refs/heads/master
/scripts/ui/__init__.py
print "Importing %s..."%(__name__), import os.path from scripts.util.package_utils import determine_package path = os.path.abspath(__file__) dir_path = os.path.dirname(path) __all__=determine_package(dir_path) def configure_ui(width,height): print "Executing configure_ui(%d,%d)" % (width,height) #from _rocketcore im...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,695
elfprince13/FreeBuild
refs/heads/master
/scripts/ui/main_menu.py
from scripts.util.nuparser import NUDomSource from org.fit.cssbox.io import DefaultDocumentSource from org.fit.cssbox.css import DOMAnalyzer, CSSNorm from java.net import URL from java.io import File as JFile from java.awt import Dimension from org.fit.cssbox.layout import BrowserCanvas #import _rocketcore #import _...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,696
elfprince13/FreeBuild
refs/heads/master
/scripts/util/graphs.py
def topsort(V,E): E = set(E) # don't want to mutate parent copy L = [] outgoing,incoming = classify_edges(V,E) S = {v for v in V if has_no_incoming(v,E,incoming)} if not S: raise ValueError("Can't topsort a cyclic graph") else: while S: n = S.pop() L.append(n) ...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,697
elfprince13/FreeBuild
refs/heads/master
/scripts/ui/keybindings.py
# Constants for permissioning/binding precedence down the road. DEFAULT = 0 USER = 1 MOD = 2 KEY_RELEASED = 0 KEY_PRESSED = 1 state_map = {'keyup' : KEY_RELEASED, 'keydown' : KEY_PRESSED} # Need to choose prefs appropriately! from scripts.prefs.keymaps import getModifiersByIndex, getModifiersByName, getEffectiveKey...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,698
elfprince13/FreeBuild
refs/heads/master
/shader_editor.py
import sys import os,os.path from net.cemetech.sfgp.freebuild.drivers import Drivers from java.lang import System def main(*argv): print "//---------------------------------------------" print print "Parsing startup arguments for shader editor" Drivers.clearMainDriver() from net.cemetech.sfgp.freebuild.gfx impo...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,699
elfprince13/FreeBuild
refs/heads/master
/scripts/prefs/fonts/default.py
# Load up DejaVu fonts as a nice default import os, os.path#, _rocketcore font_path = "./data/ui/fonts/dejavu" def loadDefaultFonts(): if os.path.exists(font_path) and os.path.isdir(font_path): paths = os.listdir(font_path) font_files = [os.path.join(font_path,name) for name in paths if len(name)>4 and name[-4:...
{"/scripts/gfx/pipeline_builder.py": ["/scripts/util/graphs.py"]}
55,710
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/tests/booking_test.py
import unittest from repositories.booking_repository import * from repositories.member_repository import * from repositories.gym_class_repository import * from repositories.staff_member_repository import * class TestBooking(unittest.TestCase): def setUp(self): member1 = Member('Jack', 'Premium') ...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,711
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/repositories/booking_repository.py
from db.run_sql import run_sql from models.booking import Booking import repositories.member_repository as member_repository import repositories.gym_class_repository as gym_class_repository import pdb def save(booking): sql = "INSERT INTO bookings ( member_id, gym_class_id ) VALUES ( %s, %s) RETURNING id;" val...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,712
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/controllers/gym_class_controller.py
from flask import Flask, render_template, request, redirect from flask import Blueprint from models.gym_class import Gym_class import repositories.gym_class_repository as gym_class_repository import repositories.member_repository as member_repository import repositories.booking_repository as booking_repository import r...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,713
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/controllers/booking_controller.py
from flask import Flask, render_template, request, redirect from flask import Blueprint from models.booking import Booking import repositories.booking_repository as booking_repository import repositories.member_repository as member_repository import repositories.gym_class_repository as gym_class_repository import datet...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,714
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/controllers/staff_member_controller.py
from flask import Flask, render_template, request, redirect from flask import Blueprint from models.staff_member import Staff_Member import repositories.staff_member_repository as staff_member_repository import pdb staff_members_blueprint = Blueprint("staff_members", __name__) @staff_members_blueprint.route("/staff_m...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,715
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/console.py
# from CodeGym.models.staff_member import Staff_Member import pdb from models.gym_class import Gym_class from models.member import Member from models.booking import Booking from models.staff_member import Staff_Member import repositories.gym_class_repository as gym_class_repository import repositories.member_repositor...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,716
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/repositories/staff_member_repository.py
from db.run_sql import run_sql from models.gym_class import Gym_class from models.staff_member import Staff_Member import pdb def save(staff_member): sql = "INSERT INTO staff_members( name, job_type ) VALUES ( %s, %s ) RETURNING id" values = [staff_member.name, staff_member.job_type] results = run_sql( sql...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,717
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/repositories/member_repository.py
from db.run_sql import run_sql from models.gym_class import Gym_class from models.member import Member def save(member): sql = "INSERT INTO members( name, type ) VALUES ( %s, %s ) RETURNING id" values = [member.name, member.type] results = run_sql( sql, values ) member.id = results[0]['id'] return ...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,718
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/tests/gym_class_test.py
import unittest from repositories.gym_class_repository import * class TestGym_Class(unittest.TestCase): def setUp(self): self.gym_class = Gym_class('Arm Day', 3, '2021-08-30', '12:00', 60, 12) def test_gym_class_has_name(self): self.assertEqual("Arm Day", self.gym_class.name) def test_g...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,719
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/run_tests.py
import unittest from tests.booking_test import * from tests.gym_class_test import * from tests.member_test import * from tests.staff_member_test import * if __name__ == '__main__': unittest.main()
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,720
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/tests/member_test.py
import unittest from repositories.member_repository import * class TestMember(unittest.TestCase): def setUp(self): self.member = Member('Jack', 'Premium') def test_member_has_name(self): self.assertEqual("Jack", self.member.name) def test_guest_has_membership_type(self): self.as...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,721
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/tests/staff_member_test.py
import unittest from repositories.staff_member_repository import * class TestStaff_Member(unittest.TestCase): def setUp(self): self.staff_member = Staff_Member('Steve', 'Instructor') def test_member_has_name(self): self.assertEqual("Steve", self.staff_member.name) def test_guest_has_mem...
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,722
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/models/staff_member.py
class Staff_Member: def __init__(self, name, job_type, id = None): self.name = name self.job_type = job_type self.id = id
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,723
KieranShek/CodeGym_Flask_Full_Stack_Web_App
refs/heads/main
/repositories/gym_class_repository.py
from db.run_sql import run_sql from models.gym_class import Gym_class from models.member import Member def save(gym_class): sql = "INSERT INTO gym_classes(name, instructor, date, time, duration, capacity) VALUES ( %s, %s, %s, %s, %s, %s ) RETURNING id" values = [gym_class.name, gym_class.instructor, gym_class....
{"/tests/booking_test.py": ["/repositories/booking_repository.py", "/repositories/member_repository.py", "/repositories/gym_class_repository.py", "/repositories/staff_member_repository.py"], "/repositories/booking_repository.py": ["/repositories/member_repository.py", "/repositories/gym_class_repository.py"], "/control...
55,731
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/punjabi-series-pca-lda.py
''' punjabi-series-pca-lda: PCA-LDA pipeline as used for Punjabi time series project (Kochetov, Faytak, Nara) ''' import argparse import glob import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import re import sys from hashlib import sha1 from scipy.ndimage import median_f...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,732
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/punjabi-cache-frames.py
""" punjabi-cache-frames: frame caching method used in Punjabi dental/retroflex project (Kochetov, Faytak, Nara) """ # TODO: actually using? from __future__ import absolute_import, division, print_function import argparse import glob import numpy as np import os import pandas as pd import re import struct import subp...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,733
mfaytak/ultramisc
refs/heads/master
/scripts/file-management/mfa-unflatten.py
# Simple utility to "unflatten" forced alignment output from # the Montreal Forced Aligner (move audio files and TextGrid # annotations back into acquisition directories). Assumes # each ultrasound acquisition in its own subdirectory in expdir. # Assumes each .TextGrid has a matching directory name. # Usag...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,734
mfaytak/ultramisc
refs/heads/master
/scripts/ssanova/palate-getter.py
# palate getter function - averages all palate traces in ET output .con file # outputs a text file that can be used in ssanova_palate.R # usage: python palate-getter.py [directory name] # where directory contains multiple subjects' palate-finding dirs # target files MUST end in "palates.con" import os, sys, argp...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,735
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/nasalcoda-cache-frames.py
''' Script to cache vowel and nasal data of interest in Mandarin Chinese. Assumes TextGrid annotations with phone set used in Montreal Forced Aligner for its pre-trained Mandarin Chinese acoustic model. Lists of target segments and/or can be input to selectively extract data. If either list is omitted, no restr...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,736
mfaytak/ultramisc
refs/heads/master
/scripts/file-management/acq-share.py
''' acq-share.py: by Matt Faytak / Jennifer Kuo Divide ultrasound subdirectories into approximately equal shares for processing by multiple workers. Usage: python acq-share.py [expdir] [shares] [--flat] [--random] expdir: the experiment folder containing the acquisition subdirectories to be divide...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,737
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/suzhou-cache-frames.py
#!/usr/bin/env python ''' suzhou-cache-frames: frame caching method as used in Suzhou iz/i project. ''' import argparse import audiolabel import glob import imgphon as iph import os import numpy as np import pandas as pd import re import shutil import sys from collections import OrderedDict from ha...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,738
mfaytak/ultramisc
refs/heads/master
/scripts/ssanova/con-checker.py
# Checks whether # Can easily be extended to any processing task that takes place # in a subject directory and involves outputs of easily identifiable # files. # Usage: python con-checker.py [directory containing all acquisitions/data/etc] # Authors: Matthew Faytak (faytak@ucla.edu) Copyright (c) 2018 # L...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,739
mfaytak/ultramisc
refs/heads/master
/scripts/video/eb-make-avi.py
# eb-extract-all.py: extract all frames as BMPs from a raw file # WARNING: largely superseded by code in ./flap-video-writer.py # usage: python eb-extract-all.py expdir (-f / --flop) import argparse import audiolabel import glob import numpy as np import os import re import shutil import subprocess from ...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,740
mfaytak/ultramisc
refs/heads/master
/setup.py
from distutils.core import setup setup( name = 'ultramisc', author = 'Matthew Faytak', packages = ['ultramisc'] )
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,741
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/process-cache.py
''' process-cache.py: a python command line utility for cleaning up ultrasound frame data stored in a .npy cache. A metadata pickle is used to identify frames. Both of these files are created using one of the *-cache-frames.py scripts also stored in this repository. To be more precise, this script fa...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,742
mfaytak/ultramisc
refs/heads/master
/scripts/file-management/check-adjusting.py
### TAP/FLAP Project ### Python script for checking if all textgrids have been adjusted ### instructions: In command line/terminal, run python checkadjusting.py TG_DIR, ### where TG_DIR is the directory containing the textgrids. ## Packages that need to be downloaded: audiolabel ##Jennifer Kuo, July 2019 impo...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,743
mfaytak/ultramisc
refs/heads/master
/scripts/ssanova/format-con.py
#/usr/bin/env python ''' format-con.py: Extract pairs of columns from EdgeTrak-produced .con files to generate CSV files that Jeff Mielke's tongue_ssanova.R can operate on. Extracts single target frames but can be extended to sequences. Usage $ python format-con.py dirname Arguments directory dir contai...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,744
mfaytak/ultramisc
refs/heads/master
/scripts/ssanova/eb-extract-frames.py
#!/usr/bin/env python # eb-extract-frames.py: extract frame BMPs for contour extraction # usage: python eb-extract-frames.py expdir (-f / --flop) import argparse import audiolabel import glob import numpy as np import os import re import shutil from operator import itemgetter from PIL import Image from ultratils.raw...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,745
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/punjabi-series-cache-frames.py
#!/usr/bin/env python """ punjabi-series-cache-frames: time series frame caching method used in Punjabi dental/retroflex project (Kochetov, Faytak, Nara) """ # TODO: actually using? from __future__ import absolute_import, division, print_function import argparse import glob import numpy as np import os import pandas...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,746
mfaytak/ultramisc
refs/heads/master
/scripts/ssanova/ultrasonix-extract-frames.py
#!/usr/bin/env python # TODO RENAME extract frame BMPs for contour extraction # from ultrasonix data, using ultratils.exp.Exp class # This is set up to extract Kejom vowel and fricative data # usage: python ulx-extract-frames.py expdir (-f / --flop) import os, re, shutil from PIL import Image from ultratils.exp impo...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,747
mfaytak/ultramisc
refs/heads/master
/scripts/file-management/ultrasonix-subsetter.py
#!/usr/bin/env python # subsetter.py: pick out a subset of acquisitions in an experiment directory. # usage: python subsetter.py expdir import argparse import glob import os import shutil import sys from ultratils.exp import Exp from ultramisc.ebutils import read_stimfile # parse argument(s) parser = argparse.Ar...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,748
mfaytak/ultramisc
refs/heads/master
/scripts/file-management/replace-ts-word.py
''' replace-ts-word: find and replace words in transcript files. Intended use is changing spellings to get along with forced alignment dictionaries. ''' import os, sys, glob import argparse def read_transcript(my_ts_file): with open(my_ts_file, "r") as tsfile: sentence = tsfile.read().rstrip('\n') wordlist =...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,749
mfaytak/ultramisc
refs/heads/master
/scripts/file-management/mfa-flatten.py
# Simple utility to copy audio data recorded with ultrasound to # to a flat directory structure with appropriate file extensions, # as expected by the Montreal Forced Aligner. # Usage: python mfa-flatten.py [expdir] # expdir - top-level directory for one subject, as output by EchoB/Micro. import argparse ...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,750
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/suzhou-process-cache.py
''' suzhou-process-cache: frame cache processing method as used in Suzhou project. NOTE: largely superceded by general script, ./process-cache.py, plus the ./suzhou-pca-lda* scripts run afterwards. ''' import argparse import glob import matplotlib.pyplot as plt import numpy as np import os import panda...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,751
mfaytak/ultramisc
refs/heads/master
/scripts/video/flap-video-viewer.py
#!/usr/bin/env python import argparse import easygui import glob import os import time import vlc from ultramisc.ebutils import read_stimfile def play_from_gui(av): ''' Plays a video file using python VLC bindings, then closes the video player. ''' player = vlc.MediaPlayer(av) player.play()...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,752
mfaytak/ultramisc
refs/heads/master
/scripts/file-management/subsetter.py
#!/usr/bin/env python # subsetter.py: pick out a subset of acquisitions in an experiment directory. # usage: python subsetter.py expdir # TODO test both options (delete, not delete) import argparse import glob import os import shutil import sys from ultramisc.ebutils import read_stimfile, read_listfile # parse arg...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,753
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/punjabi-series-process-cache.py
''' punjabi-series-process-cache.py: process cache as done in Kochetov/Faytak/Nara project. ''' import argparse import glob import matplotlib.pyplot as plt import numpy as np import pandas as pd import os import re import sys from hashlib import sha1 from imgphon import ultrasound as us from scipy.ndi...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,754
mfaytak/ultramisc
refs/heads/master
/scripts/video/flap-video-writer.py
''' flap-video-writer: convert designated sequences of ultrasound frames into .AVI movies. ''' import argparse import audiolabel import glob import imgphon.ultrasound as us # TODO reorganize import numpy as np import os import subprocess from operator import itemgetter from PIL import Image # check if co...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,755
mfaytak/ultramisc
refs/heads/master
/scripts/file-management/move-for-recoding.py
#### 2019 TAP/FlAP ULTRASOUND PROJECT #### ## Script for moving acquisitions into folders sorted by the type of tap/flap ## inter-rater disagreement. ## Jennifer Kuo July 2019 ## TO run: python move-for-recoding.py EXPDIR CODEFILE ## Where: EXPDIR is the directory containing the experiment files (acquisitions), ## a...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,756
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/nasalcoda-pca-lda.py
''' nasalcoda-pca-lda: PCA-LDA pipeline as used in nasal coda project (Liu S., Faytak). ''' import argparse import glob import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import re import sys from hashlib import sha1 from imgphon.ultrasound import reconstruct_frame from s...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,757
mfaytak/ultramisc
refs/heads/master
/ultramisc/ebutils.py
import os from unicodedata import normalize def read_echob_metadata(rawfile): ''' Gather information about a .raw file from its .img.txt file. For legacy .raw data without a header; if a header exists, use ultratils utilities. Inputs: a .raw file, which is assumed to have an .img.txt file wi...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,758
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/punjabi-pca.py
''' punjabi-pca: PCA analysis for Punjabi project (Kochetov, Faytak, Nara). WARNING: Largely superceded by ./punjabi-series-pca-lda.py ''' import argparse import glob import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import re import sys from hashlib import sha1 from scipy.ndimage im...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,759
mfaytak/ultramisc
refs/heads/master
/scripts/dim-reduction/suzhou-pca-lda-1ld.py
''' suzhou-pca-lda-1ld: PCA-LDA method, Suzhou project, simple (1LD) model. ''' import argparse import glob import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import re import sys from hashlib import sha1 from sklearn.decomposition import PCA from sklearn.discriminant_ana...
{"/scripts/dim-reduction/nasalcoda-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/dim-reduction/suzhou-cache-frames.py": ["/ultramisc/ebutils.py"], "/scripts/video/eb-make-avi.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/format-con.py": ["/ultramisc/ebutils.py"], "/scripts/ssanova/eb-extract-frames.py": ["...
55,763
ToxicWar/learn-backbone.js
refs/heads/master
/backbone_and_django/app/views.py
from django.views.generic import TemplateView from rest_framework import viewsets from .serializers import TaskSerializer from .models import Task class TaskViewSet(viewsets.ModelViewSet): model = Task serializer_class = TaskSerializer class Home(TemplateView): template_name = 'app/index.html' home = H...
{"/backbone_and_django/app/views.py": ["/backbone_and_django/app/models.py"]}
55,764
ToxicWar/learn-backbone.js
refs/heads/master
/backbone_and_django/app/models.py
from django.db import models class Task(models.Model): title = models.CharField('Title', max_length=1000) is_completed = models.BooleanField('Is completed', default=False)
{"/backbone_and_django/app/views.py": ["/backbone_and_django/app/models.py"]}
55,765
ToxicWar/learn-backbone.js
refs/heads/master
/backbone_and_django/app/urls.py
from django.conf.urls import patterns, url, include from rest_framework import routers import views router = routers.DefaultRouter() router.register(r'tasks', views.TaskViewSet) urlpatterns = patterns('', url(r'^$', 'app.views.home', name='Home'), url(r'', include(router.urls)), )
{"/backbone_and_django/app/views.py": ["/backbone_and_django/app/models.py"]}
55,767
diogommartins/reloadable
refs/heads/master
/reloadable/decorators.py
from functools import wraps, partial from time import sleep from reloadable import config def reloadable(exception_callback=None, sleep_time=0, stop_condition_exception=None, max_reloads=None, return_on_success=False): def decorator(func): @wrap...
{"/reloadable/decorators.py": ["/reloadable/__init__.py"], "/tests/test_decorators.py": ["/reloadable/__init__.py", "/reloadable/decorators.py", "/reloadable/config.py"], "/tests/test_configure.py": ["/reloadable/__init__.py"], "/reloadable/__init__.py": ["/reloadable/decorators.py"]}
55,768
diogommartins/reloadable
refs/heads/master
/tests/test_decorators.py
from unittest import TestCase try: from unittest.mock import Mock except ImportError: from mock import Mock from reloadable import configure from reloadable.decorators import reloadable, retry_on_error from reloadable.config import STOP_CONDITION_EXCEPTION class ReloadableDecoratorTests(TestCase): def se...
{"/reloadable/decorators.py": ["/reloadable/__init__.py"], "/tests/test_decorators.py": ["/reloadable/__init__.py", "/reloadable/decorators.py", "/reloadable/config.py"], "/tests/test_configure.py": ["/reloadable/__init__.py"], "/reloadable/__init__.py": ["/reloadable/decorators.py"]}
55,769
diogommartins/reloadable
refs/heads/master
/reloadable/config.py
ENABLED = True STOP_CONDITION_EXCEPTION = KeyboardInterrupt
{"/reloadable/decorators.py": ["/reloadable/__init__.py"], "/tests/test_decorators.py": ["/reloadable/__init__.py", "/reloadable/decorators.py", "/reloadable/config.py"], "/tests/test_configure.py": ["/reloadable/__init__.py"], "/reloadable/__init__.py": ["/reloadable/decorators.py"]}
55,770
diogommartins/reloadable
refs/heads/master
/setup.py
# coding=utf-8 from os import path from setuptools import setup, find_packages VERSION = '0.1.5' here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst')) as file: long_description = file.read() setup( name='reloadable', version=VERSION, description='Rerun a function upon ...
{"/reloadable/decorators.py": ["/reloadable/__init__.py"], "/tests/test_decorators.py": ["/reloadable/__init__.py", "/reloadable/decorators.py", "/reloadable/config.py"], "/tests/test_configure.py": ["/reloadable/__init__.py"], "/reloadable/__init__.py": ["/reloadable/decorators.py"]}
55,771
diogommartins/reloadable
refs/heads/master
/tests/test_configure.py
from unittest import TestCase from reloadable import configure from reloadable import config class ConfigureTest(TestCase): def setUp(self): self.save_old_config() def tearDown(self): self.restore_old_config() def test_changes_config(self): setattr(config, 'WTF', True) c...
{"/reloadable/decorators.py": ["/reloadable/__init__.py"], "/tests/test_decorators.py": ["/reloadable/__init__.py", "/reloadable/decorators.py", "/reloadable/config.py"], "/tests/test_configure.py": ["/reloadable/__init__.py"], "/reloadable/__init__.py": ["/reloadable/decorators.py"]}
55,772
diogommartins/reloadable
refs/heads/master
/reloadable/__init__.py
from .decorators import * from . import config def configure(**options): for option, value in options.items(): config_name = option.upper() if not hasattr(config, config_name): raise ValueError("Option '%s' doesn't exist for reloadable" % config_name) setattr(config, config_nam...
{"/reloadable/decorators.py": ["/reloadable/__init__.py"], "/tests/test_decorators.py": ["/reloadable/__init__.py", "/reloadable/decorators.py", "/reloadable/config.py"], "/tests/test_configure.py": ["/reloadable/__init__.py"], "/reloadable/__init__.py": ["/reloadable/decorators.py"]}
55,774
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/monitor/game_ascription.py
#!/usr/bin/env python #ecoding:utf-8 #用途: #用于做游戏归属查询 from app.monitor import monitor from flask import render_template, request, jsonify, flash from models import Game_Ascritption from ..scripts.zabbix_manage import manage_zabbix from flask_login import login_required, current_user from app.scripts.too...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,775
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/scripts/zabbix_manage.py
#!/usr/bin/env python #ecoding:utf-8 from zabbix import Efun_Zabbix from ..scripts.tools import save_memcache_value,get_memcached_value from ..business.models import Manager_business import string, json, re, urllib, urllib2, cookielib, sys from ..models import Sections,db from redis_manage import Efun_Redis ...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,776
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/monitor/interface.py
#ecoding:utf-8 from flask import request from flask_login import current_user from app.monitor import monitor from app import db from app.models import Monitor_host, Login_pwd, Login_ssh import json import sys, time from app.scripts.tools import urldecode, return_id, select_and_create, save_db, return_ips, save_memcac...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,777
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/monitor/scan_page.py
#!/usr/bin/env python #ecoding:utf-8 from app.monitor import monitor from flask import render_template, request, jsonify, url_for, redirect, Response from flask_login import login_required, current_user from ..decorators import user_required, zabbix_login_required from ..scripts.zabbix import zabbix_API from...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,778
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/decorators.py
#!/usr/bin/env python #ecoding:utf-8 from functools import wraps from flask import abort, redirect, url_for from flask_login import current_user from .models import Permission from app.scripts.tools import get_memcached_value #1 先判断用户是否为管理员。 #2 如果是管理员直接返回不做检测 #3 如果非管理员则检测路径是否具有访问权限 def permission_required(permission...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,779
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/monitor/views_monitor.py
#ecoding:utf-8 from flask import render_template, request, redirect, url_for from flask_login import login_required, current_user from app.monitor import monitor from app.models import Login_pwd, Proxy, System, Login_ssh, Monitor_host import sys, json, os from app.scripts.socket_client import Run_Socket_Client from app...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,780
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/report/export_excel.py
#coding:utf-8 import sys,os,re from openpyxl import Workbook from openpyxl.styles import Color, PatternFill, Font, Border,Side, Alignment, Protection from openpyxl.styles import colors from openpyxl.cell import Cell from openpyxl.comments import Comment from .. models import User,Trouble_repo,Trouble_repo_add,...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,781
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/main/system_manage.py
#coding: utf-8 import time,datetime,json,re,calendar,sys from sqlalchemy import or_ from app.main import main from app import db, csrf from flask_login import login_required from app.decorators import permission_required from flask import render_template, flash, redirect, session, url_for, request,Response fr...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,782
wenyongxin/moniotr_system_v0.2
refs/heads/master
/app/scripts/zabbix.py
#!/usr/bin/env python #ecoding:utf-8 import json, sys, urllib2, re, time import config reload(sys) sys.setdefaultencoding('utf-8') class zabbix_API(): def __init__(self, action='application', zabbix_user=None, zabbix_password=None, zabbix_server=None): if action == 'test': sel...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...
55,783
wenyongxin/moniotr_system_v0.2
refs/heads/master
/test/aa.py
a = { '103.227.128.16': { '47.91.163.77':[ 'login.efun.com', 'ptlogin.efun.com', 'loginsea.efunsea.com', 'ptlogin.efunsea.com', 'https://sdksea-file-download.efunsea.com/policy/all/en_US/efun.html' ...
{"/app/decorators.py": ["/app/models.py", "/app/scripts/tools.py"], "/app/report/export_excel.py": ["/app/models.py", "/config.py"], "/app/main/system_manage.py": ["/app/__init__.py", "/app/decorators.py", "/app/models.py", "/app/scripts/zabbix.py", "/app/scripts/tools.py", "/config.py"], "/app/auth/func.py": ["/app/__...