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 / installing_opencv_from_source_in_Ubuntu_1804.sh
Last active April 4, 2024 05:05
Installing OpenCV from source on Ubuntu 18.04 machine
#!/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 / cuda_setup.sh
Created December 6, 2017 11:15
Installing CUDA toolkit v8..0 and cuDNN 6.0 on Ubuntu 16.04
#!/bin/bash
## This gist is a step by step instructions to install cuda v8.0 and cudnn 6.0 on ubuntu 16.04
## official guide: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
### steps ####
# verify the system has a cuda-capable gpu
# verify the system has gcc installed
# download and install the nvidia cuda toolkit
# download cudnn
# setup environment variables
@Mahedi-61
Mahedi-61 / even_palindrome.c
Last active April 8, 2018 02:36
codeforces problem solution in c
// my solution to problem http://codeforces.com/problemset/problem/897/B
#include<stdio.h>
#include<math.h>
int main(){
int num_digit = 0, remainder = 0;
long int num_palindrome, count = 0, n = 0;
long long int palindrome = 0, mod = 0, rev_num = 0, arr_sum = 0;
num_digit = 0
num_palindrome = 0
count = 0
n = 0
palindrome = 0
mod = 0
arr_sum = 0
s = input()
num_palindrome, mod = map(int, s.split())
@Mahedi-61
Mahedi-61 / working_with_imagemagick.sh
Last active July 17, 2018 08:49
installation and basic commands of ImageMagick
#!/bin/bash
## This gist contains instructions about complete installation about ImageMagick,
# a powerful open-source command line image editor tool
### installation ###
cd
sudo apt-get install build-essential checkinstall && sudo apt-get build-dep imagemagick -y
# get latest version of the imagemagic tar.gz file
@Mahedi-61
Mahedi-61 / working_in_remote_server.sh
Last active November 18, 2021 22:02
useful unix command for beginners to work in remote server
#!/bin/bash
# This gist contains unix command useful for beginners who started working in remote server for their project.
# machine: Ubuntu 16.04
### Connection
# connecting to a remote system using SSH (Secure Shell)
ssh <remote_host>
# for different username on the remote system
ssh <user_name@remote_host>
@Mahedi-61
Mahedi-61 / ml_setup.sh
Last active August 25, 2022 21:36
setting python3 environment on linux machine for machine learning project
#!/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 / useful_unix_commands.sh
Last active January 19, 2020 20:15
some useful unix commands used most commonly.
#!/bin/bash
# This gist contains commands used in my everyday life
### compressing a file
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
# -c: create an archive.
# -z: compress the archive with gzip.
# -v: verbosity
# -f: allows you to specify the filename of the archive
@Mahedi-61
Mahedi-61 / linux_fun.sh
Last active April 8, 2018 14:47
this file contains linux command for fun. so let's install and enjoy :-)
### command: sl (Steam Locomotive) :-) :-)
sudo apt-get install sl
# This command works even when you type ‘LS‘ and not ‘ls‘.
#### CMatrix is a simple program that shows the cool matrix scrolling lines in the terminal.
sudo apt-get install cmatrix
# for running cmatrix type
#cmatrix
@Mahedi-61
Mahedi-61 / group_bar_plot.R
Last active December 29, 2018 11:16
creating group bar chart using r for research publication.
setEPS()
postscript("example.eps")
nm=c(98.45, 97.58, 98.75, 96.92, 99.41)
bag=c(56.23, 72.14, 72.73, 85.78, 87.10)
coat=c(16.93, 45.45, 41.50, 68.11, 55.13)
data=matrix(c(nm,bag,coat), ncol=3)
colnames(data)=c("normal", "bag", "coat")
rownames(data)=c("GEI+PCA", "SPAE", "GaitGAN", "PTSN", "Proposed")