Skip to content

Instantly share code, notes, and snippets.

View fils's full-sized avatar
:octocat:

Douglas Fils fils

:octocat:
View GitHub Profile
package org.oceanleadership;
import org.apache.jena.rdf.model.Model;
// import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.RDFNode;
// import org.apache.jena.riot.RDFFormat;
import org.topbraid.jenax.util.JenaUtil;
import org.topbraid.shacl.util.ModelPrinter;
@fils
fils / main.go
Last active July 28, 2018 00:49
A test to see if the google go-cloud package works with minio via the Amazon Go SDK
package main
import (
"context"
"flag"
"fmt"
"io/ioutil"
"log"
"github.com/aws/aws-sdk-go/aws"
@fils
fils / FAIRPlayBill.gv
Last active December 18, 2017 22:05
DOT graph of FAIR Data players... (very incomplete.....)
graph {
rankdir = LR;
overlap = false; // scale || false
splines = true; // true || false
concentrate=false
forcelabels=true;
// Entries
node [shape=circle,style=filled,color=lightblue]; "Uncatagorized";
node [shape=oval,style=filled,color=lightblue];
@fils
fils / itemlist.jsonld
Last active September 2, 2020 14:34
How to point to multiple catalogs via schema.org
{
"@id": "http://foo.org/id/doc/1",
"@context": "https://schema.org/",
"@type": "ItemList",
"url": "http://en.wikipedia.org/wiki/Billboard_200",
"name": "Top music artists",
"description": "The artists with most cumulative weeks at number one according to Billboard 200",
"itemListElement": [
{
"@id": "http://foo.org/id/doc/1/li1",
{
"@context": "http://schema.org/",
"@type": "Organization",
"name": "R2R",
"contactPoint": {
"@type": "ContactPoint",
"contactType": "Administrator",
"url": "http://www.ldeo.columbia.edu/user/arko",
"name": "Bob Arko",
"email": "nemo@nobody.com"
@prefix csvw: <http://www.w3.org/ns/csvw#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://opencoredata.org/doc/dataset/045deec9-94b2-445a-8fd2-43dbe90841fb/prov> # is a /prov extension really a good way to define a URI for this?
a prov:Attribution ;
prov:agent <http://doi.org/10.17616/R37936> ; # does this need to be made a node with schema type DOI noted?
prov:hadRole "Publisher" ; # is this a litterial ?
prov:wasAssociatedWith <https://github.com/OpenCoreData> ; # just a URL.. need a DOI for this git project?
prov:qualifiedUsage <http://opencoredata.org/doc/dataset/045deec9-94b2-445a-8fd2-43dbe90841fb/prov#qu1> ;
@fils
fils / ocd_etl_prov.py
Created January 15, 2016 21:11
This gist is using the Python code at https://github.com/pymonger/prov_es to attempt to model the prov workflow for Open Core Data. This code use a first stab at simply modifying the prov_es code to the simpler OCD event.
from datetime import datetime, timedelta
from prov_es.model import ProvEsDocument
# create doc
doc = ProvEsDocument()
# input database...
# Janus database credit JRSO/TAMU
id = "Janus" # not an id, just a NAME
downloadURL = 'http://iodp.org' # no download URL, just an "info" URL
@fils
fils / fils1_lipd.json
Created November 5, 2015 12:01
Example LiPD JOSN-LD package. This uses the pattern described at https://www.authorea.com/users/17200/articles/19163/_show_article .
{
"@context": {
"Feature": "geojson:Feature",
"FeatureCollection": "geojson:FeatureCollection",
"GeometryCollection": "geojson:GeometryCollection",
"Journal": "http://purl.org/ontology/bibo/Journal",
"LineString": "geojson:LineString",
"MultiLineString": "geojson:MultiLineString",
"MultiPoint": "geojson:MultiPoint",
"MultiPolygon": "geojson:MultiPolygon",
{
"@context": {
"@base" : "http://schema.org",
"glview" : "http://schema.geolink.org/somethingIforgot"
},
"@type": "Dataset",
"name" : "larval krill pigments",
"description" : "Southern Ocean larval krill studies- fluorescence and clearance, 2001-2002",
"url" : "http://lod.bco-dmo.org/id/dataset/3300",
"keywords" : "cool words about this cool data",
package main
import (
"database/sql"
"gopkg.in/rana/ora.v3"
"log"
"testing"
)
func init() {