This file contains hidden or 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
| http://pinboard.in/u:Pinboard | |
| http://pinboard.in/u:rubinsztajn | |
| http://pinboard.in/u:pberry | |
| http://pinboard.in/u:rybesh | |
| http://pinboard.in/u:librarywebchic | |
| http://pinboard.in/u:archivesnext | |
| http://pinboard.in/u:Skud | |
| http://pinboard.in/u:hoverbird | |
| http://pinboard.in/u:paulsmith | |
| http://pinboard.in/u:helrond |
This file contains hidden or 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
| @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
| <http://dx.doi.org/10.1126/science.1157784> | |
| <http://prismstandard.org/namespaces/basic/2.1/doi> "10.1126/science.1157784" ; | |
| <http://prismstandard.org/namespaces/basic/2.1/endingPage> "832" ; | |
| <http://prismstandard.org/namespaces/basic/2.1/startingPage> "828" ; | |
| <http://prismstandard.org/namespaces/basic/2.1/volume> "325" ; | |
| <http://purl.org/dc/terms/creator> <http://id.crossref.org/contributor/a-h-renear-1z0zrfd0bp2b7>, <http://id.crossref.org/contributor/c-l-palmer-1z0zrfd0bp2b7> ; | |
| <http://purl.org/dc/terms/date> "2009-08-13Z"^^<http://www.w3.org/2001/XMLSchema#date> ; | |
| <http://purl.org/dc/terms/identifier> "10.1126/science.1157784" ; |
This file contains hidden or 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 | |
| """ | |
| install web.py and mod_wsgi and put this in your apache config: | |
| WSGIScriptAlias /multiprocessing /home/ed/wsgi_multiprocessing.py | |
| AddType text/html .py | |
| Then visit, |
This file contains hidden or 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 pymarc | |
| import codecs | |
| reader = pymarc.MARCReader(codecs.open('test.dat', 'r', 'windows-1251')) | |
| record = reader.next() | |
| print record['200']['a'].encode('utf-8') |
This file contains hidden or 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
| [2011-05-06 11:49:40,739: ERROR/MainProcess] Task sampler.web.tasks.load_bags[96bb7e3a-dc18-4214-bdd3-547933217bf0] raised exception: TypeError("KeyError('bagKey',) is not JSON serializable",) | |
| Traceback (most recent call last): | |
| File "/home/esummers/.virtualenvs/sampler/lib/python2.6/site-packages/celery/execute/trace.py", line 34, in trace | |
| return cls(states.SUCCESS, retval=fun(*args, **kwargs)) | |
| File "/home/esummers/.virtualenvs/sampler/lib/python2.6/site-packages/celery/task/base.py", line 241, in __call__ | |
| return self.run(*args, **kwargs) | |
| File "/home/esummers/.virtualenvs/sampler/lib/python2.6/site-packages/celery/app/__init__.py", line 141, in run | |
| return fun(*args, **kwargs) | |
| File "/home/esummers/projects/sampler/sampler/../sampler/web/tasks.py", line 19, in load_bags | |
| cts_loader.service_requests() |
This file contains hidden or 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 ptree | |
| >>> ptree.id2ptree("info:lccn/hahah/motherhubbard") | |
| '/in/fo/+l/cc/n=/ha/ha/h=/mo/th/er/hu/bb/ar/d/' | |
| >>> ptree.ptree2id("/in/fo/+l/cc/n=/ha/ha/h=/mo/th/er/hu/bb/ar/d/") | |
| u'info:lccn/hahah/motherhubbard' | |
| >>> |
This file contains hidden or 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@rorty:~$ rdfsum meta | |
| 7591 <http://xmlns.com/foaf/0.1/Document> | |
| 7590 <http://purl.org/ontology/bibo/Document> | |
| 7377 <http://www.w3.org/2006/time#Interval> | |
| 6982 <http://purl.org/NET/c4dm/event.owl#Event> | |
| 6982 <http://linkedevents.org/ontology/Event> | |
| 6225 <http://data.archiveshub.ac.uk/def/ArchivalResource> | |
| 6163 <http://data.archiveshub.ac.uk/def/Creation> | |
| 5761 <http://www.w3.org/2004/02/skos/core#Concept> | |
| 4533 <http://xmlns.com/foaf/0.1/Agent> |
This file contains hidden or 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
| #!/bin/sh | |
| # | |
| # pass this script a filename of ntriples data and get back a | |
| # little report about the types of resources in the rdf, e.g. | |
| # | |
| # ed@curry:~/$ rdfsum oreily_catalog.nt | |
| # 6803 <http://purl.org/goodrelations/v1#TypeAndQuantityNode> | |
| # 5861 <http://purl.org/goodrelations/v1#Offering> | |
| # 4564 <http://purl.org/goodrelations/v1#UnitPriceSpecification> |
This file contains hidden or 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 socket | |
| >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| >>> s.bind(('localhost', 8080)) | |
| >>> s.listen(1) |
This file contains hidden or 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@rorty:~$ host en.wikipedia.org | |
| en.wikipedia.org is an alias for text.wikimedia.org. | |
| text.wikimedia.org is an alias for text.pmtpa.wikimedia.org. | |
| text.pmtpa.wikimedia.org has address 208.80.152.2 |