Skip to content

Instantly share code, notes, and snippets.

Hugo van Kemenade hugovk

  • Nord Software
  • Helsinki, Finland
Block or report user

Report or block hugovk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hugovk
hugovk / helsinki_metro_stations.csv
Last active Mar 9, 2016
Helsinki metro stations, co-ordinates taken from Wikipedia.
View helsinki_metro_stations.csv
Latitude Longitude Name
60.163056 24.914444 Ruoholahti
60.168889 24.931944 Kamppi
60.170556 24.940556 Rautatientori
60.172222 24.9475 Helsingin yliopisto
60.18 24.950556 Hakaniemi
60.1875 24.961111 Sörnäinen
60.1875 24.976944 Kalasatama
60.188889 25.008056 Kulosaari
60.195 25.030833 Herttoniemi
View define.py
#!/usr/bin/env python
'''
I frequently look up word meanings online.
It's kind of a hassle to fire up the browser, and search online after a while.
It's a lot easier for me to do it from the command line, when my terminal is one keyboard shortcut away.
I wrote this script using the wordnik api that does just that.
I suggest you put this somewhere in your PATH, make it executable.
Make sure you get a Wornik API key at http://developer.wordnik.com/
@hugovk
hugovk / Snowball
Last active Dec 16, 2015 — forked from nossidge/Snowball
Python version of nossidge's C++ from https://gist.github.com/nossidge/5272238
View Snowball
#!/usr/bin/env python
"""
Python version of nossidge's C++ from https://gist.github.com/nossidge/5272238
Original blurb:
~~ Snowball Poem ~~
Snowball (also called a Chaterism): A poem in which each line is a single word,
and each successive word is one letter longer. One of the constrained writing
techniques invented by the Oulipo (Workshop of Potential Literature).
@hugovk
hugovk / leg.py
Created Feb 6, 2014
Hacky script used for renaming (most) of the Wikipedia/Wikimedia photos of members of congress into bioguide IDs for use by https://github.com/sunlightlabs/congress/
View leg.py
#!/usr/bin/env python
import csv
import os
import re
import sys
def mvit(infile, outfile):
for suffix in [
"_113th_Congress_2013",
@hugovk
hugovk / 30s.py
Created Jun 29, 2014
Download a file every 30 seconds.
View 30s.py
import argparse
import datetime
import os
from twisted.internet import reactor
from twisted.internet import task
# Download an image from a URL every few seconds
parser = argparse.ArgumentParser(
description='Download an image from a URL every few seconds.')
@hugovk
hugovk / darkandstormy.py
Created Nov 20, 2014
Dark and Stormy: A 50,006-word recursive story for NaNoGenMo 2014. https://github.com/dariusk/NaNoGenMo-2014/issues/35#issuecomment-63762140
View darkandstormy.py
#!/usr/bin/env python
"""
Create a recursive story for NaNoGenMo 2014.
"""
sentence = 'It was a dark and stormy night, the ship was sinking; "Tell us a story, Captain!" the crew begged. The Captain began: '
senlen = len(sentence.split())
target = 50000
@hugovk
hugovk / README.md
Last active Aug 29, 2015
Questions arising from a Project Gutenberg corpus
View README.md
@hugovk
hugovk / pandb.sh
Last active Aug 29, 2015
pandb.sh downloads and extracts a database from Pantheon in a local environment. updb.sh extracts the last downloaded DB.
View pandb.sh
#!/bin/bash
echo $1
DATABASENAME="TODO_ENTER_YOUR_DATABASE_NAME"
# From the Pantheon dashboard Backups tab, copy the temporary link for the
# database. Call this script with that link (in quotes) as a parameter.
if [ -z "$1" ];
then
@hugovk
hugovk / .jshintrc
Last active Apr 29, 2016
Gruntfile for Drupal to compile Less to CSS with source maps
View .jshintrc
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
View keybase.md

Keybase proof

I hereby claim:

  • I am hugovk on github.
  • I am hugovk (https://keybase.io/hugovk) on keybase.
  • I have a public key whose fingerprint is F213 C454 5327 1E8C 046B 98FD 277D DF42 CB72 5F45

To claim this, I am signing this object:

You can’t perform that action at this time.