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 / latex_installation.sh
Last active July 4, 2018 16:08
this gist contains necessary steps for installing research work tools like LaTeX, R and other useful library.
### install latex for writing research paper
sudo apt-get update
sudo apt-get install texlive
# for extra (language) packages type following command instead of above
sudo apt-get install texlive-full
# Other useful packages (** optional)
# don't install if you have one or less space in disk
sudo apt-get install ibus
@Mahedi-61
Mahedi-61 / ubuntu.sh
Last active January 19, 2020 20:14
steps require to install ubuntu 18.04 LTS from 16.04 LTS
## Upgrading ubuntu from 16.04LTS to 18.04LTS using command line
# first update previous version
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade && sudo apt autoremove
# update manager core
sudo apt install update-manager-core
# make prompt=lts if not in following file
sudo nano /etc/update-manager/release-upgrades
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 4, 2024 14:18
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/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
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// function for concatenation
char* concat(const char *s1, const char *s2)
{
char *result = malloc(strlen(s1) + strlen(s2) + 1); // +1 for the null-terminator
strcpy(result, s1);
@Mahedi-61
Mahedi-61 / install_canon_printer.sh
Last active March 9, 2024 14:47
canon_LBP3300_printer_driver_installation_on_ubuntu_18.04
## 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 / random_bit_generator.c
Created August 10, 2018 20:44
c code for random bit generator
#include <stdio.h>
#include <stdint.h>
#include <string.h>
//#include <stdlib.h>
int main(int argc, char* argv[])
{
uint32_t lfsr = 0xACE1ACE1u;
unsigned period = 0;
@Mahedi-61
Mahedi-61 / preprocess_go.sh
Last active August 21, 2018 09:03
unix script for preprocessing and preparing Gene Ontology Consortium dataset (go annotations)
#!/bin/bash
# This gist preprocess goa dataset of over 543M samples (~94 GB) to around 170M samples with selected column (~6 GB) for research
# removing first 8 lines
sed -i '1,8d' goa_uniprot_all.gaf
# putting NA to missing values
sed -i "s/\t\t/\tNA\t/g" goa_uniprot_all.gaf
# making string to one single world
sed -i 's/ /-/g' goa_uniprot_all.gaf
@Mahedi-61
Mahedi-61 / sync_image_blend.py
Created September 2, 2018 15:39
this gist contains python code for blening icon images into source image
"""
@Author: Md Mahedi Hasan
"""
# python modules
import re, random
import os, glob
from skimage import io, util
from scipy import ndarray, ndimage
from PIL import Image
import PIL
@Mahedi-61
Mahedi-61 / net_config.sh
Created September 14, 2018 06:40
Instructions for installing static and dynamic IP address in Arch Linux
# 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 / openpose_install_on_CentOS-7.sh
Last active August 15, 2019 06:42
installing openpose at CentOS 7 server machine
#!/bin/bash
# Openpose required CMake version >= 3.12
# remove previous verison
sudo yum remove cmake
# set new version
version=3.14
build=6