Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Yu Chen Hou yucombinator

😀
View GitHub Profile
View gist:d833fab0db2b92a3cfdc6184058d5812
PS C:\Users\houyu\Dropbox\Code> python .\theroom.py
That’s too bad. My Lisa is loyal to me.
None
Well maybe you should be happy, Mark.
None
I have a problem with Lisa. Um, I don’t have a dozen red roses, please?
Well maybe you should leave right now, Mark.
Let’s go eat, hunh? Come on, it’s good for you, come on.
You must be crazy. I cannot tell you, it’s confidential.
No, it’s not true! It’s bullshit! I did not hit her! It’s not true! It’s bullshit! I did not hit her! It’s not over! Everybody betray me. Let’s see
@yucombinator
yucombinator / output.csv
Last active February 10, 2019 07:19
Lester / Uni WPS Data
View output.csv
Year Intersection Incident Date
2011 Sunview St / University Ave W 9520-MVC HIT AND RUN Jan 7 2011 8:12AM
2011 Lester St / University Ave W 9520-MVC HIT AND RUN Feb 5 2011 2:14AM
2011 Albert St / University Ave W 9500-MVC PROP. DAMAGE Feb 19 2011 12:51PM
2011 Albert St / University Ave W 9570-IMPAIRED DRIVER Feb 26 2011 6:50PM
2011 Albert St / University Ave W 9520-MVC HIT AND RUN Feb 26 2011 6:51PM
2011 Albert St / University Ave W 9520-MVC HIT AND RUN Mar 7 2011 6:30PM
2011 Albert St / University Ave W 9520-MVC HIT AND RUN Mar 8 2011 4:00PM
2011 Lester St / University Ave W 9520-MVC HIT AND RUN Mar 10 2011 10:00PM
2011 Lester St / University Ave W 9520-MVC HIT AND RUN Aug 8 2011 5:54PM
View gist:5a804a4893d89182d8891fcabef5088b
PS C:\Users\houyu\Code\lester> python .\parser.py
YEAR: 2011
Sunview St / University Ave W - Jan 7 2011 8:12AM - 9520-MVC HIT AND RUN.
Lester St / University Ave W - Feb 5 2011 2:14AM - 9520-MVC HIT AND RUN.
Albert St / University Ave W - Feb 19 2011 12:51PM - 9500-MVC PROP. DAMAGE.
Albert St / University Ave W - Feb 26 2011 6:50PM - 9570-IMPAIRED DRIVER.
Albert St / University Ave W - Feb 26 2011 6:51PM - 9520-MVC HIT AND RUN.
Albert St / University Ave W - Mar 7 2011 6:30PM - 9520-MVC HIT AND RUN.
Albert St / University Ave W - Mar 8 2011 4:00PM - 9520-MVC HIT AND RUN.
Lester St / University Ave W - Mar 10 2011 10:00PM - 9520-MVC HIT AND RUN.
@yucombinator
yucombinator / gtkmm3.md
Created July 8, 2016 21:49
gtkmm3 on Windows + VS
View gtkmm3.md
View keybase.md

Keybase proof

I hereby claim:

  • I am icechen1 on github.
  • I am yuchen (https://keybase.io/yuchen) on keybase.
  • I have a public key whose fingerprint is A35A EE7D BBAF CE5E F0AB 1E8D B24C 0C3B 2941 B6AB

To claim this, I am signing this object:

@yucombinator
yucombinator / timersort.py
Created December 27, 2014 00:23
The silliest sorting algorithm of all time.
View timersort.py
import time
from threading import Timer
array = [10,5,2,4,1,7,65,2,8,1]
res = []
def timersort(array):
for i in array:
Timer(i/10, res.append,[i]).start()
timersort(array)
@yucombinator
yucombinator / ite_bin_search.c
Created December 15, 2014 18:06
Iterative binary search
View ite_bin_search.c
int binarySearchIte(int *a, int start, int end, int value) {
while ((end - start) > 1) {
int cursor = start + (end - start) / 2;
if (a[cursor] == value) {
return cursor;
}
if (a[cursor]<value) {
start = cursor;
View bin search.c
int binarySearch(int *a, int start, int end, int value) {
if ((end-start) <= 1) {
//base case
return -1;
}
int cursor = start + (end - start) / 2;
if (a[cursor]>value) {
return binarySearch(a, start, cursor, value);
View Mergesort.c
void mergeS(int *a, int n, int *temp){
//base case
if (n <= 1) {
return;
}
//recursion stuff
mergeS(a, n / 2, temp);
mergeS(a + n/2, n - n / 2, temp);
int i = 0, j = n / 2, k = 0;
@yucombinator
yucombinator / gist:5954276
Created July 9, 2013 02:40
pig latin translator for haskell
View gist:5954276
{-# LANGUAGE CPP, TemplateHaskell #-}
-----------------------------------------------------------------------------
--
-- Module : pigLatin
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer : Yu Chen Hou
-- Stability :
-- Portability :