Skip to content

Instantly share code, notes, and snippets.

View Mahedi-61's full-sized avatar
🕌
Oh Lord! Bestow me with Knowledge

Md Mahedi Hasan Mahedi-61

🕌
Oh Lord! Bestow me with Knowledge
  • West Virginia University
  • Morgantown, WV
View GitHub Profile
@Mahedi-61
Mahedi-61 / SqueezeNetCIFAR.py
Created February 1, 2022 04:24
SqueezeNet on CIFAR-10 Dataset
import torch
import torch.optim as optim
import numpy as np
from matplotlib import pyplot as plt
from tabnanny import check
from sklearn.metrics import confusion_matrix
import seaborn as sns
from torch import nn
import torch.nn.init as init
from torchvision import transforms, datasets
@Mahedi-61
Mahedi-61 / RBF_Pseudo_Inverse.py
Last active October 3, 2022 21:26
Radial Basis Function initialized on K-means and trained on Pseudo Inverse for MNIST digit classification
"""
modified from several gist of https://gist.github.com/tarlanahad
For Homework Assingment 12 (CpE 520)
"""
import numpy as np
import torchvision
from matplotlib import pyplot as plt
from sklearn.metrics import confusion_matrix
import seaborn as sns
@Mahedi-61
Mahedi-61 / RBF_classifier.py
Last active December 5, 2021 21:50
Radial Basis Function Netowork for MNIST classification tranined on gradient decent approach
"""
Author: Md Mahedi Hasan
For Homework Assingment 12 (CpE 520)
"""
import numpy as np
import os
import matplotlib.pyplot as plt
from torch.utils.data import DataLoader
from torchvision import transforms
@Mahedi-61
Mahedi-61 / KSOM.py
Created November 29, 2021 01:24
Implementing Kohonen Self Organizing Maps using numpy
"""
Script to implement simple self organizing map
@author: Riley Smith
Created: 1-27-21
"""
"""
@modified: Md Mahedi Hasan (11/28/2021)
For Homework Assingment 11 (CpE 520
"""
@Mahedi-61
Mahedi-61 / autoencoder_mnist.py
Last active November 18, 2021 20:47
3-layer autoencoder for MNIST digit reconstruction and classification with visualization (Pytorch)
"""
Course: Applications of NN (CpE - 520)
Homework Assignment 9
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import torch
@Mahedi-61
Mahedi-61 / parity-3-problem
Last active January 10, 2023 21:00
Solving Parity-3 problem using 3-layer from scratch
# solving parity-3 problems using numpy only
from os import error
import numpy as np
import math
np.random.seed(1)
def relu(x):
return np.maximum(0, x)
@Mahedi-61
Mahedi-61 / pdftk_commands.sh
Last active November 2, 2020 14:41
useful commands of shell script pdftk
# Replacing few page from a pdf file using another pdf file
pdftk A=first.pdf B=second.pdf cat A1 B1 A3-end output out.pdf
# Above code means second page of first.pdf is replaced by the first page of second PDF
# merging multiple files into one file
pdftk file1.pdf file2.pdf cat output mergedfile.pdf
@Mahedi-61
Mahedi-61 / bslr.ipynb
Last active March 24, 2020 02:48
Notebook for running openpose for my Bangla Sign Language Project in Google Colaboratory
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mahedi-61
Mahedi-61 / latex_math.tex
Last active December 27, 2019 19:58
gait journal latex math
#for equation 3
\begin{align*}
\alpha &=
\begin{cases}
\tan^{-1}{\frac{|J_{2x}-J_{1x}|}{|J_{2y}-J_{1y}|}} & J_{2y} \neq J_{1y}\\
\pi/2 & J_{2y} = J_{1y}
\end{cases} \\ \noalign{\vskip10pt}
\beta &=
\begin{cases}
@Mahedi-61
Mahedi-61 / AlgorithmForBDGovt.py
Last active August 19, 2021 19:47
how BD government find Abrar Murderer
"""
Author: A cup of Tea
Description: Algorithm about how BD government is going to find Abrar Murderer
"""
def findGuiltyToAbrarMurder():
if(guilty == activistOfBCL):
victim = activistOfShibir
silenceLikeHell()
useBruteForceToRemoveMovement(BCLGang, BDPolice)