Skip to content

Instantly share code, notes, and snippets.

View leoluyi's full-sized avatar
🎯
Focusing

Leo Lu leoluyi

🎯
Focusing
View GitHub Profile
@leoluyi
leoluyi / recode_to.R
Last active August 29, 2015 14:10 — forked from hadley/recode.R
# forked from hadley/recode.R
# https://gist.github.com/hadley/2751ba61d1c7f4eaacab
recode_to <- function(df, ..., match = c("first", "last")) {
match <- match.arg(match)
cases <- lapply(list(...), as.case)
if (identical(match, "last")) cases <- rev(cases)
n <- nrow(df)
write.Hmisc.SPSS = function(data, datafile, codefile) {
## Write an SPSS file from R with variable labels from the Hmisc package
# source:
# http://stackoverflow.com/questions/10181730/information-from-label-attribute-in-r-to-variable-labels-in-spss/10261534#10261534
# EXAMPLE DATA (see: http://stackoverflow.com/q/10181730/1270695)
#
# If you do not want to alter your original file, as in the example above,
# and if you are connected to the internet while you are using this function,
# you can try this self-contained function:

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge

library("shiny")
x <- runApp(shinyApp(
fluidPage(
"Password:",
tags$input(id = "password", type = "password"),
actionButton("done", "Done")
),
function(input, output) {
observe({
@leoluyi
leoluyi / Front-end-Developer-Interview-Questions-TC.md
Created November 20, 2015 01:45 — forked from hanksudo/Front-end-Developer-Interview-Questions-TC.md
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.

此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。

Rebecca MurpheyBaseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。

@leoluyi
leoluyi / solarized-dark.css
Last active January 2, 2016 15:33 — forked from nicolashery/solarized-dark.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@leoluyi
leoluyi / Default (OSX).sublime-keymap
Created May 20, 2016 16:54 — forked from mason-stewart/Default (OSX).sublime-keymap
Better user key bindings for SublimeREPL.
[
// Remapping of *some* SublimeREPL shortcuts
{ "keys": ["ctrl+super+s"], "command": "repl_transfer_current", "args": {"scope": "selection"}},
{ "keys": ["ctrl+shift+,", "s"], "command": "repl_transfer_current", "args": {"scope": "selection", "action":"view_write"}},
{ "keys": ["ctrl+shift+super+f"], "command": "repl_transfer_current", "args": {"scope": "file"}},
{ "keys": ["shift+ctrl+,", "f"], "command": "repl_transfer_current", "args": {"scope": "file", "action":"view_write"}},
{ "keys": ["ctrl+super+l"], "command": "repl_transfer_current", "args": {"scope": "lines"}},
{ "keys": ["shift+ctrl+,", "l"], "command": "repl_transfer_current", "args": {"scope": "lines", "action":"view_write"}},
{ "keys": ["ctrl+super+b"], "command": "repl_transfer_current", "args": {"scope": "block"}},
{ "keys": ["shift+ctrl+,", "b"], "command": "repl_transfer_current", "args": {"scope": "block", "action":"view_write"}}
@leoluyi
leoluyi / zsh.md
Created June 8, 2016 03:09 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@leoluyi
leoluyi / tmux-cheatsheet.markdown
Created June 23, 2016 13:55 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname