index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
30,672
ik6cgsg/min-disk-check
refs/heads/main
/main.py
import sys from min_disk_checker import * from point import * if __name__ == '__main__': if len(sys.argv) != 2: print("Usage: /path/to/python3.x main.py <data_file>\n" "data_file format:\n" "\tFirst line - '[int] [int] [int]\\n' - indices of disk edge points from list below\n" ...
{"/main.py": ["/min_disk_checker.py", "/point.py"], "/min_disk_checker.py": ["/point.py"], "/test.py": ["/min_disk_checker.py", "/point.py"]}
30,673
ik6cgsg/min-disk-check
refs/heads/main
/point.py
class PointException(Exception): pass class Point(object): def __init__(self, x: int, y: int): self.x = x self.y = y @staticmethod def create_from_str(string: str): if not string: raise PointException("Wrong string format") try: coords = [int(x)...
{"/main.py": ["/min_disk_checker.py", "/point.py"], "/min_disk_checker.py": ["/point.py"], "/test.py": ["/min_disk_checker.py", "/point.py"]}
30,674
ik6cgsg/min-disk-check
refs/heads/main
/min_disk_checker.py
import numpy from point import * class MinDiskCheckerException(Exception): pass def det3x3(a) -> int: return a[0][0] * (a[1][1] * a[2][2] - a[2][1] * a[1][2]) - \ a[1][0] * (a[0][1] * a[2][2] - a[2][1] * a[0][2]) + \ a[2][0] * (a[0][1] * a[1][2] - a[1][1] * a[0][2]) def det4x4(a) -> ...
{"/main.py": ["/min_disk_checker.py", "/point.py"], "/min_disk_checker.py": ["/point.py"], "/test.py": ["/min_disk_checker.py", "/point.py"]}
30,675
ik6cgsg/min-disk-check
refs/heads/main
/test.py
import unittest from min_disk_checker import * from point import * import warnings class TestMinDiskChecker(unittest.TestCase): def setUp(self) -> None: self.mdc = MinDiskChecker() warnings.filterwarnings("error") def test_min_disk_0_points(self): points = [] coords = [] ...
{"/main.py": ["/min_disk_checker.py", "/point.py"], "/min_disk_checker.py": ["/point.py"], "/test.py": ["/min_disk_checker.py", "/point.py"]}
30,680
Keiichi-Hirano/python-LineBot-ddp
refs/heads/master
/app/models/noanswer.py
""" author : nsuhara <na010210dv@gmail.com> date created : 2019/5/1 python version : 3.7.3 """ import datetime import json import logging from linebot.models.actions import PostbackAction, URIAction from linebot.models.template import ButtonsTemplate, TemplateSendMessage from app.framework.nslinebot.mode...
{"/app/models/__init__.py": ["/app/models/noanswer.py"]}
30,681
Keiichi-Hirano/python-LineBot-ddp
refs/heads/master
/app/processes/ddp.py
""" author : date created : 2019/7/31 python version : 3.7.2 """ import datetime import logging logger = logging.getLogger(__name__) # DMBS DB_answer = '' RDBMS = 'RDBMS使用の必須要件が発生した場合に、RDBMS(Oracle/DB2/PostgreSQL)を使用' MarkLogic = 'MarklogicをDataHUBとして使用' Hadoop = 'Data Aggregation(集計)データの格納を目的にDWHとして...
{"/app/models/__init__.py": ["/app/models/noanswer.py"]}
30,682
Keiichi-Hirano/python-LineBot-ddp
refs/heads/master
/app/models/__init__.py
from .clock_in import ClockIn from .main_menu import MainMenu from .trash import Trash from .ddp import Ddp from .noanswer import noanswer MODELS = { 'main_menu': MainMenu, 'clock_in': ClockIn, # 2019/07/03 add start # DDP条件メニュー 'trash': Trash, 'ddp': Ddp, 'noanswer':noanswer # 2019/07/03 add en...
{"/app/models/__init__.py": ["/app/models/noanswer.py"]}
30,683
Keiichi-Hirano/python-LineBot-ddp
refs/heads/master
/app/processes/noanswer.py
""" author : nsuhara <na010210dv@gmail.com> date created : 2019/5/1 python version : 3.7.3 """ import datetime import logging logger = logging.getLogger(__name__) class Process(object): def __init__(self): pass def DDP_check_process(self,check1,check2,check3,check4,check5): ...
{"/app/models/__init__.py": ["/app/models/noanswer.py"]}
30,684
tungvx/reporting
refs/heads/master
/urls.py
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('reporting.views', # Examples: # url(r'^$', 'report_tool.views.home', name='home'), # url(r'^report_tool/', include(...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,685
tungvx/reporting
refs/heads/master
/generate_from_spreadsheet.py
try: from xml.etree import ElementTree except ImportError: from elementtree import ElementTree try: import gdata import gdata.spreadsheet.service import gdata.service import gdata.spreadsheet import gdata.docs import gdata.docs.data import gdata.docs.client import gdata.docs.service...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,686
tungvx/reporting
refs/heads/master
/admin.py
from reporting.models import Upload from django.contrib import admin class UploadAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['filename']}), (None, {'fields': ['description']}), ('Date information', {'fields': ['upload_time'], 'classes': ['collapse']...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,687
tungvx/reporting
refs/heads/master
/views.py
from time import time, ctime from django.core.files import File import os.path import datetime from django.core import serializers from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotAllowed from django.core.urlresolvers import reverse from django.http.multipartparser import FILE from django.shor...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,688
tungvx/reporting
refs/heads/master
/extract_information.py
import re import xlwt from reporting.models import Upload, Spreadsheet_report import django import definitions try: import sqlite3 import psycopg2 import psycopg2.extras import MySQLdb except : '' try: from report_tool.settings import DATABASE_PATH except : '' #this function is used for e...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,689
tungvx/reporting
refs/heads/master
/definitions.py
try: from report_tool.models import Pupil from django.contrib.admin.models import LogEntry except : '' def get_ds_hs(): return Pupil.objects.all() def get_student_in_class(_class_name): return Pupil.objects.filter(class_id__name = _class_name) def get_admin_log(): return LogEntry.objects.all(...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,690
tungvx/reporting
refs/heads/master
/models.py
# -*- coding: utf-8 -*- import datetime from django.db import models from django import forms class Upload(models.Model): #Upload files table in databases filename = models.CharField(max_length=255) upload_time = models.DateTimeField('time uploaded') description = models.Cha...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,691
tungvx/reporting
refs/heads/master
/tests.py
from django.test import TestCase from reporting.models import Upload, Spreadsheet_report from datetime import datetime from extract_information import get_list_of_object, extract_information from generate_from_spreadsheet import upload_result class SimpleTest(TestCase): def setUp(self): self.upload = Uplo...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,692
tungvx/reporting
refs/heads/master
/report.py
import datetime from django.db import models from django import forms from xlwt.Workbook import Workbook import xlrd,xlwt import re from xlutils.styles import Styles from xlutils.copy import copy #http://pypi.python.org/pypi/xlutils from xlutils.filter import process,XLRDReader,XLWTWriter import operator from itertools...
{"/generate_from_spreadsheet.py": ["/report.py"], "/tests.py": ["/extract_information.py", "/generate_from_spreadsheet.py"], "/report.py": ["/extract_information.py"]}
30,699
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/LBGLCM.py
#importing os module (file handling in os) and pillow module for images import os from PIL import Image #importing the GLCM and LBP module from skimage.feature import greycomatrix, greycoprops, local_binary_pattern #importing numpy and pandas import numpy as np import pandas as pd #function to extract features for a...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,700
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/Final_Results_Window.py
#Importing the GUI module from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog3(object): #Method for setting up the UI def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(699, 745) self.Photo = QtWidgets.QLabel(Dialog) self.Photo.setGeometry(QtCore.QRect(...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,701
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/Training_Result_Window.py
#Impoting the GUI module from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog1(object): #Method for setting up the UI def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(624, 633) self.label = QtWidgets.QLabel(Dialog) self.label.setGeometry(QtCore.QRect(4...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,702
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/Trained_Classifier_Predictions.py
#Importing .py files for GLCM and LBGLCM along with classifier import GLCM_for_single_image, LBGLCM_for_single_image, Classifiers #Importing numpy and keras import numpy as np from keras_preprocessing import image #Extracting Features for single image def extract(selected_classifier, directory_of_image): if 'GLCM...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,703
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/Training_Window.py
#importing modules import os #import GUI modules from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import QSize from PyQt5.QtGui import QIcon, QImage, QPalette, QBrush from PyQt5.QtWidgets import QFileDialog #importing files for classifiers and feature extraction methods import Classifiers import GLCM impo...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,704
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/Operator_Window.py
#Loading Modules for GUI from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QFileDialog, QWidget #Loading Trained Classifiers import Trained_Classifier_Predictions #Loading the Final results window from Final_Results_Window import Ui_Dialog3 #declaring variables to be used for storing the name of...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,705
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/Classifiers.py
#importing os module import os #importing numpy and pandas for computation and storage import numpy as np import pandas as pd #keras for CNN from keras.layers import Dense, Conv2D, Flatten, MaxPooling2D from keras.models import Sequential from keras.preprocessing.image import ImageDataGenerator #importing modules fo...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,706
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/LBGLCM_for_single_image.py
#importing pillow module for images from PIL import Image #importing the GLCM and LBP module from skimage.feature import greycomatrix, greycoprops, local_binary_pattern #importing numpy and pandas import numpy as np import pandas as pd #function to extract features for a ***single image*** def extract_features(direc...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,707
omeym/AME-505-Group-3-Deep-learning-based-Surface-Defect-Classifier
refs/heads/master
/GLCM.py
#importing os module (file handling in os) and pillow module for images import os from PIL import Image #importing the GLCM module from skimage.feature import greycomatrix, greycoprops #importing numpy and pandas import numpy as np import pandas as pd #function to extract features for a ***collection of images*** d...
{"/Trained_Classifier_Predictions.py": ["/LBGLCM_for_single_image.py", "/Classifiers.py"], "/Training_Window.py": ["/Classifiers.py", "/GLCM.py", "/LBGLCM.py", "/Operator_Window.py", "/Training_Result_Window.py"], "/Operator_Window.py": ["/Trained_Classifier_Predictions.py", "/Final_Results_Window.py"]}
30,708
matthewswogger/tensorflow_speech_recognition_demo
refs/heads/master
/speech_data.py
""" Utilities for downloading and providing data from openslr.org, libriSpeech, Pannous, Gutenberg, WMT, tokenizing, vocabularies. """ # TODO! see https://github.com/pannous/caffe-speech-recognition for some data sources import os import re import sys import wave import numpy import numpy as np import skimage.io # s...
{"/run_model.py": ["/speech_data.py"]}
30,709
matthewswogger/tensorflow_speech_recognition_demo
refs/heads/master
/run_model.py
from __future__ import division, print_function, absolute_import import tflearn as tf import speech_data import numpy as np from sklearn.cross_validation import train_test_split def score_model(X, y): y_predicted = np.array(model.predict(X)) bool_arr = np.argmax(y_predicted,axis=1) == np.argmax(np.array(y),axi...
{"/run_model.py": ["/speech_data.py"]}
30,756
sshivaji/dgt-uci-engine
refs/heads/master
/pydgt.py
from Queue import Queue import serial import sys import time from threading import Thread from threading import RLock from threading import Condition from struct import unpack import signal import glob from itertools import cycle clock_blink_iterator = cycle(range(2)) BOARD = "Board" FEN = "FEN" CLOCK_BUTTON_PRESSED...
{"/engine.py": ["/pydgt.py"]}
30,757
sshivaji/dgt-uci-engine
refs/heads/master
/engine.py
import sys import threading import cmd import chess from chess import polyglot import tables import os import glob import platform # DGT from pydgt import DGTBoard from pydgt import FEN from pydgt import CLOCK_BUTTON_PRESSED from pydgt import CLOCK_LEVER from pydgt import CLOCK_ACK from pydgt import scan as dgt_port_...
{"/engine.py": ["/pydgt.py"]}
30,760
Richard-Cod/django_restaurant
refs/heads/master
/client/migrations/0006_info_googlemapslink.py
# Generated by Django 2.2 on 2020-07-14 20:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('client', '0005_auto_20200714_2040'), ] operations = [ migrations.AddField( model_name='info', name='googleMapsLink', ...
{"/client/admin.py": ["/client/models.py"], "/client/forms.py": ["/client/models.py"], "/client/views.py": ["/client/models.py", "/client/forms.py"]}
30,761
Richard-Cod/django_restaurant
refs/heads/master
/client/admin.py
from django.contrib import admin # Register your models here. from .models import Category,Food,Reason,Event,Info,Reservation admin.site.register(Category) admin.site.register(Food) admin.site.register(Reason) admin.site.register(Event) admin.site.register(Info) admin.site.register(Reservation)
{"/client/admin.py": ["/client/models.py"], "/client/forms.py": ["/client/models.py"], "/client/views.py": ["/client/models.py", "/client/forms.py"]}
30,762
Richard-Cod/django_restaurant
refs/heads/master
/client/forms.py
from django.forms import ModelForm from .models import Reservation class ReservationForm(ModelForm): class Meta: model = Reservation fields = '__all__'
{"/client/admin.py": ["/client/models.py"], "/client/forms.py": ["/client/models.py"], "/client/views.py": ["/client/models.py", "/client/forms.py"]}
30,763
Richard-Cod/django_restaurant
refs/heads/master
/client/migrations/0005_auto_20200714_2040.py
# Generated by Django 2.2 on 2020-07-14 20:40 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('client', '0004_info'), ] operations = [ migrations.RemoveField( model_name='info', name='created_at', ), migra...
{"/client/admin.py": ["/client/models.py"], "/client/forms.py": ["/client/models.py"], "/client/views.py": ["/client/models.py", "/client/forms.py"]}
30,764
Richard-Cod/django_restaurant
refs/heads/master
/client/models.py
from django.db import models from datetime import datetime # Create your models here. from django.contrib.auth.models import User class TimeStampMixin(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: abstract = True ...
{"/client/admin.py": ["/client/models.py"], "/client/forms.py": ["/client/models.py"], "/client/views.py": ["/client/models.py", "/client/forms.py"]}
30,765
Richard-Cod/django_restaurant
refs/heads/master
/client/views.py
from django.shortcuts import render,HttpResponseRedirect from django.http import HttpResponse,JsonResponse # Create your views here. from client.models import Category, Food ,Event ,Reason,Info,Reservation from client.forms import ReservationForm from django.views.decorators.csrf import csrf_exempt CATEGORIES = [ ...
{"/client/admin.py": ["/client/models.py"], "/client/forms.py": ["/client/models.py"], "/client/views.py": ["/client/models.py", "/client/forms.py"]}
30,766
Richard-Cod/django_restaurant
refs/heads/master
/client/migrations/0004_info.py
# Generated by Django 2.2 on 2020-07-14 20:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('client', '0003_event_reason'), ] operations = [ migrations.CreateModel( name='Info', fields=[ ('id', m...
{"/client/admin.py": ["/client/models.py"], "/client/forms.py": ["/client/models.py"], "/client/views.py": ["/client/models.py", "/client/forms.py"]}
30,770
alxdmg/Conway-s-Game-of-Life
refs/heads/master
/GameOfLife_parse.py
""" This module contains the parse implementation of the GameOfLife object used in Animation.py """ import numpy as np import os class GameOfLife(): """ ---March 2020--- This class implements a simple way of simulating Conway's Game of Life. The class has two main attributes: -living:...
{"/Animations.py": ["/GameOfLife_parse.py"]}
30,771
alxdmg/Conway-s-Game-of-Life
refs/heads/master
/GameOfLife_dense.py
""" This module contains the dense implementation of the GameOfLife object used in Animation.py """ import numpy as np import os class GameOfLife(): """ ---March 2020--- This class implements a simple way of simulating Conway's Game of Life. The class has two main attributes: -Board: ...
{"/Animations.py": ["/GameOfLife_parse.py"]}
30,772
alxdmg/Conway-s-Game-of-Life
refs/heads/master
/Animations.py
import matplotlib.pyplot as plt import matplotlib.animation as animation from GameOfLife_parse import GameOfLife # from GameOfLife_dense import GameOfLife game = GameOfLife(130, 150) print("available figures:") print(game.list_elems()) game.new_elem(figure="acorn", top_left_x=70, top_left_y=100) NumGen = ...
{"/Animations.py": ["/GameOfLife_parse.py"]}
30,774
jshirius/kaggle_cassava
refs/heads/main
/src/utils.py
from contextlib import contextmanager import os from pathlib import Path import random import time import numpy as np import torch import cv2 @contextmanager def timer(message: str): print(f'[{message}] start.') t0 = time.time() yield elapsed_time = time.time() - t0 print(f'[{message}] done in {el...
{"/src/learning.py": ["/src/data_set.py", "/src/model/train_model.py"], "/train_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"], "/inference_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"]}
30,775
jshirius/kaggle_cassava
refs/heads/main
/create_mixup_images.py
# ==================================================== # MixUP画像作成スクリプト # ==================================================== import cv2 import pandas as pd import numpy as np from src.mixup_generator import MixupGenerator import os import matplotlib.pyplot as plt from PIL import Image import shutil import keras fro...
{"/src/learning.py": ["/src/data_set.py", "/src/model/train_model.py"], "/train_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"], "/inference_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"]}
30,776
jshirius/kaggle_cassava
refs/heads/main
/src/learning.py
# 訓練と評価 import time from tqdm import tqdm import torch from torch import nn from torch.cuda.amp import autocast, GradScaler import numpy as np import pandas as pd from src.data_set import TestDataset, LABEL_NUM from src.model.train_model import CassvaImgClassifier, LabelSmoothingLoss, TaylorCrossEntropyLoss, CutMixCri...
{"/src/learning.py": ["/src/data_set.py", "/src/model/train_model.py"], "/train_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"], "/inference_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"]}
30,777
jshirius/kaggle_cassava
refs/heads/main
/train_main.py
# ==================================================== # メイン処理 # ==================================================== package_path = './FMix-master' import sys; sys.path.append(package_path) """ import sys package_path = '../input/pytorch-image-models/pytorch-image-models-master' #'../input/efficientnet-pytorch-07/ef...
{"/src/learning.py": ["/src/data_set.py", "/src/model/train_model.py"], "/train_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"], "/inference_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"]}
30,778
jshirius/kaggle_cassava
refs/heads/main
/src/feature.py
# 特徴量 import numpy as np from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA import pandas as pd # Use Numpy [may cause Out-of-Memory (OOM) error] def rolling_window(a, shape): # rolling window for 2D array #次元数が増える #a(1次...
{"/src/learning.py": ["/src/data_set.py", "/src/model/train_model.py"], "/train_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"], "/inference_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"]}
30,779
jshirius/kaggle_cassava
refs/heads/main
/inference_main.py
# ==================================================== # 推論メイン処理 # ==================================================== """ import sys package_path = '../input/pytorch-image-models/pytorch-image-models-master' #'../input/efficientnet-pytorch-07/efficientnet_pytorch-0.7.0' sys.path.append(package_path) sys.path.append(...
{"/src/learning.py": ["/src/data_set.py", "/src/model/train_model.py"], "/train_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"], "/inference_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"]}
30,780
jshirius/kaggle_cassava
refs/heads/main
/src/data_set.py
# ==================================================== # Dataset # ==================================================== import torch from torch.utils.data import Dataset,DataLoader import cv2 import numpy as np #Mixup, Cutmix, FMix Visualisations #from fmix.fmix import sample_mask, make_low_freq_image, binarise_mask ...
{"/src/learning.py": ["/src/data_set.py", "/src/model/train_model.py"], "/train_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"], "/inference_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"]}
30,781
jshirius/kaggle_cassava
refs/heads/main
/src/model/train_model.py
# 訓練モデル #import efficientnet.tfkeras as efn import tensorflow as tf import tensorflow.keras.layers as L import tensorflow.keras.backend as K from tensorflow.keras import optimizers, Sequential, losses, metrics, Model from tensorflow.keras.callbacks import EarlyStopping import torch from torch import nn import timm # ...
{"/src/learning.py": ["/src/data_set.py", "/src/model/train_model.py"], "/train_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"], "/inference_main.py": ["/src/utils.py", "/src/data_set.py", "/src/model/train_model.py", "/src/learning.py"]}
30,784
philimon-reset/AirBnB_clone_good
refs/heads/master
/models/state.py
#!/usr/bin/python3 """ contains state class to represent a state """ from models.base_model import BaseModel, Base from sqlalchemy import Column, String from sqlalchemy.orm import relationship class State(BaseModel, Base): """ State class """ __tablename__ = "states" name = Column(String(128), nullab...
{"/models/review.py": ["/models/place.py"], "/models/place.py": ["/models/user.py"]}
30,785
philimon-reset/AirBnB_clone_good
refs/heads/master
/models/review.py
#!/usr/bin/python3 from models.base_model import BaseModel, Base from models.place import Place from sqlalchemy.orm import relationship from sqlalchemy import create_engine, Column, Integer, String class Review(BaseModel, Base): """ Review class """ __tablename__ = "reviews" # place_id = Colum...
{"/models/review.py": ["/models/place.py"], "/models/place.py": ["/models/user.py"]}
30,786
philimon-reset/AirBnB_clone_good
refs/heads/master
/models/user.py
#!/usr/bin/python3 """ module containing user class """ from models.base_model import BaseModel, Base # from models.review import Review from sqlalchemy.orm import relationship from sqlalchemy import create_engine, Column, Integer, String class User(BaseModel, Base): """ User class """ __table...
{"/models/review.py": ["/models/place.py"], "/models/place.py": ["/models/user.py"]}
30,787
philimon-reset/AirBnB_clone_good
refs/heads/master
/models/place.py
#!/usr/bin/python3 """ module containing place """ from models.base_model import BaseModel, Base from models.city import City from models.user import User from sqlalchemy import Column, String, Integer, Float from sqlalchemy.sql.schema import ForeignKey class Place(BaseModel, Base): """ Place class ...
{"/models/review.py": ["/models/place.py"], "/models/place.py": ["/models/user.py"]}
30,815
linhduongtuan/sesemi
refs/heads/master
/models/__init__.py
from .sesemi import SESEMI
{"/models/__init__.py": ["/models/sesemi.py"], "/dataset.py": ["/utils.py"], "/models/sesemi.py": ["/models/timm.py", "/utils.py"], "/inference.py": ["/models/__init__.py", "/utils.py", "/dataset.py"], "/open_sesemi.py": ["/models/__init__.py", "/utils.py", "/dataset.py"]}
30,816
linhduongtuan/sesemi
refs/heads/master
/models/timm.py
# Copyright 2021, Flyreel. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
{"/models/__init__.py": ["/models/sesemi.py"], "/dataset.py": ["/utils.py"], "/models/sesemi.py": ["/models/timm.py", "/utils.py"], "/inference.py": ["/models/__init__.py", "/utils.py", "/dataset.py"], "/open_sesemi.py": ["/models/__init__.py", "/utils.py", "/dataset.py"]}
30,817
linhduongtuan/sesemi
refs/heads/master
/dataset.py
# Copyright 2021, Flyreel. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
{"/models/__init__.py": ["/models/sesemi.py"], "/dataset.py": ["/utils.py"], "/models/sesemi.py": ["/models/timm.py", "/utils.py"], "/inference.py": ["/models/__init__.py", "/utils.py", "/dataset.py"], "/open_sesemi.py": ["/models/__init__.py", "/utils.py", "/dataset.py"]}
30,818
linhduongtuan/sesemi
refs/heads/master
/models/sesemi.py
# Copyright 2021, Flyreel. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
{"/models/__init__.py": ["/models/sesemi.py"], "/dataset.py": ["/utils.py"], "/models/sesemi.py": ["/models/timm.py", "/utils.py"], "/inference.py": ["/models/__init__.py", "/utils.py", "/dataset.py"], "/open_sesemi.py": ["/models/__init__.py", "/utils.py", "/dataset.py"]}
30,819
linhduongtuan/sesemi
refs/heads/master
/inference.py
# Copyright 2021, Flyreel. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
{"/models/__init__.py": ["/models/sesemi.py"], "/dataset.py": ["/utils.py"], "/models/sesemi.py": ["/models/timm.py", "/utils.py"], "/inference.py": ["/models/__init__.py", "/utils.py", "/dataset.py"], "/open_sesemi.py": ["/models/__init__.py", "/utils.py", "/dataset.py"]}
30,820
linhduongtuan/sesemi
refs/heads/master
/open_sesemi.py
# Copyright 2021, Flyreel. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
{"/models/__init__.py": ["/models/sesemi.py"], "/dataset.py": ["/utils.py"], "/models/sesemi.py": ["/models/timm.py", "/utils.py"], "/inference.py": ["/models/__init__.py", "/utils.py", "/dataset.py"], "/open_sesemi.py": ["/models/__init__.py", "/utils.py", "/dataset.py"]}
30,821
linhduongtuan/sesemi
refs/heads/master
/utils.py
# Copyright 2021, Flyreel. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
{"/models/__init__.py": ["/models/sesemi.py"], "/dataset.py": ["/utils.py"], "/models/sesemi.py": ["/models/timm.py", "/utils.py"], "/inference.py": ["/models/__init__.py", "/utils.py", "/dataset.py"], "/open_sesemi.py": ["/models/__init__.py", "/utils.py", "/dataset.py"]}
30,836
xspring14/tfseg
refs/heads/main
/tfseg/model.py
import os import tensorflow as tf import tensorflow_hub as hub from tfseg.silence_tensorflow import silence_tensorflow silence_tensorflow() MODEL_PATH = os.path.join(os.path.dirname(__file__), 'chn_seg_albert') MODEL = hub.load(MODEL_PATH) def cut_func(model, sent: str, use_pos=True): if len(sent) <= 0: ...
{"/tfseg/model.py": ["/tfseg/silence_tensorflow.py"], "/tfseg/test_cut.py": ["/tfseg/__init__.py", "/tfseg/pair.py"], "/tfseg/__init__.py": ["/tfseg/model.py"], "/tfseg/posseg.py": ["/tfseg/model.py", "/tfseg/pair.py"]}
30,837
xspring14/tfseg
refs/heads/main
/tfseg/test_cut.py
from tfseg import cut, lcut from tfseg import posseg from tfseg.pair import pair def test_cut(): ret = cut('我爱北京天安门') for x in ret: assert isinstance(x, str) def test_lcut(): ret = lcut('我爱北京天安门') assert isinstance(ret, list) assert isinstance(ret[0], str) def test_posseg_cut(): r...
{"/tfseg/model.py": ["/tfseg/silence_tensorflow.py"], "/tfseg/test_cut.py": ["/tfseg/__init__.py", "/tfseg/pair.py"], "/tfseg/__init__.py": ["/tfseg/model.py"], "/tfseg/posseg.py": ["/tfseg/model.py", "/tfseg/pair.py"]}
30,838
xspring14/tfseg
refs/heads/main
/tfseg/silence_tensorflow.py
"""Copy from silence-tensorflow https://github.com/LucaCappelletti94/silence_tensorflow/blob/aa02373647db93f92ec824a55f37b6ae175d7227/silence_tensorflow/silence_tensorflow.py#L5 """ import os import logging def silence_tensorflow(): """Silence every warning of notice from tensorflow.""" logging.getLogger('te...
{"/tfseg/model.py": ["/tfseg/silence_tensorflow.py"], "/tfseg/test_cut.py": ["/tfseg/__init__.py", "/tfseg/pair.py"], "/tfseg/__init__.py": ["/tfseg/model.py"], "/tfseg/posseg.py": ["/tfseg/model.py", "/tfseg/pair.py"]}
30,839
xspring14/tfseg
refs/heads/main
/tfseg/pair.py
"""Copy from jieba https://github.com/fxsjy/jieba/blob/d703bce30236f278818d7f346b2d746256871380/jieba/posseg/__init__.py#L44 """ class pair(object): def __init__(self, word, flag): self.word = word self.flag = flag def __unicode__(self): return '%s/%s' % (self.word, self.flag) d...
{"/tfseg/model.py": ["/tfseg/silence_tensorflow.py"], "/tfseg/test_cut.py": ["/tfseg/__init__.py", "/tfseg/pair.py"], "/tfseg/__init__.py": ["/tfseg/model.py"], "/tfseg/posseg.py": ["/tfseg/model.py", "/tfseg/pair.py"]}
30,840
xspring14/tfseg
refs/heads/main
/tfseg/__init__.py
from tfseg.model import MODEL, cut_func def cut(sent: str): for word in cut_func(MODEL, sent, use_pos=False): yield word def lcut(sent: str): return cut_func(MODEL, sent, use_pos=False)
{"/tfseg/model.py": ["/tfseg/silence_tensorflow.py"], "/tfseg/test_cut.py": ["/tfseg/__init__.py", "/tfseg/pair.py"], "/tfseg/__init__.py": ["/tfseg/model.py"], "/tfseg/posseg.py": ["/tfseg/model.py", "/tfseg/pair.py"]}
30,841
xspring14/tfseg
refs/heads/main
/tfseg/posseg.py
from tfseg.model import MODEL, cut_func from tfseg.pair import pair def cut(sent: str): for word, pos in zip(*cut_func(MODEL, sent, use_pos=True)): yield pair(word, pos) def lcut(sent: str): return [ pair(word, pos) for word, pos in zip(*cut_func(MODEL, sent, use_pos=True)) ]
{"/tfseg/model.py": ["/tfseg/silence_tensorflow.py"], "/tfseg/test_cut.py": ["/tfseg/__init__.py", "/tfseg/pair.py"], "/tfseg/__init__.py": ["/tfseg/model.py"], "/tfseg/posseg.py": ["/tfseg/model.py", "/tfseg/pair.py"]}
30,847
codingmedved/tickets
refs/heads/master
/events/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-07-29 18:06 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('locati...
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,848
codingmedved/tickets
refs/heads/master
/orders/models.py
from django.db import models from events.models import Ticket, TicketPrice from django.contrib.auth.models import User class TicketStatus(models.Model): name = models.CharField(max_length=128) is_active = models.BooleanField(default=True) class TicketNumbers(models.Model): ticket_price = models.Foreign...
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,849
codingmedved/tickets
refs/heads/master
/locations/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-07-29 18:06 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,850
codingmedved/tickets
refs/heads/master
/events/migrations/0004_auto_20170729_2119.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-07-29 18:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0003_auto_20170729_2117'), ] operations = [ migrations.AlterField...
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,851
codingmedved/tickets
refs/heads/master
/events/views.py
from django.shortcuts import render # Create your views here. from django.shortcuts import render from .models import * from django.contrib import messages def home(request): tickets = Ticket.objects.all() return render(request, 'events/home.html', locals()) def ticket(request, ticket_id): ticket = Tic...
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,852
codingmedved/tickets
refs/heads/master
/events/models.py
from django.db import models from django.contrib.auth.models import User from locations.models import Location # Create your models here. # class Label(models.Model): # user = models.OneToOneField(User) # city = models.ForeignKey(City) # date_birth = models.DateField() # age = models.IntegerField() #...
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,853
codingmedved/tickets
refs/heads/master
/events/urls.py
from django.conf.urls import url, include from django.contrib import admin from . import views urlpatterns = [ url(r'^$', views.home, name='home'), url(r'^ticket/(?P<ticket_id>\w+)/$', views.ticket, name='ticket'), ]
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,854
codingmedved/tickets
refs/heads/master
/events/migrations/0002_auto_20170729_2116.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-07-29 18:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0001_initial'), ] operations = [ migrations.AlterField( ...
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,855
codingmedved/tickets
refs/heads/master
/locations/models.py
from django.db import models # Create your models here. class Country(models.Model): name = models.CharField(max_length=128) is_active = models.BooleanField(default=True) def __str__(self): return "%s" % self.name class City(models.Model): name = models.CharField(max_length=128) is_activ...
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,856
codingmedved/tickets
refs/heads/master
/payments/models.py
from django.db import models from orders.models import Order # Create your models here. class Payment(models.Model): order = models.OneToOneField(Order) amount = models.DecimalField(max_digits=10, decimal_places=2) created = models.DateTimeField(auto_now_add=True, auto_now=False)
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,857
codingmedved/tickets
refs/heads/master
/events/admin.py
from django.contrib import admin from .models import * # Register your models here. admin.site.register(EventLabel) admin.site.register(TicketFeature) admin.site.register(Ticket) admin.site.register(Review) admin.site.register(TicketCategory) admin.site.register(TicketPrice)
{"/orders/models.py": ["/events/models.py"], "/events/views.py": ["/events/models.py"], "/events/models.py": ["/locations/models.py"], "/payments/models.py": ["/orders/models.py"], "/events/admin.py": ["/events/models.py"]}
30,860
dimasKaskader/SpeechRecognitionTesting
refs/heads/master
/english_recognition.py
import speech_recognition as sr import urllib.request as req from xml.dom import minidom from os import path import os import deep_speech as ds def recognize_yandex(audio): key = 'abc41255-8098-4fb0-8f6f-45be137bfc05' uuid = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab' data = audio.get_wav_data() ...
{"/main_recognition.py": ["/deepspeech_recognizer.py", "/openseq2seq_recognizer.py", "/wer.py"]}
30,861
dimasKaskader/SpeechRecognitionTesting
refs/heads/master
/openseq2seq_recognizer.py
import tensorflow as tf from open_seq2seq.utils.utils import deco_print, get_base_config, check_logdir, \ create_logdir, create_model, get_interactive_infer_results # Define the command line arguments that one would pass to run.py here # A simpler version of what run.py does. It returns the created model and its...
{"/main_recognition.py": ["/deepspeech_recognizer.py", "/openseq2seq_recognizer.py", "/wer.py"]}
30,862
dimasKaskader/SpeechRecognitionTesting
refs/heads/master
/deepspeech_recognizer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import argparse import numpy as np import shlex import subprocess import sys import wave from deepspeech import Model from timeit import default_timer as timer try: from shhlex import quote except Impor...
{"/main_recognition.py": ["/deepspeech_recognizer.py", "/openseq2seq_recognizer.py", "/wer.py"]}
30,863
dimasKaskader/SpeechRecognitionTesting
refs/heads/master
/main_recognition.py
import os from deepspeech_recognizer import DeepSpeech from kaldiasr.nnet3 import KaldiNNet3OnlineModel, KaldiNNet3OnlineDecoder from openseq2seq_recognizer import OpenSeq2Seq from wer import wer DEEPSPEECH_MODEL = './deepspeech/models' KALDI_MODEL = './kaldi/models/kaldi-generic-en-tdnn_sp-r20180815' OPENSEQ2SEQ_MO...
{"/main_recognition.py": ["/deepspeech_recognizer.py", "/openseq2seq_recognizer.py", "/wer.py"]}
30,864
dimasKaskader/SpeechRecognitionTesting
refs/heads/master
/wer.py
""" @author Kiettiphong Manovisut References: https://en.wikipedia.org/wiki/Word_error_rate https://www.github.com/mission-peace/interview/wiki """ import numpy def wer(r, h): """ Given two list of strings how many word error rate(insert, delete or substitution). """ d = numpy.zeros((len(r) + 1)...
{"/main_recognition.py": ["/deepspeech_recognizer.py", "/openseq2seq_recognizer.py", "/wer.py"]}
30,865
dimasKaskader/SpeechRecognitionTesting
refs/heads/master
/pro_codich.py
import speech_recognition as sr import urllib.request as req from xml.dom import minidom from os import path import os import openpyxl '''class Excel: index = 2 wb = openpyxl.load_workbook(filename='excel.xlsx') sheet = wb['table1'] @staticmethod def init(): while Excel.she...
{"/main_recognition.py": ["/deepspeech_recognizer.py", "/openseq2seq_recognizer.py", "/wer.py"]}
30,870
OneRaynyDay/LinearRegression
refs/heads/master
/TestData.py
import LinearRegression import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D arr = np.array([[1,0.7,0.5],[2,0.8,2.5],[3,0.9,3],[4,1.1,4.5],[5,1.4,4.5]]) LR = LinearRegression.LinearRegression(arr) for i in range(10): LR.gradDescent(0.1) vals = np.dot(LR.X, LR.Theta) fig = pl...
{"/TestData.py": ["/LinearRegression.py"]}
30,871
OneRaynyDay/LinearRegression
refs/heads/master
/LinearRegression.py
import numpy as np class LinearRegression: def __init__(self, matrix): '''X: The input of the supervised learning y: The results of the supervised learning''' biasTerm = np.ones((matrix.shape[0], 1)) print("biasTerm's shape: " + str(biasTerm.shape)) print(matrix) Xco...
{"/TestData.py": ["/LinearRegression.py"]}
30,878
francesco-borzacchiello/SudokuSover
refs/heads/main
/solver/solver.py
from abc import ABC, abstractmethod from puzzle.puzzle import * class Solver(ABC): def __init__(self, puzzles_to_solve : Puzzle): self.puzzles_to_solve = puzzles_to_solve @abstractmethod def solve(self): pass @abstractmethod def get_solution(self) -> Puzzle: pass
{"/solver/solver.py": ["/puzzle/puzzle.py"], "/utility/printUtility.py": ["/puzzle/cell.py", "/puzzle/sudoku.py"], "/puzzle/sudoku.py": ["/puzzle/cell.py", "/puzzle/puzzle.py", "/utility/printUtility.py"], "/solver/sudokuSolver.py": ["/solver/solver.py", "/puzzle/sudoku.py", "/puzzle/cell.py", "/utility/printUtility.py...
30,879
francesco-borzacchiello/SudokuSover
refs/heads/main
/puzzle/puzzle.py
class Puzzle: pass
{"/solver/solver.py": ["/puzzle/puzzle.py"], "/utility/printUtility.py": ["/puzzle/cell.py", "/puzzle/sudoku.py"], "/puzzle/sudoku.py": ["/puzzle/cell.py", "/puzzle/puzzle.py", "/utility/printUtility.py"], "/solver/sudokuSolver.py": ["/solver/solver.py", "/puzzle/sudoku.py", "/puzzle/cell.py", "/utility/printUtility.py...
30,880
francesco-borzacchiello/SudokuSover
refs/heads/main
/utility/printUtility.py
from math import * from numpy import * from puzzle.cell import * from puzzle.sudoku import ClassicSudoku class PrintClassicSudokuBoard: def __init__(self, sudoku : ClassicSudoku): self.__sudoku = sudoku self.__candidates_is_present = False self.__dimension_of_a_cell = 1 self.__boar...
{"/solver/solver.py": ["/puzzle/puzzle.py"], "/utility/printUtility.py": ["/puzzle/cell.py", "/puzzle/sudoku.py"], "/puzzle/sudoku.py": ["/puzzle/cell.py", "/puzzle/puzzle.py", "/utility/printUtility.py"], "/solver/sudokuSolver.py": ["/solver/solver.py", "/puzzle/sudoku.py", "/puzzle/cell.py", "/utility/printUtility.py...
30,881
francesco-borzacchiello/SudokuSover
refs/heads/main
/puzzle/cell.py
from operator import * class IndicesOfCell(tuple): def __new__(self, row : int, column : int): IndicesOfCell.row = property(itemgetter(0)) IndicesOfCell.column = property(itemgetter(1)) return tuple.__new__(IndicesOfCell, (row, column))
{"/solver/solver.py": ["/puzzle/puzzle.py"], "/utility/printUtility.py": ["/puzzle/cell.py", "/puzzle/sudoku.py"], "/puzzle/sudoku.py": ["/puzzle/cell.py", "/puzzle/puzzle.py", "/utility/printUtility.py"], "/solver/sudokuSolver.py": ["/solver/solver.py", "/puzzle/sudoku.py", "/puzzle/cell.py", "/utility/printUtility.py...
30,882
francesco-borzacchiello/SudokuSover
refs/heads/main
/puzzle/sudoku.py
from math import * from typing import Any, Callable from numpy import * from puzzle.cell import * from puzzle.puzzle import * class ClassicSudoku(Puzzle): #region Constructor def __init__(self, sudoku : list): self.__check_input(sudoku) self.__make_grid(sudoku) #region Check if the in...
{"/solver/solver.py": ["/puzzle/puzzle.py"], "/utility/printUtility.py": ["/puzzle/cell.py", "/puzzle/sudoku.py"], "/puzzle/sudoku.py": ["/puzzle/cell.py", "/puzzle/puzzle.py", "/utility/printUtility.py"], "/solver/sudokuSolver.py": ["/solver/solver.py", "/puzzle/sudoku.py", "/puzzle/cell.py", "/utility/printUtility.py...
30,883
francesco-borzacchiello/SudokuSover
refs/heads/main
/solver/sudokuSolver.py
from typing import Iterator from solver.solver import * from puzzle.sudoku import * from puzzle.cell import * class ClassicSudokuSolver(Solver): #region Constructor def __init__(self, sudoku : ClassicSudoku): self.__initialize_the_fields(sudoku) self.__calculate_candidates() def __ini...
{"/solver/solver.py": ["/puzzle/puzzle.py"], "/utility/printUtility.py": ["/puzzle/cell.py", "/puzzle/sudoku.py"], "/puzzle/sudoku.py": ["/puzzle/cell.py", "/puzzle/puzzle.py", "/utility/printUtility.py"], "/solver/sudokuSolver.py": ["/solver/solver.py", "/puzzle/sudoku.py", "/puzzle/cell.py", "/utility/printUtility.py...
30,898
ssh6189/2019.12.10
refs/heads/master
/test.py
import calc print(calc.add(5, 10))
{"/test.py": ["/calc.py"]}
30,899
ssh6189/2019.12.10
refs/heads/master
/dictionery.py
#key는 unique해야 하며, 불변 이다 , value 는 가변(변경 가능) dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'} print ("dict['Name']: ", dict['Name']) print ("dict['Age']: ", dict['Age']) dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'} print ("dict['Alice']: ", dict['Alice']) #존재하지 않는 키로 요소에 접근할 경우? dict['Age'] = 8; #요소의 val...
{"/test.py": ["/calc.py"]}
30,900
ssh6189/2019.12.10
refs/heads/master
/팩토리얼.py
result = 1 n = int(input("수를 입력하시오.")) for i in range(n): result = result * (i+1) print(result) str(input())
{"/test.py": ["/calc.py"]}
30,901
ssh6189/2019.12.10
refs/heads/master
/함수호출방식.py
def f(): s = "I love London!" print(s) return s s = "I love Paris!" s = f() print(s)
{"/test.py": ["/calc.py"]}
30,902
ssh6189/2019.12.10
refs/heads/master
/이진수 변환 제작.py
num = int(input("수를 입력하시오.")) str while num > 0: a = num//2 b = num%2
{"/test.py": ["/calc.py"]}
30,903
ssh6189/2019.12.10
refs/heads/master
/calc.py
def add(x, y): return x+y if __name__ == '__main__': print(add(3, 5)) #__name__은 특별한 변수 이름 #calc.py를 직접 실행시키면 __name__변수에 __main__ 값이 저장됩니다. #import되면 __name__변수에 calc.py값이 저장됩니다.
{"/test.py": ["/calc.py"]}
30,904
ssh6189/2019.12.10
refs/heads/master
/dictionery test.py
seo = {"name":"ssh", "age":"16"} print(seo.keys()) print(seo.values()) print(type(seo.keys())) print(type(seo.values())) print(seo["name"]) print(seo["age"]) print(seo.get("name"))
{"/test.py": ["/calc.py"]}
30,905
ssh6189/2019.12.10
refs/heads/master
/사칙연산계산기.py
def calc(a, b, op): if op == "+": return a+b elif op == "-": return a-b elif op == "*": return a*b elif op == "/": return a/b else: return print("올바르지 않은 입력값입니다....") if __name__ == "__main__": x = int(input("수를 입력하시오.")) z = str(input("연산자를 입력하시오."))...
{"/test.py": ["/calc.py"]}
30,906
ssh6189/2019.12.10
refs/heads/master
/구구단 가로.py
for num in range(1, 10) : # 1~9 for dan in range(2, 10) : #2~9 gugu = "{0} X {1}={2:2d} ".format(dan, num, (num*dan)) #3버전부터 지원 print(gugu , end=" ") print() #%operator 를 지원하지만 공식문서에서는 권장하지 않는다고 합니다. for num in range(1, 10) : # 1~9 for dan in range(2, 10) : #2...
{"/test.py": ["/calc.py"]}
30,907
ssh6189/2019.12.10
refs/heads/master
/Word Count.py
f = open("c:/Users/yesterday.txt",'r') result = 0 for i in range(40): yl = f.readline() yl = yl.title() print(yl) if(yl.count("Yesterday")): result = result + 1 print(result)
{"/test.py": ["/calc.py"]}