This gist contains several queries that can be used against the data published by the project "CEDAR"
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
from rdflib import ConjunctiveGraph, RDF, URIRef | |
import httplib | |
if __name__ == '__main__': | |
graph = ConjunctiveGraph() | |
graph.add((URIRef("http://google.com"), RDF.type, URIRef("http://google.com"))) | |
headers = { 'Accept' : '*/*', 'Content-Type': 'application/rdf+xml' } | |
conn = httplib.HTTPConnection("127.0.0.1:8080") | |
conn.request("PUT", "/data/http://google.com", body=graph.serialize(), headers=headers) | |
#response = conn.getresponse() |
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
wget https://github.com/downloads/cgueret/SemanticXO/performances.tar.gz | |
tar xzf performances.tar.gz | |
cd performances | |
python performances_test.py > /dev/null |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | |
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Raptor Graph Serialisation</title> | |
</head> | |
<body> | |
<table id="triples" border="1"> | |
<tr> |
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 python | |
# -*- coding: utf-8 -*- | |
# (c) 2011 Raphael Jasjukaitis <webmaster@raphaa.de> | |
import csv | |
import os | |
import sys | |
from optparse import OptionParser |
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
SYSINFO_POSITION right | |
NAME raspberrypi | |
DESCRIPTION_STRING Raspberry Pi Logo | |
BEGIN_LOGO | |
[01;32m .~~. .~~. | |
'. \ ' ' / .' [01;31m ___ _ ___ _ | |
[01;31m .~ .~~~..~. | _ \__ _ ____ __| |__ ___ _ _ _ _ _ _ | _ (_) | |
: .~.'~'.~. : | / _` (_-< '_ \ '_ \/ -_) '_| '_| || | | _/ | |
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
import requests | |
RESOURCE = "http://acropolis.org.uk/921df22045f949c5967a4d5e9dd0e653#id" | |
print "# No asking for anything" | |
r = requests.get(RESOURCE) | |
print 'Received {}'.format(r.headers['content-type']) | |
print r.text[:100] | |
print "\n# Asking for application/n-quads" |
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
# encoding: utf-8 | |
""" | |
Detects loops in the triggers | |
Heavily based on https://git.bbcarchdev.net/res/docker/blob/master/graphite/collect.py | |
""" | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
import psycopg2 |
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
{ | |
"name": "guerec01/snippets", | |
"require": { | |
"easyrdf/easyrdf": "^0.9.1" | |
}, | |
"authors": [ | |
{ | |
"name": "Christophe Gueret", | |
"email": "christophe.gueret@bbc.co.uk" | |
} |
OlderNewer