Skip to content

Instantly share code, notes, and snippets.

View sverhoeven's full-sized avatar

Stefan Verhoeven sverhoeven

View GitHub Profile
@sverhoeven
sverhoeven / index.html
Last active December 28, 2015 04:59
color legend
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var w = 50;
var h = 200;
var svg = d3.select("body").append('svg')
@sverhoeven
sverhoeven / gist:9626127
Last active August 29, 2015 13:57
cartodb install
#!/bin/sh
# hostname = cartodb.e-ecology.cloudlet.sara.nl
# user = verhoes = verhoes.cartodb.e-ecology.cloudlet.sara.nl
apt-get update
apt-get upgrade -y
echo 'cartodb.e-ecology.cloudlet.sara.nl' > /etc/hostname
# reboot
@sverhoeven
sverhoeven / nemo2nakko.py
Created May 13, 2014 10:36
Script to convert route around nemo to around nakko
#!/bin/env python
import csv
nemo = {'lat': 52.374253,'lon': 4.911687}
nakko = {'lat':52.330797,'lon':4.966013}
with open('in.csv', 'rb') as csvin:
with open('out.csv', 'wb') as csvout:
reader = csv.reader(csvin)
@sverhoeven
sverhoeven / wordpress_docker.md
Last active August 29, 2015 14:02
wordpress docker

Start container

docker pull mysql
docker pull wordpress

docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=****** -d mysql
docker run --name some-wordpress --link some-mysql:mysql -d wordpress

Config

@sverhoeven
sverhoeven / README.md
Created June 24, 2014 10:23
azure ad as idp + simplesamlphp as sp

Create sp in simplesamlphp

  1. Add SP to authsources.php

     'default-sp' => array(
             'saml:SP',
             'entityID' => 'https://svwiki.cloudapp.net',
             'discoURL' => NULL,
             'privatekey' => 'saml.pem',
    

'certificate' => 'saml.crt',

@sverhoeven
sverhoeven / SubmitBatchJobWithOutput.java
Created May 21, 2015 11:29
xenon ssh not executing in workingdirectory
/*
* Copyright 2013 Netherlands eScience Center
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@sverhoeven
sverhoeven / tanimoto.txt
Created January 31, 2016 20:43
bitvector tanimoto python benchmarks
import modifiedtanimoto.db as db
import modifiedtanimoto.algorithm as algorithm
frags = db.FragmentsDb('data/fragments12.db')
bss =frags.bitsets()
z = bss['5fl6_Y0R_frag10']
bitsets2 = {'5fl6_Y0R_frag1':bss['5fl6_Y0R_frag1']}
myiter = algorithm.distances(bss, bitsets2, 574331, 0.6633333333333333, 0.33666666666666667, 0.55, True)
for r in myiter:
@sverhoeven
sverhoeven / knime-kripodb-merge.py
Created February 23, 2016 14:10
Knime node to fetch molblock and protein name for query and hit fragment.
import pandas as pd
from kripodb.canned import fragments_by_id
# Requires as input table with columns
# hit_frag_id, query_frag_id and score
# Returns id and molblock of query and hit
# and protein name of hit.
# Location of fragment database
fragments_db_filename = '/data/kripo/tiny/fragments.sqlite'
@sverhoeven
sverhoeven / .block
Last active September 16, 2016 15:56
punchcardjs visualization of NLeSC Github events
license: apache-2.0
height: 1000
@sverhoeven
sverhoeven / requirements.txt
Created March 28, 2017 14:50
List webhooks of all repos in a GitHub organization
github3.py==1.0.0a4
click==6.7