Skip to content

Instantly share code, notes, and snippets.

Ed Summers edsu

Block or report user

Report or block edsu

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
@edsu
edsu / sagan-urls.txt
Last active Aug 29, 2015
list of most tweeted loc.gov urls in tweets mentioning sagan (in the past few days). created with http://github.com/edsu/twarc cut, sort and uniq
View sagan-urls.txt
133 http://www.loc.gov/collection/finding-our-place-in-the-cosmos-with-carl-sagan/about-this-collection/
49 http://www.loc.gov/resource/mss85590.053/
6 http://www.loc.gov/resource/mss85590.031/#seq-1
6 http://blogs.loc.gov/loc/2014/01/finding-our-place-in-the-cosmos-with-carl-sagan/
6 http://blogs.loc.gov/inside_adams/2014/01/take-a-course-or-two-with-professor-sagan/
5 http://www.loc.gov/resource/mss85590.021/#seq-1
5 http://blogs.loc.gov/catbird/2014/01/space-time-and-the-poet-sagan/
3 http://www.loc.gov/resource/mss85590.099/#seq-1
3 http://www.loc.gov/item/cosmos000055/
3 http://www.loc.gov/item/cosmos000006/
View dpla-item2.json
{
"@context": {
"@vocab": "http://purl.org/dc/terms/",
"LCSH": "http://id.loc.gov/authorities/subjects",
"aggregatedDigitalResource": "dpla:aggregatedDigitalResource",
"begin": {
"@id": "dpla:dateRangeStart",
"@type": "xsd:date"
},
"collection": "dpla:aggregation",
View dpla-item.ttl
@prefix : <http://purl.org/dc/terms/> .
@prefix dpla: <http://dp.la/terms/> .
@prefix edm: <http://www.europeana.eu/schemas/edm/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://dp.la/api/items/7f71b92c6a0f551d819493e1d1d31d91> dpla:originalRecord [ dpla:aggregation <http://dp.la/api/collections/24087df2c58f149a8167a9589cffd830> ;
:contributor "University of California Libraries (archive.org)" ;
View dpla-item1.json
{
"count": 1,
"docs": [
{
"@context": {
"@vocab": "http://purl.org/dc/terms/",
"LCSH": "http://id.loc.gov/authorities/subjects",
"aggregatedDigitalResource": "dpla:aggregatedDigitalResource",
"begin": {
"@id": "dpla:dateRangeStart",
View avg.html
<!doctype html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
function addBoxes() {
var num = $(
View access_log
207.241.226.216 - - [18/Feb/2014:16:44:11 +0000] "GET http://inkdroid.org/journal/2014/02/18/design-for-the-rubble/ HTTP/1.1" 200 16053 "-" "Mozilla/5.0 (compatible; archive.org_bot; Wayback Machine Live Record; +http://archive.org/details/archive.org_bot)"
@edsu
edsu / results.txt
Created Feb 21, 2014
% rdfsum AATOut_Full.nt
View results.txt
389833 _:node801
389833 <http://www.w3.org/2008/05/skos-xl#Label>
250819 <http://purl.org/ontology/bibo/DocumentPart>
198362 <http://purl.org/ontology/bibo/Document>
42171 <http://vocab.getty.edu/ontology#Subject>
38729 <http://www.w3.org/2004/02/skos/core#Concept>
38728 <http://vocab.getty.edu/ontology#Concept>
15162 _:node798
5336 <http://www.w3.org/1999/02/22-rdf-syntax-ns#List>
1985 <http://www.w3.org/2004/02/skos/core#Collection>
@edsu
edsu / gist:9692321
Last active Aug 29, 2015
OCLC's FAST Linked Data service now includes geo coordinates. A question from Bill Denton on a discussion list results in Karen Coombs announcing a fix in 2 days from OCLC. http://listserv.loc.gov/cgi-bin/wa?A2=ind1403&L=id&T=0&P=889 ; http://experimental.worldcat.org/fast/
View gist:9692321
% rapper -o turtle http://experimental.worldcat.org/fast/1207908/rdf
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix coord: <http://whatever/java/ORG.oclc.util.CoordToDecimal> .
@prefix naco: <http://whatever/java/ORG.oclc.util.NacoNormalize> .
@prefix norm: <http://whatever/java/ORG.oclc.util.NormalFormC> .
@prefix schema: <http://schema.org#> .
@prefix madsrdf: <http://www.loc.gov/mads/rdf/v1#> .
@prefix skosxl: <http://www.w3.org/2008/05/skos-xl#> .
View test.py
#!/usr/bin/env python
"""
It looks like some TIFF files are being rotated when saved as JPEGs. Grab this TIFF file:
http://inkdroid.org/tmp/foo.tif
Convert it to a JPEG. Now open both of them and notice how the JPG has been flipped. Is it possible that there
is orientation metadata in the TIFF is being stripped when the image is saved as a JPEG?
"""
@edsu
edsu / wikihist.py
Last active Aug 29, 2015
Print out a report of what Wikipedia articles you've visited using your Google Chrome history database. You'll need to shutdown Google Chrome first since it locks the database.
View wikihist.py
#!/usr/bin/env python
"""
Print out a report of Wikipedia articles you've visited using your Google Chrome history database.
The output is in Markdown, and you'll need to shutdown Chrome before you run this or else the
database will be locked.
"""
import os
import re
You can’t perform that action at this time.