Skip to content

Instantly share code, notes, and snippets.

@afs
afs / Log
Created December 18, 2021 15:17
Loading Wikidata Truthy into TDB2 : 2021-12
This file has been truncated, but you can view the full file.
09:17:14 INFO Setup:
09:17:14 INFO Database: DBx
09:17:14 INFO Data: /home/afs/Datasets/Wikidata/wikidata-20211208-truthy-BETA.nt.gz
09:17:14 INFO TMPDIR: /home/afs/tmp
09:17:14 INFO
09:17:14 INFO Load node table
09:17:15 INFO Nodes :: Build node table
09:17:15 INFO Nodes :: Database = DBx
09:17:15 INFO Nodes :: TMPDIR = /home/afs/tmp
09:17:15 INFO Nodes :: Data files = /home/afs/Datasets/Wikidata/wikidata-20211208-truthy-BETA.nt.gz
@afs
afs / 2021-11-17-warnings-jena-riot-summary.txt
Created November 26, 2021 19:22
Summary: Warning from parsing Wikidata Truthy 2021-11-17: Apache Jena "riot --check".
Summary of warnings: https://gist.github.com/afs/15719d46299bcf7346e3c314ac109040
Code/Count/Message
(sorted by frequency, with max 10 illustrative examples of each):
Code:13 834 DEFAULT_PORT_SHOULD_BE_OMITTED
http://www.andreykashechkin.com:80/
http://www.vitacura.cl:80/
http://www.comune.borgoamozzano.lucca.it:80/
http://www.allywalker.com:80/
http://www.nuerburgring.de:80/angebote/family-fun/ringwerk/attraktionen/ringracer.html
@afs
afs / 2021-11-17-warnings-jena-riot.txt
Last active November 27, 2021 15:10
Warnings from parsing Wikidata Truthy 2021-11-17: Apache Jena "riot --check".
11:55:11 WARN riot :: [line: 774038, col: 84] Lexical form '-3500000000-01-01T00:00:00Z' not valid for datatype XSD dateTime
11:55:12 WARN riot :: [line: 952846, col: 84] Not advised IRI: <http://www.andreykashechkin.com:80/> Code: 13/DEFAULT_PORT_SHOULD_BE_OMITTED in PORT: If the port is the default one for the scheme it should be omitted.
11:55:34 WARN riot :: [line: 4123888, col: 86] Not advised IRI: <cvs://[email protected]:/cvsroot/linuxlibertine> Code: 12/PORT_SHOULD_NOT_BE_EMPTY in PORT: The colon introducing an empty port component should be omitted entirely, or a port number should be specified.
11:55:40 WARN riot :: [line: 4874091, col: 85] Not advised IRI: <http://www.vitacura.cl:80/> Code: 13/DEFAULT_PORT_SHOULD_BE_OMITTED in PORT: If the port is the default one for the scheme it should be omitted.
11:55:42 WARN riot :: [line: 5218362, col: 85] Not advised IRI: <http://www.comune.borgoamozzano.lucca.it:80/> Code
@afs
afs / browser.html
Created November 12, 2021 10:32
Minimal HTML page to load yasgui.
<html>
<head>
<link href="https://unpkg.com/@triply/yasgui/build/yasgui.min.css" rel="stylesheet" type="text/css" />
<script src="https://unpkg.com/@triply/yasgui/build/yasgui.min.js"></script>
</head>
<body>
<h1>Browser</h1>
<div id="yasgui"></div>
<script>
const yasgui = new Yasgui(document.getElementById("yasgui"), {
@afs
afs / 00-README.md
Last active December 5, 2020 12:05
Run jena command tools and Fuseki (inc development mode)

Scripts for running:

  • Jena command line tools
  • Fuskei Main
  • Fuseki UI

either as a specific version, or in development running out of target/classes.

(scripts have system-local file names which will need adjusting to the local environment)

Symbolic links of the form

@afs
afs / ExampleServiceAuth.java
Last active October 24, 2020 16:40
Example of calling a SPARQL server with users/password authentication
/* Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 */
package examples;
import java.util.HashMap;
import java.util.Map;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.UsernamePasswordCredentials;
@afs
afs / Print HttpServlet Principal.
Created June 6, 2020 13:40
Example of installing a wrapper servlet filter in Apache jena Fuseki 3.15.0.
/*
*
* Copyright [2020] Andy Seaborne
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@afs
afs / fix-fuseki-315.sh
Created May 20, 2020 16:54
Emergency fix for fuseki-server.jar in apache-jena-fuseki-3.15.0.zip
#!/bin/bash
# Replace file Log4j2Plugins.dat in fuseki-server.jar for the one
# in jena-fuseki-server.jar.
ROOT="https://repo1.maven.org/maven2/org/apache/jena"
VER=3.15.0
JAR="jena-fuseki-server-$VER.jar"
L4J="META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat"
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
PREFIX ns: <http://example.org/ns#>
PREFIX : <http://example.org/book/>
# This data is intentionaly irregular (e.g. different ways to
# record the book creator) as if the information is either an
# aggregation or was created at different times.
@afs
afs / log4j2.properties
Last active December 5, 2020 11:50
Example log4j2.properties for Apache Jena
## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
status = error
name = JenaLog4j2
appender.console.type = Console
appender.console.name = OUT
appender.console.target = SYSTEM_ERR
## appender.console.target = SYSTEM_OUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{HH:mm:ss} %-5p %-15c{1} :: %m%n