Skip to content

Instantly share code, notes, and snippets.

@mightymax
mightymax / Dockerfile
Created May 13, 2025 11:29
Attempt to build RVT in a Docker image
# From the folder where your Dockerfile is stored:
# docker build --platform linux/amd64 -t rvt2 .
# once the build is done, try tro run the evaluation tool:
# docker run --rm rvt
# or create a container and run this command (and others per README from the RVT project):
# docker run -it --rm rvt
# python eval.py --model-folder runs/rvt2 --eval-datafolder ./data/test --tasks all --eval-episodes 25 --log-name test/1 --device 0 --headless --model-name model_99.pth && \
FROM nvidia/cuda:12.9.0-cudnn-devel-ubuntu24.04
@mightymax
mightymax / tableMap.json
Created March 1, 2023 11:15
Used in RATT Tests.
{
"be": "http://ex.com/Belgium",
"nl": "http://ex.com/Netherlands",
"de": "http://ex.com/Germany",
"en": "http://ex.com/England"
}
@mightymax
mightymax / sparql.js
Created September 22, 2022 12:10
SPARQL definitions for use with data.osm.pldn.nl
const yasgui = new Yasgui(document.getElementById('yasgui'), {
autofocus: true,
copyEndpointOnNewTab: false,
persistenceId: () => "pldn-osm", // change this to a different string to bust the yasgui cache for all users
endpointCatalogueOptions: {
getData: () => {
return [
{ endpoint: 'https://api.triplydb.com/datasets/osm/osm/services/osm/sparql' },
]
}
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX memorix: <http://memorix.io/ontology#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT ?identifier ?labelNL ?commentNL
FROM <http://example.memorix.io/resources/recordtypes>
@mightymax
mightymax / Event.ttl
Last active November 4, 2021 08:39
Memorix Recordtype for Organizations based on the https://schema.org classes
@prefix dash: <http://datashapes.org/dash#> .
@prefix schema: <http://schema.org/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix html: <http://www.w3.org/1999/xhtml/> .
@prefix memorix: <http://memorix.io/ontology#> .
@prefix Event: </resources/recordtypes/Event#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix recordtypes: </resources/recordtypes/> .
@mightymax
mightymax / RiC-O_v0-2_translation_nl.rdf
Created October 11, 2021 14:34
Dutch translation for Records in Context Ontology
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rico="https://www.ica.org/standards/RiC/ontology#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<owl:Ontology rdf:about="https://www.ica.org/standards/RiC/ontology">
<dc:contributor xml:lang="nl">Nederlandse vertaling: Stadsarchief Amsterdam</dc:contributor>
<dc:contributor xml:lang="nl">Nederlandse vertaling: Mark Lindeman</dc:contributor>
</owl:Ontology>
<rdf:Description rdf:about="https://www.ica.org/standards/RiC/ontology#Thing">
<rdfs:label xml:lang="nl">Iets</rdfs:label>
<rdfs:comment xml:lang="nl">Elk idee, materieel ding of gebeurtenis binnen het domein van de menselijke ervaring.</rdfs:comment>
<skos:example xml:lang="nl">Vliegtuig, impressionisme, renaissance, slavernij, Franse Revolutie</skos:example>
@mightymax
mightymax / GeonamesTextToTurtle.php
Last active April 21, 2021 20:13
Line parser to convert Geonames TXT downloads to Turtle.
<?php
/**
* Line parser to convert Geonames TXT downloads to Turtle.
*
* You can download TXT files (zipped) from Geonames download server:
* https://download.geonames.org/export/dump/
* Download per country (XX.zip) or allCountries.zip
* A progressbar is printed to STDERR, if you set the `--validate` flag, e.g.:
* php ./txttottl.php NL.txt BE.txt --validate
*