Skip to content

Instantly share code, notes, and snippets.

View sudoankit's full-sized avatar
📖
Reading.

Ankit sudoankit

📖
Reading.
View GitHub Profile
@sudoankit
sudoankit / brewcv3.sh
Created June 24, 2017 07:47
Install OpenCV3 on MacOS with Python Support.
brew install opencv3 --with-contrib --with-python3 --c++11 --with-examples --with-ffmpeg --with-gphoto2 --with-gstreamer --with-jasper --with-java --with-opengl --with-qt5 --with-quicktime --with-vtk --with-tbb --HEAD
@sudoankit
sudoankit / cv-compile.sh
Last active May 30, 2017 12:40
Shell script to compile OpenCV programs.
g++ `pkg-config --cflags --libs opencv` $1 -o $2 `pkg-config --cflags --libs opencv`
# $1 = yourprogram.cpp
# $2 = executable output name; yourprogram
# save the file in your directory
# $chmod +x cv-compile.sh
# $sh cv-compile $1 $2
# Caveats

Keybase proof

I hereby claim:

  • I am sudoankit on github.
  • I am sudoankit (https://keybase.io/sudoankit) on keybase.
  • I have a public key whose fingerprint is 743D AA67 1B6A 98CD EF36 FE6F BA90 CC4F 13B2 E43D

To claim this, I am signing this object:

@sudoankit
sudoankit / c++Template.cpp
Created May 15, 2016 12:51 — forked from kodekracker/c++Template.cpp
Basic C++ Template for Competitive Programming
/*
* Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
* Example:- $ g++ -std=c++11 c++Template.cpp
*
* Author : Akshay Pratap Singh
* Handle: code_crack_01
*
*/
/******** All Required Header Files ********/
@sudoankit
sudoankit / test1.cpp
Last active March 23, 2016 18:58
sample test case for NIX npylib backend.
class npyExampleTestSuite : public Test::Suite
{
public:
npyExampleTestSuite()
{
TEST_ADD(ExampleTestSuite::f_test)
TEST_ADD(ExampleTestSuite::s_test)
}
private:
@sudoankit
sudoankit / insert_sort_mycodeschool_youtube.cpp
Last active December 20, 2015 15:24
The insertion sort using C++
#include<iostream>
using namespace std;
void insertion_sort(int A[],int n){
for(int i = 0 ; i < n ;i++){
int j,key; // I have taken hole as j. It's sounds better, anyways.
key = A[i];
j = i;
while(j > 0 && A[j-1] > key ){
A[j] = A[j-1]; //left shift