index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
93,878 | 3-Rider/Investment-Pandas- | refs/heads/master | /examples.py | import dataModule
import returnClasses as rc
import date_functions as dtf
fund = 'Fund' # string
benchmark = 'BM' # string
rf_rate = 'RF'
date = 'lastMonthEnd'
# below creates a ReturnFrame with data
rdf = dataModule.get_data()
print('rdf data type: {}'.format(type(rdf)))
print()
print(rdf.head())
p... | {"/returnClasses.py": ["/date_functions.py"], "/dataModule.py": ["/returnClasses.py", "/date_functions.py"], "/examples.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"], "/main.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"]} |
93,879 | 3-Rider/Investment-Pandas- | refs/heads/master | /main.py | import dataModule
import returnClasses as rc
import date_functions as dtf
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import openpyxl
""""this module creates all output tables and graph and exports this to an excel file. Most arguments are shared by the
functions below, they are... | {"/returnClasses.py": ["/date_functions.py"], "/dataModule.py": ["/returnClasses.py", "/date_functions.py"], "/examples.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"], "/main.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"]} |
93,891 | sbremner/NextStep | refs/heads/master | /nextstep/modules/file.py | import os
import shlex
import psutil
import getpass
import argparse
import pathlib
from datetime import datetime
from nextstep.core.utils import rebuild_cmdline
from nextstep.core.module import Module
from nextstep.core.logging import make_event, write_event
class CreateFile(Module):
def __init__... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,892 | sbremner/NextStep | refs/heads/master | /nextstep/modules/network.py | import socket
import psutil
import getpass
import argparse
from datetime import datetime
from nextstep.core.utils import rebuild_cmdline
from nextstep.core.module import Module
from nextstep.core.logging import make_event, write_event
class NetworkConnection(Module):
def __init__(self, *args, **kwa... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,893 | sbremner/NextStep | refs/heads/master | /settings.py | LOG_FILE = "trace.log" | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,894 | sbremner/NextStep | refs/heads/master | /nextstep/modules/__init__.py | from nextstep.core.errors import ModuleNameError
from .process import StartProcess
from .file import (
CreateFile, ModifyFile, DeleteFile,
)
from .network import NetworkConnection
# Available modules
# TODO: Allow this dictionary to dynamically load from configured locations
MODULES = {
'process.st... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,895 | sbremner/NextStep | refs/heads/master | /nextstep/core/logging.py | import json
from settings import LOG_FILE
# TODO: Maybe use a custom logger for write_event?
# import logging
# logger = logging.getLogger("NextStep")
def make_event(**kwargs):
# Just return it as a dictionary for now
return kwargs
def write_event(evt):
# Just dump it to stdout for now
... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,896 | sbremner/NextStep | refs/heads/master | /nextstep/core/module.py | class Module(object):
""" Base module class used to implement new modules
for the tool. Inherit this class and override the
run and get_parser method to expose a new module.
"""
def __init__(self, *args, **kwargs):
pass
def run(self, *args, **kwargs):
""" Overri... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,897 | sbremner/NextStep | refs/heads/master | /nextstep/modules/process.py | import os
import shlex
import getpass
import argparse
import subprocess
from pathlib import Path
from datetime import datetime
from nextstep.core.module import Module
from nextstep.core.logging import make_event, write_event
class StartProcess(Module):
def __init__(self, *args, **kwargs):
... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,898 | sbremner/NextStep | refs/heads/master | /nextstep/core/errors.py | class NextStepException(Exception):
pass
class ModuleNameError(NextStepException):
pass | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,899 | sbremner/NextStep | refs/heads/master | /nextstep/core/utils_test.py | import unittest
from nextstep.core.utils import rebuild_cmdline
class UtilsTests(unittest.TestCase):
def test_rebuild_cmdline(self):
self.assertEqual(
rebuild_cmdline(['/c', '--input', 'filename with spaces.exe']),
'/c --input "filename with spaces.exe"'
)
... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,900 | sbremner/NextStep | refs/heads/master | /nextstep/core/utils.py | def rebuild_cmdline(parts):
""" VERY naive rebuilding of command line
TODO: Update this to be more robust with escaping values.
Could use shlex.quote but it only works properly for linux CLI
"""
if not isinstance(parts, (list,tuple)):
raise ValueError("parts must be a list o... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,901 | sbremner/NextStep | refs/heads/master | /main.py | import sys
import json
import logging
import inspect
import argparse
import settings
from nextstep.core.errors import ModuleNameError
from nextstep.modules.process import StartProcess
from nextstep.modules import load_module, get_modules
# Use logging module for "printing" info while we run the tool
l... | {"/nextstep/modules/file.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/network.py": ["/nextstep/core/utils.py", "/nextstep/core/module.py", "/nextstep/core/logging.py"], "/nextstep/modules/__init__.py": ["/nextstep/core/errors.py", "/nextstep/modules/proce... |
93,907 | jjvega86/RPSLS_Python | refs/heads/master | /human.py | from player import Player
class Human(Player):
def __init__(self, name):
super().__init__(name)
self.name = name
def choose_gesture(self):
self.print_gesture_options()
user_choice = input("Please choose your gesture!")
int_choice = int(user_choice)
return self.... | {"/human.py": ["/player.py"], "/computer.py": ["/player.py"], "/game.py": ["/human.py", "/computer.py"], "/player.py": ["/gesture.py"]} |
93,908 | jjvega86/RPSLS_Python | refs/heads/master | /gesture.py | class Gesture:
def __init__(self):
self.name = ''
self.loses_to = {}
class Lizard(Gesture):
def __init__(self):
self.name = 'lizard'
self.loses_to = {'rock', 'scissors'}
class Paper(Gesture):
def __init__(self):
self.name = 'paper'
self.loses_to = {'scisso... | {"/human.py": ["/player.py"], "/computer.py": ["/player.py"], "/game.py": ["/human.py", "/computer.py"], "/player.py": ["/gesture.py"]} |
93,909 | jjvega86/RPSLS_Python | refs/heads/master | /computer.py | from player import Player
import random
class Computer(Player):
def __init__(self, name):
super().__init__(name)
def choose_gesture(self):
return random.choice(self.gestures)
| {"/human.py": ["/player.py"], "/computer.py": ["/player.py"], "/game.py": ["/human.py", "/computer.py"], "/player.py": ["/gesture.py"]} |
93,910 | jjvega86/RPSLS_Python | refs/heads/master | /game.py | from human import Human
from computer import Computer
class Game:
def __init__(self):
self.player_one = Human(input("What is your name?"))
self.player_two = None # Setting Player 2 equal to None, equivalent of no value. Will determine
# using choose_game_type
def choose_game_type(sel... | {"/human.py": ["/player.py"], "/computer.py": ["/player.py"], "/game.py": ["/human.py", "/computer.py"], "/player.py": ["/gesture.py"]} |
93,911 | jjvega86/RPSLS_Python | refs/heads/master | /player.py | from gesture import Rock, Paper, Scissors, Lizard, Spock
class Player:
def __init__(self, name):
self.gestures = (Rock(), Paper(), Scissors(), Lizard(), Spock())
self.current_score = 0
self.name = ''
def choose_gesture(self):
pass
def print_gesture_options(self):
... | {"/human.py": ["/player.py"], "/computer.py": ["/player.py"], "/game.py": ["/human.py", "/computer.py"], "/player.py": ["/gesture.py"]} |
93,912 | kuboko-jp/FindPetMe | refs/heads/main | /ai/utils/model.py | import torch.nn as nn
import torch
from torchvision import models
import numpy as np
import cv2
class CustomModel(nn.Module):
def __init__(self):
super().__init__()
self.segment_model = models.segmentation.fcn_resnet50(pretrained=True)
sem_classes = [
'__background__', 'aeropl... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,913 | kuboko-jp/FindPetMe | refs/heads/main | /web/form/searchPet.py | import flask_wtf
from wtforms import StringField, SubmitField, validators, IntegerField, FileField, TextAreaField
class SearchPetForm(flask_wtf.FlaskForm):
features_description = TextAreaField(
'features_description',
[validators.DataRequired("必須項目"),
validators.Length(-1, 400, "最大200文字"... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,914 | kuboko-jp/FindPetMe | refs/heads/main | /web/form/memberInfo.py | import flask_wtf
from wtforms import StringField, SubmitField, validators, PasswordField
class MemberInfoForm(flask_wtf.FlaskForm):
user_nickname = StringField(
'user_nickname',
[validators.DataRequired("必須項目"),
validators.Length(-1, 10, "確認してください(最大10文字)")],
)
user_fname = Stri... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,915 | kuboko-jp/FindPetMe | refs/heads/main | /web/form/myPage.py | import flask_wtf
from wtforms import SubmitField, HiddenField
class MyPageForm(flask_wtf.FlaskForm):
pet_id = HiddenField("pet_id")
lost = SubmitField("迷子")
class MyPageDelForm(flask_wtf.FlaskForm):
thread_id = HiddenField("thread_id")
delete = SubmitField("削除")
| {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,916 | kuboko-jp/FindPetMe | refs/heads/main | /web/form/thread.py | import flask_wtf
from wtforms import SubmitField, validators, FileField, TextAreaField, SelectField
class ThreadForm(flask_wtf.FlaskForm):
message = TextAreaField(
'message'
)
img = FileField('img')
pet_id = SelectField('pet_id', [], choices=[]) # ペットの名前選択
sub = SubmitField("登録")
| {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,917 | kuboko-jp/FindPetMe | refs/heads/main | /web/form/__init__.py | from web.form.memberInfo import MemberInfoForm
from web.form.searchPet import SearchPetForm
from web.form.logIn import LogInForm
from web.form.petInfo import PetInfoForm
from web.form.thread import ThreadForm
from web.form.myPage import MyPageForm, MyPageDelForm
from web.form.memberInfoFix import MemberInfoFixForm
| {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,918 | kuboko-jp/FindPetMe | refs/heads/main | /ai/utils/calc_sim.py | import numpy as np
def get_cos_sim(v1, v2):
"""
画像から出力した2つのベクトルからコサイン類似度を計算するメソッド
Parameters
----------
v1 : list or numpy
1つめのベクトル
v2 : list or numpy
2つめのベクトル
"""
v1 = np.array(v1)
v2 = np.array(v2)
return np.dot(v1, v2) / (np.linalg.norm(v1) * np.linalg.norm(v... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,919 | kuboko-jp/FindPetMe | refs/heads/main | /ai/api.py | import io
import json
from PIL import Image
from flask import Flask, jsonify, request
import hashlib
import yaml
import torch
from torchvision import models
import torchvision.transforms as transforms
from ai.utils.model import CustomModel
import os
from waitress import serve
app = Flask(__name__)
@app.route('/'... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,920 | kuboko-jp/FindPetMe | refs/heads/main | /ai/dog_vector.py | import torch
from torch.utils.data import DataLoader
import pandas as pd
import numpy as np
from tqdm import tqdm
import os
from utils.config import get_config, seed_torch
from utils.dataset import CustomDataset
from utils.model import CustomModel
class DogVector:
"""
画像のパスとベクトルの出力先を指定すると、
出力先のディレクトリにベク... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,921 | kuboko-jp/FindPetMe | refs/heads/main | /ai/utils/config.py | from box import Box
import os
import torch
import numpy as np
import random
def get_config():
config = {
'input':{
'image_dir':'./input/kaggle_dogs'
},
'plot':'./plot',
'seed':0,
"transforms":{
"size":(512, 512),
"mean":(0.485, 0.456, 0.4... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,922 | kuboko-jp/FindPetMe | refs/heads/main | /ai/utils/img_crop.py | from PIL import Image
def crop_center(pil_img, crop_width, crop_height):
img_width, img_height = pil_img.size
return pil_img.crop(((img_width - crop_width) // 2,
(img_height - crop_height) // 2,
(img_width + crop_width) // 2,
(img_heigh... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,923 | kuboko-jp/FindPetMe | refs/heads/main | /web/form/logIn.py | import flask_wtf
from wtforms import StringField, SubmitField, validators, IntegerField, PasswordField
class LogInForm(flask_wtf.FlaskForm):
email = StringField('email',
[validators.DataRequired()])
password = PasswordField(
'password',
[validators.DataRequired()]
... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,924 | kuboko-jp/FindPetMe | refs/heads/main | /web/server.py | from email import message
from flask import render_template, request, redirect, flash, send_from_directory, abort
from sqlalchemy.orm import query
import flask_login
from waitress import serve
from web.form import *
from web.database import *
from werkzeug.utils import secure_filename
import requests
import os
import g... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,925 | kuboko-jp/FindPetMe | refs/heads/main | /web/database.py | from flask import Flask
import flask_login
from flask_sqlalchemy import SQLAlchemy
import yaml
import datetime
from werkzeug.security import generate_password_hash, check_password_hash
with open('./web/secret.yaml') as f: # 設定ファイル
secret = yaml.safe_load(f)
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_U... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,926 | kuboko-jp/FindPetMe | refs/heads/main | /web/form/petInfo.py | import flask_wtf
from wtforms import StringField, SubmitField, validators, IntegerField, FileField, TextAreaField
class PetInfoForm(flask_wtf.FlaskForm):
pet_name = StringField(
'pet_name',
[validators.DataRequired("必須項目"),
validators.Length(-1, 20, "最大20文字")],
)
# 特徴を入力してもらうよ
... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,927 | kuboko-jp/FindPetMe | refs/heads/main | /ai/utils/dataset.py | import torch
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
import os
from PIL import Image
class ImageTransform():
"""
Class for image preprocessing.
Attributes
----------
resize : int
224
mean : (R, G, B)
Average value for each color ... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,928 | kuboko-jp/FindPetMe | refs/heads/main | /web/form/memberInfoFix.py | import flask_wtf
from wtforms import StringField, SubmitField, validators, PasswordField
class MemberInfoFixForm(flask_wtf.FlaskForm):
user_nickname = StringField(
'user_nickname',
[validators.DataRequired("必須項目"),
validators.Length(-1, 10, "確認してください(最大10文字)")],
)
user_fname = S... | {"/web/form/__init__.py": ["/web/form/memberInfo.py", "/web/form/searchPet.py", "/web/form/logIn.py", "/web/form/petInfo.py", "/web/form/thread.py", "/web/form/myPage.py", "/web/form/memberInfoFix.py"], "/ai/api.py": ["/ai/utils/model.py"], "/web/server.py": ["/web/form/__init__.py", "/web/database.py"]} |
93,947 | LZC6244/maida | refs/heads/master | /maida/merge_ts_2_mp4.py | # -*- coding: utf-8 -*-
import os
import shutil
import logging
import subprocess
logging.basicConfig(format='%(asctime)s [%(name)s] %(levelname)s: %(message)s',
level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S')
logger = logging.getLogger(__name__)
def merge_ts_2_mp4(ts_dir, mp4_path, remain_ts=Tru... | {"/maida/__init__.py": ["/maida/mail/__init__.py", "/maida/merge_ts_2_mp4.py"]} |
93,948 | LZC6244/maida | refs/heads/master | /maida/__init__.py | from maida.mail import EmailSender
from maida.merge_ts_2_mp4 import merge_ts_2_mp4
| {"/maida/__init__.py": ["/maida/mail/__init__.py", "/maida/merge_ts_2_mp4.py"]} |
93,949 | LZC6244/maida | refs/heads/master | /maida/mail/__init__.py | # -*- coding: utf-8 -*-
import os
import logging
import smtplib
from typing import Union
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
logging.basicConfig(format='%(asctime)s [%(name)s] %(levelname)s: %(message)s',
level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S... | {"/maida/__init__.py": ["/maida/mail/__init__.py", "/maida/merge_ts_2_mp4.py"]} |
93,950 | LZC6244/maida | refs/heads/master | /maida/ocr/__init__.py | # -*- coding: utf-8 -*-
import logging
import numpy as np
from PIL import Image
from cnocr import CnOcr
logging.basicConfig(format='%(asctime)s [%(name)s] %(levelname)s: %(message)s',
level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S')
logger = logging.getLogger(__name__)
def img_2_cn(img_path, thre... | {"/maida/__init__.py": ["/maida/mail/__init__.py", "/maida/merge_ts_2_mp4.py"]} |
93,954 | truongquanghung/QLSV_DRF | refs/heads/main | /qlsv/myapi/urls.py | from django.urls import path, include
from . import views
from rest_framework_simplejwt import views as jwt_views
from rest_framework_simplejwt.views import (
TokenObtainPairView,
TokenRefreshView,
)
urlpatterns = [
path('rest/', views.StudentListView.as_view(), name='view'),
path('rest/<int:pk>/', vie... | {"/qlsv/myapi/serializers.py": ["/qlsv/myapi/models.py"], "/qlsv/myapi/views.py": ["/qlsv/myapi/models.py", "/qlsv/myapi/serializers.py", "/qlsv/myapi/permissions.py"]} |
93,955 | truongquanghung/QLSV_DRF | refs/heads/main | /qlsv/myapi/migrations/0002_auto_20210521_1838.py | # Generated by Django 3.1.8 on 2021-05-21 11:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('myapi', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='student',
name='sex',
field... | {"/qlsv/myapi/serializers.py": ["/qlsv/myapi/models.py"], "/qlsv/myapi/views.py": ["/qlsv/myapi/models.py", "/qlsv/myapi/serializers.py", "/qlsv/myapi/permissions.py"]} |
93,956 | truongquanghung/QLSV_DRF | refs/heads/main | /qlsv/path/path.py | main='home/main.html' | {"/qlsv/myapi/serializers.py": ["/qlsv/myapi/models.py"], "/qlsv/myapi/views.py": ["/qlsv/myapi/models.py", "/qlsv/myapi/serializers.py", "/qlsv/myapi/permissions.py"]} |
93,957 | truongquanghung/QLSV_DRF | refs/heads/main | /qlsv/myapi/migrations/0001_initial.py | # Generated by Django 3.1.8 on 2021-05-21 08:43
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='student',
fields=[
('id', models.AutoField(... | {"/qlsv/myapi/serializers.py": ["/qlsv/myapi/models.py"], "/qlsv/myapi/views.py": ["/qlsv/myapi/models.py", "/qlsv/myapi/serializers.py", "/qlsv/myapi/permissions.py"]} |
93,958 | truongquanghung/QLSV_DRF | refs/heads/main | /qlsv/myapi/permissions.py | from rest_framework import permissions
class IsAdminOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow owners of an object to edit it.
"""
def has_permission(self, request, view):
# Read permissions are allowed to any request,
# so we'll always allow GET, HEAD ... | {"/qlsv/myapi/serializers.py": ["/qlsv/myapi/models.py"], "/qlsv/myapi/views.py": ["/qlsv/myapi/models.py", "/qlsv/myapi/serializers.py", "/qlsv/myapi/permissions.py"]} |
93,959 | truongquanghung/QLSV_DRF | refs/heads/main | /qlsv/myapi/serializers.py | from rest_framework import serializers
from .models import student
class StudentSerializer(serializers.ModelSerializer):
class Meta:
model = student
fields = ('id', 'mssv', 'name', 'sex', 'faculty')
from django.contrib.auth.models import User
class UserSerializer(serializers.ModelSerializer):
... | {"/qlsv/myapi/serializers.py": ["/qlsv/myapi/models.py"], "/qlsv/myapi/views.py": ["/qlsv/myapi/models.py", "/qlsv/myapi/serializers.py", "/qlsv/myapi/permissions.py"]} |
93,960 | truongquanghung/QLSV_DRF | refs/heads/main | /qlsv/myapi/models.py | from django.db import models
# Create your models here.
class student(models.Model):
GENDER_CHOICES = (('Nam', 'Nam'),('Nữ', 'Nữ'))
mssv = models.CharField(max_length=12)
name = models.CharField(max_length=100)
sex = models.CharField(max_length=5, choices=GENDER_CHOICES)
faculty = models.CharField(... | {"/qlsv/myapi/serializers.py": ["/qlsv/myapi/models.py"], "/qlsv/myapi/views.py": ["/qlsv/myapi/models.py", "/qlsv/myapi/serializers.py", "/qlsv/myapi/permissions.py"]} |
93,961 | truongquanghung/QLSV_DRF | refs/heads/main | /qlsv/myapi/views.py | from django.shortcuts import render, redirect
from rest_framework.response import Response
from .models import student
from django.contrib.auth.models import User
from .serializers import StudentSerializer
from .serializers import UserSerializer
from rest_framework.decorators import api_view
from django.views import V... | {"/qlsv/myapi/serializers.py": ["/qlsv/myapi/models.py"], "/qlsv/myapi/views.py": ["/qlsv/myapi/models.py", "/qlsv/myapi/serializers.py", "/qlsv/myapi/permissions.py"]} |
93,987 | ilhwanh/garden-gnome-carnage-tensorflow | refs/heads/master | /main.py | import ggc
import cv2
import agent
import numpy as np
import time
meta = agent.meta_init()
ag = agent.Agent(meta)
game = ggc.GGC()
cv2.namedWindow('Game')
game.start()
episode = 1
while True:
done = False
obs_prev = np.zeros([meta.screen_height, meta.screen_width, meta.screen_channel])
obs_next = np.zeros([me... | {"/main.py": ["/ggc/__init__.py", "/agent.py"]} |
93,988 | ilhwanh/garden-gnome-carnage-tensorflow | refs/heads/master | /agent.py | import tensorflow as tf
import numpy as np
from argparse import Namespace
def meta_init():
meta = Namespace()
meta.batch_size = 128
meta.batch_length = 256
meta.conv1_dim = 16
meta.conv2_dim = 32
meta.conv3_dim = 64
meta.screen_width = 320
meta.screen_height = 240
meta.screen_channel = 3
meta.inception1_sha... | {"/main.py": ["/ggc/__init__.py", "/agent.py"]} |
93,989 | ilhwanh/garden-gnome-carnage-tensorflow | refs/heads/master | /ggc/__init__.py | import pywinauto
import time
import mss
import os
import scipy.misc
import numpy as np
import win32api
import win32con
import cv2
class GGC:
def __init__(self):
# Start GGC
self.app = pywinauto.Application().start(os.path.join(os.path.dirname(__file__), 'game/ggc.exe'))
print('Loading...')
while not self.... | {"/main.py": ["/ggc/__init__.py", "/agent.py"]} |
93,992 | dangf15/unet_transformer_translation | refs/heads/master | /unet_transformer/__init__.py | from .unet_transformer import (
UNetTransformerEncoder,
UnetTransformerModel,
)
from .unet_transformer_layer import UNetTransformerEncoderLayer
from .unet_transformer_2col import UnetTransformer2ColModel
| {"/unet_transformer/__init__.py": ["/unet_transformer/unet_transformer.py", "/unet_transformer/unet_transformer_layer.py", "/unet_transformer/unet_transformer_2col.py"], "/profiile.py": ["/unet_transformer/__init__.py"], "/unet_transformer/unet_transformer.py": ["/unet_transformer/unet_transformer_layer.py"], "/unet_tr... |
93,993 | dangf15/unet_transformer_translation | refs/heads/master | /profiile.py | import time
import torch
import numpy as np
from fairseq import options, tasks
from unet_transformer import UNetTransformerEncoder
def timeitnow(fn, n_repeats=10):
times = []
for _ in range(n_repeats):
tik = time.time()
fn()
tok = time.time()
times.append(tok - tik)
return... | {"/unet_transformer/__init__.py": ["/unet_transformer/unet_transformer.py", "/unet_transformer/unet_transformer_layer.py", "/unet_transformer/unet_transformer_2col.py"], "/profiile.py": ["/unet_transformer/__init__.py"], "/unet_transformer/unet_transformer.py": ["/unet_transformer/unet_transformer_layer.py"], "/unet_tr... |
93,994 | dangf15/unet_transformer_translation | refs/heads/master | /unet_transformer/unet_transformer_layer.py | from typing import Optional
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from fairseq import utils
from fairseq.modules import (
LayerNorm,
MultiheadAttention,
)
class UNetTransformerEncoderLayer(nn.Module):
"""
Args:
type_: 'up', 'down', 'same'... | {"/unet_transformer/__init__.py": ["/unet_transformer/unet_transformer.py", "/unet_transformer/unet_transformer_layer.py", "/unet_transformer/unet_transformer_2col.py"], "/profiile.py": ["/unet_transformer/__init__.py"], "/unet_transformer/unet_transformer.py": ["/unet_transformer/unet_transformer_layer.py"], "/unet_tr... |
93,995 | dangf15/unet_transformer_translation | refs/heads/master | /unet_transformer/unet_transformer.py | """
UnetTransformerModel is based on fairseq TransformerModel
"""
import math
from typing import Dict, List, Optional, Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from fairseq import utils
from fairseq.modules import (
LayerNorm,
PositionalEmbedding,
)
fr... | {"/unet_transformer/__init__.py": ["/unet_transformer/unet_transformer.py", "/unet_transformer/unet_transformer_layer.py", "/unet_transformer/unet_transformer_2col.py"], "/profiile.py": ["/unet_transformer/__init__.py"], "/unet_transformer/unet_transformer.py": ["/unet_transformer/unet_transformer_layer.py"], "/unet_tr... |
93,996 | dangf15/unet_transformer_translation | refs/heads/master | /unet_transformer/unet_transformer_2col.py | """
UnetTransformerModel with two columns in the encoder: vanilla transformer and U-Net
"""
import math
from typing import Optional
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from fairseq.modules import (
LayerNorm,
PositionalEmbedding,
)
from fairseq.models i... | {"/unet_transformer/__init__.py": ["/unet_transformer/unet_transformer.py", "/unet_transformer/unet_transformer_layer.py", "/unet_transformer/unet_transformer_2col.py"], "/profiile.py": ["/unet_transformer/__init__.py"], "/unet_transformer/unet_transformer.py": ["/unet_transformer/unet_transformer_layer.py"], "/unet_tr... |
94,017 | k-raj-25/bakery-management-app | refs/heads/master | /customer/api/views.py | from rest_framework import generics
from django.shortcuts import get_object_or_404
from rest_framework.response import Response
from rest_framework import status
from customer.api.serializers import *
class BakeryItemListAPIView(generics.ListAPIView):
def get(self, request):
queryset = BakeryItem.objects... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,018 | k-raj-25/bakery-management-app | refs/heads/master | /bakery_management_app/asgi.py | # import os
# import django
# from channels.http import AsgiHandler
# from channels.routing import ProtocolTypeRouter
# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bakery_management_app.settings')
# django.setup()
# application = ProtocolTypeRouter({
# "http": AsgiHandler(),
# # Just HTTP for now. (We can a... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,019 | k-raj-25/bakery-management-app | refs/heads/master | /bakery_admin/api/serializers.py | from rest_framework import serializers
from bakery_admin.models import *
from django.shortcuts import get_object_or_404
import functools
class IngredientCreateSerializer(serializers.ModelSerializer):
class Meta:
model = Ingredient
fields = [
'name',
'desc',
'qt... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,020 | k-raj-25/bakery-management-app | refs/heads/master | /customer/admin.py | # django
from django.contrib import admin
# custom
from customer.models import *
@admin.register(Order)
class OrderAdmin(admin.ModelAdmin):
list_display = ["order_no", "user", "total_price", "date"]
@admin.register(OrderItemMap)
class OrderItemMapAdmin(admin.ModelAdmin):
list_display = ["order", "bakery_it... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,021 | k-raj-25/bakery-management-app | refs/heads/master | /accounts/api/urls.py | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from accounts.api.views import (
LoginAPIView, LogoutAPIView, RegisterAPIView
)
router = DefaultRouter()
urlpatterns = router.urls
urlpatterns.append(path('login/', LoginAPIView.as_view()))
urlpatterns.append(path('logout/', L... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,022 | k-raj-25/bakery-management-app | refs/heads/master | /accounts/api/serializers.py | from rest_framework import serializers
from django.contrib.auth.models import User
from django.contrib.auth.hashers import make_password
from accounts.api.helpers import generate_hashed_password
# user create and update serializer
class UserCreateSerializer(serializers.ModelSerializer):
class Meta:
model ... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,023 | k-raj-25/bakery-management-app | refs/heads/master | /bakery_admin/migrations/0001_initial.py | # Generated by Django 3.1.7 on 2021-09-26 04:44
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,024 | k-raj-25/bakery-management-app | refs/heads/master | /customer/api/serializers.py | from rest_framework import serializers
from bakery_admin.models import BakeryItem
from customer.models import *
from django.shortcuts import get_object_or_404
class BakeryItemListSerializer(serializers.ModelSerializer):
class Meta:
model = BakeryItem
fields = [
'name',
'de... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,025 | k-raj-25/bakery-management-app | refs/heads/master | /bakery_admin/models.py | from django.db import models
from django.contrib.auth.models import User
from django.db.models.deletion import CASCADE
from django.db.models.fields import BooleanField
INGREDIENTS = (
("PCS", "Pieces"),
("KG", "Kilogram"),
("GM", "Gram"),
("Dozen", "Dozen"),
("LTR", "Litre")
)
class Ingredient(mo... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,026 | k-raj-25/bakery-management-app | refs/heads/master | /bakery_admin/api/urls.py | from django.urls import path
from rest_framework.routers import DefaultRouter
from bakery_admin.api.views import *
router = DefaultRouter()
urlpatterns = router.urls
urlpatterns += [
# ingredients
path('ingredient/create/', IngredientCreateAPIView.as_view()),
path('ingredient/update/<int:pk>/', Ingredien... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,027 | k-raj-25/bakery-management-app | refs/heads/master | /bakery_admin/api/views.py | from rest_framework import generics
from django.shortcuts import get_object_or_404
from rest_framework.response import Response
from rest_framework import status
from bakery_admin.api.serializers import *
from rest_framework.permissions import IsAdminUser
# ingerient create view
class IngredientCreateAPIView(generics... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,028 | k-raj-25/bakery-management-app | refs/heads/master | /accounts/api/views.py | from django.contrib.auth import authenticate, login
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework.authtoken.models import Token
from accounts.api.serializers import UserCreateSerializer
# login view
class LoginAPIView(APIVie... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,029 | k-raj-25/bakery-management-app | refs/heads/master | /customer/api/urls.py | from django.urls import path
from rest_framework.routers import DefaultRouter
from customer.api.views import *
router = DefaultRouter()
urlpatterns = router.urls
urlpatterns += [
# bakery item
path('bakery-item/list/', BakeryItemListAPIView.as_view()),
# order
path('order/create/', OrderCreateAPIVie... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,030 | k-raj-25/bakery-management-app | refs/heads/master | /bakery_admin/admin.py | # django
from django.contrib import admin
# custom
from bakery_admin.models import *
@admin.register(Ingredient)
class IngredientAdmin(admin.ModelAdmin):
list_display = ["name", "qty", "cost", "sku", "active"]
@admin.register(BakeryItem)
class BakeryItemAdmin(admin.ModelAdmin):
list_display = ["name", "qty... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,031 | k-raj-25/bakery-management-app | refs/heads/master | /customer/models.py | from bakery_admin.models import BakeryItem
from django.db import models
from django.contrib.auth.models import User
from django.db.models.deletion import CASCADE
from django.db.models.fields import BooleanField
class Order(models.Model):
user = models.ForeignKey(User, on_delete=CASCADE, null=True, blank=True)
... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,032 | k-raj-25/bakery-management-app | refs/heads/master | /accounts/api/helpers.py | from django.contrib.auth.hashers import make_password
from django.contrib.auth.models import User
# function to get salt and hasher for creating hashed password
def generate_hashed_password(password):
first_pass = User.objects.all()[0].password.split('$')
hasher = first_pass[0]
salt = first_pass[1] # gra... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,033 | k-raj-25/bakery-management-app | refs/heads/master | /customer/migrations/0001_initial.py | # Generated by Django 3.1.7 on 2021-09-26 14:21
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('bakery_admin', '0001_initial'),
migrations.swappable_dependency... | {"/customer/api/views.py": ["/customer/api/serializers.py"], "/bakery_admin/api/serializers.py": ["/bakery_admin/models.py"], "/customer/admin.py": ["/customer/models.py"], "/accounts/api/urls.py": ["/accounts/api/views.py"], "/accounts/api/serializers.py": ["/accounts/api/helpers.py"], "/customer/api/serializers.py": ... |
94,047 | youngsend/advanced-lane-lines | refs/heads/master | /main.py | from src.video_processor import *
processor = Pipeline()
img = cv2.imread('test_images/test4.jpg')
results = processor.process(img)
# results = processor.threshold(img)
show_four_images(results)
# v_processor = VideoProcessor()
# # v_processor.process_video('challenge_video.mp4')
# v_processor.process_video()
| {"/main.py": ["/src/video_processor.py"], "/src/video_processor.py": ["/src/pipeline.py"], "/src/pipeline.py": ["/src/camera_calibration.py", "/src/utility.py"]} |
94,048 | youngsend/advanced-lane-lines | refs/heads/master | /src/utility.py | import cv2
import matplotlib.pyplot as plt
def show_two_images(img, dst, left_title='', right_title=''):
f, (ax1, ax2) = plt.subplots(1, 2, figsize=(24, 9))
f.tight_layout()
plot_on_axis(ax1, img, left_title)
plot_on_axis(ax2, dst, right_title)
plt.subplots_adjust(left=0., right=1, top=0.9, bottom... | {"/main.py": ["/src/video_processor.py"], "/src/video_processor.py": ["/src/pipeline.py"], "/src/pipeline.py": ["/src/camera_calibration.py", "/src/utility.py"]} |
94,049 | youngsend/advanced-lane-lines | refs/heads/master | /src/video_processor.py | from moviepy.editor import VideoFileClip
from src.pipeline import *
class VideoProcessor:
def __init__(self):
self.image_pipeline = Pipeline()
self.count = 1
def process_image(self, img, plot_output=False):
# pipeline is processing BGR image
img = cv2.cvtColor(img, cv2.COLOR_R... | {"/main.py": ["/src/video_processor.py"], "/src/video_processor.py": ["/src/pipeline.py"], "/src/pipeline.py": ["/src/camera_calibration.py", "/src/utility.py"]} |
94,050 | youngsend/advanced-lane-lines | refs/heads/master | /src/pipeline.py | from src.camera_calibration import *
from src.utility import *
class Pipeline:
def __init__(self):
# camera calibration
self.camera_calibrator = CameraCalibration('camera_cal/')
# perspective transform
self.img_shape = (720, 1280, 3)
self.perspective_src = np.float32(
... | {"/main.py": ["/src/video_processor.py"], "/src/video_processor.py": ["/src/pipeline.py"], "/src/pipeline.py": ["/src/camera_calibration.py", "/src/utility.py"]} |
94,051 | youngsend/advanced-lane-lines | refs/heads/master | /src/camera_calibration.py | import numpy as np
import cv2
import glob
import os
CORNER_SIZE = (9, 6)
class CameraCalibration:
def __init__(self, rel_cal_img_folder_path):
self.project_path = os.path.abspath(os.curdir)
self.cal_img_names = glob.glob(self.project_path + '/' + rel_cal_img_folder_path + '*.jpg')
self.ob... | {"/main.py": ["/src/video_processor.py"], "/src/video_processor.py": ["/src/pipeline.py"], "/src/pipeline.py": ["/src/camera_calibration.py", "/src/utility.py"]} |
94,052 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/Qt/Menus/SpecificMenus/ConnectionControlsMenuMixin.py | from qtpy import QtCore, QtGui, QtWidgets
from pyphocorehelpers.gui.PhoUIContainer import PhoUIContainer
from pyphoplacecellanalysis.Resources import GuiResources, ActionIcons
from pyphoplacecellanalysis.GUI.Qt.Menus.PhoMenuHelper import PhoMenuHelper
from pyphoplacecellanalysis.GUI.Qt.Menus.BaseMenuProviderMixin impo... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,053 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/Qt/Widgets/PhoCodeConsoleWidget.py | # PhoCodeConsoleWidget
from pyphoplacecellanalysis.External.pyqtgraph.Qt import QtGui, QtCore
from pyphoplacecellanalysis.External.pyqtgraph.console import ConsoleWidget
class PhoCodeConsoleWidget(ConsoleWidget):
"""
Widget displaying console output and accepting command input.
Implements:
... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,054 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/General/Mixins/StylesheetThemingHelpers.py | # For qdarkstyle support:
import qdarkstyle
# For BreezeStylesheets support:
from qtpy import QtWidgets
from qtpy.QtCore import QFile, QTextStream
import pyphoplacecellanalysis.External.breeze_style_sheets.breeze_resources
# set stylesheet:
stylesheet_qss_file = QFile(":/dark/stylesheet.qss")
stylesheet_qss_file.open(Q... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,055 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/Qt/Unused/TriStateButton.py | """
Create a pyqt5 button class that allows tri-state selection.
"""
from PyQt5.QtWidgets import QPushButton
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon
import pyphoplacecellanalysis.External.pyqtgraph as pg
# class TriStateButton(QCheckBox):
# """
# A button that can be in three states:
# ... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,056 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/PyQtPlot/Params/pyqtplot_ParamTreeWidget.py | # required to enable non-blocking interaction:
# from PyQt5.Qt import QApplication
# # start qt event loop
# _instance = QApplication.instance()
# if not _instance:
# _instance = QApplication([])
# app = _instance
import numpy as np
import pyphoplacecellanalysis.External.pyqtgraph as pg
from pyphoplacecellanalysis.... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,057 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/External/breeze_style_sheets/test/ui.py | #!/usr/bin/env python
#
# The MIT License (MIT)
#
# Copyright (c) <2021-Present> <Alex Huszagh>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limita... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,058 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/General/Configs/DynamicConfigs.py | # from pyphoplacecellanalysis.PhoPositionalData.analysis.interactive_placeCell_config import InteractivePlaceCellConfig, PlottingConfig
from pathlib import Path
from pyphocorehelpers.DataStructure.dynamic_parameters import DynamicParameters
# Old class Names: VideoOutputModeConfig, PlottingConfig, InteractivePlaceCel... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,059 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/External/burst-detection-master/lib_final_poisson.py | import numpy as np
import sys
import pickle
import h5py
import copy
import scipy.stats as stat
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
plt.close('all')
plt.ion()
def do_poisson(spikeEvs, minBurstLen=3, maxInBurstLen=10, maxBurstIntStart=0.5, ... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,060 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/External/burst-detection-master/_do_analysis.py | import os, sys
import numpy as np
import h5py, pickle
import matplotlib.pyplot as plt
import matplotlib.patches as patches
plt.ion()
plt.close('all')
from lib_final_ehv import do_ehv
from lib_final_cma import do_cma
from lib_final_poisson import do_poisson
# 07549
# 00594
# 03010
# 03101
# 10319
# 021
# 04
# 05
# ... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,061 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/Qt/PlacefieldVisualSelectionControls/qt_placefield.py | # TODO: Implement the functionality present in panel_placefield.py for the new PlacefieldVisualSelectionWidget Qt widget.
from functools import partial
import numpy as np
import pyphoplacecellanalysis.External.pyqtgraph as pg
from pyphoplacecellanalysis.External.pyqtgraph.Qt import QtCore, QtGui, QtWidgets, mkQApp
f... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,062 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/PyQtPlot/Widgets/Mixins/RenderTimeEpochs/RenderTimeEpoch3DMeshesMixin.py | import pyphoplacecellanalysis
import pyphoplacecellanalysis.External.pyqtgraph as pg
from pyphoplacecellanalysis.External.pyqtgraph.Qt import QtCore, QtGui, QtWidgets
import pyphoplacecellanalysis.External.pyqtgraph.opengl as gl # for 3D raster plot
import numpy as np
from pyphocorehelpers.general_helpers import Orde... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,063 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/General/Pipeline/Stages/DisplayFunctions/DecoderPredictionError.py | import numpy as np
import pandas as pd
from copy import deepcopy
from attrs import define
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider
from matplotlib.patches import FancyArrowPatch, FancyArrow
from matplotlib import patheffects
from neuropy.core import Epoch
from neuropy.utils.dynamic_contain... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,064 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/Qt/Mixins/ComboBoxMixins.py | import numpy as np
class KeysListAccessingMixin:
""" Provides a helper function to get the keys from a variety of different data-types. Used for combo-boxes."""
@classmethod
def get_keys_list(cls, data):
if isinstance(data, dict):
keys = list(data.keys())
elif isinstance(data, l... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,065 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/Pho3D/PyVista/graphs.py | from copy import deepcopy
import numpy as np
import pyvista as pv
"""
TODO: REORGANIZE_PLOTTER_SCRIPTS: PyVista
TODO: Why isn't this a class, or in a standardized format?
Main Function: plot_3d_binned_bars
Used in:
occupancy_plotting_mixins
"""
def build_3d_plot_identifier_name(*args):
return '_'.join(l... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,066 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/PhoPositionalData/plotting/mixins/spikes_mixins.py | from typing import OrderedDict
import numpy as np
import pandas as pd
import pyvista as pv
from pyphoplacecellanalysis.Pho3D.PyVista.spikeAndPositions import build_active_spikes_plot_data_df
from pyphoplacecellanalysis.General.Mixins.SpikesRenderingBaseMixin import SpikeRenderingBaseMixin, SpikesDataframeOwningMixin
... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,067 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/General/DataSeriesToSpatial.py | import numpy as np
import pandas as pd
from pyphocorehelpers.print_helpers import format_seconds_human_readable # for build_minute_x_tick_labels(...)
class DataSeriesToSpatial:
""" Helper functions for building the mapping from temporal events (t, v0, v1, ...) to (X,Y) or (X,Y,Z):
Two of the axes are ar... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,068 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/PyQtPlot/Flowchart/CustomNodes/CustomControlWidgets/ExtendedCheckTable.py | from typing import OrderedDict
import numpy as np
from pyphoplacecellanalysis.External.pyqtgraph.Qt import QtGui, QtCore, QtWidgets
import pyphoplacecellanalysis.External.pyqtgraph as pg
from pyphoplacecellanalysis.External.pyqtgraph.widgets.CheckTable import CheckTable
__all__ = ['ExtendedCheckTable']
# ExtendedChe... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,069 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/External/pyqtgraph/examples/GLBarGraphItem.py | """
This example demonstrates the use of GLBarGraphItem.
"""
import numpy as np
import pyphoplacecellanalysis.External.pyqtgraph as pg
import pyphoplacecellanalysis.External.pyqtgraph.opengl as gl
def build_grid_items(data):
""" builds the pos, size inputs required for gl.GLBarGraphItem(pos, size) from the dat... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,070 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/Qt/Menus/GlobalApplicationMenusMainWindow/Uic_AUTOGEN_GlobalApplicationMenusMainWindow.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'c:\Users\pho\repos\pyPhoPlaceCellAnalysis\src\pyphoplacecellanalysis\GUI\Qt\GlobalApplicationMenus\GlobalApplicationMenusMainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING: Any manual changes made to this file will be ... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,071 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/PyVista/InteractivePlotter/Mixins/LapsVisualizationMixin.py | # LapsVisualizationMixin.py
import numpy as np
import pandas as pd
import pyvista as pv
class LapsVisualizationMixin:
""" Looks like some of this class is independent of the rendering library and some is VTK and PyVista specific """
@staticmethod
def lines_from_points(points):
"""Given an arra... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,072 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /tests/test_zhang_time_binning.py | from copy import deepcopy
import unittest
import numpy as np
import pandas as pd
# import the package
import sys, os
from pathlib import Path
# Add Neuropy to the path as needed
tests_folder = Path(os.path.dirname(__file__))
root_project_folder = tests_folder.parent
try:
import pyphoplacecellanalysis
except Modul... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,073 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/PyQtPlot/Widgets/Mixins/TimeCurves/Render3DTimeCurvesBaseGridMixin.py | import pyphoplacecellanalysis
import pyphoplacecellanalysis.External.pyqtgraph as pg
import pyphoplacecellanalysis.External.pyqtgraph.opengl as gl # for 3D raster plot
class BaseGrid3DTimeCurvesHelper:
""" Adds a grid below the 3D Curves to make it easier to see what neuron they correspond to.
2022-06-07: ... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
94,074 | CommanderPho/pyPhoPlaceCellAnalysis | refs/heads/master | /src/pyphoplacecellanalysis/GUI/Panel/panel_placefield.py | import param
import panel as pn
from panel.viewable import Viewer
from pyphoplacecellanalysis.PhoPositionalData.plotting.mixins.general_plotting_mixins import SingleNeuronPlottingExtended
"""
Primary Function: build_panel_interactive_placefield_visibility_controls(...)
Internally calls build_all_placefield_outpu... | {"/src/pyphoplacecellanalysis/Pho3D/__init__.py": ["/src/pyphoplacecellanalysis/Pho3D/points.py", "/src/pyphoplacecellanalysis/Pho3D/spikes.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.