View installing_opencv_from_source_in_Ubuntu_1804.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. | |
View cuda_setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View even_palindrome.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
View even_palindrome.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) |
View working_with_imagemagick.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View working_in_remote_server.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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> |
View ml_setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View useful_unix_commands.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View linux_fun.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 |
View group_bar_plot.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
OlderNewer