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
| A = np.array([[1, 2],[3,4],[5,6]]) | |
| B = np.array([[1, 2, 3], [4, 5, 6]]) | |
| Result=[] | |
| for i in range(0,len(A)): | |
| temp=[] | |
| for j in range(0,len(B[0])): | |
| s = 0 | |
| for k in range(0,len(A[0])): | |
| s += A[i][k]*B[k][j] |
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 numpy as np | |
| input_matrix=np.array([[3,0,1,2,7,4], | |
| [1,5,8,9,3,1], | |
| [2,7,2,5,1,3], | |
| [0,1,3,1,7,8], | |
| [4,2,1,6,2,8], | |
| [2,4,5,2,3,9] | |
| ]) | |
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 cv2 | |
| def take_photo(): | |
| cap = cv2.VideoCapture(0) | |
| ret , frame = cap.read() | |
| cv2.imwrite("SS.png",frame) | |
| cap.release() | |
| take_photo() |
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 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 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 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 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
| 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 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
| 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 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 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 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
| #!/usr/bin/bash | |
| files=$(ls *.wav) | |
| for file in $files;do | |
| filename=$(echo $file | cut -d "." -f 1) | |
| sox "$file" -r 48000 $filename{48000}.wav | |
| done | |
| ``` |
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
| ## 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)): |
OlderNewer