Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View pjspillai's full-sized avatar

Pree pjspillai

  • San Francisco Bay Area
View GitHub Profile
@pjspillai
pjspillai / bash_sed_freq_useful_stuff
Created May 21, 2019 22:42
Bash , Sed shortcuts
Replace first character in each line with another
(Useful for annotatin label replaceing stuff)
inp_file.txt
1 chrX_73833098_73834098
1 chrX_73889652_73890652
1 chrX_91194501_91195501
1 chrX_92000157_92001157
1 chrX_92106500_92107500
@pjspillai
pjspillai / OpenCV 4.0 , Ubuntu 18.04 Installation
Created November 30, 2018 03:07
OpenCV 4.0 , Ubuntu 18.04 Installation
git clone --recursive https://github.com/opencv/opencv_contrib.git
git clone --recursive https://github.com/opencv/opencv.git
Make sure the CmakeCache params are loaded (refer the one in gist), in cmake-gui
make -j8 install
sudo ldconfig
Note: This might not setup python opencv version correctly. It initially showed me 3.2 when I did
@pjspillai
pjspillai / CMakeCache.txt
Created November 30, 2018 03:01
OpenCV4 : CmakeCache.txt (cmake-gui params)
# This is the CMakeCache file.
# For build in directory: /home/preeti/softwares/opencv/opencv/build
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
@pjspillai
pjspillai / pkg-config_setup.txt
Created November 28, 2018 22:35
Writing own pkg-config
# Package Information for pkg-config
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir_old=${prefix}/include/opencv4/opencv
includedir_new=${prefix}/include/opencv4
Name: OpenCV
Description: Open Source Computer Vision Library
@pjspillai
pjspillai / gcc_5.3_installation_guideline.txt
Last active July 27, 2018 03:53
gcc-5.3 installation on Ubuntu 18 (to enable cuda 9.1 + NVIDIA 390)
# ================= Removing all gcc/g++ and clean build
sudo apt-get remove gcc-7
sudo apt-get remove g++-7
sudo apt-get purge gcc-7* g++-7*
sudo apt autoremove
# =======================================
@pjspillai
pjspillai / gist:dcbd8f4c7804b7cd631f8bec460c14d6
Created July 25, 2018 22:12
qt liqxcb Error (This application failed to start because it could not find or load the Qt platform plugin "xcb")
Problem occurs with anaconda's Qt installation conflicting with the default Qt5 installation (installed via .run)
sudo ln -sf /home/ppillai/anaconda2/envs/tensorflow/plugins/platforms /usr/bin/platforms
OS: Ubuntu 18.04
Others: Opencv, NCCL, CUDA 9.2, CUDNN
NOTE: For Ubuntu 17.04/ 18.04, there's an alternate way to directly install Caffe via apt-get install caffe-cpu and caffe-cuda
I am installing from source so that I can with other caffe algorithms that demand the existence of a CAFFE_ROOT directory
Modify Makefile.config file
--------------------
@pjspillai
pjspillai / gist:53cd7387e3daef9139072e59a7f1d378
Created April 20, 2018 02:24
How to get NVIDIA optimux working on Ubuntu laptop
https://www.pcsuggest.com/nvidia-optimus-ubuntu/
@pjspillai
pjspillai / Opencv_3.3_Ubuntu16_Cuda_9.1_Installation.txt
Last active June 19, 2018 22:15
Opencv 3.3, Ubuntu 16.04, Cuda 9.1 Installation Quick Checks
Download NVIDIA and CUDA drivers from here (.run files)
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal
http://www.nvidia.com/content/DriverDownload-March2009/confirmation.php?url=/XFree86/Linux-x86_64/390.25/NVIDIA-Linux-x86_64-390.25.run&lang=us&type=TITAN
disable nouveau
disable XServer
rm /tmp .X* filesuname -r
sudo update-initramfs -u [update initramfs]
@pjspillai
pjspillai / README.md
Created April 22, 2016 23:52 — forked from bergie/README.md
MQTT pub/sub example

This is a simple example of the MQTT protocol with Node.js. The client code has also been tested with a combination of C++ servers and clients.