input data.json
[
{
"id": 0 ,
"foo": "bar"
} ,
{
"id": 1 ,
curl ${BASE_URI}/catalog.jsonld | jq -r '.[] | select(."@id" | endswith("/catalog.jsonld?page=1")) | ."http://www.w3.org/ns/hydra/core#lastPage" | .[0]."@value" | split("=") | .[1]' |
require 'cgi' | |
filename = ARGV[0] | |
File.open(filename).each { |line| puts CGI.unescape(line) } |
<?php | |
function parseMarkdownLink(string $link) { | |
$pattern = "/^\[(.+?)\]\((.*?)\)$/"; | |
if (preg_match($pattern, $link, $matches)) { | |
return [ | |
"label" => $matches[1] , | |
"link" => $matches[2] | |
]; | |
} |
SELECT ?ediblething ?ediblethingLabel WHERE { | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |
wd:Q158657 wdt:P171+ ?parent_taxon . # Q158657 is "Malus pumila", the tree we want to find fruit for | |
?ediblething | |
wdt:P1582 ?parent_taxon ; | |
wdt:P279 ?superthing . | |
?superthing wdt:P361 wd:Q21925565 . | |
} | |
LIMIT 100 |
# coding: utf-8 | |
require 'json' | |
require 'uri' | |
require 'net/https' | |
require 'optparse' | |
require 'logger' | |
# Send an HTTP request, interprete response as JSON | |
# and return as Ruby object. |
tar -cvzf $ARCHIVE_NAME.tgz $CONTENT_1 $CONTENT_2 ... |
input data.json
[
{
"id": 0 ,
"foo": "bar"
} ,
{
"id": 1 ,