Skip to content

Instantly share code, notes, and snippets.

View ashepherd's full-sized avatar

Adam Shepherd ashepherd

View GitHub Profile
You are now an intelligent assistant tasked with meticulously extracting both key elements and
atomic facts from a long text.
Key Elements: The essential nouns (e.g., characters, times, events, places, numbers), verbs (e.g.,
actions), and adjectives (e.g., states, feelings) that are pivotal to the text's narrative.
Atomic Facts: The smallest, indivisible facts, presented as concise sentences. These include
propositions, theories, existences, concepts, and implicit elements like logic, causality, event
sequences, interpersonal relationships, timelines, etc.
Requirements:
Ensure that all identified key elements are reflected within the corresponding atomic facts.
You should extract key elements and atomic facts comprehensively, especially those that are
@ashepherd
ashepherd / convert.py
Created March 6, 2023 22:01
Use RDFLib to convert triples to quads
import rdflib
cg = rdflib.ConjunctiveGraph()
g = rdflib.Graph(cg.store, 'urn:bcodmo:dataset:3300')
g.parse('https://www.bco-dmo.org/node/3300/rdf/xml', format='xml')
serialization = cg.serialize(format='nquads')
print(serialization)
@ashepherd
ashepherd / install-docker.md
Created November 21, 2020 02:05 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@ashepherd
ashepherd / nanopub.jsonld
Created October 23, 2019 11:01
Nanopublication: Dataset Metadata submitted by an email from a PI to BCO-DMO
{
"@context": {
"bcodmo": "http://lod.bco-dmo.org/id/",
"odo": "http://ocean-data.org/schema/",
"np": "http://www.nanopub.org/nschema#",
"prov": "http://www.w3.org/ns/prov#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@set":[
{
{
"@context":{
"@vocab": "http://schema.org/",
"schema": "http://schema.org/",
"time": "http://www.w3.org/2006/time#"
},
"@graph":[
{
"@id": "time:TemporalEntity"
},
@prefix : <http://data.example.org/id/dataset/1234/v1/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix provone: <http://purl.dataone.org/provone/2015/01/15/ontology#> .
@prefix schema: <http://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2000/10/XMLSchema#> .
@prefix : <http://data.example.org/id/dataset/1234/v1/> .
{
"profile": "data-package",
"hash": "6ff68c0d91b13546191daa9e59eb7b87",
"name": "bariumvub_mulvfs",
"title": "Barium VUB - Dissolved Ba; particulate Ba, Sr, Ca, Al from MULVFS from VERTIGO cruises KM0414, ZHNG09RR from the Hawaiian Islands HOT Site, NW SubArctic Pacific Ocean K2 Site, 2004-2005 (VERTIGO project)",
"bytes": 7008,
"sources'": [
{
"path": "https://www.bco-dmo.org/dataset/2953",
"title": "BCO-DMO"
{
"@context": {
"@vocab": "http://schema.org/",
"datacite": "http://purl.org/spar/datacite/",
"BuildPackageAction": { "@id": "Action" },
"SubmitForBuildPackageAction": { "@id": "Action" }
},
"@type": "SubmitForBuildPackageAction",
"actionStatus": "CompletedActionStatus",
"agent" : {
{
"@context": {
"@vocab": "http://schema.org",
"gtime": "http://sweetontology.net/stateTime/"
},
"@type": "Dataset",
"name": "test",
"about": [
{
"@type": "PropertyValue",