Skip to content

Instantly share code, notes, and snippets.

View SamLau95's full-sized avatar

Sam Lau SamLau95

View GitHub Profile
@SamLau95
SamLau95 / gist:4394153
Created December 28, 2012 03:07
Testing
We couldn’t find that file to show.
@SamLau95
SamLau95 / .vromerc
Last active August 29, 2015 14:01
Vrome config
map j 10j
map k 10k
map h 10h
map l 10l
set disablesites=mail.google.com,drive.google.com,docs.google.com,facebook.com,google.com,hipchat.com,coursera.org,http://snap.berkeley.edu/,slack.com,github.com,armorgames.com,http://127.0.0.1:8888/,pandagrader.com,coderpad.io,proquest.safaribooksonline.com/book,codeschool.com,http://www.patatap.com/,ide.c9.io,mindmeister.com,cloud.digitalocean.com,calendar.sunrise.am,slides.com,trello.com,gradescope.com/courses,messenger.com/,app.asana.com/
iunmap <C-a>
unmap <C-a>
unmap <C-f>
unmap r
unmap <C-p>
@SamLau95
SamLau95 / id_rsa.pub
Created June 6, 2014 00:28
SSH Publickey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRs56q2yOd/xDVskkQ8NWqZqFl3747n2uyqU5YY+1YtiLmcgSZ6fzrCZ72pgN+nPv5O3je+YNLC1TX7RbNqruGj7YoX4LUjQzOuJOYR1/s3nnesDtgK9H2M9A6+4ImSDjXxQTxwhiTB6r20niqIHKIvj7hsOMpbJaimU5tNtou95suloE+ulFs3vYx8DVLfD4gClnJnCE1eVUNqGxeEtIeF7rkP/1FdWW6aErjjxtRDI6SlFbCQHMKlFUSbLERYLRaorj6MZMEiLifKxHLjy9DnKzbzd7PhAwYfC1ALrLXEGykFgVbYICYh7RFuyAi+AEJuhOpqdd04xW0NNo3QBSh sam@ubuntu
@SamLau95
SamLau95 / Default (Linux).sublime-keymap
Last active August 29, 2015 14:06
Sublime Preferences
[
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+v"], "command": "paste" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+u"], "command": "soft_undo" },
{ "keys": ["ctrl+w"], "command": "close_file" },
{ "keys": ["ctrl+'"], "command": "change_quotes" },
{ "keys": ["ctrl+alt+i"], "command": "prompt_insert_nums" },
@SamLau95
SamLau95 / .bash_aliases
Last active August 29, 2015 14:13
Bash_aliases for Vagrant
### Handy Extract Program
ext () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
@SamLau95
SamLau95 / fix_student_ownership.sh
Created August 26, 2016 19:06
fix_student_ownership.sh
cd /home
find . -maxdepth 2 -name data8assets -group root
names=
for name in ${names[@]}; do cd $name ; chown -R $name:$name data8assets ; cd .. ; done
@SamLau95
SamLau95 / inferential_thinking_urls_10_26_2018.txt
Created October 26, 2018 23:24
inferential_thinking_urls_10/26/2018
/
/chapters/intro
/chapters/01/what-is-data-science
/chapters/01/1/intro
/chapters/01/1/1/computational-tools
/chapters/01/1/2/statistical-techniques
/chapters/01/2/why-data-science
/chapters/01/3/Plotting_the_Classics
/chapters/01/3/1/Literary_Characters
/chapters/01/3/2/Another_Kind_Of_Character
def compute_ppsf(df):
return df.assign(
ppsf=df['price'] / df['bsqft'],
log_ppsf=lambda df: np.log10(df['ppsf']))
fig = px.scatter(
x=prediction_7var, y=error_7var,
labels=dict(x='Seven-variable prediction for AUM', y='Error'),
width=350, height=250)
px.scatter(crabs, y='inc', x= 'shell', width=350, height=250,
labels=dict(shell='Dungeness crab shell width (mm)',
inc='Growth (mm)'))