Skip to content

Instantly share code, notes, and snippets.

View dr0i's full-sized avatar

Pascal Christoph dr0i

View GitHub Profile
#!/bin/bash
# version 20120611
# author: dr0ide
# Copyright 2011 dr0ide. The program is distributed under the terms of
# the GNU General Public License, see https://www.gnu.org/licenses/gpl-3.0.html
#
#TODO:
# 1. if http://de.dbpedia.org/ontology/wikiPageRedirects exists then fetch it.
# because only there resides the information if it is "wikiPageDisambiguates" ,
# e.g. http://de.dbpedia.org/resource/Bücherei , respectively said property is NOT
@dr0i
dr0i / gist:7357697
Created November 7, 2013 16:43
Hbz01-stats-example.java
/* Copyright 2013 hbz, Pascal Christoph.
* Licensed under the Eclipse Public License 1.0 */
package org.lobid.lodmill;
import java.io.File;
import java.io.IOException;
import org.culturegraph.mf.morph.Metamorph;
import org.culturegraph.mf.stream.converter.xml.XmlDecoder;
import org.culturegraph.mf.stream.source.DirReader;
<div vocab="http://schema.org/" typeof="Corporation">
<span property="name">akika</span>
<span property="sameAs">http://www.medicalgraphics.de/</span>
Contact Details:
<div rel="address">
<div typeof="PostalAddress">
Main address:
<span property="streetAddress">Vogeslanger Str. 286</span>
<span property="postalCode">50825</span>
<span property="addressLocality" xml:lang="en" >Cologne, Germany</span>
It was created by pwsafe.cpp configure 0.2.1beta, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = erde
@dr0i
dr0i / gist:e970054262bb8efa86035683fa395fa5
Created February 7, 2017 09:37
elasticsearch child aggregation: item owner
curl -XGET 'http://gaia.hbz-nrw.de:9200/resources/_search?pretty=true' -d '
{
"query" : {
"filtered" : {
"query" : {
"query_string" : {
"query" : "köln"
}
}
}
Adamsfeld: Q28531092
Altenufer: Q28845194
Bandesmühle: Q24928613
Bathey: Q5994963
Bavert: Q28528026
Bergerbrühl: Q24175856
Bergerfurth: Q26208579
Blumental: Q26271448
Bochum-Süd: Q3641512
Borkenwirthe: Q23854151
Occurence Label Score Wikidata-ID
4 Aachen Bildchen 1.7919801 Q1017
1 Aachen Deltourserb 1.7919801 Q1017
6 Aachen Eilendorf 1.7919801 Q1017
3 Aachen Frankenberg 3.2082725 Q1390913
24 Aachen Haaren 3.0760581 Q1120297
2 Aachen Krummerück 1.7919801 Q1017
4 Aachen Laurensberg 1.7919801 Q1017
2 Aachen Melaten 1.7919801 Q1017
1 Aachen Mitte 2.4189296 Q1020752
@dr0i
dr0i / gist:cb45731d0f95e7b2f21c1d215f2753e0
Last active January 17, 2019 09:21
missing hbz01MabXml
000046099|HT000052997
000396821|HT000452509
001285193|HT003427665
005287461|HT001321732
006447401|HT004107465
010939223|HT012787448
011237068|HT012909323
011475588|HT013149479
013240130|HT014108663
016523140|HT015478944
{
"@context" : "http://lobid.org/resources/context.jsonld",
"Admin Metadata" : {
"changeDate" : "2006-06-29T07:37:26",
"creationDate" : "1999-06-29",
"descriptionConventions" : {
"code" : "aacr",
"type" : [ "DescriptionConventions" ]
},
"descriptionModifier" : {
@dr0i
dr0i / loc-bibframe-works-example.jsonld
Created July 10, 2018 09:22
loc-bibframe-works-example.jsonld
{
"@context" : "http://lobid.org/resources/context.jsonld",
"Admin Metadata" : {
"creationDate" : "1994-02-10",
"descriptionConventions" : {
"code" : "aacr",
"type" : [ "DescriptionConventions" ]
},
"encodingLevel" : {
"code" : "5",