Skip to content

Instantly share code, notes, and snippets.

View myfavouritekk's full-sized avatar

Kai KANG myfavouritekk

View GitHub Profile
@myfavouritekk
myfavouritekk / # opencv - 2016-09-28_14-20-18.txt
Created September 28, 2016 06:21
opencv (homebrew/science/opencv) on macOS 10.12 - Homebrew build logs
Homebrew build logs for homebrew/science/opencv on macOS 10.12
Build date: 2016-09-28 14:20:18
@myfavouritekk
myfavouritekk / # gnuplot - 2016-09-27_10-49-58.txt
Created September 27, 2016 02:53
gnuplot on macOS 10.12 - Homebrew build logs
Homebrew build logs for gnuplot on macOS 10.12
Build date: 2016-09-27 10:49:58
@myfavouritekk
myfavouritekk / requirements.txt
Last active July 21, 2016 07:46
Server setup
numpy>=1.7.1
scipy>=0.13.2
scikit-image>=0.9.3
matplotlib>=1.3.1
ipython>=3.0.0
h5py>=2.2.0
leveldb>=0.191
networkx>=1.8.1
nose>=1.3.0
pandas>=0.12.0
@myfavouritekk
myfavouritekk / Readme.md
Last active June 3, 2016 09:21
GeneDataLayer: Python layer in Caffe for gene data
@myfavouritekk
myfavouritekk / Readme.md
Last active January 28, 2016 05:52
Generate Logistic Distribution random numbers on GPU in Matlab

#Generate Logistic Distribution random numbers on GPU in Matlab

GPU implementation of random('Logistic', mu, sigma, shape) in Matlab. Copyright @ Kai Kang (myfavouritekk@gmail.com) 2016

##Time profiling with built-in random function

gpuLogistic has similar interface with random, but is suitable for generating large number of random numbers thanks to GPU.

@myfavouritekk
myfavouritekk / Readme.md
Last active April 25, 2022 11:50
Extract dense optical flow and save as grayscale or RGB images

#Extract dense optical flow and save as grayscale or RGB images Copyright @ Kai Kang (myfavouritekk@gmail.com) 2016

##Dependencies

  • OpenCV 2 with Python interface
  • glob, numpy, siopy

##Usages

# help messages
@myfavouritekk
myfavouritekk / README.md
Last active November 9, 2015 05:02
ELEG 3101 Final Project Judging Program

ELEG 3101 (2015-2016) Final Project Judging Program

Installation or Dependencies

  • edit_dist.cpp:
$ g++ edit_dist.cpp -o edit_dist
  • edit_dist.py:
@myfavouritekk
myfavouritekk / wget_baidu_yun.sh
Created August 2, 2015 12:00
Download Baidu Yun file using wget
#!/usr/bin/env bash
# referer url is public share links
# file url can be found via browser downloading
referer_url=$1
file_url=$2
save_name=$3
wget --referer=$referer_url -O $save_name "$file_url"
@myfavouritekk
myfavouritekk / brew_version.sh
Last active August 29, 2015 14:20 — forked from gcatlin/gist:1847248
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@myfavouritekk
myfavouritekk / git_routines.md
Last active August 29, 2015 14:17
Git: Common Routines

#Git: Common Routines

Remote repositories

  • Fetch the branches and their respective commits from the upstream repository.
$ git fetch upstream
  • Check out your fork's local master branch.