This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rdflib | |
FOAF = rdflib.Namespace('http://xmlns.com/foaf/0.1/') | |
g = rdflib.ConjunctiveGraph() | |
g.parse('http://inkdroid.org/ehs') | |
for t in g.triples((None, FOAF['jabberID'], None)): | |
print t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rdflib | |
FOAF = rdflib.Namespace('http://xmlns.com/foaf/0.1/') | |
g = rdflib.ConjunctiveGraph() | |
g.parse('http://inkdroid.org/ehs') | |
for person, jabber_id in g.subject_objects(FOAF['jabberID']): | |
print "%s has jabber ID %s" % (person, jabber_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# awful hack to print out bibo classes, and the properties that hang off of | |
# them directly | |
import rdflib | |
g = rdflib.ConjunctiveGraph() | |
g.parse('http://purl.org/ontology/bibo/') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@cache_page(86400) | |
def page_pdf(request, lccn, date, edition, sequence): | |
title = get_object_or_404(models.Title, lccn=lccn) | |
_year, _month, _day = date.split("-") | |
try: | |
_date = datetime.date(int(_year), int(_month), int(_day)) | |
except ValueError, e: | |
raise Http404 | |
try: | |
issue = title.issues.get(date_issued=_date, edition=edition) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
for i in range(1,29): | |
u = "http://dcmi-rda.s3.amazonaws.com/locdata/part%02i-marcxml.tar.gz" % i | |
os.system("wget %s" % u) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml | |
RewriteRule ^ehs$ ehs.rdf [R=303] | |
RewriteCond %{HTTP_ACCEPT} text/html [OR] | |
RewriteCond %{HTTP_ACCEPT} application/xml [OR] | |
RewriteCond %{HTTP_ACCEPT} text/xml [OR] | |
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# easy_install xlrd | |
import xlrd | |
book = xlrd.open_workbook('weekly.xls') | |
for sheet in book.sheets(): | |
for rownum in range(sheet.nrows): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import simplejson | |
import rdflib | |
def json_for_graph(g): | |
""" | |
Pass in a rdflib.Graph and get back a chunk of JSON using | |
the Talis JSON serialization for RDF: | |
http://n2.talis.com/wiki/RDF_JSON_Specification | |
""" | |
json = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esummers@terbium [/ndnp/chronam] $ svn diff chronam/static/javascript/tileviewer.js | |
Index: chronam/static/javascript/tileviewer.js | |
=================================================================== | |
--- chronam/static/javascript/tileviewer.js (revision 6508) | |
+++ chronam/static/javascript/tileviewer.js (working copy) | |
@@ -805,7 +805,7 @@ | |
this.img = null; | |
this.box = new Box(0, 0, dimensions.width, dimensions.height); | |
- this.source = pagePath + "/image_" + + this.box.width + "x" + this.box.height + "_from_" + fullBox.x + "," + fullBox.y + "_to_" + fullBox.getX2() + "," + fullBox.getY2() + ".jpg"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ed@hammer:~$ curl -i http://realtech.burningbird.net/web/browsers/browser-more-script | |
HTTP/1.1 404 Not Found | |
Date: Tue, 14 Apr 2009 16:32:49 GMT | |
Server: Apache | |
X-Powered-By: PHP/5.2.8 | |
Set-Cookie: SESS481b63c69ea068f972035faf355a997d=4ae2286c21da584e4948eb819317cd58; expires=Thu, 07 May 2009 20:06:09 GMT; path=/; domain=.realtech.burningbird.net | |
Expires: Sun, 19 Nov 1978 05:00:00 GMT | |
Last-Modified: Tue, 14 Apr 2009 16:33:14 GMT | |
Cache-Control: store, no-cache, must-revalidate | |
Cache-Control: post-check=0, pre-check=0 |
OlderNewer