Skip to content

Instantly share code, notes, and snippets.

View cococ0j's full-sized avatar

Steve Zehui Ji cococ0j

View GitHub Profile
@cococ0j
cococ0j / giphy.5.gif
Last active June 9, 2019 10:35
Gist for giphy.5.gif. Generated by `crop-github-images-cli`.
giphy.5.gif
@cococ0j
cococ0j / giphy.4.gif
Last active June 9, 2019 10:35
Gist for giphy.4.gif. Generated by `crop-github-images-cli`.
giphy.4.gif
@cococ0j
cococ0j / giphy.0.gif
Last active June 9, 2019 10:35
Gist for giphy.0.gif. Generated by `crop-github-images-cli`.
giphy.0.gif
@cococ0j
cococ0j / giphy.3.gif
Last active June 9, 2019 10:35
Gist for giphy.3.gif. Generated by `crop-github-images-cli`.
giphy.3.gif
@cococ0j
cococ0j / giphy.1.gif
Last active June 9, 2019 10:35
Gist for giphy.1.gif. Generated by `crop-github-images-cli`.
giphy.1.gif
@cococ0j
cococ0j / giphy.2.gif
Last active June 9, 2019 10:35
Gist for giphy.2.gif. Generated by `crop-github-images-cli`.
giphy.2.gif
# the fuction to find pairs
def findPairs(targ,alist):
# First, we create a hash table to store our list to shorten the search time.
# Here, we use python built-in data structure- dictionary to store key,value pairs, as dictionary is implemented based on hash.
d = {}
# store result
result = []
@cococ0j
cococ0j / global.R
Created April 26, 2018 13:57 — forked from psychemedia/global.R
f1 laptime explorer - Shiny - ergast API
library(RJSONIO)
library(plyr)
#racechart
#Helper functions
getNum=function(x){as.numeric(as.character(x))}
timeInS=function(tStr){
x=unlist(strsplit(tStr,':'))
tS=60*getNum(x[1])+getNum(x[2])