Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
interviews_details = { | |
"https://www.youtube.com/watch?v=OT91E6_Qm1A&list=PLkDaE6sCZn6FcbHlDzbVzf3TVgxzxK7lr&index=2&ab_channel=DeepLearningAI": "Ruslan Salakhutdinov", | |
"https://www.youtube.com/watch?v=dwFcodBz_2I&list=PLkDaE6sCZn6FcbHlDzbVzf3TVgxzxK7lr&index=3&ab_channel=DeepLearningAI": "Yuanqing Lin", | |
"https://www.youtube.com/watch?v=dqwx-F7Eits&list=PLkDaE6sCZn6FcbHlDzbVzf3TVgxzxK7lr&index=4&ab_channel=DeepLearningAI": "Ian GoodFellow", | |
"https://www.youtube.com/watch?v=LpAiPYNnxW0&list=PLkDaE6sCZn6FcbHlDzbVzf3TVgxzxK7lr&index=6&ab_channel=DeepLearningAI": "Pieter Abeel", | |
"https://www.youtube.com/watch?v=oJFShOfCZiA&list=PLkDaE6sCZn6FcbHlDzbVzf3TVgxzxK7lr&index=5&ab_channel=DeepLearningAI": "Youshua Bengio", | |
"https://www.youtube.com/watch?v=xxu4IqwKw0w&list=PLkDaE6sCZn6FcbHlDzbVzf3TVgxzxK7lr&index=7&ab_channel=DeepLearningAI": "Andrej Karpathy", | |
"https://www.youtube.com/watch?v=JS12eb1cTLE&list=PLkDaE6sCZn6FcbHlDzbVzf3TVgxzxK7lr&index=8&ab_channel=DeepLearningAI": "Yann Lecunn", |
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
from fpdf import FPDF | |
for hero_num in range(len(self.all_interviews_results)): | |
pdf = FPDF() # Creates a new PDF File for each hero | |
pdf.add_page() | |
pdf.set_font("Arial", "B", 16) # sets font for title | |
pdf.cell(0,0,txt=f"Interview of {list(interviews_details.values())[hero_num]}", ln=1, align="C") # Adds the Title to the PDF, title is the name of the hero. | |
pdf.ln() | |
pdf.set_font("Arial", size=12) # Font for other text | |
for line in range(len(self.all_interviews_results[hero_num]["segments"])): | |
pdf.cell(200, 10,txt =self.all_interviews_results[hero_num]["segments"][line]["text"], ln=1,) # Adds each seperate line to PDF |
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
a | b | ||
---|---|---|---|
0 | 638247440.5435247 | 43665465139.62408 | |
1 | 241472144054.771 | 16520228392039.822 | |
2 | 10786807975856.775 | 737975521275079.4 | |
3 | 523430712338389.06 | 3.581032068558979e+16 | |
4 | 2.8196404638409536e+16 | 1.929046707578994e+18 | |
5 | 1.72386003562466e+18 | 1.1793725365676029e+20 | |
6 | 1.2219069299030906e+20 | 8.359631557019926e+21 | |
7 | 1.024971897290708e+22 | 7.012307736342528e+23 | |
8 | 1.0346857215917564e+24 | 7.078764509914335e+25 |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import cv2 | |
def template_detection(image, template): | |
methods = ['cv2.TM_CCOEFF', 'cv2.TM_CCOEFF_NORMED', 'cv2.TM_CCORR', | |
'cv2.TM_CCORR_NORMED', 'cv2.TM_SQDIFF', 'cv2.TM_SQDIFF_NORMED'] | |
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 numpy as np | |
from fastapi import FastAPI, Form | |
import pandas as pd | |
from starlette.responses import HTMLResponse | |
from tensorflow.keras.preprocessing.text import Tokenizer | |
from tensorflow.keras.preprocessing.sequence import pad_sequences | |
import tensorflow as tf | |
import re | |
def preProcess_data(text): #cleaning the data |
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
model2 = Sequential([ | |
Dense(512, activation='tanh', input_shape = X_train[0].shape, kernel_regularizer='l1'), #Only change is here where we add kernel_regularizer | |
Dense(512//2, activation='tanh'), | |
Dense(512//4, activation='tanh'), | |
Dense(512//8, activation='tanh'), | |
Dense(32, activation='relu'), | |
Dense(3, activation='softmax') | |
]) | |
model2.compile(optimizer='sgd',loss='categorical_crossentropy', metrics=['acc', 'mse']) |
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
model1 = Sequential([ | |
Dense(512, activation='tanh', input_shape = X_train[0].shape), | |
Dense(512//2, activation='tanh'), | |
Dense(512//4, activation='tanh'), | |
Dense(512//8, activation='tanh'), | |
Dense(32, activation='relu'), | |
Dense(3, activation='softmax') | |
]) | |
print(model1.summary()) | |
model1.compile(optimizer='sgd',loss='categorical_crossentropy', metrics=['acc', 'mse']) |
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
from sklearn.datasets import load_iris | |
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.utils import to_categorical | |
from tensorflow.keras.layers import Dense | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.model_selection import train_test_split | |
iris = load_iris() | |
X = iris.data | |
y = iris.target | |
y = to_categorical(y) #converting output to one-hot vector |
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 "BST.h" | |
node* BST::search(int x) | |
{ | |
if (x == root->data) | |
{ | |
return root; | |
} | |
node* temp = root; | |
while (temp) |
NewerOlder