Skip to content

Instantly share code, notes, and snippets.

View phochste's full-sized avatar

Patrick Hochstenbach phochste

View GitHub Profile
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"ietf": "http://www.iana.org/assignments/relation/",
"ldp": "http://www.w3.org/ns/ldp#"
}
],
"actor": {
"id": "https://orcid.org/0000-0002-1825-0097",
@prefix my: <http://lib.ugent.be/~phochste/examples/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix as: <https://www.w3.org/ns/activitystreams#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
as:Offer
a rdfs:Class , sh:NodeShape ;
rdfs:label "Keep Offers" ;
Wat heeft leeftijd met de vraag de maken?
@phochste
phochste / gist:debdedb18d55b6d4d711d8cb9841f5ea
Last active January 5, 2020 09:08
How to extract two sub images from a larger image?
I have an image which contains two rectangular regions which contains stereotype photos. What is the best way
for a large batch of photos to extract automatically the two photos in the original source?
{
"coord": {
"lon": 139.76,
"lat": 35.68
},
"weather": Array[1][
{
"id": 802,
"main": "Clouds",
"description": "scattered clouds",
#
# Usage:
# marc_marc('852a',holding.$append)
# holding(-logfile => '/mnt/scratch/lludss/holding_error.txt')
#
package Catmandu::Fix::holding;
use strict;
use Catmandu::Util qw(:io is_string);
use POSIX qw(strftime);
use Data::Dumper;
{"coord":{"lon":3.72,"lat":51.05},"sys":{"type":3,"id":4839,"message":0.0349,"country":"BE","sunrise":1417159365,"sunset":1417189422},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"base":"cmc stations","main":{"temp":281.15,"pressure":1006,"humidity":87,"temp_min":281.15,"temp_max":281.15},"wind":{"speed":3.6,"deg":100},"rain":{"3h":0.5},"clouds":{"all":56},"dt":1417166878,"id":2797656,"name":"Gent","cod":200}
{"coord":{"lon":3.72,"lat":51.05},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"base":"cmc stations","main":{"temp":288.524,"pressure":1034.03,"humidity":87,"temp_min":288.524,"temp_max":288.524,"sea_level":1036.43,"grnd_level":1034.03},"wind":{"speed":6.93,"deg":242.008},"rain":{"3h":0.2025},"clouds":{"all":92},"dt":1447164399,"sys":{"message":0.0031,"country":"BE","sunrise":1447138397,"sunset":1447171449},"id":2797656,"name":"Gent","cod":200}
@phochste
phochste / import_viaf.pl
Created June 3, 2015 09:34
Match authors against VIAF using Catmandu and Linked Data Fragments
#!/usr/bin/env perl
#
# Match authors against VIAF
#
# License: http://dev.perl.org/licenses/artistic.html
#
# Author: Patrick Hochstenbach <Patrick.Hochstenbach@UGent.be>
#
# Apr 2015
$|++;
#!/usr/bin/env node
/*
* Install: npm install n3
* Usage: cat gigantic.ttl | tutle2ntriples
* Usage: tutle2ntriples gigantic.ttl
*
* See also: https://github.com/RubenVerborgh/N3.js
*/
var file = undefined;
if (process.argv.length == 2) {