Skip to content

Instantly share code, notes, and snippets.

View ncarboni's full-sized avatar

Nicola Carboni ncarboni

View GitHub Profile
@prefix crm: <http://www.cidoc-crm.org/cidoc-crm/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix crmpc: <http://www.cidoc-crm.org/cidoc-crm/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vir: <http://w3id.org/vir#> .
@prefix inf: <http://www.cidoc-crm.org/cidoc-crm/CRMinf/> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@ncarboni
ncarboni / artwork_mmd.mmd
Created December 15, 2020 18:10
Mermaid mmd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ncarboni
ncarboni / names_mermaid.mmd
Created December 15, 2020 18:13
names_mermaid.mmd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ncarboni
ncarboni / smithsonian_crm.sparql
Last active April 24, 2021 23:05
CRM query for obtaining appellation, dimension and creation date of an object
SELECT ?creation_date ?appellation ?label ?dimension_value ?dimension_unit
WHERE {
?x crm:P1_is_identified_by ?appellation ;
crm:P43_has_dimension ?dimension .
?creation_event crm:P108_has_produced ?x ;
crm:P4_has_time-span ?creation_date .
@ncarboni
ncarboni / query_wikidata_visual_VC.rq
Created January 31, 2022 09:50
Wikidata query used for retrieving visual elements with their images for the VC project
SELECT * WHERE {
?visual wdt:P31 ?type .
?type wdt:P279*|wdt:P31 wd:Q4502142 .
?visual wdt:P18 ?image ;
wdt:P571 ?time .
OPTIONAL {
?visual wdt:P170 ?creator
}
@ncarboni
ncarboni / hashlib-openrefine.py
Created January 31, 2022 17:15
hashlib-openrefine
import hashlib
return hashlib.sha1(value.encode('utf-8')).digest().encode('hex')
@ncarboni
ncarboni / production_role.ttl
Last active November 24, 2022 11:30
Modelling of the role of an agent in a production event with CIDOC-CRM
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix crm: <http://http://www.cidoc-crm.org/cidoc-crm/> .
@prefix sari: <http://w3id.org/sari#> .
<https://example.com/production_activity/17762> a crm:E12_Production ;
crm:P01i_is_domain_of <http://example.com/production/0766> .
<http://example.com/production/0766> a crm:PC14_carried_out_by ;
crm:p02_has_range <http://example.com/person/134> ;