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
initialize() { | |
defineConstant('tmu', 1e-8); | |
defineConstant('nmu', 1e-8); | |
defineConstant('rbp', 1e-8); | |
defineConstant('N', 1000); | |
defineConstant('alpha', 0.01); | |
defineConstant('nrep', 1); | |
defineConstant("seed", getSeed()); | |
defineConstant("data_dir", '../data/sims/'); |
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
library(tidyverse) | |
library(MASS) | |
pcov <- function(x) { | |
xs <- scale(x, scale=FALSE) | |
dd <- as.integer(!is.na(x)) | |
dim(dd) <- dim(x) | |
denom <- (t(dd) %*% dd) - 1L | |
no_obs <- denom == 0L | |
xs[is.na(xs)] <- 0 |
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
library(purrr) | |
foo <- function(x) { | |
return(function(y) { | |
y + x | |
}) | |
} | |
args <- list(1, 2) | |
foos_map <- map(args, foo) |
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: Using Bioconductor to Analyze your 23andme Data | |
Bioconductor is one of the open source projects of which I am most | |
fond. The documentation is excellent, the community wonderful, the | |
development fast-paced, and the software *very* well written. | |
There's a new package in the development branch (due to be released as | |
2.10 very soon) called `gwascat`. `gwascat` is a package that serves | |
as an interface to the [NHGRI's](http://www.genome.gov/) database of | |
genome-wide association studies. |
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
# This file is NOT licensed under the GPLv3, which is the license for the rest | |
# of YouCompleteMe. | |
# | |
# Here's the license text for this file: | |
# | |
# This is free and unencumbered software released into the public domain. | |
# | |
# Anyone is free to copy, modify, publish, use, compile, sell, or | |
# distribute this software, either in source code form or as a compiled | |
# binary, for any purpose, commercial or non-commercial, and by any |
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
trashpanda <- function() { | |
if (!require('ecoengine')) { | |
install.packages("ecoengine", dependencies = TRUE) | |
library(ecoengine) | |
} | |
view_photos(ee_photos(scientific_name = "Procyon lotor", quiet = TRUE)) | |
} |
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
# Thanks https://github.com/EBI-predocs/latex-thesis/blob/master/Makefile for | |
# some tips | |
LATEXMK = latexmk -xelatex | |
# CONFIG | |
target = manuscript | |
references = bib.bib | |
# SETUP | |
includes := $(shell ls *.tex) ${references} |
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
For every minute you are angry, you lose sixty seconds of happiness. ::: unknown | |
Anger is a momentary madness, so control your passion or it will control you. ::: Horace Walpole | |
When angry, count ten before you speak; if very angry, a hundred. ::: Jefferson | |
Anger is a wind which blows out the lamp of the mind. ::: Robert G. Ingersoll | |
Holding on to anger is like grasping a hot coal with the intent of throwing it at someone else; you are the one getting burned. ::: Buddha | |
The best remedy for a short temper is a long walk. ::: Jacqueline Schiff |
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
var fs = require('fs'); | |
var d3 = require('d3'); | |
var jsdom = require('node-jsdom'); | |
var xmlserializer = require('xmlserializer'); | |
var margin = {top: 2, right: 4, bottom: 2, left: 4}; | |
var width = 200 - margin.left - margin.right, | |
height = 14 - margin.top - margin.bottom; |
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
augroup Terminal | |
au! | |
au TermOpen * let g:last_terminal_job_id = b:terminal_job_id | |
augroup END | |
function! REPLSend(lines) | |
call jobsend(g:last_terminal_job_id, add(a:lines, '')) | |
endfunction | |
command! REPLSendLine call REPLSend([getline('.')]) |