Skip to content

Instantly share code, notes, and snippets.

View ibogun's full-sized avatar

Ivan ibogun

View GitHub Profile
parallel --header : echo my_command --f1={f1} --f2={f2} ::: f1 A B ::: f2 C D
@ibogun
ibogun / gist:df2eacd9bc4687967e27
Created April 18, 2015 16:52
for loop with paralell
seq 1 10 | parallel octave --silent --eval "test\({},{}\)"
// First program
#include "google/gtest/include/gtest/gtest.h"
int sum(int a, int b) {return a+b;}
TEST(Sum, Normal) {
EXPECT_EQ(5, sum(2, 3));
}
int main(int argc, char **argv) {
# connect to remote
# run screen ( on remote)
screen
# OR list screens
screen -ls
# if screen is running reattach it
screen -dRR ###
@ibogun
ibogun / gist:b72e3723d3d827b7dbf8
Created September 17, 2015 13:37
ffmpeg magic
# create a movie from the images with 1 image per 25 frames in the video
ffmpeg -r 1 -start_number 1000 -i %d.png -r 25 -vf scale=1200x800 basketball.avi
cmake -DCVPR2016=ON -DBoost_NO_SYSTEM_PATHS=True -DBoost_NO_BOOST_CMAKE=TRUE -DBOOST_ROOT=~/local/ ..
#include "armadillo"
int main(int argc, char *argv[]) {
int n = 100; // rows
int m = 200; // cols
arma::mat x(n,m,arma::fill::zeros); // initialize matrix to all zeros
// superpixels might not form rectangles, in general. -> Solution: keep
// track of indices which form superpixel
// Assume all superpixels are enumerated from 1 to |S| where |S| is the total number of superpixels
# kill all processes by a user
pkill -9 -u `id -u username`
@ibogun
ibogun / gist:ec0a4005c25df57a1b9d
Last active February 2, 2021 13:26
Installing gcc 4.9 & g++ 4.9 on Ubuntu 12.04 OR Ubuntu 14.04
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
sudo apt-get install g++-4.9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50
@ibogun
ibogun / gist:064115cd618e2956170d
Created January 15, 2016 17:13
Tensorflow + antrack
Installation of the tensorflow + antrack:
install_name_tool -change bazel-out/local_darwin-fastbuild/bin/tensorflow/libtensorflow.so \
/Users/Ivan/Code/deep/tensorflow/bazel-tensorflow/bazel-out/local_darwin-fastbuild/bin/tensorflow/libtensorflow.so \
./bin/robust_struck_tracker_v1.0
install_name_tool -change bazel-out/local_darwin-fastbuild/bin/tensorflow/cc/libcc_ops.so \
/Users/Ivan/Code/deep/tensorflow/bazel-tensorflow/bazel-out/local_darwin-fastbuild/bin/tensorflow/cc/libcc_ops.so \
./bin/robust_struck_tracker_v1.0