Skip to content

Instantly share code, notes, and snippets.

View frederik-elwert's full-sized avatar

Frederik Elwert frederik-elwert

View GitHub Profile
@frederik-elwert
frederik-elwert / pdf2swf.sh
Created January 14, 2015 17:42
SWF export extension for Inkscape
#! /bin/sh
rc=0
pdf2swf -qq -s transparent "$1" -o /tmp/temp.swf
cat < /tmp/temp.swf || rc=1
rm -f /tmp/temp.swf
exit $rc
@frederik-elwert
frederik-elwert / Flat to Hierarchy.ipynb
Created January 2, 2015 20:54
Flat to hierarchical XML
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@frederik-elwert
frederik-elwert / tei2tcf.py
Created December 18, 2014 18:03
TEI to TCF conversion using TCFlib
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import re
from glob import glob
import logging
from lxml import etree
@frederik-elwert
frederik-elwert / HeForShe.R
Last active August 29, 2015 14:07
HeForShe campaign analysis
library(reshape2)
library(plyr)
library(dplyr)
library(RCurl)
library(RJSONIO)
library(stringr)
library(pander)
library(RColorBrewer)
library(rMaps)
@frederik-elwert
frederik-elwert / get_datcat.py
Created July 31, 2013 09:49
Get ISOcat closed DC with all referenced simple DCs
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import argparse
import logging
from urllib.parse import urlencode
from urllib.request import urlopen, Request
from lxml import etree