Skip to content

Instantly share code, notes, and snippets.

View fbreitwieser's full-sized avatar

Florian Breitwieser fbreitwieser

View GitHub Profile
@fbreitwieser
fbreitwieser / 2d-workspaces.sh
Created January 25, 2019 23:16 — forked from DrewMcArthur/2d-workspaces.sh
This script allows a simulation of a 2D grid of workspaces for i3wm
#!/bin/bash
#This script simulates a 2D grid of workspaces with i3.
#all you have to do is add the next line to your i3/config
#bindsym <keys> exec <path>/i3/workspaces.sh <direction> [move win]
#for example,
#bindsym Control+Mod1+Right exec ~/.config/i3/workspaces.sh right
@fbreitwieser
fbreitwieser / .block
Last active November 29, 2018 20:07 — forked from mbostock/.block
Brush & Zoom
license: gpl-3.0
@fbreitwieser
fbreitwieser / index.html
Created November 29, 2018 19:58
test-line-d3
<!DOCTYPE html>
<meta charset="utf-8">
<style>
svg {
font: 10px sans-serif;
}
.axis path,
@fbreitwieser
fbreitwieser / acc.R
Created April 27, 2018 14:45
common legend with cowplot
a = read.delim("~/Accuracy_as_a_function_of_sketch_size_and_set_size.txt")
head(a)
a$rel_error = sqrt(a$Mean.squared.error) / a$Exact.size
a$p = factor(a$Sketch.size..log2.)
library(cowplot)
library(ggplot2)
plot1 = ggplot(a, aes(x=Exact.size, sqrt(Mean.squared.error) / Exact.size,
@fbreitwieser
fbreitwieser / boxstarter.ps1
Created April 6, 2018 04:37 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@fbreitwieser
fbreitwieser / d3.csv
Created March 25, 2018 23:24
Test hierD3
size path
d3
d3/d3-array
d3/d3-array/threshold
d3/d3-axis
d3/d3-brush
d3/d3-chord
d3/d3-collection
d3/d3-color
d3/d3-dispatch
@fbreitwieser
fbreitwieser / d3.csv
Last active March 25, 2018 23:57
Hierarchical visualizations with D3
d3
d3/d3-array
d3/d3-array/threshold
d3/d3-axis
d3/d3-brush
d3/d3-chord
d3/d3-collection
d3/d3-color
d3/d3-dispatch
@fbreitwieser
fbreitwieser / index.html
Created March 25, 2018 19:27
test paths
<!DOCTYPE html>
<svg width="960" height="960"></svg>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
var svg = d3.select("svg"),
width = +svg.attr("width"),
height = +svg.attr("height");
svg.append("defs").append("path").attr("id","p").attr("d","M 100 200 C 200 100 300 0 400 100 C 500 200 600 300 700 200");
svg.append("use").attr("xlink:href", "#p").attr("fill", "none").attr("stroke","red");
#!/bin/bash
# Possible formats: fasta, xml, gb
function dl_nuc {
FMT=$1
TERM=$2
ESEARCH_URL="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi"
URL_PARAMS=`curl -g "$ESEARCH_URL?db=nuccore&usehistory=y&retmax=1&retmode=json&term=$TERM" | grep -e 'querykey' -e 'webenv' | sed -e 's/^ *"querykey": "/query_key=/' -e 's/^ *"webenv": "/WebEnv=/' -e 's/",//' | paste -sd\&`
curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&query_key=1&$URL_PARAMS&rettype=fasta"