Skip to content

Instantly share code, notes, and snippets.

View berndweiss's full-sized avatar

Bernd Weiss berndweiss

View GitHub Profile
@berndweiss
berndweiss / aREADME.rst
Created October 7, 2012 07:33 — forked from leetrout/aREADME.rst
Clone all your github repos into a local directory

USAGE

python ghclone.py

Follow the prompts

Notes

@berndweiss
berndweiss / Hmisc_bezier.R
Created December 10, 2012 11:34 — forked from dsparks/Hmisc_bezier.R
Economics-style graphs
doInstall <- TRUE
toInstall <- c("Hmisc", "ggplot2", "proxy", "grid")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
# Example usage
x <- c(4,6,4,5,6,7)
y <- 1:6
plot(x, y, "o", pch=20) # bezier() generates smoothed curves from these points
points(bezier(x, y), type="l", col="red")
RMDFILE=demo-rmd-pandoc
PANDOC=~/.cabal/bin/pandoc
all:
Rscript -e "require(knitr); require(markdown); knit('$(RMDFILE).rmd', '$(RMDFILE).md'); purl('$(RMDFILE).rmd')"
${PANDOC} --mathjax --toc -B header.html -A footer.html --bibliography refs.bib --css markdown.css -s $(RMDFILE).md -o $(RMDFILE).html
@berndweiss
berndweiss / lmm
Last active August 29, 2015 14:14 — forked from ThierryO/lmm
library(ggplot2)
library(lme4)
library(mvtnorm)
fixed.intercept <- 1
n.subject <- 10
n.replicate <- 10
mean.subject <- c(1, 2, 3, 3, 2, 1)
sd.subject <- 0.1 * diag(length(mean.subject))
sd.noise <- 0.5
@berndweiss
berndweiss / Directed Acyclic Graphs in LaTeX using TikZ
Created May 14, 2016 05:15 — forked from lcomm/Directed Acyclic Graphs in LaTeX using TikZ
TikZ-based LaTeX code to create 3 basic DAGs in epidemiology/biostatistics.
\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
%Graph 1
\begin{figure}
\caption{Graph 1}
\large{\begin{tikzpicture}[%
@berndweiss
berndweiss / .bash_aliases
Created October 23, 2021 03:01 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset