This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Sonic Pi | |
### The Live Coding Music Synth for Everyone | |
### https://sonic-pi.net | |
use_debug false | |
use_bpm 80 | |
drum_mix = 1 | |
bass_mix = 1 | |
synth_mix = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_debug false | |
instruments = 1 | |
drums = 1 | |
live_loop :clock do | |
sleep 1 | |
end | |
noise_cutoffs = range(100, 120, 0.1).reflect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A tribute to | |
# | |
# Apollo 440: Glam | |
# | |
# Dedicated to my Dad | |
# | |
# (with whom I bought this on a CD back in the 1990s) | |
use_debug false | |
use_bpm 130 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run at the German DBpedia SPARQL endpoint: http://de.dbpedia.org/sparql | |
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
SELECT ?dbpedia | |
WHERE { | |
BIND (<http://www.wikidata.org/entity/Q1418856> AS ?wikidata) | |
BIND (strafter(str(?wikidata), "http://www.wikidata.org/entity/") AS ?qid) | |
BIND (iri(concat("http://wikidata.dbpedia.org/resource/", ?qid)) AS ?indirect_wikidata) | |
?dbpedia owl:sameAs ?indirect_wikidata . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from argparse import ArgumentParser, ArgumentTypeError | |
from datetime import date, datetime, timedelta | |
import json | |
import re | |
from string import Template | |
import urllib.parse | |
import urllib.request | |
import webbrowser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# A demo script that retrieves counts of class instances from LOD Laundromat datasets | |
# Usage: | |
# Reads a list of newline separated class IRIs either from its first argument or standard input. | |
# $ count_class_instances_from_lod_laundromat.sh < classes.txt | |
# | |
# Caveat: | |
# Since we use an old-school shell script, class IRIs that contain special characters, | |
# like %-encoding or commas will break the CSV output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | |
############### | |
# Create salt # | |
############### | |
INSERT { | |
GRAPH :mappings { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPARQL 1.1 implementation of concise bounded description (<https://www.w3.org/Submission/CBD>). | |
PREFIX : <http://example.com/> | |
PREFIX non: <http://non/> | |
CONSTRUCT { | |
:resource ?p1 ?r1 . | |
?r2 ?p2 ?r3 . | |
} | |
WHERE { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Solution from: <http://answers.semanticweb.com/questions/19162/split-and-trim-strings-in-sparql/27544> | |
PREFIX schema: <http://schema.org/> | |
DELETE { | |
?s schema:url ?urls . | |
} | |
INSERT { | |
?s schema:url ?url . | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX : <http://localhost/> | |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | |
CONSTRUCT { | |
?s ?p ?o . | |
} | |
WHERE { | |
# Generate 0 to 10 triples | |
VALUES ?n { 0 1 2 3 4 5 6 7 8 9 10 } |
NewerOlder