index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
52,396 | anevolina/GoogleCalendarBot | refs/heads/master | /tg_bot/GC_TelegramBot.py | """Telegram Bot module for communicating with the main API"""
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0,parentdir)
import tg_bot.bot_answers as bot_answers
from core.main_api import (create_eve... | {"/tg_bot/add_event_bot.py": ["/tg_bot/GC_TelegramBot.py"], "/core/calendar_core.py": ["/core/logger.py"], "/core/main_api.py": ["/core/calendar_core.py", "/core/exceptions.py", "/core/logger.py"], "/tg_bot/GC_TelegramBot.py": ["/tg_bot/bot_answers.py", "/core/main_api.py", "/core/exceptions.py"]} |
52,413 | JianGuanTHU/UOJ_Offline | refs/heads/master | /data/22/1/checker.py | import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
input, output, answer = sys.argv[1:]
f_in = open(input)
f_out = open(output)
f_answer = open(answer)
f_in_lines = f_in.readlines()
ref_ans, n, m = int(f_in_lines[0].strip()), int(f_in_lines[1].strip()), int(f_in_lines[2].strip())
k ... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,414 | JianGuanTHU/UOJ_Offline | refs/heads/master | /data/22/1/uoj_judger_reporter.py | #coding=utf-8
from uoj_judger_config import *
import judger_class_lib as lib
import fcntl
class pyjudgerReporter:
def __init__(self, config, test_num):
self.config = config
self.tot_time = 0
self.max_memory = 0
self.details_out = ""
self.tot_score = 0
self.test_num = test_num
def report_judgement_statu... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,415 | JianGuanTHU/UOJ_Offline | refs/heads/master | /data/37/1/uoj_judger_config.py | #coding=utf-8
import os
class pyjudgerConfig:
def __init__(self, main_path, work_path, result_path, data_path):
self.config = dict()
def load_config(config_file):
configs = open(config_file, 'r').readlines()
for each_config in configs:
key, value = each_config.strip('\n').strip('\r').split(' ')
self... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,416 | JianGuanTHU/UOJ_Offline | refs/heads/master | /data/19/1/uoj_judger_compiler.py | #coding=utf-8
import judger_class_lib as lib
class pyjudgerCompiler(object):
def __init__(self, config):
self.config = config
def run_compiler(self, path, arg):
argv = ["--type=compiler", "--work-path=" + path]
argv.extend(arg)
ret = lib.run_program( \
main_path=self.config.main_path, \
work_path=sel... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,417 | JianGuanTHU/UOJ_Offline | refs/heads/master | /judger_class_lib.py | import os
RS_AC = 0
RS_JGF = 7
RS_MLE = 3
RS_TLE = 4
RS_OLE = 5
RS_RE = 2
RS_DGS = 6
class PointInfo:
def __init__(self, num, scr, ust=0, usm=0 \
, info="", input="", out="", res="", extrainfo=""):
self.num = num
self.scr = scr
self.ust = ust
self.usm = usm
self.info = info
self.input = input
self... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,418 | JianGuanTHU/UOJ_Offline | refs/heads/master | /data/24/1/uoj_judger_tester.py | #coding=utf-8
import os
from uoj_judger_config import *
import judger_class_lib as lib
import traceback
class pyjudger_validator():
def run(self, config, tester):
input_file_name = tester.input_file_name
ret = lib.run_program(
main_path=config.main_path, \
result_file_name=config.result_path + "/run_valida... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,419 | JianGuanTHU/UOJ_Offline | refs/heads/master | /data/24/1/datagen.py |
import numpy as np
import random
import string
ds = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Subday"]
rm = []
def check(m1, d1):
for r in rm:
if r[0] == m1 and r[1] == d1:
return False
return True
for d in range(1, 11):
print(d)
rm = []
f = open("da... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,420 | JianGuanTHU/UOJ_Offline | refs/heads/master | /find_problem_id.py | #!/usr/bin/env python
with open("./submission.conf", "r") as fin:
run_config = {}
for line in fin:
key, value = line.strip('\n').strip('\r').split(' ')
run_config[key] = value
tmp = line.strip().split()
if line.strip().split()[0] == "problem_id":
print tmp[1]
run_con... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,421 | JianGuanTHU/UOJ_Offline | refs/heads/master | /find_python_version.py | #!/usr/bin/env python
import sys
with open("./data/%s/1/problem.conf"%(sys.argv[1]), "r") as fin:
run_config = {}
configs = fin.readlines()
for each_config in configs:
key, value = each_config.strip('\n').strip('\r').split(' ')
run_config[key] = value
if ("use_python3_judger" in run_conf... | {"/data/22/1/uoj_judger_reporter.py": ["/judger_class_lib.py"], "/data/19/1/uoj_judger_compiler.py": ["/judger_class_lib.py"], "/data/24/1/uoj_judger_tester.py": ["/judger_class_lib.py"]} |
52,429 | wstk/pbar | refs/heads/master | /setup.py | from setuptools import setup
with open("VERSION.txt") as ver:
VERSION = ver.read().strip()
def readme():
with open("README.txt") as rm:
return rm.read()
setup(name="pbar",
version=VERSION,
description="Simple console progress bar widget",
long_description=readme(),
url=None... | {"/test_pbar.py": ["/pbar/__init__.py"]} |
52,430 | wstk/pbar | refs/heads/master | /test_pbar.py | """
Inspection tests for pbar
--------------------------
Unit tests for this does not really make sense
"""
from pbar import Bar
from time import sleep
import logging
import unittest
import nose.tools as nosetools
class TestPBar(unittest.TestCase):
def setUp(self):
self.duration = 5
self.steps =... | {"/test_pbar.py": ["/pbar/__init__.py"]} |
52,431 | wstk/pbar | refs/heads/master | /pbar/__init__.py | """
Installation
===============
Unzip ``pbar-<version>.zip`` to a location of your choice, ``cd`` to the directory and run::
python setup.py install
.. note::
Ensure you install pbar to the correct Python interpreter. ``pbar`` is designed to work with Python3.
Verify the installation with::
pip show pb... | {"/test_pbar.py": ["/pbar/__init__.py"]} |
52,442 | qiuyingyue/ONV2SEQ | refs/heads/master | /onv_classification.py | # TensorFlow and tf.keras
import sys
import os
sys.path.append("/usr/local/lib/python2.7/dist-packages")
sys.path.append("./mnist")
import tensorflow as tf
import mnist
# Helper libraries
import numpy as np
import nn
from sketch_rnn_train_onv import load_dataset
import model_dnn_encoder as sketch_rnn_model
from PIL im... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,443 | qiuyingyue/ONV2SEQ | refs/heads/master | /sketch_rnn.py |
# coding: utf-8
# In this notebook, we will show how to load pre-trained models and draw things with sketch-rnn
# In[ ]:
# In[1]:
# import the required libraries
import numpy as np
import time
import random
import cPickle
import codecs
import collections
import os
import math
import json
import tensorflow as ... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,444 | qiuyingyue/ONV2SEQ | refs/heads/master | /onv_process.py | """
This script generate the photoreceptor input for the face dataset
The log polar sampling process is converted from the C++ implementation
Please refer to "Log Polar" section for more details
"""
import sys
sys.path.append("/usr/local/lib/python2.7/dist-packages")
sys.path.append("/home/tao/miniconda2/lib/python2.7/... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,445 | qiuyingyue/ONV2SEQ | refs/heads/master | /png_to_binary.py | import cv2
import os
data_path = "../data/png"
for root, dirs, files in os.walk(data_path):
cv2.namedWindow("ori")
cv2.namedWindow("bin")
if (len(dirs)==0):
for f in files:
im = cv2.imread(os.path.join(root, f), cv2.CV_LOAD_IMAGE_GRAYSCALE)
#print (im.shape)
#cv2.imshow("ori",im)
ret, im_bin ... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,446 | qiuyingyue/ONV2SEQ | refs/heads/master | /demean.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 22 20:38:39 2017
@author: tzhou
"""
#calculate mean
import skimage
import skimage.io
import skimage.transform
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
from PIL import Image
def rgb2gray(rgb):
return ... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,447 | qiuyingyue/ONV2SEQ | refs/heads/master | /svg2img_gif.py |
from cairosvg import svg2png
import sys
sys.path.append("/usr/local/lib/python2.7/dist-packages")
import os
import re
import svgwrite
import numpy as np
from utils import *
from PIL import Image, ImageOps
from tempfile import TemporaryFile
#from scipy import misc
#from onv_process import onv_convert_fromarr
# littl... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,448 | qiuyingyue/ONV2SEQ | refs/heads/master | /svg2img.py |
from cairosvg import svg2png
import sys
sys.path.append("/usr/local/lib/python2.7/dist-packages")
import os
import svgwrite
import numpy as np
from utils import *
from PIL import Image, ImageOps
from tempfile import TemporaryFile
#from scipy import misc
#from onv_process import onv_convert_fromarr, show_onv
def sa... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,449 | qiuyingyue/ONV2SEQ | refs/heads/master | /classification.py | # TensorFlow and tf.keras
import sys
sys.path.append("/usr/local/lib/python2.7/dist-packages")
import tensorflow as tf
# Helper libraries
import numpy as np
import nn
from sketch_rnn_train_image import load_dataset
import model_cnn_encoder as sketch_rnn_model
from PIL import Image
def network(batch):
#cnn layers
... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,450 | qiuyingyue/ONV2SEQ | refs/heads/master | /nn.py | from __future__ import absolute_import, division, print_function
import sys
sys.path.append("/usr/local/lib/python2.7/dist-packages")
import numpy as np
import tensorflow as tf
# components
from tensorflow.python.ops.nn import dropout as drop
from util.cnn import conv_layer as conv
from util.cnn import conv_relu_lay... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,451 | qiuyingyue/ONV2SEQ | refs/heads/master | /util/loss.py | from __future__ import absolute_import, division, print_function
import tensorflow as tf
import numpy as np
def weighed_logistic_loss(scores, labels, pos_loss_mult=1.0, neg_loss_mult=1.0):
# Apply different weights to loss of positive samples and negative samples
# positive samples have label 1 while negative... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,452 | qiuyingyue/ONV2SEQ | refs/heads/master | /mnist_classification.py | #mnist_classification.py
import sys
sys.path.append("/usr/local/lib/python2.7/dist-packages")
sys.path.append("./mnist")
import tensorflow as tf
from tensorflow.contrib import keras
import mnist
import numpy as np
import nn
#mnist = keras.datasets.mnist
def network(x):
x = tf.reshape(x, [-1,28*28])
print ("x", x)
#... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,453 | qiuyingyue/ONV2SEQ | refs/heads/master | /data_interpolate.py | #!/usr/bin/env python
# coding: utf-8
# In[2]:
# import the required libraries# impor
import numpy as np
import time
import random
import cPickle
import codecs
import collections
import os
import math
import json
import tensorflow as tf
from six.moves import xrange
# libraries required for vis... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,454 | qiuyingyue/ONV2SEQ | refs/heads/master | /onv_to_binary.py | #onv_to_binary.py
import os
import numpy as np
from onv_process import show_onv
data_path = "../data/onv_9936_thick"
output_path = "../data/onv_9936_thick_binary"
def convert_to_binary(onv_batch):
print onv_batch.shape
#uni,count = np.unique(onv_batch, return_counts=True)
#print (uni, count)
#show_onv(onv_batch[0]... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,455 | qiuyingyue/ONV2SEQ | refs/heads/master | /temp.py | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import sys
sys.path.append("/usr/local/lib/python2.7/dist-packages")
#sys.path.append("/home/tao/miniconda2/lib/python2.7/site-packages")
#sys.path.append("./code/")
# import the required libraries
import numpy as np
import time
import ra... | {"/onv_classification.py": ["/nn.py", "/onv_process.py"], "/classification.py": ["/nn.py"], "/mnist_classification.py": ["/nn.py"], "/temp.py": ["/onv_process.py"]} |
52,456 | MexTermin/damesgame2 | refs/heads/master | /exceptions.py | class InvalidMove(Exception):
pass
class InvalidTab(Exception):
pass
class InvalidRange(Exception):
pass
class IncorrectInt(Exception):
pass
| {"/modulotabs.py": ["/exceptions.py"], "/mainGame.py": ["/modulotabs.py", "/exceptions.py"]} |
52,457 | MexTermin/damesgame2 | refs/heads/master | /modulotabs.py | from exceptions import *
class Tab:
def __init__(self):
self.pos = []
self.symbol = ""
self.isDame = False
def counter(self,player):
if player.lower() == "b":
return "n"
elif player.lower()== "n":
return "b"
def dameValidation(self,m... | {"/modulotabs.py": ["/exceptions.py"], "/mainGame.py": ["/modulotabs.py", "/exceptions.py"]} |
52,458 | MexTermin/damesgame2 | refs/heads/master | /mainGame.py | from board import *
from modulotabs import *
from exceptions import *
import sys, os
tablet = Board()
tablet.makeMatriz()
# g = Tab()
# g.symbol="n"
tablet.teamsGenerate("b", 1, 1)
tablet.teamsGenerate("n", 2, 6)
# f = Tab()
# f.symbol = "N"
# f.isDame = True
# tablet.matrice[1][7] = f
# tablet.matrice[1][7].pos = [... | {"/modulotabs.py": ["/exceptions.py"], "/mainGame.py": ["/modulotabs.py", "/exceptions.py"]} |
52,459 | Air-Zhuang/yangzhuchang | refs/heads/master | /test.py | from test2 import A
# a=A()
# print(a.x)
# a=globals()["A"]()
# print(a.x)
print(eval("A"+".x")) | {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,460 | Air-Zhuang/yangzhuchang | refs/heads/master | /app/config/setting.py | DEBUG=True
ORI_URL_DOMAIN="http://tpzy5.com"
LOCAL_URL_DOMAIN="先用orl_url的" | {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,461 | Air-Zhuang/yangzhuchang | refs/heads/master | /app/api/v1/cate.py | from flask import jsonify
from app.libs.error_code import parameter_exception
from app.libs.redprint import Redprint
from app.models.cate import Cate
from app.validators.forms import CateListForm
from app.models.base import db
from app.models.aiyouwu import Aiyouwu
from app.models.bololi import Bololi
from app.models... | {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,462 | Air-Zhuang/yangzhuchang | refs/heads/master | /app/api/v1/pic.py | from flask import jsonify
from app.libs.redprint import Redprint
from app.validators.forms import GetPicForm
from app.libs.error_code import parameter_exception
from app.models.base import db
from app.models.aiyouwu import Aiyouwu
from app.models.bololi import Bololi
from app.models.girlt import Girlt
from app.models... | {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,463 | Air-Zhuang/yangzhuchang | refs/heads/master | /app/api/v1/domain.py | from flask import jsonify,current_app
from app.libs.redprint import Redprint
api=Redprint('domain')
@api.route('',methods=['GET'])
def get_domain():
resp={"value":{}}
resp["value"]["ori_url"]=current_app.config["ORI_URL_DOMAIN"]
resp["value"]["local_url"]=current_app.config["LOCAL_URL_DOMAIN"]
return... | {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,464 | Air-Zhuang/yangzhuchang | refs/heads/master | /app/models/slady.py | from sqlalchemy import Column, String, Integer, orm
from app.models.base import Base
class Slady(Base):
id = Column(Integer, primary_key=True, autoincrement=True)
title = Column(String(255), nullable=False)
ori_url = Column(String(255))
local_url = Column(String(255))
@orm.reconstructor
def... | {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,465 | Air-Zhuang/yangzhuchang | refs/heads/master | /app/models/cate.py | from sqlalchemy import Column, String, Integer, orm
from app.models.base import Base
class Cate(Base):
id = Column(Integer, primary_key=True)
cate_name=Column(String(255))
@orm.reconstructor
def __init__(self):
self.fields = ['id', 'cate_name']
| {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,466 | Air-Zhuang/yangzhuchang | refs/heads/master | /app/config/secure.py | SQLALCHEMY_DATABASE_URI='mysql+cymysql://root:123456@127.0.0.1:3306/yangzhuchang'
SECRET_KEY='xxxxxx'
TOKEN_EXPIRATION=30*24*3600 | {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,467 | Air-Zhuang/yangzhuchang | refs/heads/master | /app/api/v1/__init__.py | from flask import Blueprint
from app.api.v1 import user,client,token,cate,pic,domain
def create_blueprint_v1():
bp_v1=Blueprint('v1',__name__)
user.api.register(bp_v1) #参数url_prefix='/user'可写可不写
client.api.register(bp_v1)
token.api.register(bp_v1)
cate.api.register(bp_v1)
pic.api.register(... | {"/app/api/v1/cate.py": ["/app/models/cate.py", "/app/models/slady.py"], "/app/api/v1/pic.py": ["/app/models/slady.py"]} |
52,492 | majgaard/DIANA-2.0 | refs/heads/master | /view.py | import numpy as np
import math
# View class
# Holds the current viewing parameters
# and can build a view transformation
# matrix [VTM] based on the parameters.
# Carl-Philip Majgaard
# CS 251
# Spring 2016
class View:
def __init__(self):
self.vrp = np.matrix([0.5, 0.5, 1])
self.vpn = np.ma... | {"/analysis.py": ["/data.py", "/pcadata.py"]} |
52,493 | majgaard/DIANA-2.0 | refs/heads/master | /pcadata.py | import numpy as np
import copy
from data import Data
import csv
class PCAData(Data):
def __init__(self, ogDataHeaders, projectedData, eigenValues, eigenVectors, ogDataMeans):
Data.__init__(self)
self.eigenValues = eigenValues
self.eigenVectors = eigenVectors
self.meanDataValues = o... | {"/analysis.py": ["/data.py", "/pcadata.py"]} |
52,494 | majgaard/DIANA-2.0 | refs/heads/master | /data.py | import csv
import os
import numpy as np
import copy
#import analysis as an
# Data API
# Carl-Philip Majgaard
# CS 251
# Spring 2016
class Data:
def __init__(self,filename = None):
#Set a bunch of fields
self.rawHeaders = []
self.rawTypes = []
self.header2raw = {}
self.ra... | {"/analysis.py": ["/data.py", "/pcadata.py"]} |
52,495 | majgaard/DIANA-2.0 | refs/heads/master | /engine.py | # TK Skeleton
# Modified by Carl-Philip Majgaard
# CS 251
# Spring 2016
import Tkinter as tk
import tkFileDialog
import tkFont as tkf
import math
import subprocess
import random
from view import *
from data import *
import analysis
from scipy import stats
import copy
#Dialog Class to be inherited from
class Dialog(tk... | {"/analysis.py": ["/data.py", "/pcadata.py"]} |
52,496 | majgaard/DIANA-2.0 | refs/heads/master | /analysis.py | from data import *
import colorsys
from scipy import stats as sp
import numpy as np
import scipy.cluster.vq as vq
import random
import pcadata as pcadata
# Analysis methods
# Carl-Philip Majgaard
# CS 251
# Spring 2016
#get the range of a column
def dataRange(columns, data):
colNum = []
for col in columns: #g... | {"/analysis.py": ["/data.py", "/pcadata.py"]} |
52,497 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/apps.py | from django.apps import AppConfig
class AppArmadoConfig(AppConfig):
name = 'app_Armado'
| {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,498 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/migrations/0005_remove_solicitud_estado.py | # Generated by Django 2.1.3 on 2019-11-10 04:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app_Armado', '0004_auto_20191110_0057'),
]
operations = [
migrations.RemoveField(
model_name='solicitud',
name='estado',
... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,499 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/migrations/0002_auto_20191030_1112.py | # Generated by Django 2.2.6 on 2019-10-30 14:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app_Armado', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='solicitud',
options={'permissions': (('te... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,500 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/urls.py | from django.urls import path
from . import views
from .views import info, form, inicio, RegistroUsuario, exito, login_exito, login_salida, listar_solicitud, listarproductos, listarpedidos, listar_solicitud_tecnico
from django.contrib import admin
from django.conf.urls import url, include
from django.contrib.auth.deco... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,501 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/migrations/0001_initial.py | # Generated by Django 2.2.6 on 2019-10-30 14:11
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Solicitud',
fields=[
('id_servicio', models... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,502 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/migrations/0007_pedido_codigo_producto.py | # Generated by Django 2.1.3 on 2019-11-10 06:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_Armado', '0006_auto_20191110_0215'),
]
operations = [
migrations.AddField(
model_name='pedido',
name='codigo_pro... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,503 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/migrations/0003_auto_20191109_2259.py | # Generated by Django 2.1.3 on 2019-11-10 01:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_Armado', '0002_auto_20191030_1112'),
]
operations = [
migrations.CreateModel(
name='Pedido',
fields=[
... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,504 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/migrations/0008_auto_20191110_1123.py | # Generated by Django 2.1.3 on 2019-11-10 14:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_Armado', '0007_pedido_codigo_producto'),
]
operations = [
migrations.AlterField(
model_name='solicitud',
name='p... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,505 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/models.py | from django.db import models
from django.utils.translation import ugettext as _
# Create your models here.
class Solicitud(models.Model):
id_servicio = models.IntegerField(primary_key=True)
rut_cliente= models.CharField(max_length=12)
Nombre_completo = models.CharField(max_length=100)
fecha_de_visita ... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,506 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/quickstart/serializers.py | from django.contrib.auth.models import User
from app_Armado.models import Producto
from rest_framework import serializers
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
class ProductoSerializer(serializers.Hyp... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,507 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/migrations/0004_auto_20191110_0057.py | # Generated by Django 2.1.3 on 2019-11-10 03:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_Armado', '0003_auto_20191109_2259'),
]
operations = [
migrations.AlterField(
model_name='solicitud',
name='fecha... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,508 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/tests.py | from django.test import TestCase
# Create your tests here.
import unittest
class Pruebas(unittest.TestCase):
def test(self):
pass
if __name__ == "__main__":
unittest.main()
import unittest
def doblar(a): return a*2
def sumar(a,b): return a+b
def es_par(a): return 1 if a%2 == 0 else 0
class Prue... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,509 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/quickstart/viewss.py |
from django.contrib.auth.models import User
from app_Armado.models import Producto
from rest_framework import viewsets
from app_Armado.quickstart.serializers import UserSerializer, ProductoSerializer
class UserViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows users to be viewed or edited.
"""
... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,510 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/views.py | from django.shortcuts import render
from .models import Solicitud, Producto, Pedido
from django.views.generic import CreateView
from django.contrib.auth.models import User
from app_Armado.forms import RegistroForm
from django.urls import reverse_lazy
# Create your views here.
def post_list(request):
return rend... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,511 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/admin.py | from django.contrib import admin
from .models import Solicitud , Producto, Pedido
# Register your models here.
admin.site.register(Solicitud)
admin.site.register(Producto)
admin.site.register(Pedido) | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,512 | jonathanavalosescobar/mysite | refs/heads/master | /app_Armado/migrations/0009_producto_imagen.py | # Generated by Django 2.1.3 on 2019-11-28 02:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_Armado', '0008_auto_20191110_1123'),
]
operations = [
migrations.AddField(
model_name='producto',
name='imagen',... | {"/app_Armado/urls.py": ["/app_Armado/views.py"], "/app_Armado/quickstart/serializers.py": ["/app_Armado/models.py"], "/app_Armado/quickstart/viewss.py": ["/app_Armado/models.py", "/app_Armado/quickstart/serializers.py"], "/app_Armado/views.py": ["/app_Armado/models.py"], "/app_Armado/admin.py": ["/app_Armado/models.py... |
52,527 | McTuTuM/x_or_o1 | refs/heads/master | /Window.py | from PyQt5 import QtWidgets, QtCore
from PyQt5.QtWidgets import QGraphicsScene, QGraphicsView, QWidget
from x_or_o import QtWidgets, Ui_MainWindow
class Window(Ui_MainWindow, QtWidgets.QMainWindow):
def __init__(self):
QtWidgets.QMainWindow.__init__(self)
self.setupUi(self)
def button_click(se... | {"/main.py": ["/Window.py"]} |
52,528 | McTuTuM/x_or_o1 | refs/heads/master | /main.py | from Window import Window
import sys
from PyQt5 import QtWidgets
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
MainWindow = Window()
# ui = Ui_MainWindow()
# # ui.setupUi(MainWindow)
MainWindow.show()
# h = ui.graphicsView.height()
# w = ui.gr... | {"/main.py": ["/Window.py"]} |
52,529 | McTuTuM/x_or_o1 | refs/heads/master | /general.py | import pygame
import sys
from pygame.color import THECOLORS
import math
from x_or_o import Ui_MainWindow
from PyQt5 import QtWidgets
pygame.init
class General():
def __init__(self):
Ui_MainWindow.__init__(self)
self.loc = None
self.loc1start = None
self.loc1end = None
self.... | {"/main.py": ["/Window.py"]} |
52,558 | tina315/school-manage | refs/heads/master | /src/test_assert.py | # -*- coding:utf-8 -*-
# @Time : 2020/11/29 17:27
# @Author : xiangxuan
import pytest
# 测试相等
def test_add():
assert 3 + 4 == 7
# 测试不相等
def test_add2():
assert 27 + 22 != 50
# 测试大于等于
def test_add3():
assert 27 + 22 <= 50
# 测试小于等于
def test_add4():
assert 27 + 22 >= 50
# 测试大于
def test_add5():... | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,559 | tina315/school-manage | refs/heads/master | /src/test_para.py | # -*- coding:utf-8 -*-
# @Time : 2020/11/29 17:25
# @Author : xiangxuan
import pytest
def value():
pa = [
(2, 2),
(5, 3),
(4, 4)
]
return pa
@pytest.mark.parametrize("a, b", value())
def test_01(a, b):
print(a)
print(b)
assert a == b
def test_02():
"""
... | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,560 | tina315/school-manage | refs/heads/master | /src/__init__.py | #-*- coding:utf-8 -*-
# @Time : 2020/11/29 16:34
# @Author : xiangxuan | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,561 | tina315/school-manage | refs/heads/master | /test_data/__init__.py | #-*- coding:utf-8 -*-
# @Time : 2020/11/30 7:19
# @Author : xiangxuan | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,562 | tina315/school-manage | refs/heads/master | /config/__init__.py | #-*- coding:utf-8 -*-
# @Time : 2020/11/30 7:18
# @Author : xiangxuan | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,563 | tina315/school-manage | refs/heads/master | /src/test_setup_teardown.py | # -*- coding:utf-8 -*-
# @Time : 2020/11/29 16:34
# @Author : xiangxuan
import pytest
def setup_module(module):
"""
module级别的setup,它会在本module(test.py)里
所有test执行之前,被调用一次。
注意,它是直接定义为一个module里的函数
"""
print("#### setup before module")
def teardown_module(module):
"""
module级别的teardo... | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,564 | tina315/school-manage | refs/heads/master | /locallib/add_tags.py | #-*- coding:utf-8 -*-
# @Time : 2020/11/30 7:29
# @Author : xiangxuan
import time
import allure
def add_tag(tag_name):
"""
添加一个标签
:param tag_name: 标签名字
:return:
"""
localtime = time.asctime(time.localtime(time.time()))
with allure.step("根据时间创建一个标签,标签名字是:" + tag_name):
allure.... | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,565 | tina315/school-manage | refs/heads/master | /main.py | # test jenkins auto build
import time
import os
import pytest
localtime = time.asctime( time.localtime(time.time()) )
print(localtime)
work_runner = []
work_runner.append("-s")
case_mark = 'auto'
if case_mark:
work_runner.append("-m=%s" % case_mark)
work_runner.append("--alluredir")
work_runner.append("report")
... | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,566 | tina315/school-manage | refs/heads/master | /src/test_01.py | # -*- coding: utf-8 -*-
# @Time : 2020/11/27 06:40
# @Author : hexiangxuan
# @File : test_case.py
import allure
import pytest
from locallib.add_tags import add_tag
@allure.epic('自动化用例')
@allure.feature('大模块')
@allure.story('小模块')
@pytest.mark.auto
class TestOne:
def setup_class(self):
pass
@al... | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,567 | tina315/school-manage | refs/heads/master | /conftest.py | #-*- coding:utf-8 -*-
# @Time : 2020/11/14 7:52
# @Author : xiangxuan | {"/src/test_01.py": ["/locallib/add_tags.py"]} |
52,579 | apache/yetus | refs/heads/main | /releasedocmaker/src/main/python/releasedocmaker/getversions.py | #!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "L... | {"/releasedocmaker/src/main/python/releasedocmaker/getversions.py": ["/releasedocmaker/src/main/python/releasedocmaker/utils.py"], "/releasedocmaker/src/main/python/releasedocmaker/__init__.py": ["/releasedocmaker/src/main/python/releasedocmaker/getversions.py", "/releasedocmaker/src/main/python/releasedocmaker/jira.py... |
52,580 | apache/yetus | refs/heads/main | /shelldocs/src/main/python/shelldocs.py | #!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Li... | {"/releasedocmaker/src/main/python/releasedocmaker/getversions.py": ["/releasedocmaker/src/main/python/releasedocmaker/utils.py"], "/releasedocmaker/src/main/python/releasedocmaker/__init__.py": ["/releasedocmaker/src/main/python/releasedocmaker/getversions.py", "/releasedocmaker/src/main/python/releasedocmaker/jira.py... |
52,581 | apache/yetus | refs/heads/main | /releasedocmaker/src/main/python/releasedocmaker/__init__.py | #!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "L... | {"/releasedocmaker/src/main/python/releasedocmaker/getversions.py": ["/releasedocmaker/src/main/python/releasedocmaker/utils.py"], "/releasedocmaker/src/main/python/releasedocmaker/__init__.py": ["/releasedocmaker/src/main/python/releasedocmaker/getversions.py", "/releasedocmaker/src/main/python/releasedocmaker/jira.py... |
52,582 | apache/yetus | refs/heads/main | /precommit/src/main/shell/plugins.d/detsecrets_parse.py | #!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Lice... | {"/releasedocmaker/src/main/python/releasedocmaker/getversions.py": ["/releasedocmaker/src/main/python/releasedocmaker/utils.py"], "/releasedocmaker/src/main/python/releasedocmaker/__init__.py": ["/releasedocmaker/src/main/python/releasedocmaker/getversions.py", "/releasedocmaker/src/main/python/releasedocmaker/jira.py... |
52,583 | apache/yetus | refs/heads/main | /releasedocmaker/src/main/python/releasedocmaker/jira.py | #!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "L... | {"/releasedocmaker/src/main/python/releasedocmaker/getversions.py": ["/releasedocmaker/src/main/python/releasedocmaker/utils.py"], "/releasedocmaker/src/main/python/releasedocmaker/__init__.py": ["/releasedocmaker/src/main/python/releasedocmaker/getversions.py", "/releasedocmaker/src/main/python/releasedocmaker/jira.py... |
52,584 | apache/yetus | refs/heads/main | /releasedocmaker/src/main/python/releasedocmaker/utils.py | #!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# ... | {"/releasedocmaker/src/main/python/releasedocmaker/getversions.py": ["/releasedocmaker/src/main/python/releasedocmaker/utils.py"], "/releasedocmaker/src/main/python/releasedocmaker/__init__.py": ["/releasedocmaker/src/main/python/releasedocmaker/getversions.py", "/releasedocmaker/src/main/python/releasedocmaker/jira.py... |
52,585 | apache/yetus | refs/heads/main | /precommit/src/main/python/jenkins-admin.py | #!/usr/bin/env python3
# pylint: disable=invalid-name
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apac... | {"/releasedocmaker/src/main/python/releasedocmaker/getversions.py": ["/releasedocmaker/src/main/python/releasedocmaker/utils.py"], "/releasedocmaker/src/main/python/releasedocmaker/__init__.py": ["/releasedocmaker/src/main/python/releasedocmaker/getversions.py", "/releasedocmaker/src/main/python/releasedocmaker/jira.py... |
52,592 | Saunak626/cmbper | refs/heads/master | /utils.py | import torch
import numpy as np
import os
def set_random_seed(n):
np.random.seed(n)
torch.manual_seed(n)
def make_dirs(model_desc):
def _mkdir(path):
if not os.path.exists(path):
os.makedirs(path)
save_dir = "params/{}".format(model_desc)
log_dir = "logs/{}".format(model_desc)... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,593 | Saunak626/cmbper | refs/heads/master | /BP_prediction.py | import torch
from torch import optim
from torch.utils.data import DataLoader
import os
import numpy as np
from data_manager import ARTDataset
from model import Model
import argparse
from utils import make_dirs, get_model_config, get_model_description
from args import parse_args
from mpl_toolkits.axes_grid1 im... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,594 | Saunak626/cmbper | refs/heads/master | /args.py | import argparse
import os
def parse_args():
parser=argparse.ArgumentParser(description='Continuous monitoring of blood pressure with evidential regression.')
parser.add_argument('--tr_path', default='datasets/train.p',type=str, help='Training data path.')
parser.add_argument('--val_path', default='... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,595 | Saunak626/cmbper | refs/heads/master | /train.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import optim
from torch.utils.data import DataLoader
from tensorboardX import SummaryWriter
from data_manager import ARTDataset
from model import Model
from utils import get_model_config, get_model_description, make_dirs, get_logger, ... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,596 | Saunak626/cmbper | refs/heads/master | /viz_uncertainty.py | import torch
from torch import optim
from torch.utils.data import DataLoader
import os
import numpy as np
from math import pi, log
from data_manager import ARTDataset
from model import Model
import json
import time
import argparse
from utils import make_dirs, get_model_config, get_model_description
from arg... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,597 | Saunak626/cmbper | refs/heads/master | /model.py | import torch as th
from torch import nn
from torch.nn import functional as F
from torch.nn.utils import weight_norm
import math
import time
class BLSTM(nn.Module):
def __init__(self, dim, layers=2, bi=True):
super().__init__()
self.lstm = nn.LSTM(bidirectional=bi, num_layers=layers, hid... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,598 | Saunak626/cmbper | refs/heads/master | /BP_prediction_subset.py | import torch
from torch import optim
from torch.utils.data import DataLoader
import os
import numpy as np
from data_manager import ARTDataset
from model import Model
import argparse
from utils import make_dirs, get_model_config, get_model_description
from args import parse_args
from mpl_toolkits.axes_grid1 im... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,599 | Saunak626/cmbper | refs/heads/master | /data_manager.py | import torch
from torch.utils.data import Dataset
import numpy as np
import pickle
class ARTDataset(Dataset):
def __init__(self, data_path):
split = data_path.split('/')[-1].replace('.p', '')
df = pickle.load(open(data_path,'rb'))
self.x_all = torch.tensor(df['PPG'], dtype=torch.fl... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,600 | Saunak626/cmbper | refs/heads/master | /BP_classification.py | import torch
from torch import optim
from torch.utils.data import DataLoader
import os
import numpy as np
from data_manager import ARTDataset
from model import Model
import argparse
from utils import make_dirs, get_model_config, get_model_description
from args import parse_args
from mpl_toolkits.axes_grid1 im... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,601 | Saunak626/cmbper | refs/heads/master | /loss.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from math import pi, log
def Student_NLL(value, df, loc, scale):
y = (value - loc) / scale
Z = (scale.log() +
0.5 * df.log() +
0.5 * log(pi) +
torch.lgamma(0.5 * df) -
... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,602 | Saunak626/cmbper | refs/heads/master | /data_handling.py | import h5py
import numpy as np
import os
from tqdm import tqdm
import pickle
import argparse
def prepare_data(data_path, out_dir):
val_start = 90000
val_end = 100000
fl = h5py.File(data_path, 'r')
X_train = []
Y_train = []
X_val = []
Y_val = []
X_test = []
Y_test = []
for ... | {"/BP_prediction.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/train.py": ["/data_manager.py", "/model.py", "/utils.py", "/loss.py", "/args.py"], "/viz_uncertainty.py": ["/data_manager.py", "/model.py", "/utils.py", "/args.py"], "/BP_prediction_subset.py": ["/data_manager.py", "/model.py", "/utils.... |
52,625 | aaalgo/aardvark | refs/heads/master | /zoo/wrn.py | from tensorflow import variable_scope
from tensorflow.contrib.framework.python.ops import arg_scope
from tensorflow.contrib.layers import conv2d, max_pool2d, avg_pool2d, flatten, fully_connected, batch_norm
# https://arxiv.org/pdf/1605.07146.pdf
# https://arxiv.org/abs/1603.05027
def original_conv2d (net, depth, fil... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
52,626 | aaalgo/aardvark | refs/heads/master | /zoo/vgg.py | from tensorflow import nn
from tensorflow import variable_scope
from tensorflow.contrib.framework.python.ops import arg_scope
from tensorflow.contrib.layers import conv2d, max_pool2d, flatten, fully_connected, batch_norm
# https://arxiv.org/pdf/1409.1556.pdf
# Notes:
# - default size 224x224
# - input should be no... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
52,627 | aaalgo/aardvark | refs/heads/master | /gate/import.py | #!/usr/bin/env python3
import os
import picpac
from glob import glob
dic = { 'nogate.txt':0,
'gateclose.txt':1,
'gatefar.txt':2}
def load_file(path):
with open(path, 'rb') as f:
return f.read()
def load_anno(path):
anno_dic = {}
for files in os.listdir(path):
#print (f... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
52,628 | aaalgo/aardvark | refs/heads/master | /zoo/dsb_selim/resnets.py | # -*- coding: utf-8 -*-
"""
keras_resnet.models._2d
~~~~~~~~~~~~~~~~~~~~~~~
This module implements popular two-dimensional residual models.
"""
import keras.backend
import keras.layers
import keras.models
import keras.regularizers
def ResNet(inputs, blocks, block, include_top=True, classes=1000, numerical_names=Non... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
52,629 | aaalgo/aardvark | refs/heads/master | /aardvark.py | #!/usr/bin/env python4
# This is the basic aaalgo tensorflow model training framework.
import errno
import os
import sys
import subprocess
AARDVARK_HOME = os.path.abspath(os.path.dirname(__file__))
sys.path.append(os.path.join(AARDVARK_HOME, 'zoo/slim'))
from abc import ABC, abstractmethod
os.environ['TF_CPP_MIN_LOG_... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
52,630 | aaalgo/aardvark | refs/heads/master | /setup.py | #!/usr/bin/env python3
import sys
import os
import subprocess as sp
import numpy
from distutils.core import setup, Extension
libraries = []
cv2libs = sp.check_output('pkg-config --libs opencv', shell=True).decode('ascii')
if 'opencv_imgcodecs' in cv2libs:
libraries.append('opencv_imgcodecs')
pass
numpy_includ... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
52,631 | aaalgo/aardvark | refs/heads/master | /train-basic-keypoints.py | #!/usr/bin/env python3
import os
import sys
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'zoo/slim'))
import logging
import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
import aardvark
from tf_utils import *
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFIN... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
52,632 | aaalgo/aardvark | refs/heads/master | /tf_utils.py | import tensorflow as tf
import tensorflow.contrib.slim as slim
def dice_loss (gt, prob):
return -2 * (tf.reduce_sum(gt * prob) + 0.00001) / (tf.reduce_sum(gt) + tf.reduce_sum(prob) + 0.00001)
def weighted_dice_loss (gt, prob, weight):
return -2 * (tf.reduce_sum(gt * prob * weight) + 0.00001) / (tf.reduce_sum(... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
52,633 | aaalgo/aardvark | refs/heads/master | /zoo/sss/PSPNet.py | import tensorflow as tf
from tensorflow.contrib import slim
import numpy as np
import resnet_v2
import os, sys
def Upsampling(inputs,feature_map_shape):
return tf.image.resize_bilinear(inputs, size=feature_map_shape)
def ConvUpscaleBlock(inputs, n_filters, kernel_size=[3, 3], scale=2):
"""
Basic conv tran... | {"/aardvark.py": ["/tf_utils.py"], "/train-basic-keypoints.py": ["/aardvark.py", "/tf_utils.py"], "/rpn3d.py": ["/aardvark.py", "/tf_utils.py"], "/train-frcnn.py": ["/aardvark.py"], "/faster_rcnn.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-slim.py": ["/aardvark.py", "/tf_utils.py"], "/train-fcn-unet.py": ["/aard... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.