Skip to content

Instantly share code, notes, and snippets.

View agmangas's full-sized avatar

Andrés García Mangas agmangas

View GitHub Profile
@agmangas
agmangas / import.ttl
Created May 19, 2021 11:49
Test validator import
@prefix dct: <http://purl.org/dc/terms/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
<http://publications.europa.eu/resource/authority/country/ESP>
a dct:Location ;
skos:inScheme <http://publications.europa.eu/resource/authority/country> .
@agmangas
agmangas / quickstart.py
Created January 4, 2021 16:15
WoTemu quickstart app
import json
import logging
import pprint
import random
import time
from wotpy.wot.enums import DataType
_logger = logging.getLogger("wotemu.quickstart.thing")
@agmangas
agmangas / patch-runc.sh
Last active November 17, 2020 15:31
Script to patch the default "runc" container runtime with a proxy that enables privileged access on Swarm nodes
#!/usr/bin/env bash
set -e
set -u
set -x
RUNC_PROXY_GIST="https://gist.githubusercontent.com/agmangas/905a3045074a8645462eadad95334b6a/raw/"
echo "## Adding runc proxy to enable privileged support"
@agmangas
agmangas / runc-proxy
Created November 17, 2020 14:12
Runc proxy for a dirty workaround to enable privileged access on Swarm nodes
#!/usr/bin/python3
import json
import os
import pathlib
import sys
from typing import List
"""
Workaround to enable capabilities on Swarm services.
Injects all capabilities before passing requests to the real runtime (runc).
@agmangas
agmangas / breg-dcat-example.ttl
Created November 16, 2020 12:56
BRegDCAT-AP v2 public example in RDF Turtle format
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix cpsv: <http://purl.org/vocab/cpsv#> .
@prefix cv: <http://data.europa.eu/m8g/> .
# An example of a Public Organisation:
# "A Public Organisation is the responsible Agent for the delivery of a Public Service.
@agmangas
agmangas / breg-datasets-malta.ttl
Created November 3, 2020 13:18
BRegDCAT-AP v2 sample (Malta)
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<https://joinup.ec.europa.eu/collection/access-base-registries/solution/abr-bregdcat-ap#datasets-sample-malta>
a dcat:Catalog ;
dct:description "Register of Datasets (Data Catalogue) - OPM - [20593]" ;
dct:identifier "20593" ;
@agmangas
agmangas / breg-datasets-norway.ttl
Last active November 3, 2020 17:11
BRegDCAT-AP v2 sample (Norway)
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<https://joinup.ec.europa.eu/collection/access-base-registries/solution/abr-bregdcat-ap#datasets-sample-norway>
a dcat:Catalog ;
dct:description "Datakatalog for REGISTERENHETEN I BRØNNØYSUND"@nb ;
dct:identifier "<http://dataset-catalogue:8080/catalogs/974760673>" ;
@agmangas
agmangas / breg-datasets-example-ireland.ttl
Last active October 22, 2020 09:19
BRegDCAT-AP v2 example datasets (Ireland)
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<https://joinup.ec.europa.eu/collection/access-base-registries/solution/abr-bregdcat-ap#datasets-example-ireland>
a dcat:Catalog ;
dct:description "Promoting innovation and transparency through the publication of Irish Public Sector data in open, free and reusable formats." ;
dct:identifier "https://data.gov.ie/" ;
@agmangas
agmangas / breg-datasets-spain.ttl
Last active November 3, 2020 13:24
BRegDCAT-AP v2 sample (Spain)
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<https://joinup.ec.europa.eu/collection/access-base-registries/solution/abr-bregdcat-ap#datasets-sample-spain>
a dcat:Catalog ;
dct:description "Catálogo de registros de vehículos"@es ;
dct:description "Vehicles register catalogue"@en ;
@agmangas
agmangas / breg-vehicles-example.ttl
Last active October 20, 2020 09:15
BRegDCAT-AP v2 vehicles register catalog example
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<https://joinup.ec.europa.eu/collection/access-base-registries/solution/abr-bregdcat-ap#vehicles-example>
a dcat:Catalog ;
dct:description "Vehicles Register | Data Governance / Enterprise Data Management [OPM] | Public Administration [OPM]" ;
dct:identifier "27348" ;