This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from typing import NamedTuple, Dict, Any, Callable, Optional | |
import pandas as pd | |
import numpy as np | |
from enum import Enum | |
import matplotlib | |
matplotlib.use('TkAgg') | |
import matplotlib.pyplot as plt | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
from typing import Dict, Optional, Tuple, Any | |
import numpy as np | |
from PySide2.QtCore import QAbstractItemModel, QModelIndex, Qt | |
from PySide2.QtWidgets import QApplication, QTreeView | |
class TreeItem: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from enum import Enum, IntEnum | |
from typing import Dict, Union, List | |
from PySide2.QtCore import Qt, QObject, QModelIndex | |
from PySide2.QtGui import QPaintEvent, QPalette, QColor | |
from PySide2.QtWidgets import QApplication, QMainWindow, QWidget, QHBoxLayout, QTreeWidget, QTreeWidgetItem, \ | |
QToolButton, QWidgetAction, QCheckBox, QAction, QDockWidget, QPushButton, QStyle, QStylePainter, QStyleOptionButton, \ | |
QStyleOptionToolButton, QFrame, QLabel, QVBoxLayout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from enum import Enum, IntEnum | |
from typing import List | |
from PySide2.QtCore import QPropertyAnimation, QByteArray, Signal, QRect, Qt | |
from PySide2.QtGui import QResizeEvent, QColor, QMouseEvent | |
from PySide2.QtWidgets import QApplication, QWidget, QGridLayout, QLabel, QPushButton, \ | |
QFrame, QToolButton, QHBoxLayout, QVBoxLayout, \ | |
QGraphicsColorizeEffect, QStackedWidget, QButtonGroup, QAbstractButton, QToolBar, QMainWindow, QSizePolicy, \ | |
QDockWidget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from typing import Any | |
from PySide2.QtCore import QAbstractProxyModel, QModelIndex, QIdentityProxyModel, QSortFilterProxyModel, QFileInfo, Qt | |
from PySide2.QtWidgets import QApplication, QFileDialog, QWidget, QGridLayout, QLabel, QDialogButtonBox, QPushButton, \ | |
QSizeGrip, QSplitter, QFrame, QListView, QToolButton, QFileSystemModel | |
# class AdditionalColumnsProxyModel(QIdentityProxyModel): | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
from aiohttp import web | |
import socketio | |
import cv2 | |
# creates a new Async Socket IO Server | |
sio = socketio.AsyncServer(cors_allowed_origins=[]) | |
# Creates a new Aiohttp Web Application | |
app = web.Application() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear;clc; | |
% https://www.mathworks.com/help/deeplearning/examples/train-deep-learning-network-to-classify-new-images.html | |
%% Loading monkey data | |
imdsValidation = imageDatastore('10-monkey-species/validation', 'IncludeSubfolders',true,'LabelSource','foldernames'); | |
imdsTrain = imageDatastore('10-monkey-species/training', 'IncludeSubfolders',true,'LabelSource','foldernames'); | |
%% Selecting cnn model | |
net = resnet50; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
class Context: | |
def __init__(self): | |
self._filters = {} | |
self._parsers = {} | |
self._runnable_attr = '_runnable' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing | |
import os | |
import pickle | |
from os import path, getpid | |
from typing import Dict, Set, Tuple | |
import numpy as np | |
import pandas as pd | |
import seaborn as sns | |
from tqdm import tqdm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
class Context(object): | |
def __init__(self): | |
self._classes = {} | |
self._instances = {} | |
def feature(self, component_cls): |
NewerOlder