Skip to content

Instantly share code, notes, and snippets.

View emchateau's full-sized avatar

Emmanuel Château-Dutier emchateau

View GitHub Profile
@wragge
wragge / trove-newspapers-keyboard-navigation.user.js
Last active January 25, 2021 00:18
Keyboard navigation for Trove newspapers
// ==UserScript==
// @name Trove newspapers keyboard navigation
// @namespace http://timsherratt.org/trove-keyboard-navigation
// @version 0.1
// @description Use left and right arrows to move between pages, up and down arrows to move between issues.
// @author Tim Sherratt (@wragge)
// @match https://trove.nla.gov.au/newspaper/page/*
// @grant none
// ==/UserScript==

Séminaire de recherche du master « Humanités numériques »

Séance du 9 décembre 2020

Page web de l'ENC présentant la séance

Quelques liens pouvant être utile dans les échanges/discussions

Liste/ressource totalement subjective

projets DAH et GLAM

@dkarlovi
dkarlovi / README.md
Last active March 9, 2020 23:42
Split a large XML file into several smaller XML files

How to run

saxon -s:in.xml -xsl:split.xsl name=Products size=1200
@workergnome
workergnome / adjacency-list-to-edges.py
Last active May 13, 2020 17:31 — forked from chihming/adjacency-list-to-edges.py
convert an adjacency list to edge list format
import sys
"""
usage:
python adjacency-list-to-edges.py [adjacency-list-file] [edge-list-file]
example:
this program will help convert this:
[adjacency-list-file]
flower,fruit
carafe,flower,glass,window
flower,dew
@namedgraph
namedgraph / WebAlgebra.md
Last active May 9, 2023 08:32
A denotational semantics for CRUD operations on RDF datasets

RDF quads

S = I ∪ B

P = I

O = I ∪ B ∪ L

xquery version "3.0";
(:
Various Date String Parser
- Parses various flavors of date strings, returns as xs:dateTime or xs:date
- Key functions: dates:parseDateTime() and dates:parseDate()
- adapted to an eXist-compatible module from date-parser.xqy from
http://xqzone.marklogic.com/svn/commons/trunk/dates/date-parser.xqy
- by Joe Wicentowski
@bitsgalore
bitsgalore / apache-default.png
Last active April 11, 2018 03:32
Serving a static website with the Apache web server
apache-default.png
@wsalesky
wsalesky / git-sync-v2.xql
Created November 30, 2017 18:57
Update git-sync XQuery to use eXistdb's native JSON parser.
xquery version "3.1";
(:~
: Webhook endpoint for tcadrt.com data repository, /master/ branch:
: XQuery endpoint to respond to Github webhook requests. Query responds only to push requests from the master branch.

: The EXPath Crypto library supplies the HMAC-SHA1 algorithm for matching Github secret. 

:
: Secret can be stored as environmental variable.
: Will need to be run with administrative privileges, suggest creating a git user with privileges only to relevant app.
:
@danr
danr / xml.kak
Created September 19, 2017 08:15
Selecting and wrapping with xml tags in kakoune
def div -params 0..1 -docstring %{Wraps selected text with a tag and indents it.
The parameter can be omitted and then defaults to div.} %{
eval -itersel %{
exec <a-:><a-x>H Zo< / %sh{[ -n "$1" ] && echo "$1" || echo "div"} ><esc><a-x>yz<A-P>s/<ret>dz>
}
}
def select-tag -docstring %{Selects xml tag from start to end.
@regisrob
regisrob / sparql-iiif-annotations.txt
Last active October 15, 2017 07:52
SPARQL query to retrieve and display IIIF image annotations (created with Mirador and SimpleAnnotationServer, stored in Sesame). See http://demos.biblissima-condorcet.fr/ovide-moralise/
PREFIX exif: <http://www.w3.org/2003/12/exif/ns#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX cnt: <http://www.w3.org/2011/content#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX sc: <http://iiif.io/api/presentation/2#>
PREFIX sc1: <http://www.shared-canvas.org/ns/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX oa: <http://www.w3.org/ns/oa#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>