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
require 'rubygems' | |
require 'open-uri' | |
require 'json' | |
SEARCH = "(collection:prelinger+OR+mediatype:prelinger)+AND+-mediatype:collection" | |
ALL_FIELDS = "&fl[]=avg_rating&fl[]=call_number&fl[]=collection&fl[]=contributor&fl[]=coverage&fl[]=creator&fl[]=date&fl[]=description&fl[]=downloads&fl[]=foldoutcount&fl[]=format&fl[]=headerImage&fl[]=identifier&fl[]=imagecount&fl[]=language&fl[]=licenseurl&fl[]=mediatype&fl[]=month&fl[]=num_reviews&fl[]=oai_updatedate&fl[]=publicdate&fl[]=publisher&fl[]=rights&fl[]=scanningcentre&fl[]=source&fl[]=subject&fl[]=title&fl[]=type&fl[]=volume&fl[]=week&fl[]=year" | |
ID_FIELD_ONLY = "&fl[]=identifier" | |
def mkdirs() |
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
test |
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
SELECT * WHERE { | |
?annotation a a:Annotation; | |
a:body ?body; | |
a:annotates <http://www.gac.culture.gov.uk/images/standard/17686.jpg>; | |
arthack:top ?top; | |
arthack:left ?left; | |
arthack:height ?height; | |
arthack:width ?width. | |
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 pytassium | |
import time | |
dataset = pytassium.Dataset('nasa','put-your-api-key-here') | |
# -------------------------- | |
# Use the lookup API | |
# -------------------------- | |
response, data = dataset.lookup('http://data.kasabi.com/dataset/nasa/person/eugeneandrewcernan') | |
if response.status in range(200,300): | |
# data now contains an rdflib.Graph |
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
# Bulk load N-Triples into Kasabi | |
# | |
# Simple script to iterate through a large n-triples file and load it into Kasabi | |
# | |
# Be sure to set two environment variables: KASABI_DATASET and KASABI_API_KEY | |
# | |
# Script accepts a single command-line parameter which is the location of the file to upload | |
require 'rubygems' | |
require 'kasabi' |
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
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
@prefix rel: <http://www.perceive.net/schemas/relationship/> . | |
<http://example.org/#green-goblin> | |
rel:enemyOf <http://example.org/#spiderman> ; | |
a foaf:Person ; | |
foaf:name "Green Goblin" . |
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
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
@prefix rel: <http://www.perceive.net/schemas/relationship/> . | |
@prefix ex: <http://example.org/ns#> | |
<http://example.org/#touche-turtle> | |
rel:friendOf <http://example.org/#dum-dum> ; | |
a ex:Turtle ; | |
foaf:name "Touche Turtle" . | |
<http://example.org/#dum-dum> |
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
#libnotify-bin | |
require 'rubygems' | |
require 'json' | |
require 'hpricot' | |
require 'yaml' | |
require 'open-uri' | |
#Check for config | |
if !File.exist?(ENV["HOME"] + "/.wishlist-monitor/config.yaml") | |
puts "Configuration file is missing" |
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"?> | |
<rdf:RDF | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:owl="http://www.w3.org/2002/07/owl#"> | |
<rdfs:Class rdf:about="http://artisanalintegers.com/schema.rdf#Integer"> | |
<rdfs:label xml:lang="en">An Artisanal Integer</rdfs:label> | |
<rdfs:comment>Represents an Artisanal Integer</rdfs:comment> | |
</rdfs:Class> |
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
Have: | |
Ticket to Ride Europe | |
Talisman | |
Carcassonne | |
Suggestions: | |
Agricola | |
Bang! |