Skip to content

Instantly share code, notes, and snippets.

@mayel
Last active July 12, 2023 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayel/b2e65676e5b826dd862a25bda3dcf1a9 to your computer and use it in GitHub Desktop.
Save mayel/b2e65676e5b826dd862a25bda3dcf1a9 to your computer and use it in GitHub Desktop.
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"@language": "und",
"Hashtag": "as:Hashtag",
"ValueFlows": "https://w3id.org/valueflows#",
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"},
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/"
}
],
"actor": "http://localhost:4000/pub/actors/Ullrich_LLC",
"cc": ["http://localhost:4000/pub/actors/Ullrich_LLC/followers"],
"context": null,
"id": "http://localhost:4000/pub/objects/081982f4-8dd2-4d92-9202-76c703bf96a4",
"object": {
"actor": "http://localhost:4000/pub/actors/Ullrich_LLC",
"attributedTo": "http://localhost:4000/pub/actors/Ullrich_LLC",
"id": "http://localhost:4000/pub/objects/01H5563FGVZ2MXM4V25QXZYGFP",
"name": "Hermiston-Herman",
"published": "2023-07-12T13:54:27.347609Z",
"summary": "Quia earum dolorem magnam delectus optio velit ipsam ut esse voluptatibus voluptas?",
"type": "ValueFlows:ResourceSpecification"
},
"published": "2023-07-12T13:54:27.344535Z",
"to": ["https://www.w3.org/ns/activitystreams#Public",
"http://localhost:4000/pub/actors/Ullrich_LLC"],
"type": "Create"
}
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"@language": "und",
"Hashtag": "as:Hashtag",
"ValueFlows": "https://w3id.org/valueflows#",
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"},
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/"
}
],
"actor": "http://localhost:4000/pub/actors/Hayes_McClure",
"cc": ["http://localhost:4000/pub/actors/Hayes_McClure/followers"],
"context": null,
"id": "http://localhost:4000/pub/objects/09aa50ea-2425-4ff2-9ab9-760e8d7326cc",
"object": {
"action": "https://w3id.org/valueflows#transfer-custody",
"actor": "http://localhost:4000/pub/actors/Hayes_McClure",
"atLocation": {
"id": "http://localhost:4000/pub/objects/01H5563ED3MQV43AKSKB8Z02GF",
"latitude": 54.67856701924978,
"longitude": 177.32512007495455,
"name": "Lubowitz, Hand and Ziemann",
"summary": "Autem consequuntur cupiditate quis exercitationem sit est voluptatem quod debitis a a rerum commodi voluptas quia rerum delectus et non unde laborum quia eveniet doloremque nihil officiis quos et blanditiis incidunt voluptatem aut necessitatibus vero rem dicta quisquam perferendis.",
"type": "Place"
},
"attributedTo": "http://localhost:4000/pub/actors/Hayes_McClure",
"availableQuantity": {
"hasNumericalValue": 0.7242000255182752,
"hasUnit": {
"id": "http://localhost:4000/pub/objects/01H5563F0K6S835Q0X5CV549D7",
"label": "liter",
"symbol": "kg",
"type": "om2:Unit"
},
"id": "http://localhost:4000/pub/objects/01H5563FZNJCP6J484P3JZ4EP9",
"type": "om2:Measure"
},
"due": "2023-10-30T13:32:51.088136Z",
"effortQuantity": {
"hasNumericalValue": 0.7475587353600542,
"hasUnit": {
"id": "http://localhost:4000/pub/objects/01H5563F0K6S835Q0X5CV549D7",
"label": "liter",
"symbol": "kg",
"type": "om2:Unit"
},
"id": "http://localhost:4000/pub/objects/01H5563FZFY5E5ASAYWXQZMF40",
"type": "om2:Measure"
},
"finished": false,
"hasPointInTime": "2024-02-06T01:50:47.167425Z",
"id": "http://localhost:4000/pub/objects/01H5563FZPA8WSW5H6R82S6KF0",
"name": "Walker, Hansen and Gerlach",
"published": "2023-07-12T13:54:28.114537Z",
"resourceConformsTo": {
"id": "http://localhost:4000/pub/objects/01H5563FGVZ2MXM4V25QXZYGFP",
"name": "Hermiston-Herman",
"summary": "Quia earum dolorem magnam delectus optio velit ipsam ut esse voluptatibus voluptas?",
"type": "ValueFlows:ResourceSpecification"
},
"resourceQuantity": {
"hasNumericalValue": 0.6099360285905808,
"hasUnit": {
"id": "http://localhost:4000/pub/objects/01H5563F0K6S835Q0X5CV549D7",
"label": "liter",
"symbol": "kg",
"type": "om2:Unit"
},
"id": "http://localhost:4000/pub/objects/01H5563FZMVJGS48J1J997DNEW",
"type": "om2:Measure"
},
"summary": "Sunt nemo voluptas in exercitationem id pariatur eius molestias sint qui quam ab aut iste rerum aut voluptatum est excepturi.",
"type": "ValueFlows:Intent"
},
"published": "2023-07-12T13:54:28.109690Z",
"to": ["https://www.w3.org/ns/activitystreams#Public",
"http://localhost:4000/pub/actors/Hayes_McClure"],
"type": "Create"
}
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"@language": "und",
"Hashtag": "as:Hashtag",
"ValueFlows": "https://w3id.org/valueflows#",
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"},
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/"
}
],
"actor": "http://localhost:4000/pub/actors/Dietrich_Nolan_and_Hilpert",
"cc": ["http://localhost:4000/pub/actors/Dietrich_Nolan_and_Hilpert/followers"],
"context": null,
"id": "http://localhost:4000/pub/objects/33d18f79-e744-4c85-9cde-21ca35253d0a",
"object": {
"actor": "http://localhost:4000/pub/actors/Dietrich_Nolan_and_Hilpert",
"attributedTo": "http://localhost:4000/pub/actors/Dietrich_Nolan_and_Hilpert",
"eligibleLocation": {
"id": "http://localhost:4000/pub/objects/01H5563ED3MQV43AKSKB8Z02GF",
"latitude": 54.67856701924978,
"longitude": 177.32512007495455,
"name": "Lubowitz, Hand and Ziemann",
"summary": "Autem consequuntur cupiditate quis exercitationem sit est voluptatem quod debitis a a rerum commodi voluptas quia rerum delectus et non unde laborum quia eveniet doloremque nihil officiis quos et blanditiis incidunt voluptatem aut necessitatibus vero rem dicta quisquam perferendis.",
"type": "Place"
},
"id": "http://localhost:4000/pub/objects/01H5563GQV156XC4P1BSA0A7T4",
"name": "Tremblay, Ankunding and Nolan",
"published": "2023-07-12T13:54:28.219658Z",
"summary": "Culpa ut ipsum cupiditate ut doloremque quaerat laborum est veniam vero velit et soluta quidem libero eius cumque et sed dolorem voluptas ut odio voluptatem illo quo molestias molestiae qui officia quibusdam enim quaerat aut quo numquam est labore sed doloribus vel optio aut.",
"type": "ValueFlows:Proposal",
"unitBased": true
},
"published": "2023-07-12T13:54:29.078595Z",
"to": ["https://www.w3.org/ns/activitystreams#Public",
"http://localhost:4000/pub/actors/Dietrich_Nolan_and_Hilpert"],
"type": "Create"
}
@mayel
Copy link
Author

mayel commented Jul 12, 2023

For reference these were generated by the following code:

users = for _ <- 1..5, do: fake_user!()

random_user = fn -> Faker.Util.pick(users) end

user = random_user.()

random_place = Bonfire.Geolocate.Simulate.fake_geolocation!(random_user.())

action_id = ValueFlows.Simulate.action_id()

unit1 = Bonfire.Quantify.Simulate.fake_unit!(random_user.())
unit2 = Bonfire.Quantify.Simulate.fake_unit!(random_user.())

res_spec = ValueFlows.Simulate.fake_resource_specification!(random_user.())

intent =
  ValueFlows.Simulate.fake_intent!(
    random_user.(),
    %{resource_conforms_to: res_spec, at_location: random_place, action_id: action_id},
    Faker.Util.pick([unit1, unit2])
  )

proposal = ValueFlows.Simulate.fake_proposal!(user, %{eligible_location: random_place})

ValueFlows.Simulate.fake_proposed_intent!(proposal, intent)

ValueFlows.Simulate.fake_proposed_to!(random_user.(), proposal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment