index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
36
Yuliashka/Snake-Game
refs/heads/main
/food.py
from turtle import Turtle import random # we want this Food class to inherit from the Turtle class, so it will have all the capapibilities from # the turtle class, but also some specific things that we want class Food(Turtle): # creating initializer for this class def __init__(self): # we...
{"/main.py": ["/snake.py", "/food.py", "/scoreboard.py"]}
37
Yuliashka/Snake-Game
refs/heads/main
/snake.py
from turtle import Turtle STARTING_POSITIONS = [(0, 0), (-20, 0), (-40, 0)] MOVE_DISTANCE = 20 UP = 90 DOWN = 270 RIGHT = 0 LEFT = 180 class Snake: # The code here is going to determine what should happen when we initialize a new snake object def __init__(self): # below we create a new...
{"/main.py": ["/snake.py", "/food.py", "/scoreboard.py"]}
38
Yuliashka/Snake-Game
refs/heads/main
/main.py
from turtle import Screen import time from snake import Snake from food import Food from scoreboard import Score # SETTING UP THE SCREEN: screen = Screen() screen.setup(width=600, height=600) screen.bgcolor("black") screen.title("My Snake Game") # to turn off the screen tracer screen.tracer(0) # CREAT...
{"/main.py": ["/snake.py", "/food.py", "/scoreboard.py"]}
39
Yuliashka/Snake-Game
refs/heads/main
/scoreboard.py
from turtle import Turtle ALIGMENT = "center" FONT = ("Arial", 18, "normal") class Score(Turtle): def __init__(self): super().__init__() self.score = 0 self.color("white") self.penup() self.goto(0, 270) self.write(f"Current score: {self.score}", align...
{"/main.py": ["/snake.py", "/food.py", "/scoreboard.py"]}
46
marcin-mulawa/Water-Sort-Puzzle-Bot
refs/heads/main
/loading_phone.py
import numpy as np import cv2 import imutils picture = 'puzzle.jpg' def load_transform_img(picture): image = cv2.imread(picture) image = imutils.resize(image, height=800) org = image.copy() #cv2.imshow('orginal', image) mask = np.zeros(image.shape[:2], dtype = "uint8") cv2.rectangle(mask, (15...
{"/auto_puzzle.py": ["/solver.py"], "/solver.py": ["/loading_pc.py"]}
47
marcin-mulawa/Water-Sort-Puzzle-Bot
refs/heads/main
/loading_pc.py
import numpy as np import cv2 import imutils picture = 'puzzle.jpg' def load_transform_img(picture): image = cv2.imread(picture) #image = imutils.resize(image, height=800) org = image.copy() #cv2.imshow('orginal', image) mask = np.zeros(image.shape[:2], dtype = "uint8") cv2.rectangle(mask, (6...
{"/auto_puzzle.py": ["/solver.py"], "/solver.py": ["/loading_pc.py"]}
48
marcin-mulawa/Water-Sort-Puzzle-Bot
refs/heads/main
/auto_puzzle.py
import pyautogui as pya import solver import time import glob import os import numpy as np import cv2 import shutil path = os.getcwd() path1 = path + r'/temp' path2 = path +r'/level' try: shutil.rmtree(path1) except: pass try: os.mkdir('temp') except: pass try: os.mkdir('level') except: pass ...
{"/auto_puzzle.py": ["/solver.py"], "/solver.py": ["/loading_pc.py"]}
49
marcin-mulawa/Water-Sort-Puzzle-Bot
refs/heads/main
/solver.py
from collections import deque import random import copy import sys import loading_pc import os def move(new_list, from_, to): temp = new_list[from_].pop() for _i in range(0,4): if len(new_list[from_])>0 and abs(int(temp) - int(new_list[from_][-1]))<3 and len(new_list[to])<3: temp = new_li...
{"/auto_puzzle.py": ["/solver.py"], "/solver.py": ["/loading_pc.py"]}
54
TheDinner22/lightning-sim
refs/heads/main
/lib/board.py
# represent the "board" in code # dependencies import random class Board: def __init__(self, width=10): self.width = width self.height = width * 2 self.WALL_CHANCE = .25 self.FLOOR_CHANCE = .15 # create the grid self.create_random_grid() def create_random_gri...
{"/main.py": ["/lib/board.py", "/lib/window.py"]}
55
TheDinner22/lightning-sim
refs/heads/main
/lib/window.py
# use pygame to show the board on a window # dependencies import pygame, random class Window: def __init__(self, board): # init py game pygame.init() # width height self.WIDTH = 600 self.HEIGHT = 600 # diffenet display modes self.display_one = False ...
{"/main.py": ["/lib/board.py", "/lib/window.py"]}
56
TheDinner22/lightning-sim
refs/heads/main
/main.py
# this could and will be better i just needed to make it here as a # proof of concept but it will be online and better later import os, sys BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # adds project dir to places it looks for the modules sys.path.append(BASE_PATH) from lib.board import B...
{"/main.py": ["/lib/board.py", "/lib/window.py"]}
79
igoryuha/wct
refs/heads/master
/eval.py
import torch from models import NormalisedVGG, Decoder from utils import load_image, preprocess, deprocess, extract_image_names from ops import style_decorator, wct import argparse import os parser = argparse.ArgumentParser(description='WCT') parser.add_argument('--content-path', type=str, help='path to the content ...
{"/eval.py": ["/models.py", "/utils.py", "/ops.py"], "/utils.py": ["/ops.py"]}
80
igoryuha/wct
refs/heads/master
/models.py
import torch import torch.nn as nn import copy normalised_vgg_relu5_1 = nn.Sequential( nn.Conv2d(3, 3, 1), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(3, 64, 3), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64, 64, 3), nn.ReLU(), nn.MaxPool2d(2, ceil_mode=True), nn.Reflec...
{"/eval.py": ["/models.py", "/utils.py", "/ops.py"], "/utils.py": ["/ops.py"]}
81
igoryuha/wct
refs/heads/master
/ops.py
import torch import torch.nn.functional as F def extract_image_patches_(image, kernel_size, strides): kh, kw = kernel_size sh, sw = strides patches = image.unfold(2, kh, sh).unfold(3, kw, sw) patches = patches.permute(0, 2, 3, 1, 4, 5) patches = patches.reshape(-1, *patches.shape[-3:]) # (patch_nu...
{"/eval.py": ["/models.py", "/utils.py", "/ops.py"], "/utils.py": ["/ops.py"]}
82
igoryuha/wct
refs/heads/master
/utils.py
import torch from torchvision import transforms from ops import relu_x_1_style_decorator_transform, relu_x_1_transform from PIL import Image import os def eval_transform(size): return transforms.Compose([ transforms.Resize(size), transforms.ToTensor() ]) def load_image(path): return Imag...
{"/eval.py": ["/models.py", "/utils.py", "/ops.py"], "/utils.py": ["/ops.py"]}
89
tattle-made/archive-telegram-bot
refs/heads/master
/tattle_helper.py
import os import json import boto3 import requests from logger import log, logError from dotenv import load_dotenv load_dotenv() s3 = boto3.client("s3",aws_access_key_id=os.environ.get('S3_ACCESS_KEY'),aws_secret_access_key=os.environ.get('S3_SECRET_ACCESS_KEY')) API_BASE_URL = "https://archive-server.tattle.co.in" #...
{"/tattle_helper.py": ["/logger.py"], "/test.py": ["/tattle_helper.py"], "/prototype.py": ["/logger.py", "/tattle_helper.py"]}
90
tattle-made/archive-telegram-bot
refs/heads/master
/post_request.py
token = "78a6fc20-fa83-11e9-a4ad-d1866a9a3c7b" # add your token here url = "<base-api-url>/api/posts" try: payload = d payload = json.dumps(payload) headers = { 'token': token, 'Content-Type': "application/json", 'cache-control': "no-cache", } r = requests.post(url, data=...
{"/tattle_helper.py": ["/logger.py"], "/test.py": ["/tattle_helper.py"], "/prototype.py": ["/logger.py", "/tattle_helper.py"]}
91
tattle-made/archive-telegram-bot
refs/heads/master
/test.py
from tattle_helper import register_post, upload_file data = { "type" : "image", "data" : "", "filename": "asdf", "userId" : 169 } response = upload_file(file_name='denny.txt') print(response) # register_post(data)
{"/tattle_helper.py": ["/logger.py"], "/test.py": ["/tattle_helper.py"], "/prototype.py": ["/logger.py", "/tattle_helper.py"]}
92
tattle-made/archive-telegram-bot
refs/heads/master
/prototype.py
import os import sys import json import requests import telegram import logging import re from threading import Thread from telegram.ext import CommandHandler, MessageHandler, Updater, Filters, InlineQueryHandler from telegram import InlineQueryResultArticle, InputTextMessageContent from telegram.ext.dispatcher import ...
{"/tattle_helper.py": ["/logger.py"], "/test.py": ["/tattle_helper.py"], "/prototype.py": ["/logger.py", "/tattle_helper.py"]}
93
tattle-made/archive-telegram-bot
refs/heads/master
/logger.py
from datetime import datetime def log(data): print('----', datetime.now(), '----') print(data) def logError(error): print('****', datetime.now(), '****') print(error)
{"/tattle_helper.py": ["/logger.py"], "/test.py": ["/tattle_helper.py"], "/prototype.py": ["/logger.py", "/tattle_helper.py"]}
143
shuishen112/pairwise-rnn
refs/heads/master
/main.py
import data_helper import time import datetime import os import tensorflow as tf import numpy as np import evaluation now = int(time.time()) timeArray = time.localtime(now) timeStamp = time.strftime("%Y%m%d%H%M%S", timeArray) timeDay = time.strftime("%Y%m%d", timeArray) print (timeStamp) def main(args): ar...
{"/main.py": ["/data_helper.py"], "/run.py": ["/config.py", "/data_helper.py", "/models/__init__.py"], "/models/__init__.py": ["/models/QA_CNN_pairwise.py"], "/test.py": ["/config.py", "/data_helper.py", "/models/__init__.py"]}
144
shuishen112/pairwise-rnn
refs/heads/master
/config.py
class Singleton(object): __instance=None def __init__(self): pass def getInstance(self): if Singleton.__instance is None: # Singleton.__instance=object.__new__(cls,*args,**kwd) Singleton.__instance=self.get_test_flag() print("build FLAGS over") ret...
{"/main.py": ["/data_helper.py"], "/run.py": ["/config.py", "/data_helper.py", "/models/__init__.py"], "/models/__init__.py": ["/models/QA_CNN_pairwise.py"], "/test.py": ["/config.py", "/data_helper.py", "/models/__init__.py"]}
145
shuishen112/pairwise-rnn
refs/heads/master
/run.py
from tensorflow import flags import tensorflow as tf from config import Singleton import data_helper import datetime,os import models import numpy as np import evaluation import sys import logging import time now = int(time.time()) timeArray = time.localtime(now) timeStamp = time.strftime("%Y%m%d%H%M%S", timeArray)...
{"/main.py": ["/data_helper.py"], "/run.py": ["/config.py", "/data_helper.py", "/models/__init__.py"], "/models/__init__.py": ["/models/QA_CNN_pairwise.py"], "/test.py": ["/config.py", "/data_helper.py", "/models/__init__.py"]}
146
shuishen112/pairwise-rnn
refs/heads/master
/models/QA_CNN_pairwise.py
#coding:utf-8 import tensorflow as tf import numpy as np from tensorflow.contrib import rnn import models.blocks as blocks # model_type :apn or qacnn class QA_CNN_extend(object): # def __init__(self,max_input_left,max_input_right,batch_size,vocab_size,embedding_size,filter_sizes,num_filters,hidden_size, # dro...
{"/main.py": ["/data_helper.py"], "/run.py": ["/config.py", "/data_helper.py", "/models/__init__.py"], "/models/__init__.py": ["/models/QA_CNN_pairwise.py"], "/test.py": ["/config.py", "/data_helper.py", "/models/__init__.py"]}
147
shuishen112/pairwise-rnn
refs/heads/master
/models/my/nn.py
from my.general import flatten, reconstruct, add_wd, exp_mask import numpy as np import tensorflow as tf _BIAS_VARIABLE_NAME = "bias" _WEIGHTS_VARIABLE_NAME = "kernel" def linear(args, output_size, bias, bias_start=0.0, scope=None, squeeze=False, wd=0.0, input_keep_prob=1.0, is_train=None):#, name_w='',...
{"/main.py": ["/data_helper.py"], "/run.py": ["/config.py", "/data_helper.py", "/models/__init__.py"], "/models/__init__.py": ["/models/QA_CNN_pairwise.py"], "/test.py": ["/config.py", "/data_helper.py", "/models/__init__.py"]}
148
shuishen112/pairwise-rnn
refs/heads/master
/models/__init__.py
from .QA_CNN_pairwise import QA_CNN_extend as CNN from .QA_RNN_pairwise import QA_RNN_extend as RNN from .QA_CNN_quantum_pairwise import QA_CNN_extend as QCNN def setup(opt): if opt["model_name"]=="cnn": model=CNN(opt) elif opt["model_name"]=="rnn": model=RNN(opt) elif opt['model_name']=='qcnn': model=QCNN(opt...
{"/main.py": ["/data_helper.py"], "/run.py": ["/config.py", "/data_helper.py", "/models/__init__.py"], "/models/__init__.py": ["/models/QA_CNN_pairwise.py"], "/test.py": ["/config.py", "/data_helper.py", "/models/__init__.py"]}
149
shuishen112/pairwise-rnn
refs/heads/master
/test.py
# -*- coding: utf-8 -*- from tensorflow import flags import tensorflow as tf from config import Singleton import data_helper import datetime import os import models import numpy as np import evaluation from data_helper import log_time_delta,getLogger logger=getLogger() args = Singleton().get_rnn_flag() #args...
{"/main.py": ["/data_helper.py"], "/run.py": ["/config.py", "/data_helper.py", "/models/__init__.py"], "/models/__init__.py": ["/models/QA_CNN_pairwise.py"], "/test.py": ["/config.py", "/data_helper.py", "/models/__init__.py"]}
150
shuishen112/pairwise-rnn
refs/heads/master
/data_helper.py
#-*- coding:utf-8 -*- import os import numpy as np import tensorflow as tf import string from collections import Counter import pandas as pd from tqdm import tqdm import random from functools import wraps import time import pickle def log_time_delta(func): @wraps(func) def _deco(*args, **kwargs): star...
{"/main.py": ["/data_helper.py"], "/run.py": ["/config.py", "/data_helper.py", "/models/__init__.py"], "/models/__init__.py": ["/models/QA_CNN_pairwise.py"], "/test.py": ["/config.py", "/data_helper.py", "/models/__init__.py"]}
158
pedromeldola/Desafio
refs/heads/master
/core/models.py
from django.db import models #criação da classe com os atributos class Jogo(models.Model): idJogo = models.AutoField(primary_key=True) placar = models.IntegerField() placarMin = models.IntegerField() placarMax = models.IntegerField() quebraRecMin = models.IntegerField() quebraRecMax = models.In...
{"/core/views.py": ["/core/models.py"]}
159
pedromeldola/Desafio
refs/heads/master
/core/views.py
from django.shortcuts import render,redirect from .models import Jogo from django.views.decorators.csrf import csrf_protect #método para chamar todos os objetos que estão na classe Jogo quando entrar na home page def home_page(request): jogo = Jogo.objects.all() return render (request,'home.html',{'jogo':jogo}...
{"/core/views.py": ["/core/models.py"]}
160
pedromeldola/Desafio
refs/heads/master
/core/migrations/0002_auto_20200930_2254.py
# Generated by Django 3.1 on 2020-10-01 01:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='jogo', name='id', ), migr...
{"/core/views.py": ["/core/models.py"]}
161
pedromeldola/Desafio
refs/heads/master
/core/migrations/0001_initial.py
# Generated by Django 3.1.1 on 2020-09-28 18:50 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Jogo', fields=[ ('id', models.AutoField(aut...
{"/core/views.py": ["/core/models.py"]}
185
andrewjschuang/Turing
refs/heads/master
/turing.py
import time from datetime import datetime from flask import (Flask, abort, flash, redirect, render_template, request, session, url_for) from sqlalchemy.exc import IntegrityError from wtforms import (Form, RadioField, StringField, SubmitField, TextAreaField, TextField, validators)...
{"/test.py": ["/turing.py"]}
186
andrewjschuang/Turing
refs/heads/master
/test.py
from flask_testing import TestCase from models.shared import db from models.model import User, Task, Project, Question, Response, Questionnaire from turing import create_app import unittest class MyTest(TestCase): def create_app(self): config = { 'SQLALCHEMY_DATABASE_URI': 'sqlite:///test.db...
{"/test.py": ["/turing.py"]}
187
andrewjschuang/Turing
refs/heads/master
/functionalities.py
functionalities = { 'Login': 'Login page', 'Feedback': 'This feedback form', 'Todo': 'To do module', 'Projects': 'Anything related to projects', 'Code': 'Code editor', 'Forum': 'The forum', 'Profile': 'Your profile page', }
{"/test.py": ["/turing.py"]}
188
yywang0514/dsnre
refs/heads/master
/train.py
import sys import os import time import numpy as np import torch import torch.nn.functional as F import argparse import logging from lib import * from model import * def train(options): if not os.path.exists(options.folder): os.mkdir(options.folder) logger.setLevel(logging.DEBUG) formatter = logging.Formatter(...
{"/train.py": ["/lib/__init__.py", "/model.py"], "/model.py": ["/lib/__init__.py"]}
189
yywang0514/dsnre
refs/heads/master
/lib/module.py
import torch import torch.nn as nn import math class LayerNorm(nn.Module): """Layer Normalization class""" def __init__(self, features, eps=1e-6): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(torch.zeros(features)) self.eps = eps def forward(self...
{"/train.py": ["/lib/__init__.py", "/model.py"], "/model.py": ["/lib/__init__.py"]}
190
yywang0514/dsnre
refs/heads/master
/model.py
import torch import torch.nn as nn from lib import * class Model(nn.Module): def __init__(self, fine_tune, pre_train_emb, part_point, size_vocab, dim_emb, ...
{"/train.py": ["/lib/__init__.py", "/model.py"], "/model.py": ["/lib/__init__.py"]}
191
yywang0514/dsnre
refs/heads/master
/lib/__init__.py
from module import * from util import * from data_iterator import *
{"/train.py": ["/lib/__init__.py", "/model.py"], "/model.py": ["/lib/__init__.py"]}
192
yywang0514/dsnre
refs/heads/master
/format.py
import sys import codecs class InstanceBag(object): def __init__(self, entities, rel, num, sentences, positions, entitiesPos): self.entities = entities self.rel = rel self.num = num self.sentences = sentences self.positions = positions self.entitiesPos = entitiesPos def bags_decompose(data_bags): bag...
{"/train.py": ["/lib/__init__.py", "/model.py"], "/model.py": ["/lib/__init__.py"]}
193
yywang0514/dsnre
refs/heads/master
/lib/util.py
import sys import re import numpy as np import cPickle as pkl import codecs import logging from data_iterator import * logger = logging.getLogger() extra_token = ["<PAD>", "<UNK>"] def display(msg): print(msg) logger.info(msg) def datafold(filename): f = open(filename, 'r') data = [] while 1: line = f.readl...
{"/train.py": ["/lib/__init__.py", "/model.py"], "/model.py": ["/lib/__init__.py"]}
194
yywang0514/dsnre
refs/heads/master
/lib/data_iterator.py
import time import cPickle import numpy as np import torch class InstanceBag(object): def __init__(self, entities, rel, num, sentences, positions, entitiesPos): self.entities = entities self.rel = rel self.num = num self.sentences = sentences self.positions = positions self.entitiesPos = entitiesPos def ...
{"/train.py": ["/lib/__init__.py", "/model.py"], "/model.py": ["/lib/__init__.py"]}
210
rodelrod/pomodoro-report
refs/heads/master
/test_notebook_parser.py
#!/usr/bin/env python import unittest from notebook_parser import * import os import errno from datetime import datetime def mkdir_p(path): try: os.makedirs(path) except OSError as exc: if exc.errno == errno.EEXIST: pass else: raise class TestParser(unittest...
{"/test_notebook_parser.py": ["/notebook_parser.py"]}
211
rodelrod/pomodoro-report
refs/heads/master
/notebook_parser.py
#!/usr/bin/env python import re import os NOTEBOOK_PATH = '/home/rrodrigues/.rednotebook/data' class EmptyDayException(Exception): """No info was entered for this date.""" class Parser(object): """Parses RedNotebook monthly files. This is a very basic parser used to extract Pomodoro referen...
{"/test_notebook_parser.py": ["/notebook_parser.py"]}
220
grizzlypeaksoftware/tankbot
refs/heads/master
/tankbot.py
import RPi.GPIO as GPIO from time import sleep def Init(): GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) GPIO.setup(3,GPIO.OUT,initial=GPIO.LOW) #blue GPIO.setup(5,GPIO.OUT,initial=GPIO.LOW) #green GPIO.setup(16,GPIO.OUT,initial=GPIO.LOW) #yellow GPIO.setup(18,GPIO.OUT,initial=GPIO.LOW) #orange Welcome...
{"/bot.py": ["/tankbot.py"]}
221
grizzlypeaksoftware/tankbot
refs/heads/master
/bot.py
import tankbot import keyboard import time as _time tankbot.Init() recorded = [] recording_started = False def ControlSwitch(key, event): global recording_started #print(key) #print(event.event_type) if key == "s": tankbot.Stop() if key == "up": tankbot.Forward() if key == "down": tankbot.Reverse() if...
{"/bot.py": ["/tankbot.py"]}
223
jeespinozam/bomberman-ai
refs/heads/master
/plugins/SerpentBombermanGameAgentPlugin/files/helpers/ppo.py
from tensorforce.agents import PPOAgent from serpent.utilities import SerpentError import numpy as np import os # This file is borrowed from SerpentAIsaacGameAgentPlugin: # https://github.com/SerpentAI/SerpentAIsaacGameAgentPlugin/blob/master/files/helpers/ppo.py class SerpentPPO: def __init__(self, frame_shape...
{"/plugins/SerpentBombermanGameAgentPlugin/files/serpent_Bomberman_game_agent.py": ["/plugins/SerpentBombermanGameAgentPlugin/files/helpers/game_status.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/ppo.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/dqn.py"]}
224
jeespinozam/bomberman-ai
refs/heads/master
/plugins/SerpentBombermanGameAgentPlugin/files/serpent_Bomberman_game_agent.py
# import time # import os # import pickle # import serpent.cv # # import numpy as np # import collections # # from datetime import datetime # # # from serpent.frame_transformer import FrameTransformer # from serpent.frame_grabber import FrameGrabber # from serpent.game_agent import GameAgent # from serpen...
{"/plugins/SerpentBombermanGameAgentPlugin/files/serpent_Bomberman_game_agent.py": ["/plugins/SerpentBombermanGameAgentPlugin/files/helpers/game_status.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/ppo.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/dqn.py"]}
225
jeespinozam/bomberman-ai
refs/heads/master
/plugins/SerpentBombermanGameAgentPlugin/files/helpers/dqn.py
import json import sys import random import os import numpy as np from collections import deque from keras.models import Sequential from keras.layers import * from keras.optimizers import * class KerasAgent: def __init__(self, shape, action_size): self.weight_backup = "bombergirl_weight.model" ...
{"/plugins/SerpentBombermanGameAgentPlugin/files/serpent_Bomberman_game_agent.py": ["/plugins/SerpentBombermanGameAgentPlugin/files/helpers/game_status.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/ppo.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/dqn.py"]}
226
jeespinozam/bomberman-ai
refs/heads/master
/plugins/SerpentBombermanGamePlugin/files/serpent_Bomberman_game.py
from serpent.game import Game from .api.api import BombermanAPI from serpent.utilities import Singleton from serpent.game_launchers.web_browser_game_launcher import WebBrowser class SerpentBombermanGame(Game, metaclass=Singleton): def __init__(self, **kwargs): kwargs["platform"] = "web_browser" kwargs["wind...
{"/plugins/SerpentBombermanGameAgentPlugin/files/serpent_Bomberman_game_agent.py": ["/plugins/SerpentBombermanGameAgentPlugin/files/helpers/game_status.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/ppo.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/dqn.py"]}
227
jeespinozam/bomberman-ai
refs/heads/master
/plugins/SerpentBombermanGameAgentPlugin/files/helpers/game_status.py
#from .memreader import MemoryReader import time class Game: enemies = [] #{x,y} bombs = [] #{x,y} bonus = [] girl = {"x": 0, "y": 0} start_time = 0 time = 0 game_inputs = { 0: "MoveUp", 1: "MoveDown", 2: "MoveLeft", 3: "MoveRight", 4: "LeaveBomb", ...
{"/plugins/SerpentBombermanGameAgentPlugin/files/serpent_Bomberman_game_agent.py": ["/plugins/SerpentBombermanGameAgentPlugin/files/helpers/game_status.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/ppo.py", "/plugins/SerpentBombermanGameAgentPlugin/files/helpers/dqn.py"]}
230
martkins/images_exif_viewer
refs/heads/master
/labelmodel.py
from kivy.uix.button import Button from kivy.uix.label import Label from kivy.lang import Builder from kivy.event import EventDispatcher class LabelModel(Label): def __init__(self, **kwargs): super(Label, self).__init__(**kwargs)
{"/main.py": ["/imagemodel.py", "/buttonmodel.py", "/labelmodel.py"]}
231
martkins/images_exif_viewer
refs/heads/master
/imagemodel.py
from kivy.uix.image import Image from kivy.properties import NumericProperty class ImageModel(Image): ang = NumericProperty() def __init__(self, **kwargs): super(Image, self).__init__(**kwargs) def rotate_right(self): self.ang += 90 def rotate_left(self): self.ang -= 90 ...
{"/main.py": ["/imagemodel.py", "/buttonmodel.py", "/labelmodel.py"]}
232
martkins/images_exif_viewer
refs/heads/master
/main.py
from kivy.app import App from kivy.uix.image import Image from kivy.properties import ObjectProperty from kivy.uix.listview import ListView, SimpleListAdapter from kivy.uix.label import Label from imagemodel import ImageModel from kivy.uix.button import Button from kivy.factory import Factory from buttonmodel import Bu...
{"/main.py": ["/imagemodel.py", "/buttonmodel.py", "/labelmodel.py"]}
233
martkins/images_exif_viewer
refs/heads/master
/buttonmodel.py
import exifread from kivy.uix.button import Button from kivy.lang import Builder from tkinter.filedialog import askopenfilenames from kivy.properties import DictProperty, ListProperty, NumericProperty import webbrowser from tkinter import Tk root = Tk() root.withdraw() Builder.load_file('./actionbutton.kv') def _con...
{"/main.py": ["/imagemodel.py", "/buttonmodel.py", "/labelmodel.py"]}
234
aejontargaryen/conceal-bot
refs/heads/master
/poolSetup.py
import requests import json import time from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from poolModels import pool, poolBase engine = create_engine('sqlite:///poolData.db') # Bind the engine to the metadata of the Base class so that the # declaratives can be accessed through a DBSessio...
{"/bot.py": ["/utils.py"]}
235
aejontargaryen/conceal-bot
refs/heads/master
/utils.py
import random import requests import sys import discord import binascii import json from collections import deque from jsonrpc_requests import Server from models import Transaction, TipJar config = json.load(open('config.json')) class CCXServer(Server): def dumps(self, data): data['password'] = config['r...
{"/bot.py": ["/utils.py"]}
236
aejontargaryen/conceal-bot
refs/heads/master
/bot.py
import asyncio import discord from discord.ext.commands import Bot, Context import requests from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from poolModels import pool, poolBase from models import Wallet, TipJar, Base, Transaction from utils import config, format_hash, gen_paymentid, rpc...
{"/bot.py": ["/utils.py"]}
237
CENSOREDd/test_fk
refs/heads/master
/fk.py
#!/usr/bin/python3 from time import sleep print("what the fuck???") if __name__ == "__main__": print("here is python code!!!") print("Executing code...") sleep(2)
{"/test.py": ["/fk.py"]}
238
CENSOREDd/test_fk
refs/heads/master
/test.py
#!/usr/bin/python3 import fk print("here is test")
{"/test.py": ["/fk.py"]}
239
ericfourrier/auto-clean
refs/heads/develop
/autoc/utils/corrplot.py
import seaborn as sns import matplotlib.pyplot as plt def plot_corrmatrix(df, square=True, linewidths=0.1, annot=True, size=None, figsize=(12, 9), *args, **kwargs): """ Plot correlation matrix of the dataset see doc at https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.he...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
240
ericfourrier/auto-clean
refs/heads/develop
/setup.py
from setuptools import setup, find_packages def readme(): with open('README.md') as f: return f.read() setup(name='autoc', version="0.1", description='autoc is a package for data cleaning exploration and modelling in pandas', long_description=readme(), author=['Eric Fourrier'], ...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
241
ericfourrier/auto-clean
refs/heads/develop
/autoc/utils/getdata.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: efourrier Purpose : Get data from https://github.com/ericfourrier/autoc-datasets """ import pandas as pd def get_dataset(name, *args, **kwargs): """Get a dataset from the online repo https://github.com/ericfourrier/autoc-datasets (requires internet...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
242
ericfourrier/auto-clean
refs/heads/develop
/test.py
# -*- coding: utf-8 -*- """ @author: efourrier Purpose : Automated test suites with unittest run "python -m unittest -v test" in the module directory to run the tests The clock decorator in utils will measure the run time of the test """ ######################################################### # Import Packages an...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
243
ericfourrier/auto-clean
refs/heads/develop
/autoc/naimputer.py
from autoc.explorer import DataExploration, pd from autoc.utils.helpers import cserie import seaborn as sns import matplotlib.pyplot as plt #from autoc.utils.helpers import cached_property from autoc.utils.corrplot import plot_corrmatrix import numpy as np from scipy.stats import ttest_ind from scipy.stats.mstats impor...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
244
ericfourrier/auto-clean
refs/heads/develop
/autoc/exceptions.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: efourrier Purpose : File with all custom exceptions """ class NotNumericColumn(Exception): """ The column should be numeric """ pass class NumericError(Exception): """ The column should not be numeric """ pass # class NotFactor
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
245
ericfourrier/auto-clean
refs/heads/develop
/autoc/__init__.py
__all__ = ["explorer", "naimputer"] from .explorer import DataExploration from .naimputer import NaImputer from .preprocess import PreProcessor from .utils.getdata import get_dataset # from .preprocess import PreProcessor
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
246
ericfourrier/auto-clean
refs/heads/develop
/autoc/explorer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: efourrier Purpose : This is a framework for Modeling with pandas, numpy and skicit-learn. The Goal of this module is to rely on a dataframe structure for modelling g """ ######################################################### # Import modules and global h...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
247
ericfourrier/auto-clean
refs/heads/develop
/autoc/outliersdetection.py
""" @author: efourrier Purpose : This is a simple experimental class to detect outliers. This class can be used to detect missing values encoded as outlier (-999, -1, ...) """ from autoc.explorer import DataExploration, pd import numpy as np #from autoc.utils.helpers import cserie from exceptions import NotNumericC...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
248
ericfourrier/auto-clean
refs/heads/develop
/autoc/preprocess.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: efourrier Purpose : The purpose of this class is too automaticely transfrom a DataFrame into a numpy ndarray in order to use an aglorithm """ ######################################################### # Import modules and global helpers #####################...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
249
ericfourrier/auto-clean
refs/heads/develop
/autoc/utils/helpers.py
# -*- coding: utf-8 -*- """ @author: efourrier Purpose : Create toolbox functions to use for the different pieces of code ot the package """ from numpy.random import normal from numpy.random import choice import time import pandas as pd import numpy as np import functools def print_section(section_name, width=120):...
{"/test.py": ["/autoc/utils/helpers.py", "/autoc/utils/getdata.py", "/autoc/explorer.py", "/autoc/naimputer.py", "/autoc/outliersdetection.py"], "/autoc/naimputer.py": ["/autoc/explorer.py", "/autoc/utils/helpers.py", "/autoc/utils/corrplot.py"], "/autoc/__init__.py": ["/autoc/explorer.py", "/autoc/naimputer.py", "/aut...
281
lukemadera/ml-learning
refs/heads/master
/breakout_ai_a2c.py
import numpy as np import os import random import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.autograd as autograd # Implementing a function to make sure the models share the same gradient # def ensure_shared_grads(model, shared_model): # for param, shared_p...
{"/breakout_run_train.py": ["/breakout_ai_a2c.py", "/date_time.py", "/number.py"]}
282
lukemadera/ml-learning
refs/heads/master
/number.py
# Decimal is causing rounding errors? E.g. 1/3 is 3.333333333334 and 1/3 of 30 is 9.9999999999990 # We want to keep precision at a max, but don't increase precision for numbers that start as less. # For example, change 33.33333333333334 to 33.33333333 and keep 1 as 1 (not 1.0000000001) from decimal import * # decimal...
{"/breakout_run_train.py": ["/breakout_ai_a2c.py", "/date_time.py", "/number.py"]}
283
lukemadera/ml-learning
refs/heads/master
/breakout_run_train.py
import gym import logging import numpy as np import torch import time import breakout_ai_a2c as ai_a2c import date_time import number from subproc_vec_env import SubprocVecEnv from atari_wrappers import make_atari, wrap_deepmind, Monitor def updateState(obs, state, nc): # Do frame-stacking here instead of the Fra...
{"/breakout_run_train.py": ["/breakout_ai_a2c.py", "/date_time.py", "/number.py"]}
284
lukemadera/ml-learning
refs/heads/master
/date_time.py
import datetime import dateutil.parser import dateparser import math import pytz def now(tz = 'UTC', microseconds = False): # return pytz.utc.localize(datetime.datetime.utcnow()) dt = datetime.datetime.now(pytz.timezone(tz)) if not microseconds: dt = dt.replace(microsecond = 0) return dt def n...
{"/breakout_run_train.py": ["/breakout_ai_a2c.py", "/date_time.py", "/number.py"]}
285
lukemadera/ml-learning
refs/heads/master
/lodash.py
import copy import random def findIndex(array1, key, value): return find_index(array1, key, value) def find_index(array1, key, value): for index, arr_item in enumerate(array1): if key in arr_item and arr_item[key] == value: return index return -1 def extend_object(default, new): f...
{"/breakout_run_train.py": ["/breakout_ai_a2c.py", "/date_time.py", "/number.py"]}
311
Sssssbo/SDCNet
refs/heads/master
/infer_SDCNet.py
import numpy as np import os import torch import torch.nn.functional as F from PIL import Image from torch.autograd import Variable from torchvision import transforms from torch.utils.data import DataLoader import matplotlib.pyplot as plt import pandas as pd from tqdm import tqdm from misc import check_mkdir, AvgMete...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
312
Sssssbo/SDCNet
refs/heads/master
/resnext/__init__.py
from .resnext101 import ResNeXt101
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
313
Sssssbo/SDCNet
refs/heads/master
/misc.py
import numpy as np import os import pylab as pl #import pydensecrf.densecrf as dcrf class AvgMeter(object): def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 def update(self, val, n=1): self.val = val ...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
314
Sssssbo/SDCNet
refs/heads/master
/resnet/__init__.py
from .make_model import ResNet50, ResNet50_BIN, ResNet50_LowIN
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
315
Sssssbo/SDCNet
refs/heads/master
/resnet/make_model.py
from .resnet import ResNet, BasicBlock, Bottleneck import torch from torch import nn from .config import resnet50_path model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://downlo...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
316
Sssssbo/SDCNet
refs/heads/master
/datasets.py
import os import os.path import torch.utils.data as data from PIL import Image class ImageFolder_joint(data.Dataset): # image and gt should be in the same folder and have same filename except extended name (jpg and png respectively) def __init__(self, label_list, joint_transform=None, transform=None, target_...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
317
Sssssbo/SDCNet
refs/heads/master
/model/make_model.py
import torch import torch.nn as nn from .backbones.resnet import ResNet, Comb_ResNet, Pure_ResNet, Jointin_ResNet, Jointout_ResNet, BasicBlock, Bottleneck, GDN_Bottleneck, IN_Bottleneck, IN2_Bottleneck, SNR_Bottleneck, SNR2_Bottleneck, SNR3_Bottleneck from loss.arcface import ArcFace from .backbones.resnet_ibn_a import...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
318
Sssssbo/SDCNet
refs/heads/master
/resnet/config.py
resnet50_path = './resnet/resnet50-19c8e357.pth'
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
319
Sssssbo/SDCNet
refs/heads/master
/model.py
import torch import torch.nn.functional as F from torch import nn from resnext import ResNeXt101 class R3Net(nn.Module): def __init__(self): super(R3Net, self).__init__() res50 = ResNeXt101() self.layer0 = res50.layer0 self.layer1 = res50.layer1 self.layer2 = res50.layer2 ...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
320
Sssssbo/SDCNet
refs/heads/master
/create_free.py
import numpy as np import os import torch from PIL import Image from torch.autograd import Variable from torchvision import transforms from torch.utils.data import DataLoader import matplotlib.pyplot as plt import pandas as pd from tqdm import tqdm import cv2 import numpy as np from config import ecssd_path, hkuis_pa...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
321
Sssssbo/SDCNet
refs/heads/master
/count_dataset.py
import numpy as np import os import torch from PIL import Image from torch.autograd import Variable from torchvision import transforms from torch.utils.data import DataLoader import matplotlib.pyplot as plt import pandas as pd from tqdm import tqdm path_list = ['msra10k', 'ECSSD', 'DUT-OMROM', 'DUTS-TR', 'DUTS-TE', '...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
322
Sssssbo/SDCNet
refs/heads/master
/SDCNet.py
import datetime import os import time import torch from torch import nn from torch import optim from torch.autograd import Variable from torch.utils.data import DataLoader from torchvision import transforms import pandas as pd import numpy as np import joint_transforms from config import msra10k_path, MTDD_train_path...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
323
Sssssbo/SDCNet
refs/heads/master
/model/backbones/resnet.py
import math import torch from torch import nn def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) class BasicBlock(nn.Module): expansion = 1 def __init__(s...
{"/infer_SDCNet.py": ["/misc.py", "/datasets.py", "/model.py"], "/resnet/__init__.py": ["/resnet/make_model.py"], "/resnet/make_model.py": ["/resnet/config.py"], "/model/make_model.py": ["/model/backbones/resnet.py"], "/model.py": ["/resnext/__init__.py"], "/create_free.py": ["/misc.py", "/datasets.py", "/model.py"], "...
326
lukasld/Flask-Video-Editor
refs/heads/main
/app/api/videoApi.py
import os from flask import Flask, request, redirect, \ url_for, session, jsonify, send_from_directory, make_response, send_file from . import api from . import utils from .. import VIDEO_UPLOAD_PATH, FRAMES_UPLOAD_PATH, IMG_EXTENSION, VIDEO_EXTENSION, CACHE from . VideoProcessing import Frame, Vide...
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
327
lukasld/Flask-Video-Editor
refs/heads/main
/app/docs/__init__.py
from flask_swagger_ui import get_swaggerui_blueprint swagger_ui = get_swaggerui_blueprint( '/docs', '/static/swagger.json', config={ "app_name": "videoApi" } )
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
328
lukasld/Flask-Video-Editor
refs/heads/main
/app/api/__init__.py
from flask import Blueprint api = Blueprint('videoApi', __name__) from . import videoApi, errors, help
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
329
lukasld/Flask-Video-Editor
refs/heads/main
/app/main/errors.py
from flask import redirect, url_for, jsonify from . import main @main.app_errorhandler(404) def page_not_found(e): return jsonify(error=str(e)), 404 @main.app_errorhandler(405) def method_not_allowed(e): return jsonify(error=str(e)), 405
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
330
lukasld/Flask-Video-Editor
refs/heads/main
/app/api/decorators.py
from flask import request, jsonify from functools import wraps from .errors import InvalidAPIUsage, InvalidFilterParams, IncorrectVideoFormat """ Almost like an Architect - makes decorations """ def decorator_maker(func): def param_decorator(fn=None, does_return=None, req_c_type=None, req_type=None, arg=Non...
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
331
lukasld/Flask-Video-Editor
refs/heads/main
/app/api/utils.py
import cv2 import math import string import random import numpy as np import skvideo.io from PIL import Image from .. import VIDEO_EXTENSION, VIDEO_UPLOAD_PATH, \ FRAMES_UPLOAD_PATH, IMG_EXTENSION, CACHE FPS = 23.98 SK_CODEC = 'libx264' def create_vid_path(name): return f'{VIDEO_UPLOAD_PATH}/{na...
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
332
lukasld/Flask-Video-Editor
refs/heads/main
/config.py
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ """ SECRET_KEY = os.environ.get('SECRET_KEY') FLASK_CONFIG = os.environ.get('FLASK_CONFIG') VIDEO_EXTENSION = os.environ.get('VIDEO_EXTENSION') VIDEO_WIDTH = os.environ.get('VIDEO_WIDTH') VIDEO_HEIGHT = os.e...
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
333
lukasld/Flask-Video-Editor
refs/heads/main
/app/api/VideoProcessing.py
from werkzeug.utils import secure_filename from functools import partial import subprocess as sp import time import skvideo.io import numpy as np import threading import ffmpeg import shlex import cv2 import re from PIL import Image from werkzeug.datastructures import FileStorage as FStorage from .. import VIDEO_EXT...
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
334
lukasld/Flask-Video-Editor
refs/heads/main
/app/api/help.py
from flask import jsonify, request, send_from_directory from . decorators import parameter_check from . import api from ..import HELP_MSG_PATH import json AV_EP = ["upload", "preview", "download", "stats", "filters"] AV_FILTERS = ["canny", "greyscale", "laplacian", "gauss"] @api.route('/help/', methods=['GET']) @api....
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
335
lukasld/Flask-Video-Editor
refs/heads/main
/app/__init__.py
from flask import Flask from config import config from flask_caching import Cache from flask_swagger_ui import get_swaggerui_blueprint VIDEO_EXTENSION=None VIDEO_WIDTH=None VIDEO_HEIGHT=None VIDEO_UPLOAD_PATH=None FRAMES_UPLOAD_PATH=None IMG_EXTENSION=None HELP_MSG_PATH=None CACHE=None def create_app(config_nam...
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...
336
lukasld/Flask-Video-Editor
refs/heads/main
/app/api/errors.py
import sys import traceback from flask import jsonify, request from . import api class InvalidAPIUsage(Exception): status_code = 400 def __init__(self, message='', status_code=None): super().__init__() self.message = message self.path = request.path if status_code is None: ...
{"/app/api/videoApi.py": ["/app/api/__init__.py", "/app/__init__.py", "/app/api/VideoProcessing.py", "/app/api/decorators.py", "/app/api/errors.py"], "/app/api/decorators.py": ["/app/api/errors.py"], "/app/api/utils.py": ["/app/__init__.py"], "/app/api/VideoProcessing.py": ["/app/__init__.py", "/app/api/__init__.py", "...