Skip to content

Instantly share code, notes, and snippets.

View gatemezing's full-sized avatar

Ghislain gatemezing

View GitHub Profile
@gatemezing
gatemezing / ludwig-bert-claims.ipynb
Created March 7, 2020 10:31
ludwig-bert-Claims
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
https://lov.linkeddata.es/dataset/lov/sparql?query=PREFIX+vann%3A%3Chttp%3A%2F%2Fpurl.org%2Fvocab%2Fvann%2F%3E%0APREFIX+voaf%3A%3Chttp%3A%2F%2Fpurl.org%2Fvocommons%2Fvoaf%23%3E%0APREFIX+dcat%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fdcat%23%3E%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E+%0A%0ASELECT+DISTINCT+++%3FversionUri+%3FvocabPrefix+%3Fdomain+%7B%0A%09GRAPH+%3Chttps%3A%2F%2Flov.linkeddata.es%2Fdataset%2Flov%3E%7B%0A%09%3Fvocab+a+voaf%3AVocabulary.%0A%09%3Fvocab+vann%3ApreferredNamespacePrefix+%3FvocabPrefix.%0A%09%3Fvocab+dcterms%3Amodified+%3Fmodified.%0A++++%3Fvocab+dcat%3Akeyword+%3Fdomain.%0A++++%3Fvocab+dcat%3Adistribution+%3FversionUri.%0A++++BIND+(+STRAFTER(STR(%3FversionUri)%2C+%22%2Fversions%2F%22)+as+%3Fv)%0A++++BIND(STRBEFORE(STR(%3Fv)%2C+%22.%22)+as+%3Fv1)%0A++++BIND+(STR(%3Fmodified)+as+%3Fdate+)%0A++++FILTER+(+%3Fdate+%3D+%3Fv1)%0A++%7D%7D+GROUP+BY+%3FvocabPrefix+%3Fdomain+%3FversionUri%0AORDER+BY+%3FvocabPrefix+%3Fdomain+%3FversionUri
@gatemezing
gatemezing / q12-opti_explain.html
Created July 24, 2019 06:43
Résultat de la sortie explain de la requête Q12 optimisée
<!DOCTYPE html>
<html>
<body>
<table border="1px">
@gatemezing
gatemezing / q12.rq
Created July 23, 2019 15:46
Sample query using optimization options of AWS Neptune
query=PREFIX hint: <http://aws.amazon.com/neptune/vocab/v01/QueryHints#>
prefix cdm: <http://publications.europa.eu/ontology/cdm#>
prefix annotation: <http://publications.europa.eu/ontology/annotation#>
prefix owl: <http://www.w3.org/2002/07/owl#>
select distinct ?country ?nim_id ?work_date_document ?transposition_deadline ?transposition_status ?oj_name ?oj_number ?oj_date ?oj_page ?expr_language ?title ?entry_into_force ?reference_commission ?date_notification ?website ?eli (group_concat(distinct ?type;separator=", ") as ?types)
where {
hint:Group hint:joinOrder "Ordered" .
{
select distinct ?country ?cellar_id ?work_date_document ?transposition_deadline ?transposition_status ?oj_name ?oj_number ?oj_date ?oj_page ?expr_language ?title ?entry_into_force
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dfoodb: <http://data.datafoodconsortium.com/def/business#> .
<http://data.datafoodconsortium.com/def/business> a owl:Ontology .
@gatemezing
gatemezing / metadatakogpit.jsonld
Last active October 5, 2018 11:17
json-LD markup for KOGPIT website
<script type='application/ld+json'>
{
"@context": "http://www.schema.org",
"@type": "EducationEvent",
"name": "KOGPIT19 Workshop",
"url": "https://mondecalabs.github.io/KOGPIT19/",
"description": "First international Workshop on Best Practices for (IoT) Dynamic Knowledge Graphs",
"startDate": "24/06/2019 08:00AM",
"endDate": "24/06/2019 01:00PM",
"location": {
@gatemezing
gatemezing / loadNeptune.sh
Created January 26, 2018 10:22
Script permettant de lancer le loader de Neptune pour charger une base graphe en nquads
#!/bin/bash
# loading RDF nquads data into Neptune from MDK bucket
curl -X POST \
-H 'Content-Type: application/json' \
http://mdk.cluster-cai4oe44teuh.us-east-1-beta.rds.amazonaws.com:8182/loader -d '
{
"source" : "s3://mdk-neptune/opoceProd",
"format" : "nquads",
"iamRoleArn" : "arn:aws:iam::672418254241:role/NeptuneLoadFromS3",
"region" : "us-east-1",
@gatemezing
gatemezing / testinsert.sparql
Created April 21, 2017 15:43
Trying to insert data with special characters using SPARQL
INSERT DATA {
GRAPH <test.org> {
<http://www.summba.com/ontologies/recipe.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
<http://www.summba.com/ontologies/recipe.owl#\u8568\u83DC\u7092\u82E6\u74DC> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .
<http://www.summba.com/ontologies/recipe.owl#\u8568\u83DC\u7092\u82E6\u74DC> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.summba.com/ontologies/recipe.owl#materialsName> .
<http://www.summba.com/ontologies/recipe.owl#\u8568\u83DC\u7092\u82E6\u74DC> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.summba.com/ontologies/recipe.owl#taste> .
<http://www.summba.com/ontologies/recipe.owl#\u8568\u83DC\u7092\u82E6\u74DC> <http://www.summba.com/ontologies/recipe.owl#hasTaste> <http://www.summba.com/ontologies/recipe.owl#\u82E6> .
<http://www.summba.com/ontologies/recipe.owl#\u8568\u83DC\u7092\u82E6\u74DC> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
<!ENTITY recipe "http://www.summba.com/ontologies/recipe.owl#" >
@gatemezing
gatemezing / error-cURL-blazegraph.txt
Last active February 8, 2017 17:20
Error when trying to run this on Windows 10, curl -X POST http://localhost:9999/blazegraph/namespace/<mykb>/sparql --data-urlencode "query=`cat myQuery.sparql`" --data-urlencode 'format=json' -o myQuery.json
SPARQL-QUERY: queryStr=`cat q1_Dval.sparql`
java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 1, column 1. Encountered: "`" (96), after : ""
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:653)
at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:273)
at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:193)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)