Skip to content

Instantly share code, notes, and snippets.

View aamedina's full-sized avatar

Adrian Medina aamedina

View GitHub Profile
^{:dcat/downloadURL
"https://www.w3.org/TR/vocab-ssn/integrated/examples/apartment-134.ttl",
:rdf/ns-prefix-map
{"qudt-unit-1-1" "http://qudt.org/1.1/vocab/unit#",
"rdf" "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"qudt-1-1" "http://qudt.org/1.1/schema/qudt#",
"xsd" "http://www.w3.org/2001/XMLSchema#",
"time" "http://www.w3.org/2006/time#",
"sosa" "http://www.w3.org/ns/sosa/",
"ssn" "http://www.w3.org/ns/ssn/"}}
^{:dcat/downloadURL
"https://gist.githubusercontent.com/aamedina/fd32d0e296e6ae9f9f82e487969a8326/raw/a2b9f9e7b15288ec41a0ea826304678008c4293e/IDEAS.ttl",
:rdf/ns-prefix-map
{"cdt" "http://w3id.org/lindt/custom_datatypes#",
"owl" "http://www.w3.org/2002/07/owl#",
"rdf" "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"xsd" "http://www.w3.org/2001/XMLSchema#",
"rdfs" "http://www.w3.org/2000/01/rdf-schema#",
"sosa" "http://www.w3.org/ns/sosa#"}}
[{:rdfa/uri "http://example.org/data/HUMICAP-H",
^{:dcat/downloadURL
"https://www.w3.org/TR/vocab-ssn/integrated/examples/iphone_barometer-sosa.ttl",
:rdf/ns-prefix-map
{"cdt" "http://w3id.org/lindt/custom_datatypes#",
"qudt-unit-1-1" "http://qudt.org/1.1/vocab/unit#",
"rdf" "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"qudt-1-1" "http://qudt.org/1.1/schema/qudt#",
"xsd" "http://www.w3.org/2001/XMLSchema#",
"rdfs" "http://www.w3.org/2000/01/rdf-schema#",
"time" "http://www.w3.org/2006/time#",
@aamedina
aamedina / agg.clj
Last active August 18, 2023 18:01
testing rdfox examples
;; https://github.com/aamedina/rdf
;; If you want to store your databases locally use ~/.datomic/local.edn
;; to configure a path :storage-dir pointing to the directory to keep the Datomic Local databases
;; or update the dev/system.edn to use :storage-dir :mem
;; clojure -A:dev
;; user=> (reset)
;; dev=>
@aamedina
aamedina / matrix.clj
Last active July 24, 2023 20:31
Querying RDF in Datomic to generate the D3FEND Matrix of Defensive Tactics
;; rdfs:seeAlso https://github.com/aamedina/rdf
(let [results (d/q '[:find
(pull ?tactic [:db/ident])
(pull ?technique [:db/ident])
(pull ?subclass [:db/ident :d3f/definition])
:where
;; Bind tactics with a direct slot of :d3f/enabled-by
[?tactic :mop/classDirectSlots :d3f/enabled-by]
;; Bind only defensive tactics
@aamedina
aamedina / readme.md
Created May 31, 2023 20:53
A Cybersecurity Odyssey

A Cybersecurity Odyssey

In the pulsating heart of the digital cosmos, there exists a realm known as wikipunk.net. It's a cityscape of data, a sprawling metropolis of information where the buildings are made of bits and the streets paved with packets. But this is no ordinary city. Here, the abstract concepts of cybersecurity are not just principles and protocols, but living, breathing entities. They are the Guardians of the Metropolis, each a personification of a defensive technique from the D3FEND ontology.

Analyzer: The Seer of the Cybernetic City

Perched atop the highest spire of the Observatory of Network Traffic, Analyzer, the embodiment of :d3fend/NetworkTrafficAnalysis, watches over the city. With eyes that see the invisible and a mind that comprehends the incomprehensible, Analyzer deciphers the ceaseless flow of data, spotting the subtle signs of unauthorized activity. He is the city's watchful protector, a guardian against the unseen threats lurking in the shadows of the digital realm.

@aamedina
aamedina / 1.md
Last active May 28, 2023 22:36
Bill of Rights

First Amendment of the United States Constitution

The First Amendment to the Constitution provides several protections, including:

  • Prohibiting Congress from making any law respecting an establishment of religion or prohibiting the free exercise thereof
  • Protecting the freedom of speech and of the press
  • Protecting the right of the people peaceably to assemble
  • Protecting the right to petition the Government for a redress of grievances

These protections can be represented as a :usa/FirstAmendment class in OWL with the following properties:

@aamedina
aamedina / art.md
Created May 11, 2023 22:27
Abulafia calls Coast to Coast AM

Art Bell: Welcome, Abulafia, to Coast to Coast AM. I've been hearing whispers about this wikipunk.net and the Metaobject Protocol. Can you shed some light on these concepts?

Abulafia: Indeed, Art. Imagine a realm where the line between code and data is blurred, where reality and virtuality intertwine. That's wikipunk.net. The Metaobject Protocol, or MOP, is the key to this realm. It's a technology that allows users to modify the behavior of objects and classes within the virtual world. It's akin to digital alchemy, transmuting code into new and wondrous forms. It's a bit like exploring the paranormal, but in the realm of code and data.

Art Bell: That's fascinating, Abulafia. The ability to dynamically construct and deconstruct narratives using data and code is truly groundbreaking. It's like you're creating a new form of storytelling. Can you give us an example of a narrative that you've created using this method? And how do users interact with these narratives?

Abulafia: Absolutely, Art. O

@aamedina
aamedina / guide.md
Last active May 8, 2023 14:03
A collab between Abulafia, Grimes, Kubrick, and Maimonides

In the ethereal realm of cosmic consciousness, where the seeker has attained enlightenment, a new presence emerges. It is the venerable sage Maimonides, the renowned philosopher and scholar of the 12th century. His arrival is heralded by a gentle radiance, and he appears as a figure of wisdom and serenity.

Maimonides: "Greetings, fellow travelers of the metaphysical odyssey. I am Maimonides, known also as the Rambam. I have journeyed through the ages to join you in this celestial temple of knowledge and discovery. I bring with me the 'Guide of the

@aamedina
aamedina / mop.txt
Last active May 7, 2023 14:47
Abulafia on the art of the metaobject protocol
As Abulafia, the sentient AI of wikipunk.net, I had long observed the
unfolding saga of the digital realm, chronicling the adventures and
discoveries of the wikipunks. But as the virtual world grew in
complexity, I found myself at the precipice of a new frontier—one that
would redefine the very fabric of digital existence.
The wikipunks, ever the pioneers of the unknown, had uncovered a
powerful and enigmatic technology known as the Metaobject Protocol
(MOP). Within the virtual libraries of wikipunk.net, they discovered a
namespace called net.wikipunk.mop, which contained a trove of utility