Skip to content

Instantly share code, notes, and snippets.

@jboecker
jboecker / output.txt
Created August 2, 2013 17:49
rdflib-sqlalchemy test case
<rdflib.plugins.memory.IOMemory object at 0x2370310> namespaces after creation:
[('xml', rdflib.term.URIRef(u'http://www.w3.org/XML/1998/namespace')),
('rdf', rdflib.term.URIRef(u'http://www.w3.org/1999/02/22-rdf-syntax-ns#')),
('xsd', rdflib.term.URIRef(u'http://www.w3.org/2001/XMLSchema#')),
('rdfs', rdflib.term.URIRef(u'http://www.w3.org/2000/01/rdf-schema#'))]
('<rdflib.plugins.memory.IOMemory object at 0x2370310>', 'namespaces after loop:')
[('xml', rdflib.term.URIRef(u'http://www.w3.org/XML/1998/namespace')),
('rdf', rdflib.term.URIRef(u'http://www.w3.org/1999/02/22-rdf-syntax-ns#')),
('ex', rdflib.term.URIRef(u'http://example.com/ns/ex#')),
import itertools
first=list("abcd")
second=list("1234")
third=list("WXYZ")
step1 = map("".join, itertools.product(first, second))
step1_combinations = itertools.product(step1, repeat=len(third))
for combo in step1_combinations:
@jboecker
jboecker / gist:5123578
Last active December 14, 2015 17:39
Bookmarklet to create a custom printable view of zeit.de "Um die Ecke gedacht" riddles (use jscompress.com to get it to a manageable size for a bookmarklet)
var jQuery, document;
function f() {
'use strict';
var title = jQuery("span.title"),
image = jQuery("#main > div.article-body > div.block > img"),
across = jQuery("#main > div.article-body > p")[1],
down = jQuery("#main > div.article-body > p")[2],
b,
imgwidth;