index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
83,183 | alliance-genome/agr_loader | refs/heads/stage | /src/data_manager/data_type_config.py | """Gets information from YAML configs"""
import logging
import sys
import os
from transactors import FileTransactor
from .sub_type_config import SubTypeConfig
class DataTypeConfig():
"""Data Type Config"""
logger = logging.getLogger(__name__)
def __init__(self, data_type, submission_system_data):
... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,184 | alliance-genome/agr_loader | refs/heads/stage | /src/etl/htp_metadataset_etl.py | """HTP DataSet."""
import logging
import multiprocessing
from etl import ETL
from etl.helpers import ETLHelper
from files import JSONFile
from transactors import CSVTransactor, Neo4jTransactor
logger = logging.getLogger(__name__)
class HTPMetaDatasetETL(ETL):
"""HTP Meta Dataset."""
htp_dataset_query_templ... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,185 | alliance-genome/agr_loader | refs/heads/stage | /src/test/schema_cond_prop_tests.py | """Schema String Property Test"""
from etl import Neo4jHelper
def pytest_generate_tests(metafunc):
"""pyTest Generat Test"""
# called once per each test function
funcarglist = metafunc.cls.params[metafunc.function.__name__]
argnames = sorted(funcarglist[0])
metafunc.parametrize(argnames, [[funca... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,186 | alliance-genome/agr_loader | refs/heads/stage | /src/transactors/transactor.py | """Transactor"""
from threading import Thread
class Transactor(Thread):
"""Transactor"""
def __init__(self):
Thread.__init__(self)
self.threadid = 0
| {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,187 | alliance-genome/agr_loader | refs/heads/stage | /src/etl/variation_etl.py | """Variation ETL."""
import logging
import multiprocessing
import uuid
from etl import ETL
from etl.helpers import ETLHelper, AssemblySequenceHelper
from files import JSONFile
from transactors import CSVTransactor, Neo4jTransactor
from data_manager import DataFileManager
from loader_common import ContextInfo
class ... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,188 | alliance-genome/agr_loader | refs/heads/stage | /src/etl/etl.py | """ETL."""
import logging
import sys
import time
from test import TestObject
from etl.helpers import ETLHelper
from loader_common import ContextInfo
class ETL:
"""ETL."""
logger = logging.getLogger(__name__)
etlh = ETLHelper()
def __init__(self):
"""Initialise objects."""
context_i... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,189 | alliance-genome/agr_loader | refs/heads/stage | /src/test/unit_tests.py | """Unit tests.
Tests that methods return what they should etc.
Remember to remove bad_pages test once the olf code has been removed.
"""
from etl.helpers import ETLHelper
class TestClass():
"""Test Class."""
etlh = ETLHelper()
def test_get_shortname_from_taxon(self):
"""Test obtaining a specie... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,190 | alliance-genome/agr_loader | refs/heads/stage | /src/etl/allele_etl.py | """Allele ETL."""
import logging
import multiprocessing
import uuid
from etl import ETL
from etl.helpers import ETLHelper
from etl.helpers import TextProcessingHelper
from files import JSONFile
from transactors import CSVTransactor, Neo4jTransactor
logger = logging.getLogger(__name__)
class AlleleETL(ETL):
"""... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,191 | alliance-genome/agr_loader | refs/heads/stage | /src/etl/vep_transcript_etl.py | """VEP Transcript ETL."""
import logging
import multiprocessing
import uuid
import re
from etl import ETL
from etl.helpers import ETLHelper
from files import TXTFile
from transactors import CSVTransactor
from transactors import Neo4jTransactor
class VEPTranscriptETL(ETL):
"""VEP Transcript ETL."""
logger =... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,192 | alliance-genome/agr_loader | refs/heads/stage | /src/data_manager/data_file_manager.py | """Getting files from FMS"""
import logging
import os
import sys
import json
import yaml
import urllib3
from cerberus import Validator
from loader_common import Singleton, ContextInfo
from urllib.parse import urlparse
from .data_type_config import DataTypeConfig
class DataFileManager(metaclass=Singleton):
"""M... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,193 | alliance-genome/agr_loader | refs/heads/stage | /src/etl/phenotype_etl.py | """Phenotype ETL."""
import logging
import uuid
import multiprocessing
from etl import ETL
from etl.helpers import ExperimentalConditionHelper
from files import JSONFile
from transactors import CSVTransactor
from transactors import Neo4jTransactor
class PhenoTypeETL(ETL):
"""Phenotype ETL."""
logger = logg... | {"/src/files/csv_file.py": ["/src/files/comment_file.py"], "/src/etl/helpers/obo_helper.py": ["/src/etl/helpers/etl_helper.py", "/src/etl/helpers/neo4j_helper.py"], "/src/etl/gene_disease_ortho_etl.py": ["/src/etl/helpers/__init__.py"], "/src/data_manager/__init__.py": ["/src/data_manager/data_file_manager.py", "/src/d... |
83,202 | AtharvaKalsekar/Weakly-supervised-object-localization | refs/heads/master | /bbox_generator/CAM.py | from keras.models import *#get_output_layer , load_model
import keras.backend as K
import cv2
import numpy as np
#model = load_model('cnn_08042019.h5')
def get_CAM( model, image_path, image_class):
original_img = cv2.imread(image_path, 1)
width, height, _ = original_img.shape
original_img_copy = or... | {"/trainer.py": ["/dataset_helpers/IDG.py", "/dataset_helpers/accessing_dir.py"], "/testing_model.py": ["/bbox_generator/CAM.py", "/bbox_generator/B_BOX.py"]} |
83,203 | AtharvaKalsekar/Weakly-supervised-object-localization | refs/heads/master | /dataset_helpers/IDG.py |
import numpy as np
import keras
from PIL import Image
from patcher import get_patched_image
class DataGenerator(keras.utils.Sequence):
'Generates data for Keras'
def __init__(self, list_IDs, labels, path, patch_size, data_purpose, batch_size=32, dim=(32,32), n_channels=1,
n_classes=10, shuff... | {"/trainer.py": ["/dataset_helpers/IDG.py", "/dataset_helpers/accessing_dir.py"], "/testing_model.py": ["/bbox_generator/CAM.py", "/bbox_generator/B_BOX.py"]} |
83,204 | AtharvaKalsekar/Weakly-supervised-object-localization | refs/heads/master | /trainer.py | from keras import models
from keras import layers
from keras import optimizers
from keras.preprocessing.image import ImageDataGenerator
from dataset_helpers.IDG import DataGenerator
from dataset_helpers.accessing_dir import get_partition_and_labels
from keras.layers import Conv2D, MaxPooling2D, Dense, GlobalAvera... | {"/trainer.py": ["/dataset_helpers/IDG.py", "/dataset_helpers/accessing_dir.py"], "/testing_model.py": ["/bbox_generator/CAM.py", "/bbox_generator/B_BOX.py"]} |
83,205 | AtharvaKalsekar/Weakly-supervised-object-localization | refs/heads/master | /testing_model.py | from keras.models import load_model
import cv2
import numpy as np
from bbox_generator.CAM import get_CAM
from bbox_generator.B_BOX import get_bbox
model = load_model('./models/cnn_10042019_colab.h5')
image_path = 'test_ship_2.jpeg'
image_class = 'ship'
#print(model.summary())
heatmap , original_im... | {"/trainer.py": ["/dataset_helpers/IDG.py", "/dataset_helpers/accessing_dir.py"], "/testing_model.py": ["/bbox_generator/CAM.py", "/bbox_generator/B_BOX.py"]} |
83,206 | AtharvaKalsekar/Weakly-supervised-object-localization | refs/heads/master | /dataset_helpers/accessing_dir.py | import os
from os.path import isfile
def get_partition_and_labels():
list_of_dirs=os.listdir('./cifar/train')
classes = [f for f in list_of_dirs if not isfile(f)]
classes = sorted(classes)
#print(classes)
partition = { 'train' : [] , 'validation' : []}
labels = {}
for part in ['train','vali... | {"/trainer.py": ["/dataset_helpers/IDG.py", "/dataset_helpers/accessing_dir.py"], "/testing_model.py": ["/bbox_generator/CAM.py", "/bbox_generator/B_BOX.py"]} |
83,207 | AtharvaKalsekar/Weakly-supervised-object-localization | refs/heads/master | /dataset_helpers/patcher.py | import numpy as np
from keras.preprocessing import image
import random
def get_patched_image(one_image,image_size,patch_size):
'''
if image_dims=(image_hieght,image_width,n_channels)
then image_size=image_height=image_width
and
patch_size=patch_hieght=patch_width
'''
mean=np.mean(one_i... | {"/trainer.py": ["/dataset_helpers/IDG.py", "/dataset_helpers/accessing_dir.py"], "/testing_model.py": ["/bbox_generator/CAM.py", "/bbox_generator/B_BOX.py"]} |
83,208 | AtharvaKalsekar/Weakly-supervised-object-localization | refs/heads/master | /bbox_generator/B_BOX.py | import cv2
import numpy as np
def get_bbox(image , original_image):
img_copy=image.copy()
gray_img = cv2.cvtColor( image, cv2.COLOR_BGR2GRAY)
#cv2.imshow("gray",gray_img)
#cv2.waitKey()
ret,thresh_img = cv2.threshold(gray_img,150,255,cv2.THRESH_BINARY)
#cv2.imshow("threshold1",thresh_img)
#c... | {"/trainer.py": ["/dataset_helpers/IDG.py", "/dataset_helpers/accessing_dir.py"], "/testing_model.py": ["/bbox_generator/CAM.py", "/bbox_generator/B_BOX.py"]} |
83,220 | sengkchu/gpu-analytics | refs/heads/master | /gpu_scraper.py | import sqlite3
from requests import get
from bs4 import BeautifulSoup
import time
import random
import pandas as pd
import re
import math
from json import loads
from PCPartPicker_API import pcpartpicker
#Interface with SQL
def run_query(DB, q):
with sqlite3.connect(DB) as conn:
return pd.read_sql(q,conn)
... | {"/server_files/appdata/worker.py": ["/gpu_scraper.py"]} |
83,221 | sengkchu/gpu-analytics | refs/heads/master | /server_files/appdata/worker.py | import os
from gpu_scraper import run_all
import schedule
import time
def job():
run_all()
os.system("service apache2 reload")
print("SCRAPE COMPLETE RELOADING SERVER")
schedule.every().day.at("00:10").do(job)
while True:
schedule.run_pending()
time.sleep(1)
| {"/server_files/appdata/worker.py": ["/gpu_scraper.py"]} |
83,222 | sengkchu/gpu-analytics | refs/heads/master | /server_files/var/www/FlaskApp/FlaskApp/__init__.py | import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import flask
import plotly.graph_objs as go
import os
from random import randint
import time
import pandas as pd
import numpy as np
import sqlite3
#Application object
server = flask.Flask(__... | {"/server_files/appdata/worker.py": ["/gpu_scraper.py"]} |
83,223 | Song-Jun-Ho/UPMSP_multi | refs/heads/main | /agent/main.py | import os
import tensorflow as tf
from tensorflow.keras.layers import Dense, GRU, Flatten
from agent.VDN_agent import QAgent
from agent.VDN_net import VDN
from utils.memory import RandomMemory
from utils.policy import EpsGreedyQPolicy
import copy
import numpy as np
import copy
import matplotlib.pyplot as plt
import ran... | {"/agent/main.py": ["/agent/VDN_agent.py", "/agent/VDN_net.py", "/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/qmix_test.py": ["/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/VDN_agent.py": ["/agent/VDN_net.py"]} |
83,224 | Song-Jun-Ho/UPMSP_multi | refs/heads/main | /agent/VDN_net.py | import tensorflow as tf
from tensorflow.keras.layers import Dense
import copy
import numpy as np
import copy
class MixingNet():
def __init__(self, agent_nets, embed_shape):
self.agent_nets = agent_nets
self.agent_num = len(agent_nets)
self.embed_shape = embed_shape
self.timesteps ... | {"/agent/main.py": ["/agent/VDN_agent.py", "/agent/VDN_net.py", "/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/qmix_test.py": ["/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/VDN_agent.py": ["/agent/VDN_net.py"]} |
83,225 | Song-Jun-Ho/UPMSP_multi | refs/heads/main | /agent/qmix_test.py | import os
import tensorflow as tf
from tensorflow.keras.layers import Dense, GRU, Flatten
from agent.qmix_mixing_net import QMix
from utils.memory import RandomMemory
from utils.policy import EpsGreedyQPolicy
import copy
import numpy as np
import matplotlib.pyplot as plt
import random
import pandas as pd
from collecti... | {"/agent/main.py": ["/agent/VDN_agent.py", "/agent/VDN_net.py", "/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/qmix_test.py": ["/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/VDN_agent.py": ["/agent/VDN_net.py"]} |
83,226 | Song-Jun-Ho/UPMSP_multi | refs/heads/main | /utils/memory.py | import random
from collections import deque, namedtuple
import numpy as np
Experience = namedtuple('Experience', 'state0, observations0, action, reward, observations1, state1, terminal')
def sample_batch_indexes(low, high, size):
r = range(low, high)
batch_idxs = random.sample(r, size)
return batch_idxs
... | {"/agent/main.py": ["/agent/VDN_agent.py", "/agent/VDN_net.py", "/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/qmix_test.py": ["/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/VDN_agent.py": ["/agent/VDN_net.py"]} |
83,227 | Song-Jun-Ho/UPMSP_multi | refs/heads/main | /agent/VDN_agent.py | import tensorflow as tf
from collections import deque, namedtuple
import numpy as np
from agent.VDN_net import *
'''
agent_net 및 target agent_net 의 get_action 등 여러 내장함수가 있는 class
'''
class QAgent:
def __init__(self, aid, policy, model, target_model, action_num, timesteps=1):
self.aid = aid
se... | {"/agent/main.py": ["/agent/VDN_agent.py", "/agent/VDN_net.py", "/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/qmix_test.py": ["/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/VDN_agent.py": ["/agent/VDN_net.py"]} |
83,228 | Song-Jun-Ho/UPMSP_multi | refs/heads/main | /agent/testing.py | import numpy as np
episode = [[[1,2,3,4], [1,0,0], 3],[[1,2,3,4], [1,0,0], 3], [[1,2,3,4], [1,0,0], 3]]
buffer = []
for _ in range(3):
buffer.append(episode)
buffer = np.array(buffer, dtype=object)
sample = np.reshape(buffer, [9, -1])
print(sample[0][0])
a = [[[1,2,3]], [[4,5,6]], [[7,8,9]]]
a = np.vstack(a)
pr... | {"/agent/main.py": ["/agent/VDN_agent.py", "/agent/VDN_net.py", "/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/qmix_test.py": ["/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/VDN_agent.py": ["/agent/VDN_net.py"]} |
83,229 | Song-Jun-Ho/UPMSP_multi | refs/heads/main | /environment/Multi_Environment.py | import simpy
import random
import os
import functools
import numpy as np
from environment.RL_SimComponent import *
class ENVIRONMENT(object):
def __init__(self):
self.job_type = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# self.weight = np.random.uniform(0, 5, len(self.job_type))
self.weight = [0.68... | {"/agent/main.py": ["/agent/VDN_agent.py", "/agent/VDN_net.py", "/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/qmix_test.py": ["/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/VDN_agent.py": ["/agent/VDN_net.py"]} |
83,230 | Song-Jun-Ho/UPMSP_multi | refs/heads/main | /utils/policy.py | import numpy as np
class Policy():
def select_action(self, **kwargs):
raise NotImplementedError
class EpsGreedyQPolicy(Policy):
def __init__(self):
super(EpsGreedyQPolicy, self).__init__()
# self.eps = eps
# self.eps_decay_rate = eps_decay_rate
# self.min_eps = min_eps
... | {"/agent/main.py": ["/agent/VDN_agent.py", "/agent/VDN_net.py", "/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/qmix_test.py": ["/utils/memory.py", "/utils/policy.py", "/environment/Multi_Environment.py"], "/agent/VDN_agent.py": ["/agent/VDN_net.py"]} |
83,241 | TK0431/AutoDo | refs/heads/master | /key.py | from pymouse import * # 模拟鼠标所使用的包
from pykeyboard import * # 模拟键盘所使用的包
import time # 连续进行两个动作可能太快而效果不明显,因此加入暂停时间
m = PyMouse() # 鼠标的实例m
k = PyKeyboard() # 键盘的实例k
s = 0.1 # 双击间隔时间
def get_screen_size():
"""
获取屏幕尺寸(一般为电脑屏幕的分辨率,如1920*1080)
"""
... | {"/help_user32.py": ["/pic.py"], "/test.py": ["/help_user32.py", "/pic.py", "/help_cv.py", "/key.py", "/logic.py"]} |
83,242 | TK0431/AutoDo | refs/heads/master | /help_cv.py | import cv2
import numpy as np
import matplotlib.pyplot as plt
from PyQt5.QtWidgets import QApplication
from PyQt5.QtGui import *
import sys
import win32gui
def read_img(path):
"""
读取图片
"""
return cv2.imread(path)
def read_qt5_img(imgQt5):
"""
读取QT5截图
"""
imgQt5 = imgQt5.convertToForm... | {"/help_user32.py": ["/pic.py"], "/test.py": ["/help_user32.py", "/pic.py", "/help_cv.py", "/key.py", "/logic.py"]} |
83,243 | TK0431/AutoDo | refs/heads/master | /test2.py | # coding:utf8
import numpy as np
import cv2
from PIL import Image
import pytesseract
import sys
# 读取文件
imagePath = "D:/2.jpg"
img = cv2.imread(imagePath)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imshow('img',gray)
cv2.waitKey()
# 此步骤形态学变换的预处理,得到可以查找矩形的图片
# 参数:输入矩阵、输出矩阵数据类型、设置1、0时差分方向为水平方向的核卷积,设置0、1为垂直方向,ksize:核... | {"/help_user32.py": ["/pic.py"], "/test.py": ["/help_user32.py", "/pic.py", "/help_cv.py", "/key.py", "/logic.py"]} |
83,244 | TK0431/AutoDo | refs/heads/master | /help_user32.py | import win32gui
import pic
def get_hwnd(name, clss=None):
"""
获取窗口
"""
return win32gui.FindWindow(clss, name)
def get_win_rect(hwnd):
"""
left, top, right, bottom
"""
return win32gui.GetWindowRect(hwnd)
def get_win_size(hwnd):
"""
width,height
"""
left, top, right, ... | {"/help_user32.py": ["/pic.py"], "/test.py": ["/help_user32.py", "/pic.py", "/help_cv.py", "/key.py", "/logic.py"]} |
83,245 | TK0431/AutoDo | refs/heads/master | /pic.py | from PIL import ImageGrab
from PyQt5.QtWidgets import QApplication
from PyQt5.QtGui import *
import sys
def get_pic_byte(x, y, w, h):
return ImageGrab.grab(bbox=(x, y, w, h))
def save_pic(x, y, w, h, path):
pic = get_pic_byte(x, y, w, h)
pic.save(path)
def get_pic(hwnd):
app = QApplication(sys.argv)... | {"/help_user32.py": ["/pic.py"], "/test.py": ["/help_user32.py", "/pic.py", "/help_cv.py", "/key.py", "/logic.py"]} |
83,246 | TK0431/AutoDo | refs/heads/master | /test.py | from help_user32 import *
from pic import *
from help_cv import *
from key import *
from logic import *
def press_a():
send_key_sed('a', 0.1)
def press_w():
send_key_sed('w', 0.1)
def press_s():
send_key_sed('s', 0.1)
def press_d():
send_key_sed('d', 0.1)
hwnd = get_hwnd("AutoTest", None)
path... | {"/help_user32.py": ["/pic.py"], "/test.py": ["/help_user32.py", "/pic.py", "/help_cv.py", "/key.py", "/logic.py"]} |
83,247 | TK0431/AutoDo | refs/heads/master | /logic.py | import _thread
map_type = 0
road_type = 0
pos = (0,0)
def pic_start(img):
pos = get_pos(img)
tp = judge_back(img)
if tp > 0:
pass
elif tp < 0:
pass
else:
pass
#_thread.start_new_thread(press_a)
#_thread.start_new_thread(press_w)
#flg = False
def get_pos(img):
... | {"/help_user32.py": ["/pic.py"], "/test.py": ["/help_user32.py", "/pic.py", "/help_cv.py", "/key.py", "/logic.py"]} |
83,250 | alg107/papis-fzf | refs/heads/master | /papis_fzf/fzf.py | import functools
import sys
import os
#import dmenu
from pyfzf.pyfzf import FzfPrompt
from picker import picker as picker2
import papis.pick
import papis.format
#_fzf_pick = lambda x: FzfPrompt().prompt(x)[0]
_fzf_pick = lambda x: picker2(x)
def pick(options):
cols = os.popen('tput cols', 'r').read().strip()
... | {"/papis_fzf/fzf.py": ["/picker.py"]} |
83,251 | alg107/papis-fzf | refs/heads/master | /setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
from papis_fzf import __version__
with open('README.rst') as fd:
long_description = fd.read()
setup(
name='papis-fzf',
version=__version__,
author='Alex Goodenbour',
install_requires=[
"papis>=0.11",
"pyfzf",
],
descript... | {"/papis_fzf/fzf.py": ["/picker.py"]} |
83,252 | alg107/papis-fzf | refs/heads/master | /picker.py | import curses
import os
alphabet = """
qwertyuiopasdfghjklzxcvbnm,./;'[]\\1234567890-=
QWERTYUIOPASDFGHJKLZXCVBNM<>?":{}|+_)(*&^%$#@!~`
"""
def print_lst(stdscr, lst, selected):
idxs = [i[1] for i in lst]
filt_idx = 0
try:
filt_idx = idxs.index(selected)
except:
pass
y0,x0 = stdscr... | {"/papis_fzf/fzf.py": ["/picker.py"]} |
83,253 | nguyenminhhieu3004/hieu_crawl | refs/heads/main | /main.py | import tim_url
import tai_url
def main():
url_goc = input('Nhập link khởi đầu: ')
# tìm các link liên quan với link khởi đầu
url_tim_duoc = tim_url.tim_url_lien_quan(url_goc, url_goc)
# thêm tiếp url liên quan
hang_cho = url_tim_duoc
history = tim_url.them_va_duyet_hang_cho(hang_cho, url_goc)
... | {"/main.py": ["/tai_url.py"]} |
83,254 | nguyenminhhieu3004/hieu_crawl | refs/heads/main | /tai_url.py | # Các thư viện cần thiết
import os
import requests
import codecs
# Hàm Tạo thư mục và chuyển đến thư mục đó
# Cần truyền vào cho hàm Tên thư mục
def tao_thu_muc(name):
os.mkdir(name)
os.chdir(name)
# Hàm lưu tất cả các url đã tim được
# Truyền vào một List, set, tuples,... các URL hợp lệ
def luu_file(histor... | {"/main.py": ["/tai_url.py"]} |
83,330 | executivereader/reuters-downloader | refs/heads/master | /parse_reuters_articles.py | # code here
import xmltodict
import os
from update_replica_set import start_mongo_client
from time import sleep
from pymongo.errors import DuplicateKeyError
def upload_all_documents_to_mongo(path, client):
"""
Uploads all documents in path to Mongo.
Inputs:
path: a string with the path in which to ... | {"/initialize_reuters_downloader.py": ["/update_replica_set.py"]} |
83,331 | executivereader/reuters-downloader | refs/heads/master | /initialize_reuters_downloader.py | # code here
from update_replica_set import start_mongo_client
import os
if __name__ == "__main__":
client = start_mongo_client()
tr_credentials = client.credentials.thomsonreuters.find_one()
# first update whatever's on machine
os.system("sudo apt-get update")
# get only dependencies (explained lat... | {"/initialize_reuters_downloader.py": ["/update_replica_set.py"]} |
83,332 | executivereader/reuters-downloader | refs/heads/master | /update_replica_set.py | from pymongo import MongoClient
from pymongo.errors import AutoReconnect
from socket import gethostname, gethostbyname
from time import sleep
import requests
import os
def get_connection_string_from_file(filename = None):
'''
Gets the connection string from a file.
Default is connection_string.txt located... | {"/initialize_reuters_downloader.py": ["/update_replica_set.py"]} |
83,336 | Arks-System/Patchlists | refs/heads/master | /translationlink.py | #!/usr/bin/env python
import os
import sys
import requests
from bs4 import BeautifulSoup
BASE="https://pso2.acf.me.uk/Manual/"
def get_url_from_page(src):
url = []
soup = BeautifulSoup(src, 'html.parser').find("table")
soup = soup.find_all('a')
for e in soup:
url.append(e['href'])
retu... | {"/translation.py": ["/utils.py"], "/main.py": ["/utils.py", "/worker.py"]} |
83,337 | Arks-System/Patchlists | refs/heads/master | /translation.py | #!/usr/bin/env python3
import os
import sys
from stat import *
import utils
BASEDIR = os.path.abspath(os.path.dirname(__file__))
WORKING = "%s/patch_prod/translation/" % (BASEDIR)
PATCHLIST = "%s/patchlist.txt" % (WORKING)
VERSION_FILE = "%s/gameversion.ver.pat" % (WORKING)
IGNORE = [
"version.ver",
... | {"/translation.py": ["/utils.py"], "/main.py": ["/utils.py", "/worker.py"]} |
83,338 | Arks-System/Patchlists | refs/heads/master | /main.py | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# vim: set fileencoding=utf8 :
# pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=C0103
# pylint: disable=C0325
# pylint: disable=C0301
import os
import sys
import time
import queue
import threading
import requests
import signal
import shutil
import utils
... | {"/translation.py": ["/utils.py"], "/main.py": ["/utils.py", "/worker.py"]} |
83,339 | Arks-System/Patchlists | refs/heads/master | /utils.py | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# vim: set fileencoding=utf8 :
# pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=C0103
# pylint: disable=C0325
# pylint: disable=C0301
import os
import requests
import hashlib
import psutil
HEADERS = {"User-Agent": "AQUA_HTTP"}
LOCKFILE = "/tmp/patchlist.l... | {"/translation.py": ["/utils.py"], "/main.py": ["/utils.py", "/worker.py"]} |
83,340 | Arks-System/Patchlists | refs/heads/master | /get_file.py | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# vim: set fileencoding=utf8 :
# pylint: disable=C0111
# pylint: disable=W0621
# pylint: disable=C0103
# pylint: disable=C0325
import hashlib
import requests
def hash(file):
BLOCKS = 65536
hasher = hashlib.md5()
with open(file, 'rb') as afile:
buf = af... | {"/translation.py": ["/utils.py"], "/main.py": ["/utils.py", "/worker.py"]} |
83,341 | Arks-System/Patchlists | refs/heads/master | /worker.py | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# vim: set fileencoding=utf8 :
# pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=C0103
# pylint: disable=C0325
# pylint: disable=C0301
import os
import sys
import threading
import time
class DownloadWorker(threading.Thread):
def __init__(self, lst, cal... | {"/translation.py": ["/utils.py"], "/main.py": ["/utils.py", "/worker.py"]} |
83,342 | Arks-System/Patchlists | refs/heads/master | /cleanlocalpatchbase.py | #!/usr/bin/env python3
import re
import os
import sys
import shutil
from datetime import *
from stat import *
BASEDIR = os.path.abspath(os.path.dirname(__file__))
WORKING = "%s/patch_prod/" % (BASEDIR)
if (__name__ == "__main__"):
r = re.compile(r'^v[0-9]+_rc_[0-9]+_[0-9A-F]+$')
if (os.path.exists(WORKI... | {"/translation.py": ["/utils.py"], "/main.py": ["/utils.py", "/worker.py"]} |
83,344 | monero-ecosystem/python-monerorpc | refs/heads/master | /examples/test_daemon_rpc_params.py | from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
import logging
logging.basicConfig()
logging.getLogger("MoneroRPC").setLevel(logging.DEBUG)
log = logging.getLogger("wallet-rpc-lib")
rpc = AuthServiceProxy("http://test:test@127.0.0.1:18081/json_rpc")
# rpc = AuthServiceProxy('http://127.0.0.1:18081/... | {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,345 | monero-ecosystem/python-monerorpc | refs/heads/master | /jsonrpc/json.py | _json = __import__("json")
loads = _json.loads
dumps = _json.dumps
if hasattr(_json, "JSONEncodeException"):
JSONEncodeException = _json.JSONEncodeException
JSONDecodeException = _json.JSONDecodeException
else:
JSONEncodeException = TypeError
JSONDecodeException = ValueError
| {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,346 | monero-ecosystem/python-monerorpc | refs/heads/master | /jsonrpc/__init__.py | from .json import loads, dumps, JSONEncodeException, JSONDecodeException
from jsonrpc.proxy import ServiceProxy, JSONRPCException
| {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,347 | monero-ecosystem/python-monerorpc | refs/heads/master | /monerorpc/authproxy.py | """
Copyright 2011 Jeff Garzik
Forked by Norman Schenck from python-bitcoinrpc in 09/2018.
python-monerorpc is based on this fork.
AuthServiceProxy has the following improvements over python-jsonrpc's
ServiceProxy class:
- HTTP connections persist for the life of the AuthServiceProxy object
(if serv... | {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,348 | monero-ecosystem/python-monerorpc | refs/heads/master | /jsonrpc/authproxy.py | from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
__all__ = ["AuthServiceProxy", "JSONRPCException"]
| {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,349 | monero-ecosystem/python-monerorpc | refs/heads/master | /examples/test_rpc_batch.py | from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
import logging
import pprint
logging.basicConfig()
logging.getLogger("MoneroRPC").setLevel(logging.DEBUG)
log = logging.getLogger("wallet-rpc-lib")
rpc = AuthServiceProxy("http://test:test@127.0.0.1:38083/json_rpc")
# rpc = AuthServiceProxy('http://12... | {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,350 | monero-ecosystem/python-monerorpc | refs/heads/master | /tests.py | import json
from decimal import Decimal
import pytest
import responses
from requests.exceptions import ConnectionError, Timeout, RequestException
from monerorpc.authproxy import (
AuthServiceProxy,
EncodeDecimal,
JSONRPCException,
)
class TestEncodeDecimal:
def test_encodes_ok(self):
assert j... | {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,351 | monero-ecosystem/python-monerorpc | refs/heads/master | /jsonrpc/proxy.py | from monerorpc.authproxy import AuthServiceProxy as ServiceProxy, JSONRPCException
| {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,352 | monero-ecosystem/python-monerorpc | refs/heads/master | /examples/test_rpc.py | from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
import logging
logging.basicConfig()
logging.getLogger("MoneroRPC").setLevel(logging.DEBUG)
log = logging.getLogger("wallet-rpc-lib")
rpc = AuthServiceProxy("http://test:test@127.0.0.1:38083/json_rpc")
# rpc = AuthServiceProxy('http://127.0.0.1:38083/... | {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,353 | monero-ecosystem/python-monerorpc | refs/heads/master | /setup.py | #!/usr/bin/env python
from setuptools import setup
__version__ = "v0.6.2"
setup(
name="python-monerorpc",
version=__version__,
description="Enhanced version of python-jsonrpc for Monero (monerod, monero-wallet-rpc).",
long_description=open("README.md").read(),
long_description_content_type="text/... | {"/examples/test_daemon_rpc_params.py": ["/monerorpc/authproxy.py"], "/jsonrpc/__init__.py": ["/jsonrpc/json.py", "/jsonrpc/proxy.py"], "/jsonrpc/authproxy.py": ["/monerorpc/authproxy.py"], "/examples/test_rpc_batch.py": ["/monerorpc/authproxy.py"], "/tests.py": ["/monerorpc/authproxy.py"], "/jsonrpc/proxy.py": ["/mone... |
83,354 | Jonesasj/steam-review-crawler | refs/heads/main | /review_handler.py | import uuid
from datetime import date
import json
class ReviewHandler:
def __init__(self, franchise, gameName, maxSize):
self.reviews = []
self.franchise = franchise
self.gameName = gameName
self.maxSize = maxSize
def addReviews(self, reviews):
reviewList = []
f... | {"/main.py": ["/review_handler.py"]} |
83,355 | Jonesasj/steam-review-crawler | refs/heads/main | /main.py | import urllib.request
import json
from review_handler import ReviewHandler
import sys
cursor = '*'
seenCursors = []
success = True
fileCounter = 0
MAX_REVIEW_FILE_LENGTH = 5000
NUM_PER_PAGE = 100
franchise = ""
gameName = ""
appId = ""
if len(sys.argv) != 4:
sys.exit('the first argument should be franchise and th... | {"/main.py": ["/review_handler.py"]} |
83,356 | ryrizo/nlp | refs/heads/master | /idf.py | import sys
from tokenizer import getTokenList
def idf_main(min_doc_freq, read_file):
minDocFreq = int(min_doc_freq)
docfreq = dict()
totdocs = 0
for line in open(read_file, "r"):
value = line.strip("\r\n").split("\t")
id = value[0]
labels = value[1]
title = value[2]
... | {"/idf.py": ["/tokenizer.py"], "/tfidf.py": ["/tokenizer.py"]} |
83,357 | ryrizo/nlp | refs/heads/master | /sgm2txt.py | import re
import sys
from bs4 import BeautifulSoup
def getString(element):
output = ""
if (element != None):
output = re.sub("[\t\r\n]", " ", element.string)
return output
input = open(sys.argv[1], "r")
text = " ".join(input.readlines())
input.close()
xml = BeautifulSoup(text, features = "xml")
... | {"/idf.py": ["/tokenizer.py"], "/tfidf.py": ["/tokenizer.py"]} |
83,358 | ryrizo/nlp | refs/heads/master | /num_features.py | #splitter
from sklearn.datasets import load_svmlight_files
trn_X, trn_y, tst_X, tst_y = load_svmlight_files(("C:/Users/Ryan/git/nlp/trn.dat", "C:/Users/Ryan/git/nlp/tst.dat"))
print trn_X.shape[1] | {"/idf.py": ["/tokenizer.py"], "/tfidf.py": ["/tokenizer.py"]} |
83,359 | ryrizo/nlp | refs/heads/master | /tfidf.py | import math
import sys
from tokenizer import getTokenList
def tfidf_main(sys_arg_1, sys_arg_2):
input = open(sys_arg_1, "r")
totdocs = int(input.readline().strip("\r\n"))
termList = []
idf = dict()
for line in input:
value = line.strip("\r\n").split("\t")
termList.append(value[0])
... | {"/idf.py": ["/tokenizer.py"], "/tfidf.py": ["/tokenizer.py"]} |
83,360 | ryrizo/nlp | refs/heads/master | /tokenizer.py | #!/usr/bin/python
import re
import sys
from nltk.tokenize import wordpunct_tokenize
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
stopSet = set(stopwords.words("english"))
stemmer = PorterStemmer()
alphanumeric = re.compile("^[0-9A-Za-z]+$")
def getTokenList(text,
lowe... | {"/idf.py": ["/tokenizer.py"], "/tfidf.py": ["/tokenizer.py"]} |
83,371 | tmLen/my_bot | refs/heads/master | /utils.py | from emoji import emojize
from random import choice
from telegram import ReplyKeyboardMarkup, KeyboardButton
import settings
def get_user_emoji(user_data):
if 'smile' not in user_data:
user_data['smile'] = emojize(choice(settings.USER_EMOJI), use_aliases=True)
return user_data['smile']
def get_keyboa... | {"/handlers.py": ["/utils.py"], "/bot.py": ["/handlers.py"]} |
83,372 | tmLen/my_bot | refs/heads/master | /handlers.py | from glob import glob
from random import choice
import utils
def greet_user(bot, update):
greet = 'Привет,' + update.message.chat.first_name + '\n'
update.message.reply_text(greet, reply_markup=utils.get_keyboard())
def send_picture(bot, update):
bot.send_photo(chat_id=update.message.chat_id, photo=open(... | {"/handlers.py": ["/utils.py"], "/bot.py": ["/handlers.py"]} |
83,373 | tmLen/my_bot | refs/heads/master | /bot.py | import logging
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, RegexHandler
import handlers
import settings
PROXY = {'proxy_url': settings.proxy_url, 'urllib3_proxy_kwargs': {'username': settings.username, 'password': settings.password}}
logging.basicConfig(format='%(name)s - %(levelname)s... | {"/handlers.py": ["/utils.py"], "/bot.py": ["/handlers.py"]} |
83,382 | zheng-2019/image-classification-garbage | refs/heads/master | /dataset/dataloader.py | from torch.utils.data import Dataset
from torchvision import transforms as T
from config import config
from PIL import Image
from dataset.aug import *
from itertools import chain
from glob import glob
from tqdm import tqdm
import random
import numpy as np
import pandas as pd
import os
import cv2
import torch
#... | {"/dataset/dataloader.py": ["/config.py"], "/eval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/models/model.py": ["/config.py"], "/myeval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/main.py": ["/config.py", "/dataset/dataloader.py", "/dataset/sampler.py", "/models/model.... |
83,383 | zheng-2019/image-classification-garbage | refs/heads/master | /config.py | class DefaultConfigs(object):
#1.string parameters
train_data = "/home/ltdev/lingtian/jhzheng/s3data/image-classification-garbage/data/train_color.txt"
test_data = "/home/ltdev/lingtian/jhzheng/s3data/image-classification-garbage/data/test_color.txt"
val_data = "/home/ltdev/lingtian/jhzheng/s3data/image... | {"/dataset/dataloader.py": ["/config.py"], "/eval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/models/model.py": ["/config.py"], "/myeval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/main.py": ["/config.py", "/dataset/dataloader.py", "/dataset/sampler.py", "/models/model.... |
83,384 | zheng-2019/image-classification-garbage | refs/heads/master | /eval.py | import os
import random
import time
import json
import torch
import torchvision
import numpy as np
import pandas as pd
import warnings
from datetime import datetime
from torch import nn,optim
from config import config
from collections import OrderedDict
from torch.autograd import Variable
from torch.utils.data im... | {"/dataset/dataloader.py": ["/config.py"], "/eval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/models/model.py": ["/config.py"], "/myeval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/main.py": ["/config.py", "/dataset/dataloader.py", "/dataset/sampler.py", "/models/model.... |
83,385 | zheng-2019/image-classification-garbage | refs/heads/master | /models/model.py | import torchvision
import torch.nn.functional as F
from torch import nn
from config import config
def loadnet(config):
if config.model_name=='densenet169':
return torchvision.models.densenet169(pretrained=True)
elif config.model_name=='densenet161':
return torchvision.models.densenet161(pretr... | {"/dataset/dataloader.py": ["/config.py"], "/eval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/models/model.py": ["/config.py"], "/myeval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/main.py": ["/config.py", "/dataset/dataloader.py", "/dataset/sampler.py", "/models/model.... |
83,386 | zheng-2019/image-classification-garbage | refs/heads/master | /myeval.py |
import os
import random
import time
import torch
import numpy as np
import pandas as pd
from datetime import datetime
from config import config
from collections import OrderedDict
from torch.autograd import Variable
from torch.utils.data import DataLoader
from dataset.dataloader import *
from config import confi... | {"/dataset/dataloader.py": ["/config.py"], "/eval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/models/model.py": ["/config.py"], "/myeval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/main.py": ["/config.py", "/dataset/dataloader.py", "/dataset/sampler.py", "/models/model.... |
83,387 | zheng-2019/image-classification-garbage | refs/heads/master | /dataset/sampler.py | import torch
import torch.utils.data
import torchvision
import numpy as np
def make_weights_for_balanced_classes(labels,classes):
labels = np.array(labels)
#print(labels)
weights=[]
outs=[]
weight = 1./ len(labels)
for ic in range(classes):
weights.append(weight/(labels==ic).sum())
... | {"/dataset/dataloader.py": ["/config.py"], "/eval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/models/model.py": ["/config.py"], "/myeval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/main.py": ["/config.py", "/dataset/dataloader.py", "/dataset/sampler.py", "/models/model.... |
83,388 | zheng-2019/image-classification-garbage | refs/heads/master | /main.py | import os
import random
import time
import json
import torch
import torchvision
import numpy as np
import pandas as pd
import warnings
from datetime import datetime
from torch import nn,optim
from config import config
from collections import OrderedDict
from torch.autograd import Variable
from torch.utils.data im... | {"/dataset/dataloader.py": ["/config.py"], "/eval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/models/model.py": ["/config.py"], "/myeval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/main.py": ["/config.py", "/dataset/dataloader.py", "/dataset/sampler.py", "/models/model.... |
83,389 | zheng-2019/image-classification-garbage | refs/heads/master | /data/attrabute_make2txt.py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 28 20:04:10 2017
@author: hosery
"""
# !/usr/bin/evn python
# coding:utf-8
import os
import cv2
import numpy as np
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
import sys
folder = '/home/lt... | {"/dataset/dataloader.py": ["/config.py"], "/eval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/models/model.py": ["/config.py"], "/myeval.py": ["/config.py", "/dataset/dataloader.py", "/models/model.py"], "/main.py": ["/config.py", "/dataset/dataloader.py", "/dataset/sampler.py", "/models/model.... |
83,392 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/accounts/admin.py | from rolepermissions.roles import assign_role
from rolepermissions.admin import RolePermissionsUserAdminMixin
from import_export import resources
from import_export.admin import ImportExportModelAdmin
from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import g... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,393 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/students/tests.py | import os
from datetime import date
from django.conf import settings
from django.core import mail
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test import TestCase
from django.urls import reverse
from .models import AdmissionStudent
from django_school_management.academics.models import Dep... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,394 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/students/migrations/0023_auto_20210223_1235.py | # Generated by Django 2.2.13 on 2021-02-23 06:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('students', '0022_auto_20201226_1852'),
]
operations = [
migrations.AddField(
model_name='admissionstudent',
name='a... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,395 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/articles/migrations/0021_auto_20210325_0143.py | # Generated by Django 2.2.13 on 2021-03-24 19:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0020_blogconfiguration'),
]
operations = [
migrations.AlterField(
model_name='blogconfiguration',
name=... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,396 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/result/apps.py | from django.apps import AppConfig
class ResultConfig(AppConfig):
name = 'django_school_management.result'
| {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,397 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/institute/urls.py | from django.urls import path
from . import views
app_name = 'institute'
urlpatterns = [
path('dashboard/settings/institute-profiles/',
views.InstituteProfileConfigListView.as_view(),
name='institute_profile_list'
),
path('dashboard/settings/setup-school/',
views.InstituteProfileSet... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,398 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/institute/views.py | from django.core import serializers
from django.shortcuts import redirect, render
from django.urls import reverse_lazy
from django.views import View
from django.views.generic import DetailView, ListView
from django.views.generic.edit import CreateView, UpdateView
from django_school_management.institute.forms.institute... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,399 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/result/views.py | from django.db import IntegrityError
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.shortcuts import render, get_object_or_404, redirect
from django.http import JsonResponse, HttpResponse
from django_school_management.students.models import Student
from djan... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,400 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/accounts/migrations/0008_commonuserprofile_sociallink.py | # Generated by Django 2.2.13 on 2021-01-28 11:59
import ckeditor_uploader.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accounts', '0007_remove_user_account_type'),
]
op... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,401 | TareqMonwer/Django-School-Management | refs/heads/master | /context_processors/dj_sms_context_processor.py | from django_school_management.institute.models import (InstituteProfile,
TextWidget, ListWidget
)
from django_school_management.articles.models import Category
def attach_institute_data_ctx_processor(request)... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,402 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/institute/migrations/0009_alter_instituteprofile_id_alter_listwidget_id_and_more.py | # Generated by Django 4.2.3 on 2023-07-12 19:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('institute', '0008_alter_instituteprofile_created_by'),
]
operations = [
migrations.AlterField(
model_name='instituteprofile',
... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,403 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/students/views/pdf_views.py | import io
from reportlab.pdfgen import canvas
from django.http import FileResponse
def test_pdf(request):
# create file like buffer to recieve PDF data
buffer = io.BytesIO()
# create pdf using buffer file as pdf
p = canvas.Canvas(buffer)
# Draw things on the PDF. Here's where the PDF generation... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,404 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/academics/migrations/0005_auto_20201208_0759.py | # Generated by Django 2.2.13 on 2020-12-08 01:59
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
dependencies = [
('students', '0015_admissionstudent_rejected'),
('academics', ... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,405 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/articles/migrations/0008_auto_20210125_1952.py | # Generated by Django 2.2.13 on 2021-01-25 13:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0007_article_is_featured'),
]
operations = [
migrations.AlterModelOptions(
name='article',
options={'ge... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,406 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/academics/admin.py | from django.contrib import admin
from .models import (AcademicSession,
Semester, Department,
Batch, TempSerialID,
Subject)
class AcademicSessionAdmin(admin.ModelAdmin):
list_display = ('year', 'created_by')
class BatchAdmin(admin.ModelAdmin):
li... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,407 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/result/migrations/0009_auto_20201223_0053.py | # Generated by Django 2.2.13 on 2020-12-22 18:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('students', '0021_student_temporary_id'),
('academics', '0010_auto_20201219_0025'),
('result', '0008_subjectgroup_subjects'),
]
operations =... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,408 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/articles/views.py | from django.contrib import messages
from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.shortcuts import redirect
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.views import View
from django.views.generic import (
ListView, DetailView,
Crea... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,409 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/articles/migrations/0003_auto_20210125_1402.py | # Generated by Django 2.2.13 on 2021-01-25 08:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0002_category'),
]
operations = [
migrations.AlterModelOptions(
name='category',
options={'verbose_name... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,410 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/articles/migrations/0019_newsletter_is_active.py | # Generated by Django 2.2.13 on 2021-03-06 10:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0018_auto_20210301_1249'),
]
operations = [
migrations.AddField(
model_name='newsletter',
name='is_acti... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,411 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/accounts/forms.py | from crispy_forms.helper import FormHelper
from django import forms as djform
from django.forms import inlineformset_factory
from django.contrib.auth import get_user_model, forms
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _
from .models import CommonUserPro... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
83,412 | TareqMonwer/Django-School-Management | refs/heads/master | /django_school_management/students/migrations/0013_admissionstudent_application_type.py | # Generated by Django 2.2.13 on 2020-12-04 20:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('students', '0012_auto_20201204_2110'),
]
operations = [
migrations.AddField(
model_name='admissionstudent',
name='a... | {"/django_school_management/accounts/admin.py": ["/django_school_management/accounts/models.py", "/django_school_management/accounts/forms.py"], "/django_school_management/students/tests.py": ["/django_school_management/students/models.py", "/django_school_management/academics/models.py", "/django_school_management/stu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.