##Simply annoying Tweets
Annoyingly extended words (4+ of the same letter in a phrase): OOOOHHHHMMMMYYYYGGGGOOOODDDD
([a-z])/1{4}
Tweet w/ just a single hashtag: #omgthissucks
^ *#[^ ]+$
#!/bin/sh | |
DIR="$HOME/.oh-my-zsh/custom/themes" | |
mkdir -p $DIR | |
cd $DIR | |
sed "s/➜/→/g;s/✗/×/g" $HOME/.oh-my-zsh/themes/robbyrussell.zsh-theme > robbyrussell.zsh-theme |
# data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat | |
# Originally seen at http://spatial.ly/2014/08/population-lines/ | |
# So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess, | |
# and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after | |
# @hadleywickham pointed that out. Also, switched from geom_segment to geom_line. | |
# The result of the code below can be seen at http://imgur.com/ob8c8ph | |
library(tidyverse) |
## data input (number of reads mapped to each category) | |
total=100 | |
rRNA=5 # mapped to nuclear rRNA regions | |
mtRNA=7 # mapped to mitochondria genome | |
# for the rest of above, then we divide into different category, like http://www.biomedcentral.com/1741-7007/8/149 did. | |
intergenic=48 | |
introns=12 | |
exons=30 | |
upstream=3 | |
downstream=6 |
#' A function to create caterpillar plots from rstan's stanfit objects | |
#' | |
#' @param obj a \code{stanfit} object | |
#' @param pars character string, vector, or regular expression of paramater | |
#' labels that you would like to plot as declared in \code{model_code} from the | |
#' \code{\link{stan}} call. | |
#' @param pars_labels vector of parameter labels. Important: they must be in | |
#' the same order as in the \code{stanfit} object when \code{as.data.frame(obj)} | |
#' is called. | |
#' @param hpd logical. If \code{TRUE} then the 90% and 95% highest probability |
# Slopegraphs in matplotlib | |
# Trey Causey (@treycausey) | |
# Problems arise when equal values occur | |
# within the same time unit | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
units = ['A', 'B', 'C', 'D'] |
all: example.ipynb example.html | |
example.md: example.Rmd | |
./knit | |
example.ipynb: example.md | |
notedown example.md | sed '/%%r/d' > example.ipynb | |
example.html: example.Rmd | |
R -e "knitr::knit2html('example.Rmd')" |
# Helper functions that allow string arguments for dplyr's data modification functions like arrange, select etc. | |
# Author: Sebastian Kranz | |
# Examples are below | |
#' Modified version of dplyr's filter that uses string arguments | |
#' @export | |
s_filter = function(.data, ...) { | |
eval.string.dplyr(.data,"filter", ...) | |
} |
example.md: example.Rmd | |
./knit | |
example.ipynb: example.md | |
notedown example.md | sed 's/%%r/%%R/' > example.ipynb |
##Simply annoying Tweets
Annoyingly extended words (4+ of the same letter in a phrase): OOOOHHHHMMMMYYYYGGGGOOOODDDD
([a-z])/1{4}
Tweet w/ just a single hashtag: #omgthissucks
^ *#[^ ]+$