Skip to content

Instantly share code, notes, and snippets.


Guangchuang Yu GuangchuangYu

View GitHub Profile
View NetEase Cloud Music Hosts
View ggplot2 euler (almost venn) diagrams
if (!require("pacman")) install.packages("pacman")
pacman::p_load(dplyr, venneuler)
pacman::p_load_current_gh('trinker/textshape', 'thomasp85/ggforce')
x <- matrix(sample(0:4, 80, TRUE, c(.6, .1, .1, .1, .1)), ncol=4)
colnames(x) <- LETTERS[1:4]
View markdownhere.css
.markdown-here-wrapper {
font-size: 16px;
line-height: 1.8em;
letter-spacing: 0.1em;
pre, code {
font-size: 14px;
font-family: Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace;
kevinelliott /
Last active Oct 22, 2020
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

stephenturner / explore-correlations.r
Created Aug 27, 2012
Exploring correlations with R using cor.prob and chart.Correlation
View explore-correlations.r
## Correlation matrix with p-values. See for documentation of this function
cor.prob <- function (X, dfr = nrow(X) - 2) {
R <- cor(X, use="pairwise.complete.obs")
above <- row(R) < col(R)
r2 <- R[above]^2
Fstat <- r2 * dfr/(1 - r2)
R[above] <- 1 - pf(Fstat, 1, dfr)
R[row(R) == col(R)] <- NA