Hana 9e216da9ef go.mod: add go.mod and move pygments to third_party
After go1.16, go will use module mode by default,
even when the repository is checked out under GOPATH
or in a one-off directory. Add go.mod, go.sum to keep
this repo buildable without opting out of the module
mode.

> go mod init github.com/mmcgrana/gobyexample
> go mod tidy
> go mod vendor

In module mode, the 'vendor' directory is special
and its contents will be actively maintained by the
go command. pygments aren't the dependency the go will
know about, so it will delete the contents from vendor
directory. Move it to `third_party` directory now.

And, vendor the blackfriday package.

Note: the tutorial contents are not affected by the
change in go1.16 because all the examples in this
tutorial ask users to run the go command with the
explicit list of files to be compiled (e.g.
`go run hello-world.go` or `go build command-line-arguments.go`).
When the source list is provided, the go command does
not have to compute the build list and whether it's
running in GOPATH mode or module mode becomes irrelevant.
2021-02-15 16:45:26 -05:00

49 lines
1.7 KiB
SPARQL

# This is a test SPARQL query
BASE <http://pygments.org/examples/sparql.rq>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?person (COUNT(?nick) AS ?nickCount) {
<#jonny> foaf:knows ?person .
?person a foaf:Person .
?person foaf:firstName "Freddy" .
?person foaf:lastName "Smith" .
# predicate-object list
?person foaf:nick ?nick ;
foaf:age "21"^^xsd:int ; # typed literal
ex:title 'Mr' ; # single-quoted string
ex:width 2 ; # integer
ex:height 1.80 ; # float
ex:distanceToSun 1.4e8 ; # float with exponent
ex:ownsACat true ;
ex:catName "Kitty", "Kitty_" ; # object list
# some other float values
ex:float1 .125 ;
ex:float2 +2.5e10 ;
ex:float3 2.5e+10 ;
ex:float4 -1.e-10 ;
ex:float5 .0e1 ;
ex:float6 5e11 ;
ex:float7 1. ;
ex:aUnicodeÀExample "somestring" ;
ex:catName "Kitty", "Kitty_" ; # object list
ex:escape "\n\u00c0\U00010000";
ex:catAge ?catage ;
dcterms:description "Someone with a cat called \"cat\"."@en . # language tag
?person foaf:knows _:b0 .
_:b0 foaf:knows [ _:b1 a foaf:Person; foaf:name "Jonny" . ] .
OPTIONAL { ?person foaf:isPrimaryTopicOf ?page }
OPTIONAL { ?person foaf:name ?name
{ ?person foaf:depiction ?img }
UNION
{ ?person foaf:firstName ?firstN } }
FILTER ( bound(?page) || bound(?img) || bound(?firstN) )
FILTER ( ?catage < 101 && ?catage > 9 && ?catage >= 10 && ?catage <= 100 && ?catage != 20 )
}
GROUP BY ?person
ORDER BY ?img ASC(?firstN) DESC(?page)