Skip to content

Instantly share code, notes, and snippets.

View edsu's full-sized avatar

Ed Summers edsu

View GitHub Profile
DB<8> ed@curry:~$ perl -de 1;
Loading DB routines from perl5db.pl version 1.32
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(-e:1): 1
DB<1> use Encode;
SELECT ?publisher ?publisherName ?abstract
WHERE {
?publisher <http://www.w3.org/2004/02/skos/core#subject> <http://dbpedia.org/resource/Category:Book_publishing_companies_of_the_United_States> .
?publisher <http://www.w3.org/2000/01/rdf-schema#label> ?publisherName .
?publisher <http://dbpedia.org/ontology/abstract> ?abstract .
}
@edsu
edsu / wikiedits.py
Created October 15, 2010 13:43
little irc bot that prints out live edits in wikipedia
#!/usr/bin/env python
# run this script and it will connect to irc://irc.wikimedia.org/en.wikipedia and
# print out live edits that are happening on wikipedia.
#
# you'll need to install python-irclib
import re
import sys
import irclib
@edsu
edsu / vocab-tally.txt
Created October 23, 2010 19:08
list of vocabularies that were mentioned in the use cases this morning
agrovoc: 1
bibo: 3
dcterms: 8
dctypes: 1
doap: 1
exif: 1
foaf: 9
frbr: 3
geo: 1
gnb: 1
@edsu
edsu / inflection-names-20101101.txt
Created November 2, 2010 20:32
inflection.com activity
Ann Grogan
Bessie Blackwell
Joseph Budnick
Marvis Simmons
Sandra Lowry
Richard Geisbrecht
William Newman
Lawrence Whitfield
Sonia Waks
Marlene Riedel
@edsu
edsu / inflection-names-20101102.txt
Created November 2, 2010 20:36
inflection name queries for 11/02/2010
Robert Taylor
Zelda Lewis
Robert Taylor
Elizabeth Reilly
Thomas Martin
George Nunley
William Wasserkrug
Rita Fremouw
Luz Maria Unda
William Wasserkrug
@edsu
edsu / id.txt
Created November 18, 2010 15:12
get id url
>>> import urllib
>>> r = urllib.urlopen('http://id.loc.gov/authorities/label/Soviet Union--History--1939-1945')
>>> r.url
'http://id.loc.gov/authorities/sh85125815#concept'
(u'4713613', u'0', u'A_Gathering_of_Old_Men')
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/home/ed/.virtualenvs/linkypedia/lib/python2.6/site-packages/Django-1.2.1-py2.6.egg/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/ed/.virtualenvs/linkypedia/lib/python2.6/site-packages/Django-1.2.1-py2.6.egg/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ed/.virtualenvs/linkypedia/lib/python2.6/site-packages/Django-1.2.1-py2.6.egg/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
@prefix dcat: <http://vocab.deri.ie/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix fb: <http://www.facebook.com/2008/fbml> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xhv: <http://www.w3.org/1999/xhtml/vocab#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
VZCZCXRO3160
OO RUEHGA RUEHHA RUEHMT RUEHQU RUEHVC
DE RUEHOT #0918/01 1911849
ZNY SSSSS ZZH
O 091849Z JUL 08
FM AMEMBASSY OTTAWA
TO RUEHC/SECSTATE WASHDC IMMEDIATE 8157
INFO RUCNCAN/ALL CANADIAN POSTS COLLECTIVE PRIORITY
RUEHBUL/AMEMBASSY KABUL PRIORITY 0198
RUEHIL/AMEMBASSY ISLAMABAD PRIORITY 0815