Skip to content

Instantly share code, notes, and snippets.

View mhermans's full-sized avatar

Maarten Hermans mhermans

View GitHub Profile
@mhermans
mhermans / spa_vb.md
Last active December 27, 2015 00:09
SP.a of Vlaams Belang?
  1. "Voor onze partij moet de aandacht in de eerste plaats gaan naar het welvaartsverlies en de toenemende materiële onzekerheid van die doorsnee-Vlaming en hoe dit zoveel mogelijk kan voorkomen worden."

  2. "[Theodore Dalrymple] is vooral een exponent van het typisch Angelsaksische atomaire denken, enkel beperkt door het liberale beginsel van 'de vrijheid van een ander', en overgoten met een saus van burgerlijk fatsoen. Wie bij Dalrymple vertrekt, komt altijd uit bij harde, liberale conclusies. Wij willen dat niet."

  3. "Wij willen een sociaal Vlaanderen. Het Voka is niet onze baas."

  4. "Wij pleiten voor bestaanszekerheid voor alle Vlamingen, solidair door de gemeenschap gedragen. De sociale zekerheid is en blijft een kerntaak van de overheid en mag niet geprivatiseerd worden." p. 55

  5. "Inkomenszekerheid en bijgevolg een aanpassing van de lonen aan de levensduurte is een belangrijke sociale verworvenheid. Daarom blijven wij voorstander van de loonindexering als een instrument van so

@mhermans
mhermans / graphgist_test.adoc
Last active January 1, 2016 20:39
Test GraphGist

Graphing our way through the ICIJ offshore jurisdiction data


Introduction

In 2013 the International Consortium of Investigative Journalism (ICIJ) released a subset of the leaked dataset on offshore jurisdictions to the public. This dataset contains ownership information about companies created in 10 offshore jurisdictions including the British Virgin Islands, the Cook Islands and Singapore. It covers nearly 30 years until 2010.

@mhermans
mhermans / example_riffe.r
Last active January 2, 2016 07:38
Reproducable example of projection using mstls
library(devtools)
dev_mode(on=TRUE)
install_github(username='mhermans', repo='mstls')
library(mstls)
data(YU61female) # included dataset in mstls: 2-region female population (Yugoslavia, 1961)
# calculate observed rates
obs_rates <- with(
@mhermans
mhermans / neo4j_icij
Last active July 30, 2017 20:35
Graphing our way through the ICIJ offshore jurisdiction data
= Graphing our way through the ICIJ offshore jurisdiction data
:neo4j-version: 2.0.0
:author: Maarten Hermans
:twitter: @hermansm
'''
== Introduction
In 2013 the http://www.icij.org[International Consortium of Investigative Journalism] (ICIJ) released a subset of the leaked dataset on offshore jurisdictions to the public. This dataset contains ownership information about companies created in 10 offshore jurisdictions including the British Virgin Islands, the Cook Islands and Singapore. It covers nearly 30 years until 2010.
@mhermans
mhermans / gist:5b33f154c97a9866c447
Last active August 29, 2015 14:01
dierentheator document scraper error
# ERROR
2014-05-19 23:57:10,980 - parsing http://www.lachambre.be/kvvcr/showpage.cfm?section=/flwb&language=fr&rightmenu=right&cfm=/site/wwwcfm/flwb/flwbn.cfm?lang=F&legislat=53&dossierID=3573 --- a document 3573
2014-05-19 23:57:12,065 - LXML parsing http://www.lachambre.be/kvvcr/showpage.cfm?section=/flwb&language=fr&rightmenu=right&cfm=/site/wwwcfm/flwb/flwbn.cfm?lang=F&legislat=53&dossierID=3573 --- a document 3573
2014-05-19 23:57:12,068 - LXML parsing http://www.lachambre.be/kvvcr/showpage.cfm?section=/flwb&language=nl&rightmenu=right&cfm=/site/wwwcfm/flwb/flwbn.cfm?lang=F&legislat=53&dossierID=3573 --- a document 3573 nl
2014-05-19 23:57:12,995 - lachambre_deputy.find (0.00) {'lachambre_id': '01201'}
Traceback (most recent call last):
File "/home/mhermans/tmp/dierentheater/lachambre_parser/documents.py", line 68, in parse_every_documents
handle_document(document)
File "/home/mhermans/tmp/dierentheater/lachambre_parser/documents.py", line 121, in handle_document
@mhermans
mhermans / group_mean.r
Created November 21, 2014 11:51
Berkeken groepsgemiddelden in R
# Berkeken groepsgemiddelden in R
data(iris)
summary(iris)
str(iris)
typeof(iris$Petal.Length)
typeof(iris$Species)
class(iris$Petal.Length)
class(iris$Species)
@mhermans
mhermans / writeTable.r
Created November 26, 2014 11:28
Write R tables to Excel
library(XLConnect)
# schrijffunctie
# --------------
writeTable <- function(table, excel_fn) {
wbFilename <- excel_fn
wb = loadWorkbook(wbFilename, create = TRUE)
sheet <- 'tables'
createSheet(wb, sheet)
@mhermans
mhermans / arduino_sunshine.cpp
Created December 14, 2014 19:16
Arduino "You are my sunshine" version using toneAC
#include <toneAC.h>
#define c 261.626 // 261 Hz
#define d 293.665 // 294 Hz
#define e 329.628 // 329 Hz
#define f 349.228 // 349 Hz
#define g 391.995 // 392 Hz
#define a 440.000 // 440 Hz
@mhermans
mhermans / 201502110_linkdump_power_mapping_cc.md
Last active August 29, 2015 14:15
Linkdump power mapping/analysis Ch & Cl (Feb. 2015)

Linkdump power mapping Ch & Cl February 2015

The following is a unstructed dump of links, projects, software, discussion groups, that I mentioned yesterday and/or interesting for power mapping & data journalism in general.

The number of excamation marks indicate relevance.

@mhermans
mhermans / 20150227_rstudio_demoserver.md
Last active August 29, 2015 14:16
setup rstudio demo server

Add swap (walkthrough):

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s

start up docker: