Skip to content

Instantly share code, notes, and snippets.

View boutros's full-sized avatar

Petter Goksøyr Åsen boutros

  • Oslo Public Library
  • Oslo
View GitHub Profile
This file has been truncated, but you can view the full file.
_:b1023947 <http://data.deichman.no/ontology#agent> <http://data.deichman.no/person/h30277300> <https://katalog.deichman.no> .
_:b1023947 <http://data.deichman.no/ontology#role> <http://data.deichman.no/role#author> <https://katalog.deichman.no> .
_:b1023947 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.deichman.no/ontology#Contribution> <https://katalog.deichman.no> .
_:b1023947 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.deichman.no/ontology#MainEntry> <https://katalog.deichman.no> .
_:b1023948 <http://data.deichman.no/ontology#hasRelationType> <http://data.deichman.no/relationType#continuedIn> <https://katalog.deichman.no> .
_:b1023948 <http://data.deichman.no/ontology#work> <http://data.deichman.no/work/w4d48d16117525bb58fd130fb878648e9> <https://katalog.deichman.no> .
_:b1023948 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.deichman.no/ontology#WorkRelation> <https://katalog.deichman.no> .
_:b1023949 <http://data.deichman.no/ontology#hasRelatio
@boutros
boutros / test.txt
Created December 15, 2019 00:20
epd module test
> sudo apt install pipenv
> cd scratch
> pipenv install
> pipenv shell
> python3
>>> import epd
>>> l = epd.list_all()
>>> len(l)
253
>>> l2 = epd.list_query("sement")
@boutros
boutros / perdato.csv
Created August 27, 2019 11:56
hvor mange arrangement opprettet per dag
dato antall
2019-03-27 9
2019-03-28 21
2019-03-29 5
2019-04-01 11
2019-04-02 1
2019-04-02 46
2019-04-03 14
2019-04-04 22
2019-04-05 104
@boutros
boutros / search.md
Last active July 5, 2019 09:38
publication based search

The new search result format is going to be roughly like this, with each hit representing a publication:

{
    ...properties on publication...
    work: {
        ...properties on work...
    }
    otherPublications: {
        ...properties on other publications on the same work...

}

@boutros
boutros / http.md
Created November 28, 2018 08:03 — forked from icholy/http.md

Experiments with the http.Handler interface

When using net/http, handling errors is kinda annoying.

http.HandleFunc("/foo", func(w http.ResponseWriter, r *http.Request) {
	thing, err := storage.Get("thing")
	if err != nil {
		http.Error(w, err.Error(), 500)
@boutros
boutros / resources.nt
Last active October 1, 2018 12:37
ls.ext resources
<http://data.deichman.no/nationality#aborig> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.deichman.no/utility#Nationality> .
<http://data.deichman.no/nationality#aborig> <http://www.w3.org/2000/01/rdf-schema#label> "Aboriginsk"@no .
<http://data.deichman.no/nationality#aborig> <http://www.w3.org/2000/01/rdf-schema#label> "Aboriginal Australian"@en .
<http://data.deichman.no/nationality#afg> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.deichman.no/utility#Nationality> .
<http://data.deichman.no/nationality#afg> <http://www.w3.org/2000/01/rdf-schema#label> "Afghanistan"@no .
<http://data.deichman.no/nationality#afg> <http://www.w3.org/2000/01/rdf-schema#label> "Afghanistan"@en .
<http://data.deichman.no/nationality#afr> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.deichman.no/utility#Nationality> .
<http://data.deichman.no/nationality#afr> <http://www.w3.org/2000/01/rdf-schema#label> "Afrikansk"@no .
<http://data.deichman.no/nationality#afr> <http://www.w3.o
@boutros
boutros / tjenestekatalog.ttl
Created July 13, 2018 10:57
tjenestekatalog
@prefix : <https://tjenester.deichman.no/ontology/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix raw: <http://data.deichman.no/raw/> .
@prefix dbpedia: <http://dbpedia.org/resource/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ns0: <http://migration.deichman.no/> .
@prefix ns2: <http://lexvo.org/id/iso639-3/> .
@prefix ns1: <http://data.deichman.no/publication/> .
@prefix ns4: <http://data.deichman.no/raw#> .
@prefix ns3: <http://migration.deichman.no/> .
@boutros
boutros / queries.sparql
Last active July 10, 2018 09:52
tjenestekatalog insert update
===============================================
ADD SERVICE:
--------------------
_:b1 a :Service ;
:name "Petter til tjeneste!" ;
:description "Bestill en Petter i dag!" ;
:partner _:b2, _:b3 .
_:b2 a :Partner ;
@boutros
boutros / gentjeneste.go
Last active June 15, 2018 11:48
tjenestekatalog import
package main
import (
"encoding/csv"
"fmt"
"io"
"log"
"os"
"strings"
@boutros
boutros / schema.ttl
Last active July 24, 2018 07:00
shacl2dot
@base <https://tjenester.deichman.no/ontology/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<ServiceShape>
a sh:NodeShape ;
sh:targetClass <Service> ;
sh:name "Tjeneste"@no ;