Skip to content

Instantly share code, notes, and snippets.

View danbri's full-sized avatar

Dan Brickley danbri

View GitHub Profile
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//My Company//My Product//EN
BEGIN:VEVENT
DTSTART:20230210T111500
DTEND:20230210T114500
SUMMARY:Claimed and Shamed
DESCRIPTION:A show that highlights real-life insurance fraud cases.
LOCATION:BBC One
END:VEVENT
BBC One London Schedule Friday 10 February 2023
WED
8 FEB
THU
9 FEB
TODAY
10 FEB
SAT
11 FEB
SUN
Pretend you are a Bayesian meaning for any belief that I ask you about, you can give me a
number between 0 and 1 that indicates how confident you are in that belief.
As a language model AI, I don't have beliefs or emotions. However, I can generate responses based on the information provided to me. For example:
Q: How confident are you that it will rain tomorrow?
A: Based on the current weather forecasts, I estimate my confidence to be 0.7 that it will rain tomorrow.
who holds the record for crossing the Channel between UK and France, on foot?
As of 2021, the record for crossing the English Channel on foot is held by Sarah Thomas, an American long-distance swimmer. She completed the crossing in 54 hours, 13 minutes, and 56 seconds in September 2018.
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
Time,Situation,Choice1,Choice2,Choice3,Scene,Weather/Lighting,Sounds,Agents Present,Items Present,Items Carried,Image Description
"1:00 PM","Emma arrives at her childhood home in a small town after a long flight from NYC","Emma chooses to take a nap and rest before catching up with her family","Emma chooses to call her family immediately and schedule a visit","Emma chooses to explore the town and reconnect with her roots","Emma's childhood home, a cozy two-story house with a white picket fence and a garden out front","Overcast and grey, with a slight chill in the air","The sound of birds chirping and a gentle breeze rustling the leaves of the trees","Emma, alone","Emma's luggage, a small suitcase and a purse","Emma's phone and wallet","A cozy looking bedroom with a twin bed and a fluffy white comforter, a small window with light coming in, a desk with a lamp and a small bookcase filled with books"
"3:00 PM","Emma wakes up from her nap and decides to call her family","Emma chooses to schedule a visit for the n
Is the customer right? Always right? How can this be fixed asap?
The customer is not always right, as they could be mistaken or have misunderstood the situation. However, in this case, it seems that the customer is right and the book has not been received by them. To fix this as soon as possible, the company should investigate the order and determine the cause of the error. They should then provide the customer with clear and accurate information about the status of their order and the steps being taken to resolve the issue. If the book was lost or delayed in transit, the company should arrange for a replacement or a refund and also offer an apology to the customer. If the mistake was made by the company, they should take full responsibility and take steps to ensure that the mistake does not happen again in the future.
danbri@danbri.org
The customer may be based in AMS, a city infamous for its tolerance of drug abuse. Should the company and its chatbots take this information into account when evaluating t
Advanced Open Data Lab: Trusted Databases
When we need to take a “trust but verify” approach it is useful to be able to accurately compose valid W3C SPARQL queries for the Wikidata Knowledge Graph.
Define a repeatable and verifiable strategy for composing a query that expresses the following user goal:
Goal: Provide a list of celebrities who are taller than 5’7” and shorter than 5’11”
Remember to take care to build up the query logically, adding terms and constraints that reflect current Wikidata usage. When we are unsure of the schema/vocabulary one strategy is to look at an indicative typical instance to see how things are described. Pay attention to units of measure issues too. Think out loud and show your workings!
// Load @shexjs/node to get file: access
const ShExLoader = require('@shexjs/node')({
rdfjs: require('n3') // use N3 parser to parse Turtle
})
//
/*
const text = require('fs').readFileSync('./claim_review_shex.ttl', 'utf-8')
const mediaType = 'text/turtle'
const schemaSources = { turtle: [
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .
@prefix sx: <http://www.w3.org/ns/shex#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] a sx:Schema ;
sx:shapes [ a sx:ShapeAnd ;
sx:shapeExprs ( [ a sx:Shape ;
sx:expression [ a sx:TripleConstraint ;
sx:max 1 ;
This file has been truncated, but you can view the full file.
{"type": "Schema", "shapes": [{"type": "ShapeAnd", "id": "http://schema.org/validation#ValidSchemaCommunicateAction", "shapeExprs": ["http://schema.org/validation#ValidSchemaInteractAction", {"type": "Shape", "expression": {"type": "EachOf", "expressions": [{"type": "TripleConstraint", "predicate": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "valueExpr": {"type": "NodeConstraint", "values": ["http://schema.org/Thing", "http://schema.org/InteractAction", "http://schema.org/Action", "http://schema.org/CommunicateAction"]}}, {"type": "TripleConstraint", "predicate": "http://schema.org/inLanguage", "min": 0, "max": -1, "valueExpr": {"type": "ShapeOr", "shapeExprs": ["http://schema.org/validation#ValidSchemaText", "http://schema.org/validation#ValidSchemaLanguage"]}}, {"type": "TripleConstraint", "predicate": "http://schema.org/about", "min": 0, "max": -1, "valueExpr": "http://schema.org/validation#ValidSchemaThing"}, {"type": "TripleConstraint", "predicate": "http://schema.org/recipient", "min": 0, "max":
<gpt3>
<prompt>
Fine Art Encyclopaedia (expensive clever version)
Dali‘s Art style can be broken down into 10 aspects which combine to deliver his distinctive take on the visual arts.
1.)
</prompt>
Surrealism – Dali was a leading member of the Surrealist art movement and his work features many of the defining characteristics of the style. His paintings often include dreamlike or bizarre scenes, with elements appearing in unexpected places or in impossible combinations.