Skip to content

Instantly share code, notes, and snippets.

View aanwark's full-sized avatar
🎯
perseverantia super omnia

Ali Anwar aanwark

🎯
perseverantia super omnia
View GitHub Profile
#include <iostream>
#include <opencv2/highgui.hpp>
#include <deque>
using namespace cv;
using namespace std;
//
// e.g. to smooth noisy landmarks ;)
//
#include "opencv2/opencv.hpp"
using namespace cv;
int main(int argc, char** argv)
{
VideoCapture cap;
// open the default camera, use something different from 0 otherwise;
// Check VideoCapture documentation.
if(!cap.open(0))
return 0;
# use polipo to connect to ss server locally, and support polipo listen under 8123.
git config --global http.proxy http://127.0.0.1:8123
HTTP_PROXY=http://127.0.0.1:8123 go get X
git config --global --unset http.proxy
# Encap this to override the issue because fucking GFW block google sites...
@aanwark
aanwark / Shadowsocks_With_V2Ray.md
Created February 26, 2019 02:41
Install Shadowsocks With V2Ray Manually

Installing Packages

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean && sudo apt-get install build-essential haveged -y
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install curl -y
sudo apt-get install shadowsocks-libev -y
sudo apt-get install cron -y
sudo apt-get install screen -y

Install V2Ray

@aanwark
aanwark / how_to_set_up_ssh_keys.md
Created February 27, 2019 04:58 — forked from stormpython/how_to_set_up_ssh_keys.md
Setting up ssh keys for remote server access

How to Set up SSH Keys

Create the RSA Key Pair

ssh-keygen -t rsa

Store the Keys and Passphrase

Once you have entered the Gen Key command, you will get a few more questions:

@aanwark
aanwark / lua_cheat_sheet.lua
Last active May 31, 2019 04:26
Cheat Sheet from Lua Tutorial by Derek Banas
-- Prints to the screen (Can end with semicolon)
print("Hello World")
--[[
Multiline comment
]]
-- Variable names can't start with a number, but can contain letters, numbers
-- and underscores
@aanwark
aanwark / convert.lua
Last active May 31, 2019 05:32
Remaining Cheat Sheet from Derek Banas Lua Tutorial (Lua Modules)
-- The module name and filename are the same
local convert = {}
function convert.ftToCm(feet)
return feet * 30.48
end
return convert
import cv2
from train import train
from keras.models import load_model
t = train()
img_left = cv2.imread("../data/1.bmp")
img_right = cv2.imread("../test_data/0.jpg")
model = t.get_siamese_model()