Skip to content

Instantly share code, notes, and snippets.

View qingkaikong's full-sized avatar

Qingkai Kong qingkaikong

View GitHub Profile
qingkaikong /
Created July 29, 2016 07:00 — forked from piscisaureus/
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

# -*- coding: utf-8 -*-
# An pure python implemetation of Dynamic Time Warpping
class Dtw(object):
def __init__(self, seq1, seq2, distance_func=None):
seq1, seq2 are two lists,
distance_func is a function for calculating
from numpy import loadtxt, zeros, ones, array, linspace, logspace
from pylab import scatter, show, title, xlabel, ylabel, plot, contour
#Evaluate the linear regression
def compute_cost(X, y, theta):
Comput cost for linear regression
#Number of training samples
qingkaikong /
Created November 21, 2013 23:40 — forked from ivanov/
# A template to demonstrate why we need to profile
# This instance written by Paul Ivanov (XXX: put your name / github id here)
def where_is_the_bottleneck(x):
def could_be_this_one(x, y):
def or_this_one(x):