Skip to content

Instantly share code, notes, and snippets.

View mdlincoln's full-sized avatar

Matthew Lincoln mdlincoln

View GitHub Profile
@mdlincoln
mdlincoln / iconclass_atomic
Last active December 21, 2015 01:48
This is an attempt to define a regular expression that will capture the various particles of an Iconclass notation in its match groups. The Iconclass schema is described here: http://www.iconclass.nl/contents-of-iconclass
(\d{1,2})([A-Z]{1,2})?(\d{1,5})?(\(\w*\))?(\d{1,2})?(\(\+\d\))?
@mdlincoln
mdlincoln / coins.html
Last active August 29, 2015 13:57
Add bibliographic metadata via COinS (http://ocoins.info/) to your Jekyll blog with this _include snippet
<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rft.title={{ page.title | cgi_escape }}&amp;rft.aulast={{ site.data.contact.name_last | cgi_escape }}&amp;rft.aufirst={{ site.data.contact.name_first | cgi_escape }}&amp;rft.source={{ site.data.site.title | cgi_escape }}&amp;rft.date={{ page.date | date_to_xmlschema }}&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier={{ site.url | cgi_escape }}{{ page.url | cgi_escape }}&amp;rft.language=English"></span>
library("mvbutils")
path <- "state07_DE.txt"
col.widths <- c(6, 4, 2, 4)
table.header <- c("COOP.ID", "YEAR", "MONTH", "ELEMENT")
for(i in 1:31) {
new.widths <- c(5, 1, 1, 1)
new.header <- c(paste("VALUE",i, sep=""),
paste("MFLAG",i, sep=""),
library(SPARQL)
rights_query <- 'PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX edm: <http://www.europeana.eu/schemas/edm/>
PREFIX ens: <http://www.europeana.eu/schemas/edm/>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?edmrights ?provider (COUNT(*) as ?count)
edmrights provider count
1 <http://www.europeana.eu/rights/rr-f/> 'de Rand' vzw 159
2 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunale Biblioteker. Lokalhistorisl Samling. 1
3 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunes Biblioteker. Lokalhistorisk Samling, 1
4 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunes Biblioteker. Lokalhistorisk Samling. 12
5 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunes Biblioteker. Lokalhistorisl Samling. 1
6 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunes Biblioteker. Lokalhistorsk Samling. 1
7 <http://www.europeana.eu/rights/rr-f/> Accademia Nazionale di Santa Cecilia 5000
8 <http://www.europeana.eu/rights/rr-f/> Alex Vella Gera 225
9 <http://creativecommons.org/publicdomain/mark/1.0/> American Farm School of Thessaloniki Historical Archives 1007
{
"acquisition" : {
"method" : "bruikleen",
"date" : "1808-01-01T00:00:00Z",
"creditLine" : "Bruikleen van de gemeente Amsterdam"
},
"artistRole" : null,
"associations" : [ ],
"catRefRPK" : [ ],
"classification" : {
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dbpprop: <http://dbpedia.org/property/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX edm: <http://www.europeana.eu/schemas/edm/>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX tgn: <http://vocab.getty.edu/tgn/>
PREFIX xl: <http://www.w3.org/2008/05/skos-xl#>
SELECT ?concept ?conceptname (COUNT(?changenote) as ?numchanges)
WHERE {
?concept skos:inScheme tgn: .
https://www.rijksmuseum.nl/nl/zoeken?s=chronologic&f=1&p=2&ps=12&f.classification.iconClassIdentifier.sort=25A4&place=Amsterdam&imgonly=True&ii=3
@mdlincoln
mdlincoln / default
Last active August 29, 2015 14:20
rstudio on DO
# Goes to /etc/nginx/sites-enabled/default
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding