Skip to content

Instantly share code, notes, and snippets.

View evanp's full-sized avatar

Evan Prodromou evanp

View GitHub Profile
@evanp
evanp / collection1c.jsonld
Created August 18, 2024 17:04
Paged collection
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://example.org/collection1",
"type": "Collection",
"first": {
"type": "CollectionPage",
"id": "https://example.org/collection1/page1",
"items": [
{
"type": "Note",
@evanp
evanp / collection1a.jsonld
Created August 18, 2024 16:46
Converting an AS2 collection from JSON-LD to n-quads
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://example.org/collection1",
"type": "Collection",
"items": [
{
"id": "https://example.org/note1",
"type": "Note",
"content": "This is a simple note"
}
53743f8a chore: v0.11.0-dev.0
5f6ffa6d chore: v0.10.0-rc.0
5df97f00 fix: add CDP API KEY secret for testing
80d40a95 chore(deps): bump braces from 3.0.2 to 3.0.3 in /app
cb56a57d fix: gitignore
ddefd097 fix: gitignore
baf58ac8 fix: gitignore
c5042110 fix: gitignore
436682f1 fix: gitignore
18a53758 fix: dockerfile for mage

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Keybase proof

I hereby claim:

To claim this, I am signing this object:

from csv import DictReader as CSVReader
def csv2godot(csv_file, godot_file):
data = []
with open(csv_file, 'r') as f:
reader = CSVReader(f)
for row in reader:
data.append(row)
with open(godot_file, 'w') as f:
f.write('[')
@evanp
evanp / read.jsonld
Created December 18, 2023 20:46
An example of reading a Wikipedia page
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Read",
"actor": {
"id": "https://social.example/users/evanp",
"type": "Person",
"name": "Evan Prodromou"
},
"object": {
"type": "Page",
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "View",
"actor": {
"id": "https://social.example/users/evanp",
"name": "Evan Prodromou"
},
"object": "https://activitypub.wikidata.example/Q55436290",
"startTime": "2023-11-05T00:00:00Z",
"duration": "106M"
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://activitypub.wikidata.example/Q55436290",
"type": "Video",
"name": "Barbie",
"duration": "114m",
"published": "19-07-2023T00:00:00Z"
}
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://geosocial.example/users/evanp/arrive/233",
"type": "Arrive",
"location": "https://activitypub.wikidata.example/wiki/Q727",
"summary": "Evan arrived in Amsterdam",
"startTime": "2024-06-03T00:00:00Z"
}