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
View spacemacs.el
;; -*- mode: dotspacemacs -*-
(defun dotspacemacs/layers ()
(setq-default
dotspacemacs-configuration-layers `(
spacemacs
my-web-dev
(colors :variables
colors-enable-rainbow-identifiers t
colors-enable-nyan-cat-progress-bar t)
@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>).
@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 / 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 / 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 / graph_shortestpath_reasoning.ttl
Created Jan 14, 2014
Stardog 2.2 graph analytics embedded in SPARQL queries
View graph_shortestpath_reasoning.ttl
# graph for shortest path with reasoning
@prefix rule: <tag:stardog:api:rule:> .
@prefix : <urn:test:> .
@prefix g: <tag:stardog:api:property:graph:> .
# the graph
:one :to :two .
:one :to :four .
:two :to :four .
:two :to :five .
@kendall
kendall / gist:1732851
Created Feb 3, 2012
Stardog 0.9 Admin Shell
View gist:1732851
-> % java -cp dist/lib/stardog-cli.jar com.clarkparsia.stardog.cli.console.StardogConsole
INFO: Stardog Server running on local:stardog
> help
Stardog 0.7.4 command line client
Type 'help <cmd>' or '<cmd> -h/--help' to print the usage information for a specific command
Available commands:
add
connect
@kendall
kendall / construct.java
Created Jul 30, 2011
Spring for Stardog fragments
View construct.java
String sparql = "CONSTRUCT { ?a <urn:test:new> ?b } WHERE { ?a <urn:test:p> ?b }";
List<Map<String,String>> results = snarlTemplate.construct(sparql, new GraphMapper<Map<String,String>>() {
@Override
public Map<String, String> mapRow(Statement next) {
Map<String,String> map = new HashMap<String,String>();
map.put(next.getSubject().stringValue(), next.getObject().stringValue());
return map;
}
});
@kendall
kendall / spring-select.java
Created Jul 30, 2011
Spring Select fragment
View spring-select.java
String sparql = "SELECT ?a ?b WHERE { ?a <urn:test:b> ?b } LIMIT 5";
List<Map<String,String>> results = snarlTemplate.query(sparql, new RowMapper<Map<String,String>>() {
@Override
public Map<String,String> mapRow(BindingSet bindingSet) {
Map<String,String> map = new HashMap<String,String>();
map.put("a", bindingSet.getValue("a").stringValue());
map.put("b", bindingSet.getValue("b").stringValue());
return map;
}
@kendall
kendall / applicationContext.xml
Created Jul 30, 2011
applicationContext.xml
View applicationContext.xml
<bean name="dataSource" class="com.clarkparsia.stardog.ext.spring.DataSourceFactoryBean">
<property name="to" value="testdb"/>
<property name="createIfNotPresent" value="true"/>
</bean>
<bean name="template" class="com.clarkparsia.stardog.ext.spring.SnarlTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean name="importer" class="com.clarkparsia.stardog.ext.spring.DataImporter">
You can’t perform that action at this time.