Skip to content

Instantly share code, notes, and snippets.

View blahah's full-sized avatar

Rik Smith-Unna blahah

  • upward spiral ∞⟨X∴↯⟩∞
  • Bristol / Berlin / Nairobi
  • X @blahah404
View GitHub Profile
@blahah
blahah / get_elsevier_pdf.sh
Created January 19, 2016 19:25
wget PDFs from sciencedirect.com (elsevier)
# with example PDF URL
PDF_URL"=http://www.sciencedirect.com/science/article/pii/S0191886909000877/pdfft\?md5\=25fb6461c7b1ebe114acb2cd5ab91ddd\&pid\=1-s2.0-S0191886909000877-main.pdf"
wget \
--header "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36" \
--verbose \
--save-cookies cookies.txt \
--keep-session-cookies \
$PDF_URL
@blahah
blahah / refseq_to_gene_symbol_biomart.R
Created December 15, 2015 16:28
get RefSeq mRNA mapping to human gene symbol via ensembl biomart
# This script demonstrates how to download a mapping from RefSeq mRNA to human gene symbols by using the ensembl biomart service and the bioconductor `biomaRt` package in R.
source("https://bioconductor.org/biocLite.R")
biocLite("biomaRt")
library("biomaRt")
# work around bug in resolving host (https://support.bioconductor.org/p/74304/)
listMarts(host="www.ensembl.org")
@blahah
blahah / summarise_assemblies.R
Last active December 4, 2015 15:40
Summary statistics and plots of transcriptome assemblies (for ICIPE TReND NGS students)
setwd("~/project_icipe")
library(ggplot2)
# 1. load the files
oases <- read.csv('./oases.csv')
soap <- read.csv('./soapdenovotrans.csv')
# check the number of rows and columns
dim(oases)
dim(soap)
@blahah
blahah / keybase.md
Created November 12, 2015 18:24
keybase proof

Keybase proof

I hereby claim:

  • I am blahah on github.
  • I am blahah (https://keybase.io/blahah) on keybase.
  • I have a public key whose fingerprint is CAB4 0A1C 6299 A1C7 1A80 4FF6 7571 0934 02B0 C4F8

To claim this, I am signing this object:

@blahah
blahah / README.md
Last active October 18, 2015 11:36 — forked from mbostock/.block
Bullet Charts

Designed by Stephen Few, a bullet chart “provides a rich display of data in a small space.” A variation on a bar chart, bullet charts compare a given quantitative measure (such as profit or revenue) against qualitative ranges (e.g., poor, satisfactory, good) and related markers (e.g., the same measure a year ago). Layout inspired by Stephen Few. Implementation based on work by Clint Ivy, Jamie Love of N-Squared Software and Jason Davies. The "update" button randomizes the values slightly to demonstrate transitions.

@blahah
blahah / project_idea.md
Last active August 29, 2015 14:27
Mozilla Science Fellowship project idea

The Mozilla Science Fellowship application asks:

What do you see as the opportunities for impact around open research at your university? Could you leverage this opportunity in a potential project?

The answer field allows 100 words, but here I develop my idea before condensing it for the application.

Long version: The Cambridge School of Open Science

Cambridge University is unusual in that most PhD students are not required to take any classes - they do research from day 1. There are optional classes offered that cover a small proportion of the skills needed to do research in the modern, open environment, but these are far from comprehensive and in particular do not cover most aspects of open science.

@blahah
blahah / less_wrong_reading.md
Last active August 29, 2015 14:26
Reading Less Wrong - the order in which I read LW, with very short summaries

I have wanted to dive into Less Wrong for a long while, and now that I finally have some time I am taking the plunge. I am recording the order in which I read articles here with some notes.

  1. About Less Wrong - has a lot of links to articles that sample the flavour of the whole site
  2. Your Intuitions Are Not Magic - very high level, short post that draws parallels between intuition and statistical methods, and arguing that we should be critical of our intuitions (and statistical tools). Interesting, but not particularly enlightening or useful.
  3. The Cognitive Science of Rationality - very good introduction to how understanding cognitive science can help make us better thinkers. Includes a very brief introduction rationality, reasoning errors, and tools for avoiding bias.
@blahah
blahah / gaaah.cc
Created June 19, 2015 23:06
libkhmer untraceable abort
#include "hashbits.hh"
#include "subset.hh"
#include <string>
#include <exception>
using namespace khmer;
using namespace std;
bool file_exists (const string& name) {
@blahah
blahah / jmir.json
Created June 14, 2015 20:33
jmir scraperjson scraper
{
"url": "www\\.jmir\\.org",
"elements": {
"publisher": {
"selector": "//meta[@name='citation_publisher']",
"attribute": "content"
},
"journal": {
"selector": "//meta[@name='citation_journal_title']",
"attribute": "content"