This file contains hidden or 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
# Flat scheme for the Base16 Builder (https://github.com/chriskempson/base16-builder) | |
scheme: "flat" | |
author: "Timothée Poisot (http://github.com/tpoisot)" | |
base00: "2c3e50" # ---- | |
base01: "475767" # --- | |
base02: "62707d" # -- | |
base03: "7e8a94" # - | |
base04: "99a3ab" # + | |
base05: "b5bdc3" # ++ | |
base06: "d0d6da" # +++ |
This file contains hidden or 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
import networkx as nx | |
import numpy as np | |
import itertools | |
## We define each S* motif as a directed graph in networkx | |
motifs = { | |
'S1': nx.DiGraph([(1,2),(2,3)]), | |
'S2': nx.DiGraph([(1,2),(1,3),(2,3)]), | |
'S3': nx.DiGraph([(1,2),(2,3),(3,1)]), | |
'S4': nx.DiGraph([(1,2),(3,2)]), |
This file contains hidden or 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
#! /usr/bin/python2 | |
import requests as re | |
doi = "10.1002/ece3.508" | |
base = "http://dx.doi.org/" | |
url = base + doi |
This file contains hidden or 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
#! /usr/bin/python2 | |
import json | |
from TwitterAPI import TwitterAPI | |
c_key = '...' | |
c_sec = '...' | |
t_key = '...' | |
t_sec = '...' |
This file contains hidden or 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(rmangal) | |
library(taxize) | |
api = mangalapi(usr='tpoisot', pwd='nope, not telling you') | |
all_taxa = listTaxa(api) | |
for(tax in all_taxa) | |
{ | |
identifier <- get_uid(tax$name, ask = FALSE) | |
if(! is.na(identifier)) tax$ncbi <- identifier[1] |
This file contains hidden or 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
# Metapop model in R | |
library(igraph) | |
library(plyr) | |
library(reshape2) | |
library(RColorBrewer) | |
colorize <- function(x, pal='Oranges') | |
{ | |
x <- x - min(x) |
This file contains hidden or 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
#! /usr/bin/python2 | |
import sys | |
import codecs | |
from bibtexparser.bparser import BibTexParser | |
def dict2bib(ke,di): | |
b = "@"+di['type'].upper()+"{"+ke+"," | |
for (k, v) in di.iteritems(): | |
if k not in ['type', 'id', 'abstract', 'doi', 'keywords']: |
This file contains hidden or 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
comp=clang | |
opt= -O3 -DWall -lgsl -lgslcblas -DHAVE_INLINE -lm | |
src=src.c | |
out=lagoon | |
$(out): $(src) | |
$(comp) $(src) -o $(out) $(opt) | |
simuls: $(out) | |
./$(out) |
This file contains hidden or 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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "Scriptoria object", | |
"description": "Meta-data about a publication registered in scriptoria", | |
"type": "object", | |
"properties": { | |
"source": { | |
"description": "URI of the original repository", | |
"type": "string" | |
}, |
This file contains hidden or 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
#! /usr/bin/python | |
# Timothee Poisot | |
# [email protected] | |
# released under the BSD 2 license | |
import sys | |
def onlyNonEmpty(table): | |
N_non_empty = int(table[1][2]) + 3 |