Skip to content

Instantly share code, notes, and snippets.

View Mynuddin-dev's full-sized avatar
😁
Deep Learning

Md Mynuddin Mynuddin-dev

😁
Deep Learning
View GitHub Profile
@Mynuddin-dev
Mynuddin-dev / skin_detection.py
Last active November 9, 2022 18:18
Skin Detection with Naive Bayes on Colab
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):
@Mynuddin-dev
Mynuddin-dev / HPFFP.md
Created November 3, 2022 10:49 — forked from DadgadCafe/HPFFP.md
Haskell Programming From First Principles

HASKELL PROGRAMMING FROM FIRST PRINCIPLES

CHAPTER1. ALL YOU NEED IS LAMBDA

1.1 All You Need is Lambda

lambda calculus:

computation model, 1930s, Alonzo Church, formalizing a method, Turing machines

## 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)):
@Mynuddin-dev
Mynuddin-dev / camera.py
Created August 22, 2022 10:24
Face Recognation
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
@Mynuddin-dev
Mynuddin-dev / utt2spk.py
Created August 4, 2022 08:06
For kaldi utt2spk file modified(sort)
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)
@Mynuddin-dev
Mynuddin-dev / vocab.py
Last active August 2, 2022 06:21
lexicon text to vocab text
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")
@Mynuddin-dev
Mynuddin-dev / Image_resize.py
Created July 13, 2022 06:57
Multiple Image Resize
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)
@Mynuddin-dev
Mynuddin-dev / traffic.py
Last active June 30, 2022 08:35
traffic ai50 assignment
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
@Mynuddin-dev
Mynuddin-dev / LeNet5.py
Last active November 12, 2023 15:54
LeNet5 handwritten digit recognition
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
@Mynuddin-dev
Mynuddin-dev / CNN_X_Y.py
Last active November 4, 2022 07:13
train image data with cnn
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