Skip to content

Instantly share code, notes, and snippets.

View anguyen8's full-sized avatar

Anh (Totti) Nguyen anguyen8

View GitHub Profile
@anguyen8
anguyen8 / mongodb_db.js
Created April 26, 2012 23:57 — forked from elranu/mongodb_db.js
ueberDB support for monogDB - etherpad-lite
/**
* Mariano Julio Vicario aka Ranu - TW: @el_ranu
* http://www.ranu.com.ar
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
#include <cuda_runtime.h>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <string>
#include <iostream>
#include <stdio.h>
#include "caffe/caffe.hpp"
/*
* given a list of input leveldb's, merge them into a single output leveldb
*
*/
#include <iostream>
#include <algorithm>
#include <boost/program_options.hpp>
#include <boost/cstdint.hpp>
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'

Mac OS X Terminal Aliases & How-To

Collection of some of my fav terminal aliases that i use often & collected from the web. This file will be updated with more aliases as i find more. Feel free to comment and share your fav aliases you use :)

###Follow these simple steps to add the following aliases:###


  1. Within the Terminal, run:
@anguyen8
anguyen8 / git_push
Created May 11, 2015 19:20
GitPush with checking for updates
function gpush () {
# Check if we need to pull before pushing
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u})
BASE=$(git merge-base @ @{u})
stop=0
if [ $LOCAL = $REMOTE ]; then
echo "Up-to-date"
@anguyen8
anguyen8 / dlib_plus_osm.md
Created August 17, 2015 01:34 — forked from iandees/dlib_plus_osm.md
Detecting Road Signs in Mapillary Images with dlib C++

image

I've been interested in computer vision for a long time, but I haven't had any free time to make any progress until this holiday season. Over Christmas and the New Years I experimented with various methodologies in OpenCV to detect road signs and other objects of interest to OpenStreetMap. After some failed experiments with thresholding and feature detection, the excellent /r/computervision suggested using the dlib C++ module because it has more consistently-good documentation and the pre-built tools are faster.

After a day or two figuring out how to compile the examples, I finally made some progress:

Compiling dlib C++ on a Mac with Homebrew

  1. Clone dlib from Github to your local machine:
@anguyen8
anguyen8 / gist:9726dd8efbc97477d959
Created August 17, 2015 17:47
Build OpenCV 3.0 on OSX to work with dlib
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
-D PYTHON2_PACKAGES_PATH=~/anaconda/lib/python2.7/site-packages \
-D PYTHON2_LIBRARY=~/anaconda/lib/libpython2.7.dylib \
-D PYTHON2_INCLUDE_DIR=~/anaconda/include/python2.7 \
-D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_opencv_gpu=OFF \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..
#!/bin/bash
# Anh Nguyen <[email protected]>
# 2016-04-30
# MIT License
# This script takes in same-size images from a folder and make a crossfade video from the images using ffmpeg.
# Make sure you have ffmpeg installed before running.
# The output command looks something like the below, but for as many images as you have in the folder.