Skip to content

Instantly share code, notes, and snippets.

Dan Brickley danbri

View GitHub Profile
View example-google-recipe-shex
<#GoogleRecipe> @<#Recipe> AND{
schema:name @<#Text>
// techdoc:url "https://developers.google.com/search/docs/data-types/recipe#name"
// techdoc:description "The name of the dish.";
schema:image @<#URL> OR @<#ImageObject> +
// techdoc:url "https://developers.google.com/search/docs/data-types/recipe"
// techdoc:description "Image of the completed dish.";
}
@danbri
danbri / gist:ce3179abe506941bb5b7195d473fd25a
Created Jul 31, 2020
sample Dataset shacl example for SCC
View gist:ce3179abe506941bb5b7195d473fd25a
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] a sh:NodeShape ;
schema:identifier "ValidSoDataset" ;
sh:and ( [ sh:property [ sh:minCount 1 ;
View gist:6373de64dd9820a25aba0d6dd52799b0
TYPES: Quiz, Question, eduQuestionType, Answer, hasPart, assesses, about, educationalAlignment
PRE-MARKUP:
Quiz is a test of knowledge, skills, or abilities; it can contain one-to-multiple questions with answers.
MICRODATA:
<!-- JSON-LD example only -->
View gist:6c715ff96fe9e7a43adeba1776b51c18
master└─ $ curl --verbose https://webschemas.org/
* Trying 216.239.38.21...
* TCP_NODELAY set
* Connected to webschemas.org (216.239.38.21) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
View gist:0f634e325f7d7d963eb7a6caaacc6531
master└─ $ curl --verbose https://webschemas.org/Volcano
* Trying 216.239.38.21...
* TCP_NODELAY set
* Connected to webschemas.org (216.239.38.21) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
View gist:c0f88ddbd217900ee0ade85792980813
master└─ $ curl --verbose https://schema.org/Volcano
* Trying 2a00:1450:4009:808::200e...
* TCP_NODELAY set
* Connected to schema.org (2a00:1450:4009:808::200e) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
View gist:f1af94f2de0ad7a0a7a61a9e6b11eb72
@prefix : <https://schema.org/> .
@prefix schema: <https://schema.org/> .
@prefix dcid: <https://datacommons.org/> .
<#USCity_0600001>
a :City ;
:dcid "geoId/0600001" ;
:name "No Place Town" .
View gist:7e5036ae221d03b1758601e891c3ca2b
<div>
<!-- https://github.com/schemaorg/schemaorg/issues/2469#issuecomment-589150625 -->
<!-- https://www.imdb.com/title/tt0087332/alternateversions -->
<!-- https://ui.eidr.org/view/content?id=10.5240/7EC7-228A-510A-053E-CBB8-J -->
<!-- see issue, may need to break out edits vs titles, in which case let's attach to specific types to avoid /CreativeWork clutter. -->
<div typeof="rdf:Property" resource="http://schema.org/titleEIDR">
View gist:9e0083abc03f788e5b645b7593b7b935
{
"@context": ["https://schema.org/", "https://gs1.org/voc/"],
"@type": "DataFeed",
"dateModified": "2019-09-13T14:43:54-07:00",
"dataFeedElement": [{
"@type": "Menu",
"@id": "https://fopatestagent.com/menu/cucina-venti",
"name": "Ameci Pizza + Pasta's Menu",
"hasMenuSection": [{
"@type": "MenuSection",
View gist:97bc5f35be7672a8cd335cd11e74005e
SELECT (?s as ?href) ?image (?label as ?name) ?label
where {
?s wdt:P31*/wdt:P171* <http://www.wikidata.org/entity/Q692384> ;
<http://www.wikidata.org/prop/direct/P18> ?image ;
rdfs:label ?label .
filter (lang(?label) = "en")
}
group by ?s ?label ?image
LIMIT 20
You can’t perform that action at this time.