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 / 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
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:

@hugovk
hugovk / README.md
Last active Aug 29, 2015
Cutthroat verb-nouns
View README.md

Cutthroat verb-nouns

David-Antoine Williams writes:

What is the difference between a catch-all and a catch-phrase? Both are compounds formed as Verb+Noun, but in catch-all, the noun is the direct object of the verb, whereas in catch-phrase it is the subject. That is, a catch-all is something that catches all things, whereas a catch-phrase is not something that catches phrases – it is a phrase that catches something. Get it?

Recently there has been some discussion of catch-all type compounds, which Brianne Hughes has named “cutthroat compounds,” after one of the more suggestive of these. Apparently they’re rare, because they violate a general tendency for compounds in English to put the ‘head’ (e.g. phrase) on the right (‘right-headedness’). Compare F. ouvre-bouteille to E. bottle-opener (not open-bo

@hugovk
hugovk / minitest.py
Last active Aug 29, 2015
Attempt to download another user's Wordnik list
View minitest.py
#!/usr/bin/env python
# encoding: utf-8
from wordnik import swagger, AccountApi, WordListApi
WORDNIK_USERNAME = TODO
WORDNIK_PASSWORD = TODO
WORDNIK_API_KEY = TODO
permalink = "gapeseeds-and-muckworms---compound-derogatives"
@hugovk
hugovk / Vagrantfile
Created Jun 1, 2015
A Drupal Vagrantfile
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
hostname = 'myvagrant'
domain = 'example.com'
ip = '192.168.54.5'
#forwarded_port = 8080
cpus = 2
ram = 2048
@hugovk
hugovk / HOLD-DOOR-1801.jpg
Last active Aug 29, 2015
Cutthroats: A supplement to Johnson's English dictionary (1801)
You can’t perform that action at this time.