Skip to content

Instantly share code, notes, and snippets.

View jbspeakr's full-sized avatar

Jan Brennenstuhl jbspeakr

View GitHub Profile
@jbspeakr
jbspeakr / Piratenpartei-Berlin-Locations.csv
Created November 30, 2012 17:08
Piratenpartei Berlin - Crew & Squad Locations
Name Link Location icon
Bunte Kuh http://wiki.piratenpartei.de/BE:Crews/Bunte_Kuh Grünberger Str. 1 10243 Berlin small_red
Havelpiraten http://wiki.piratenpartei.de/BE:Crews/Havelpiraten Sprengelstraße 17, 13595 Berlin small_red
Tempelhofer Feld (Squad) http://wiki.piratenpartei.de/BE:Squads/Tempelhofer_Feld Boddinstr. 42/43, 12053 Neukölln wht_blank
Innenpolitik (Squad) http://wiki.piratenpartei.de/BE:Squads/Innenpolitik Abgeordnetenhaus von Berlin Niederkirchnerstr. 5 10117 Berlin wht_blank
1984 http://wiki.piratenpartei.de/BE:Crews/1984 Mierendorffstrasse 26-27, 10589 Berlin
@jbspeakr
jbspeakr / Mitgliederverteilung-Piratenpartei-Deutschland.csv
Created December 16, 2012 12:31
Mitgliederverteilung der Piratenpartei Deutschland. Datensatz gescraped von Jan Brennenstuhl.
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
Landesverband,Mitglieder gesamt,stimmberechtigt davon,stimmberechtigt in %,Mio. Einwohner,Mitgl. pro Mio. Einw.,stimmber. Mitgl. pro Mio. Einw.,Fläche in km²,Mitgl./ 1000 km²,Stand,nicht stimmberechtig in %,geometry_simplified,geometry_simplified_vertex_count,geometry,geometry_vertex_count,USE,RS,RS_ALT,SHAPE_LENG,SHAPE_AREA,import_notes,geometry_pos
Baden-Württemberg,3795,2215,58,"10,8",353,206,35.751,106,08.11.2012,42,"<MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>7.607016,48.002454 7.621914,47.972781 7.609585,47.953805 7.584045,47.93246 7.578664,47.893688 7.556384,47.878995 7.561856,47.841138 7.530089,47.781206 7.54686,47.741677 7.54657,47.73031 7.511439,47.697156 7.520401,47.662905 7.566408,47.632241 7.60876,47.577953 7.625761,47.58056 7.646052,47.596034 7.667653,47.59172 7.680838,47.581933 7.68866,47.572192 7.68604,47.566092 7.637784,47.565451 7.634045,47.560943 7.665845,47.537701 7.677068,47.534446 7.69652,47.5343 7.794091,47.556911 7.812091,47.570888 7.821923,47.587362 7.891659,47.5
@jbspeakr
jbspeakr / top-level-domains.sql
Last active December 10, 2015 17:18
all Top-Level-Domains (TLD) and their corresponding countries/ generics as SQL
CREATE TABLE dmakr_domain (id INT NOT NULL, tld VARCHAR(4) NOT NULL, country VARCHAR(200), PRIMARY KEY(id));
INSERT INTO dmakr_domain (id, tld, country) VALUES ("1", "aero", "Air transport");
INSERT INTO dmakr_domain (id, tld, country) VALUES ("2", "asia", "Organisations and individuals in the Asia-Pacific region");
INSERT INTO dmakr_domain (id, tld, country) VALUES ("3", "biz", "Business");
INSERT INTO dmakr_domain (id, tld, country) VALUES ("4", "cat", "Catalan");
INSERT INTO dmakr_domain (id, tld, country) VALUES ("5", "com", "Commercial organizations");
INSERT INTO dmakr_domain (id, tld, country) VALUES ("6", "coop", "Cooperatives");
INSERT INTO dmakr_domain (id, tld, country) VALUES ("7", "edu", "Educational establishments");
INSERT INTO dmakr_domain (id, tld, country) VALUES ("8", "gov", "US government");
INSERT INTO dmakr_domain (id, tld, country) VALUES ("9", "info", "Informational sites");
@jbspeakr
jbspeakr / top-level-domains.json
Created January 6, 2013 10:05
all Top-Level-Domains (TLD) and their corresponding countries/ generics in JSON
[
{
"model": "dmakr.domain",
"pk": 1,
"fields": {
"tld": "aero",
"country": "Air transport"
}
},{
"model": "dmakr.domain",
@jbspeakr
jbspeakr / German-Zip-Codes.csv
Created January 18, 2013 16:46
list of German zip codes (Postleitzahl), including dialing code, name of the city and federal state.
We can't make this file beautiful and searchable because it's too large.
Ort;Zusatz;Plz;Vorwahl;Bundesland
Aach;b Trier;54298;0651;Rheinland-Pfalz
Aach;, Hegau;78267;07774;Baden-Württemberg
Aachen;;52062;0241;Nordrhein-Westfalen
Aachen;;52064;0241;Nordrhein-Westfalen
Aachen;;52066;0241;Nordrhein-Westfalen
Aachen;;52068;0241;Nordrhein-Westfalen
Aachen;;52070;0241;Nordrhein-Westfalen
Aachen;;52072;0241;Nordrhein-Westfalen
Aachen;;52074;0241;Nordrhein-Westfalen
@jbspeakr
jbspeakr / csv2json.py
Last active December 14, 2015 06:18
Check http://www.datahack.it for further conversion snippets!
import csv
import json
i = open('input.csv', 'r')
reader = csv.DictReader(i)
data = json.dumps([row for row in reader], indent=4)
o = open('output.json', 'w')
o.write(data)
@jbspeakr
jbspeakr / zipcodes-germany.csv
Created February 26, 2013 18:59
Zipcode-list Germany Source: OpenGeoDB / http://www.datendieter.de/item/Postleitzahlen_Liste_Deutschland License: Public Domain
We can't make this file beautiful and searchable because it's too large.
State,Zipcode,City
Baden-Württemberg,64754,Eberbach (Baden)
Baden-Württemberg,68159,Jungbusch
Baden-Württemberg,68159,"Mannheim, Universitätsstadt"
Baden-Württemberg,68161,Schwetzingerstadt
Baden-Württemberg,68161,"Mannheim, Universitätsstadt"
Baden-Württemberg,68161,Oststadt
Baden-Württemberg,68163,Neuostheim
Baden-Württemberg,68163,Lindenhof
Baden-Württemberg,68163,"Mannheim, Universitätsstadt"
@jbspeakr
jbspeakr / gemeindeverzeichnis.json
Created March 23, 2013 23:16
Alle politisch selbständigen Gemeinden mit ausgewählten Merkmalen am 31.12.2012 (4. Quartal) Auf Basis des destatis Gemeindeverzeichnisses: https://www.destatis.de/DE/ZahlenFakten/LaenderRegionen/Regionales/Gemeindeverzeichnis/Administrativ/Archiv/GVAuszugQ/AuszugGV4QAktuell.html
[
{
"name": "Flensburg, Stadt",
"area": "56.74",
"inhabitants": {
"male": "44028",
"number": "89357",
"female": "45329",
"density": "1575"
},
@jbspeakr
jbspeakr / csv2yaml.py
Created June 25, 2013 14:45
Check http://www.datahack.it for further conversion snippets!
import csv
import yaml
i = open('input.csv', 'r')
reader = csv.DictReader(i)
data = yaml.safe_dump([row for row in reader], canonical=False,
encoding='utf-8', allow_unicode=True,
default_flow_style=False)
@jbspeakr
jbspeakr / arangodb-setup.sh
Created July 22, 2013 18:15
Setup ArangoDB on Uberspace
# Log in and execute
wget -O - https://www.arangodb.org/repositories/1.3.2/Uberspace/uberspace-arangodb.sh | sh
# Copy sh-Scripts to ~/bin
cp arangod.sh ~/bin
cp arangosh.sh ~/bin
# Setup daemontools
test -d ~/service || uberspace-setup-svscan