This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[{ "keys": ["super+k", "super+t"], "command": "title_case" }, | |
{ "keys": ["super+shift+r"], "command": "Marked" } | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup Packages --------------------------------------------------------------- | |
# List of packages for session | |
.packages <- c("devtools", "dplyr", "ggplot2", "markdown") | |
# Install CRAN packages (if not already installed) | |
.inst <- .packages %in% installed.packages() | |
if(length(.packages[!.inst]) > 0) install.packages(.packages[!.inst]) | |
# Load packages for session | |
lapply(.packages, require, character.only=TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set up virtual environments for Python | |
# ------------------------------------------------------------ | |
export WORKON_HOME=$HOME/.virtualenvs | |
source /usr/local/bin/virtualenvwrapper.sh | |
# Start R quietly | |
# ------------------------------------------------------------ | |
alias R='R -q' | |
### Added by the Heroku Toolbelt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sum the events for each day using the reduce algorithm. | |
from itertools import groupby | |
from operator import itemgetter | |
logs = [('2009-09-02', 11), | |
('2009-09-02', 3), | |
('2009-09-03', 10), | |
('2009-09-03', 4), | |
('2009-09-03', 22), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PySpark in IPython | |
PYSPARK_DRIVER_PYTHON=ipython pyspark | |
# PySpark in Jupyter Notebook backed by Python kernel | |
PYSPARK_DRIVER_PYTHON=ipython Jupyter Notebook | |
# Spark with Scala REPL | |
spark-shell --master local[*] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env Rscript | |
# File description ------------------------------------------------------------- | |
# | |
# | |
# Setup packages --------------------------------------------------------------- | |
# List of packages for session | |
.packages = c("devtools", | |
"stringr", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" Print text to terminal in color! | |
The way of the future. | |
""" | |
import sys | |
# Define ASCII color codes | |
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = map(lambda x: x+30, range(8)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Automagically update all packages on a Mac | |
# | |
# Some people would consider this approach "harmful". I want to be on the cutting edge... | |
# The new features from the community are very nice. But more importantly, I want to break my code early and loudly. | |
# This approach cultivates long-term code resilience. | |
################################################################################ | |
# brew: Manages all command line utilities and Mac binaries (via Cask). | |
brew update && brew install `brew outdated` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Setup a new Mac by installing all apps automatically | |
# Install Homebrew, http://brew.sh/ | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
brew tap caskroom/cask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme", | |
"draw_centered": false | |
} |
OlderNewer