This file contains 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
# You need to install pafy, pillow and youtube-dl otherwise it won't work | |
# pip install pafy | |
# pip install pillow | |
# pip install youtube-dl | |
from importlib.util import find_spec as find_lib | |
from os.path import expandvars as os_vars | |
from urllib.request import urlopen | |
from PIL import Image, ImageTk | |
import tkinter.filedialog |
This file contains 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
#include <iostream> | |
#include <vector> | |
#include <utility> | |
template<typename T> | |
std::vector<std::pair<T, T>> range2(T start1, T end1, T start2, T end2) { | |
std::vector<std::pair<T, T>> loopValues{}; | |
for (T i = start1; i < end1; ++i) { | |
for (T j = start2; j < end2; ++j) { |
This file contains 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
function[auc] = calcAUC(sens, spec) | |
tpr = sens; | |
fpr = 1 - spec; | |
[~, indices] = sort(sqrt(fpr.^2 + tpr.^2)); | |
tpr = tpr(indices); | |
fpr = fpr(indices); |
This file contains 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 math, operator | |
from functools import reduce | |
from PIL import Image | |
from os import listdir, remove | |
from os.path import isfile, join | |
import sys | |
def update(currImage, totalImages, suffix=''): | |
filledSize = int(round(20 * currImage / float(totalImages))) | |
perc = round(100.0 * currImage / float(totalImages), 1) |