Skip to content

Instantly share code, notes, and snippets.

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 / cuda_11.3_installation_on_Ubuntu_20.04
Last active May 21, 2023 14:09
Instructions for CUDA v11.3 and cuDNN 8.2 installation on Ubuntu 20.04 for PyTorch 1.11
View cuda_11.3_installation_on_Ubuntu_20.04
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@Mahedi-61
Mahedi-61 / installing_opencv_3.45_in_CentOS-7.sh
Last active May 16, 2023 02:53
Step by step instructions to build and install OpenCV from source on CentOS 7
View installing_opencv_3.45_in_CentOS-7.sh
#!/bin/bash
# This gist is a step by step instructions to build and install OpenCV from source on CentOS 7
# note: The easy and quick way to install is
# sudo yum install opencv opencv-devel opencv-python
# But this easy pypi installation can’t open video files on GNU/Linux distribution or on mac OS X system.
# And on some system opencv binaries provided packages are not compiled.
# Therefor we have no way rather than build it from source.
### first update and upgrade pre-install yum packages.
@Mahedi-61
Mahedi-61 / net_config.sh
Created September 14, 2018 06:40
Instructions for installing static and dynamic IP address in Arch Linux
View net_config.sh
# first, install netctl if not already installed.
sudo pacman -S netctl
# to find out network card name; check
ip link
### configuring Static IP address
# my network card name is enp0s3. Now, copy the sample network card profile
sudo cp /etc/netctl/examples/ethernet-static /etc/netctl/enp0s3
@Mahedi-61
Mahedi-61 / parity-3-problem
Last active January 10, 2023 21:00
Solving Parity-3 problem using 3-layer from scratch
View parity-3-problem
# 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 / install_canon_printer.sh
Last active October 19, 2022 17:17
canon_LBP3300_printer_driver_installation_on_ubuntu_18.04
View install_canon_printer.sh
## This gist contains step by step instructions of installing canon LBP3300 printer driver on ubuntu 18.04 machine
## After a couple of months painful trying, i finally got it successfully installed on my 18.04 ubuntu machine.
## Here is the requirement
# 1) For 64 bit linux version install necessary the libraries
# 2) install the official CAPT drivers
# 3) register the printer with lpadmin
# 4) register the printer with the ccpd daemon
@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
View RBF_Pseudo_Inverse.py
"""
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 / CUDA_Toolkit_10.0_installation_on_CentOS_7.sh
Last active September 21, 2022 12:34
Step by step instructions for installing CUDA Toolkit 10.0 CentOS 7 Server machine for running Deep Learning projects
View CUDA_Toolkit_10.0_installation_on_CentOS_7.sh
#!/bin/bash
## This gist contains step by step instructions to install cuda v10.1 and cudnn 7.6 in CentOS 7
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@Mahedi-61
Mahedi-61 / installing_opencv_from_source_in_Ubuntu_1804.sh
Last active September 11, 2022 21:26
Installing OpenCV from source on Ubuntu 18.04 machine
View installing_opencv_from_source_in_Ubuntu_1804.sh
#!/bin/bash
# This gist is a step by step instructions to build and install OpenCV from source on ubuntu 18.04 LTS
# note: The easy and quick way to install is
# sudo pip3 install opencv-python
# sudo pip3 install opencv-contrib-python
# But this easy pypi installation can’t open video files on GNU/Linux distribution or on mac OS X system.
# And on some system opencv binaries provided packages are not compiled.
# Therefor we have no way rather than build it from source.
@Mahedi-61
Mahedi-61 / ml_setup.sh
Last active August 25, 2022 21:36
setting python3 environment on linux machine for machine learning project
View ml_setup.sh
#!/bin/bash
# Instructions for installing necessary packages for running machine learning projects in Ubuntu machine
# first update and upgrade your system
sudo apt-get update
sudo apt-get install build-essential cmake g++ gfortran git pkg-config python-dev python3-tk software-properties-common wget
# install pip3 for working on python 3
sudo apt-get install python3-pip
pip3 install --upgrade pip
@Mahedi-61
Mahedi-61 / SqueezeNetCIFAR.py
Created February 1, 2022 04:24
SqueezeNet on CIFAR-10 Dataset
View SqueezeNetCIFAR.py
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