Skip to content

Instantly share code, notes, and snippets.

Kendall Clark kendall

Block or report user

Report or block kendall

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kendall
kendall / keybase.md
Last active Aug 29, 2015
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am kendall on github.
  • I am kendall (https://keybase.io/kendall) on keybase.
  • I have a public key whose fingerprint is 2CE3 FDE8 E638 368F E9FF C269 15E8 E495 44C2 1C54

To claim this, I am signing this object:

@kendall
kendall / matrix.ttl
Created Sep 9, 2014
Matrix graph in RDF Turtle
View matrix.ttl
:m1 a :Movie; :title "The Matrix"; :year "1999-03-31".
:m2 a :Movie; :title "The Matrix Reloaded"; :year "2003-05-07".
:m3 a :Movie; :title "The Matrix Revolutions"; :year "2003-10-27".
:neo a :Actor; :name "Keanu Reeves".
:morpheus a :Actor; :name "Larry F".
:trinity a :Actor; :name "CAM".
:neo :hasRole [:as "Neo"; :in :m1].
:neo :hasRole [:as "Neo"; :in :m2].
@kendall
kendall / roadmap.md
Created Oct 27, 2014
Stardog Roadmap for Blossom
View roadmap.md

Roadmap

This is a test.

Another Awesome Thing

@kendall
kendall / geo.sparql
Last active Aug 29, 2015
Geospatial query answering in Stardog
View geo.sparql
prefix geof: <http://www.opengis.net/def/function/geosparql/>
prefix geo: <http://www.opengis.net/ont/geosparql#>
//get locations within 2km of Complexible HQ
select ?name where {
?loc rdfs:label ?name .
?loc geo:hasGeometry ?feature .
?hq geo:hasGeometry ?hqGeo ; rdfs:label "Complexible Headquarters" .
?feature geof:nearby (?hqGeo 2 <http://www.qudt.org/qudt/owl/1.0.0/unit/Instances.html#Kilometer>).
View sparql-dl-pellet-syntax.sparql
#
# To query for all individuals that have an age between 18 and 37 (exclusive)
# in Pellet 2.0, you have to write (ignoring PREFIXes for now):
#
SELECT ?x
WHERE
{ ?x a [ a owl:Restriction ;
owl:onProperty :age ;
owl:someValuesFrom [
View gist:393544
Graph aGraph = new GraphImpl();
URI aBook = aGraph.getValueFactory().createURI("urn:x-domain:oreilly.com:product:9780596514129.IP");
aGraph.add(aBook,
aGraph.getValueFactory().createURI("http://purl.org/dc/terms/publisher"),
aGraph.getValueFactory().createLiteral("O'Reilly Media / Pogue Press"));
aGraph.add(aBook,
aGraph.getValueFactory().createURI("http://purl.org/dc/terms/title"),
aGraph.getValueFactory().createLiteral("Switching to the Mac: The Missing Manual, Leopard Edition"));
// ... setting the additional properties here ...
View empire.java
@Namespaces({"frbr", "http://vocab.org/frbr/core#"})
@Entity
@RdfsClass("frbr:Expression")
public class Book
View empire-9.java
// but can be refreshed...
aManager.refresh(aNewBookCopy);
// and now contains the correct, up-to-date information
System.err.println(aNewBookCopy.getTitle());
System.err.println(aNewBookCopy.getEmbodiments());
View java-beans.java
Book aBook = new Book();
aBook.setTitle("Switching to the Mac: The Missing Manual, Leopard Edition");
aBook.setPublisher("O'Reilly Media / Pogue Press");
aBook.setIssueDate("2008-02-26");
// And so on...
View gist:393586
Book aNewBookCopy = aManager.find(Book.class, aNewBook.getRdfId());
// true!
System.err.println(aNewBook.equals(aNewBookCopy));
You can’t perform that action at this time.