computation model, 1930s, Alonzo Church, formalizing a method, Turing machines
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 cv2 | |
import os | |
import numpy as np | |
import csv | |
import pandas as pd | |
dir = "/content/drive/MyDrive/Applied_data_Science" | |
def absoluteFilePaths(directory): | |
filePaths = [] | |
for dirpath,_,filenames in os.walk(directory): |
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
## Day 1: Report Repair | |
## Part 1 | |
---------------------------- | |
with open("data.txt") as f: | |
numbers = f.readlines() | |
# print(len(numbers)) | |
for i in range(len(numbers)-1): | |
for j in range(i+1,len(numbers)): |
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 cv2 | |
from imutils.video import WebcamVideoStream | |
from imutils.video import FPS | |
import imutils | |
import numpy as np | |
import time | |
import dlib | |
import cv2 | |
import os | |
import math |
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
with open("utt2spk") as f: | |
liness = f.readlines() | |
utt2spk_final = open("utt2spk_final.txt" , 'w') | |
for line in liness: | |
words = line.split() | |
utt = (words[1],words[0]) | |
uttjoin = '-'.join(utt) | |
# print(uttjoin) |
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
with open("librispeech-lexicon.txt") as f: | |
liness = f.readlines() | |
vocabulary = open("vocab.txt" , 'w') | |
for line in liness: | |
vocabulary.write(line.split()[0] +"\n") |
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 cv2 | |
import os | |
import numpy as np | |
path = "/home/myn/Downloads/all_images/" | |
destination = "/home/myn/Downloads/resized_all_images" | |
for img_name in os.listdir(path): | |
# print(img_path) | |
img = cv2.imread(str(path)+"/"+str(img_name)) | |
# print(img.shape) | |
img = cv2.resize(img, (200,200), interpolation = cv2.INTER_AREA) |
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 cv2 | |
import glob | |
import numpy as np | |
import os | |
import sys | |
import tensorflow as tf | |
from sklearn.model_selection import train_test_split | |
EPOCHS = 10 |
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 keras.datasets import mnist | |
from keras.utils import to_categorical | |
from keras.layers import * | |
from keras.models import * | |
import numpy as np | |
## Load and preprocess the MNIST dataset | |
(train_images , train_labels) , (validation_images , validation_labels) = mnist.load_data() | |
## reshaping the images and normalizing the pixel values to be between 0 and 1. | |
train_images = train_images.reshape((60000, 28, 28, 1)).astype('float32') / 255 |
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 glob | |
from importlib.resources import path | |
from os import listdir | |
from os.path import isfile, join | |
import cv2 | |
import os | |
import numpy as np | |
from random import shuffle | |
# from tqdm import tqdm | |
import pandas as pd |
NewerOlder