View sxhkdrc
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
# Remove current tab from tabbed | |
super + mod1 + t; r | |
tabc.sh $(bspc query -N -n focused) remove | |
# At given direction: join two windows into a new tabbed or add window to an existing tabbed | |
super + mod1 + t; {Left,Down,Up,Right} | |
tabc.sh $(bspc query -N -n {west,south,north,east}) add $(bspc query -N -n focused) |
View captions_and_crossrefs.rmd
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
--- | |
title: "Auto-numbering and cross-referencing of figures and tables in rmarkdown" | |
output: html_document | |
--- | |
NOTE: I recommend using the bookdown package and `output: html_document2` to make captions and cross-references more easily than the method described below. | |
TODO: check this out: https://github.com/adletaw/captioner | |
Here's how to use: |
View HMM.jl
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
module HMM | |
using Distributions | |
import Distributions.rand | |
import Distributions.fit | |
immutable HiddenMarkovModel{TP, K} | |
theta::Vector{TP} | |
A::Matrix{Float64} |
View auto-install-and-load-packages.R
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
list.of.packages <- c("xx", "yy") # replace xx and yy with package names | |
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] | |
if(length(new.packages)) install.packages(new.packages) | |
lapply(list.of.packages, require, character.only=T) |