Skip to content

Instantly share code, notes, and snippets.

<html
xmlns:gannett="http://api.gannett.com/vocab/core#">
<head>
<link about="." rel="gannett:section" href="/news/" />
<link about="." rel="gannett:section" href="/life/" />
<title about="." property="schema:name">USA Today</title>
</head>
<body>
<div about="/news/">
<a href="/news/">
echo "recent_rdf_store.rq returns nothing: "; arq --data=index.ttl --query=recent_rdf_store.rq
echo
echo "recent.rq returns two rows in arq: "; arq --data=index.ttl --query=recent.rq
@ericmoritz
ericmoritz / .gitignore
Last active August 29, 2015 13:56
Sample RDF data
*~
.venv/
build/
src/

In Linked Data, properties are, just as everything else, identified by IRIs and thus have global scope which implies that they have independent semantics. In contrast, properties in data models as used in common programming languages are class-dependent. Their semantics depend on the class they belong to. In data models classes are typically described by the properties they expose whereas in Linked Data properties define to which classes they belong. If no class is specified, it is assumed that a property may apply to every class.

These differences have interesting consequences. For example, the commonly asked question of which properties can be applied to an instance of a specific class can typically not be answered for Linked Data. Strictly speaking, any property which is not explicitly forbidden could be applied. This stems from the fact that Linked Data works under an open-world assumption whereas data models used by programmers typically work under a closed-world assumption. The difference is that when

Classes, inheritance, and properties are, of course, known in other fields of computing, for example, in object-oriented programming. But while there are many similarities, there are differences, too. In object-oriented program- ming, an object class defines the properties that apply to it. To add new properties to a class means to modify the class.

However, in RDFS, properties are defined globally, that is, they are not encapsulated as attributes in class definitions. It is possible to define new properties that apply to an existing class without changing that class.

On one hand, this is a powerful mechanism with far-reaching conse- quences: we may use classes defined by others and adapt them to our re- quirements through new properties. On the other hand, this handling of properties deviates from the standard approach that has emerged in the area of modeling and object-oriented programming. It is another idiosyncratic feature of RDF/RDFS.

http://www.ics.forth.gr/isl/swprimer/

{
"queries": [
{
"href" : "http://example.org/apollo/v1/merged-fronts/",
"prompt" : "Get a merged front",
"data" : [
{"name": "front", "prompt": "Front slug, may be repeated"},
{"name": "page", "prompt": "The page number"},
{"name": "count", "prompt": "The items per page"}
]
{"collection": {
"items": [
{
"href": "http://example.com/modules/1",
"data": [
{"name": "title", "value": "Module"}
],
"links": []
},
{
@ericmoritz
ericmoritz / 2013.txt
Last active December 31, 2015 21:49
Comparison between Pitchfork's top 50 rankings and ranking by rating on the original review.
10.0 Nirvana - In Utero: 20th Anniversary Edition http://pitchfork.com/reviews/albums/18517-nirvana-in-utero-20th-anniversary-edition/
10.0 Fleetwood Mac - Rumours http://pitchfork.com/reviews/albums/17499-rumours/
10.0 Nas - Illmatic http://pitchfork.com/reviews/albums/17497-illmatic/
10.0 J Dilla - Donuts (45 Box Set) http://pitchfork.com/reviews/albums/17510-donuts-45-box-set/
9.5 Kanye West - Yeezus http://pitchfork.com/reviews/albums/18172-kanye-west-yeezus/
9.3 Vampire Weekend - Modern Vampires of the City http://pitchfork.com/reviews/albums/17963-vampire-weekend-modern-vampires-of-the-city/
9.2 Various Artists - The Rise & Fall of Paramount Records, Volume One (1917-1932) http://pitchfork.com/reviews/albums/18703-the-rise-fall-of-paramount-records-volume-one-1917-1932/
9.2 Arcade Fire - Reflektor http://pitchfork.com/reviews/albums/18667-arcade-fire-reflektor/
9.2 Digable Planets - Blowout Comb http://pitchfork.com/reviews/albums/18154-digable-planets-blowout-comb/
9.2 Half Japanese - ½ Gentlemen / Not
@ericmoritz
ericmoritz / x.py
Last active December 31, 2015 06:19
from fp.collections import get_nested
from fp.monads.maybe import Maybe
metadata = Maybe.catch(lambda: json.loads(json_src)).default({})
@ericmoritz
ericmoritz / collection+protobuf.md
Last active December 30, 2015 10:19
A prototype of collection+protobuf