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
function! s:butt() abort | |
syn match cloud2butt "\<th\%(e cloud\>\)\@=" conceal cchar=m | |
syn match cloud2butt "\%(\<th\)\@<=e\%( cloud\>\)\@=" conceal cchar=y | |
syn match cloud2butt "\%(\<the \)\@<=c\%(loud\>\)\@=" conceal cchar=b | |
syn match cloud2butt "\%(\<the c\)\@<=l\%(oud\>\)\@=" conceal cchar=u | |
syn match cloud2butt "\%(\<the cl\)\@<=o\%(ud\>\)\@=" conceal cchar=t | |
syn match cloud2butt "\%(\<the clo\)\@<=ud\>" conceal cchar=t | |
endfunction |
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 RStudio and JAGS on an Amazon EC2 instance | |
# Using Ubuntu 64-bit | |
# Partially from http://blog.yhathq.com/posts/r-in-the-cloud-part-1.html | |
# See yhat for EC2 instance set up | |
# Navigate to key pair | |
# ssh -i YOUR_KEYPAIR.pem ubuntu@PUBLIC_DNS | |
# Add a user/password. | |
# This will become your RStudio username and password. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>#!title#</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> |
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 | |
"""strip outputs from an IPython Notebook | |
Opens a notebook, strips its output, and writes the outputless version to the original file. | |
Useful mainly as a git filter or pre-commit hook for users who don't want to track output in VCS. | |
This does mostly the same thing as the `Clear All Output` command in the notebook UI. | |
LICENSE: Public Domain |
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
# My preferred defaults (may be changed in individual chunks) | |
opts_chunk$set(tidy=FALSE, warning=FALSE, message=FALSE, cache=TRUE, | |
comment=NA, verbose=TRUE, fig.width=6, fig.height=4) | |
# Name the cache path and fig.path based on filename... | |
opts_chunk$set(fig.path = paste("figure/", | |
gsub(".Rmd", "", knitr:::knit_concord$get('infile')), | |
"-", sep=""), | |
cache.path = paste(gsub(".Rmd", "", knitr:::knit_concord$get('infile') ), | |
"/", sep="")) |
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
<!-- Override Gist styling --> | |
<style type="text/css"> | |
iframe{background-color: #0a0a0a;} | |
div.gist-syntax {background-color:#0a0a0a!important;} | |
div.gist {color:#ccc!important;} | |
span.nt, span.kd, span.k, span.o{color:aliceblue!important;} | |
.gist .gist-file{border-color:#444!important;} | |
.gist .gist-file .gist-meta{background-color:#0a0a0a!important;} | |
</style> |
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
% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX | |
% Author: Honza Ustohal <[email protected]> | |
% | |
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter | |
% This might be reworked into a full blown package in the near future | |
% | |
% Prerequisite: | |
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX | |
% | |
% Usage: |
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
// Characters that are considered to separate words – does not include periods. | |
// Place comma at the end of the line if there are multiple keybindings. | |
{"word_separators": "/\\()\"‘-:,;~!@#$%^&*|+=[]{}`~?"} |
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
@black: #002b36; | |
@grayDarker: #586e75; | |
@grayDark: #657b83; | |
@gray: #839496; | |
@grayLight: #93a1a1; | |
@grayLighter: #eee8d5; | |
@white: #fdf6e3; | |
@blue: #2aa198; | |
@blueDark: #268bd2; |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
NewerOlder