Skip to content

Instantly share code, notes, and snippets.

Jaime Ashander ashander

View GitHub Profile
ashander / spartina.json
Last active Oct 15, 2018
Information sharing between institutions involved in the project to eradicate invasive _Spartina_ in the SF Bay region, copied by eye from Lubell, Jasny, Hastings 2018 _Conservation Letters_
View spartina.json
"nodes": [
{"id": "Marin County", "group": 2},
{"id": "USFWS San Pablo WFR", "group": 4},
{"id": "City of San Mateo", "group": 1},
{"id": "City of Alameda", "group": 1},
{"id": "East Bay Regional Parks", "group": 2},
{"id": "Invasive Spartina Project", "group": 5},
{"id": "USFWS", "group": 4},
{"id": "USFWS Don Edwards WFR Complex", "group": 4},
ashander / badpop.rds
Last active Nov 22, 2017
issue with raster via landsim
ashander / google-scholar.html
Last active Sep 25, 2017
Google scholar advanced bookmarklet
View google-scholar.html
<!-- copy and paste all lines starting with javascript: below into a new bookmark. you will need to click it twice to
get to GS advanced.
Uses logic from from -->
var url = this.document.location.href;
if(!url.includes("")) {
this.document.location.href = "";
} else {
if (document.readyState === "complete") {
var hp = document.getElementById('gs_hp_drw_adv');
ashander /
Last active Jul 9, 2018
Error attempting to use numpy via conda on SDSC's Comet resource --- due to default number of threads requested by OpenMP

The error below can be avoided by export OMP_NUM_THREADS=2 (or possibly a higher number). To see this run:

env OMP_NUM_THREADS=2 python -c 'import numpy'



ashander /
Last active Mar 21, 2017
what does `unlink` do in R?
mkdir -p tmp tmp/c
touch tmp/a tmp/b tmp/c/d
$ tree tmp
# tmp
# ├── a
# ├── b
# └── c
# └── d
cd tmp
strace -o ../strace.log Rscript -e 'unlink(c("a", "b", "c"), recursive=TRUE)'
ashander /
Last active May 3, 2017
Follow tweets and retweets (etc) on streaming API
ashander / Makefile
Last active Jan 27, 2017
Equity distribution (from Survey of Consumer Finances)
View Makefile README.Rmd
Rscript -e 'rmarkdown::render("README.Rmd")'
cp README_files/figure-markdown_strict/equity-vigesimals-1.png equity-vigesimals-1.png
cp README_files/figure-markdown_strict/equity-deciles-by-age-1.png equity-deciles-by-age-1.png
ashander /
Last active Oct 31, 2016
Msprime records $\sum_i (l_i - r_i)$ will _not_ sum to `n-1` for `n` samples (unless there is no recombination)
import msprime
pop = __import__('random').randint(2, 20000)
sum = 0
with open('example.tsv', 'w') as f:
msprime.simulate(pop, recombination_rate = 10).write_records(f)
with open('example.tsv', 'r') as f:
l = f.readlines()
for line in l:
vec = line.split('\t')
ashander /
Created Sep 15, 2016
keybase verification

Keybase proof

I hereby claim:

  • I am ashander on github.
  • I am ashander ( on keybase.
  • I have a public key ASB64liKYYs5Ynv_-hUY2oWx0u_J4KWK9CbksBDJliS7fgo

To claim this, I am signing this object:

You can’t perform that action at this time.