Skip to content

Instantly share code, notes, and snippets.

View michimau's full-sized avatar

Mauro Michielon michimau

  • European Food Safety Authority
  • Parma
View GitHub Profile
@michimau
michimau / mmr-art15.xsd
Created November 15, 2018 08:19
mmr-art15.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
<xs:element name="MMR_ART_15">
<xs:complexType>
<xs:sequence>
<xs:element name="MMR_PAM" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="GI_mc" type="xs:string"/>
@michimau
michimau / z3
Created December 4, 2018 16:09
z3
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT
?url
where {
?url dcterms:issued ?issued .
FILTER (str(?issued) = "None")
@michimau
michimau / casperjs-delete-harvesting-sources.js
Last active December 20, 2018 18:39
deleting undesired harvest sources of sds. usage: casperjs test casperjs-delete-harvesting-sources.js
var x = require('casper').selectXPath;
casper.options.viewportSize = {width: 1920, height: 982};
casper.on('page.error', function(msg, trace) {
this.echo('Error: ' + msg, 'ERROR');
for(var i=0; i<trace.length; i++) {
var step = trace[i];
this.echo(' ' + step.file + ' (line ' + step.line + ')', 'ERROR');
}
});
casper.test.begin('Resurrectio test', function(test) {
@michimau
michimau / logXfrancois
Created January 25, 2019 10:43
logXfrancois
1/25/2019 11:40:46 AM &lt;gmd:function&gt;
1/25/2019 11:40:46 AM &lt;gmd:CI_OnLineFunctionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="download" codeSpace="ISOTC211/19115"&gt;download&lt;/gmd:CI_OnLineFunctionCode&gt;
1/25/2019 11:40:46 AM &lt;/gmd:function&gt;
1/25/2019 11:40:46 AM &lt;/gmd:CI_OnlineResource&gt;
1/25/2019 11:40:46 AM &lt;/srv:connectPoint&gt;
1/25/2019 11:40:46 AM &lt;/srv:SV_OperationMetadata&gt;
1/25/2019 11:40:46 AM &lt;/srv:containsOperations&gt;
1/25/2019 11:40:46 AM &lt;srv:operatesOn uuidref="{EAA32033-70BF-4CCC-B3E3-4888CCEB70F4}" xlink:href="http://eservices.dls.moi.gov.cy/geoportal_inspire/rest/document?id=%7B74C15B05-8311-4183-AFA3-77B3BD7FEB25%7D"/&gt;
1/25/2019 11:40:46 AM &lt;srv:operatesOn uuidref="{CC46CE70-CB44-4310-B077-C744C2099CA5}" xlink:href="http://eservices.dls.moi.gov.cy/geoportal_inspire/rest/document?id=%7B1E3581BF-AC46-4226-B26F-E8266A885621%7D"/&gt;
1/25/
@michimau
michimau / lta
Created January 31, 2019 15:53
time builder long term average
"date","year","obsValue"
"2011-01-01 00:00:00",2011,55743
"2011-02-01 00:00:00",2011,50954
"2011-03-01 00:00:00",2011,57373
"2011-04-01 00:00:00",2011,54986
"2011-05-01 00:00:00",2011,58857
"2011-06-01 00:00:00",2011,66204
"2011-07-01 00:00:00",2011,65438
"2011-08-01 00:00:00",2011,72016
"2011-09-01 00:00:00",2011,68782
@michimau
michimau / indicator_ancillaries_01
Last active February 13, 2019 14:22
indicator_ancillaries_01
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX Assessment: <http://www.eea.europa.eu/portal_types/Assessment#>
PREFIX Specification: <http://www.eea.europa.eu/portal_types/Specification#>
PREFIX PolicyQuestion: <http://www.eea.europa.eu/portal_types/PolicyQuestion#>
PREFIX ontologies: <http://www.eea.europa.eu/ontologies.rdf#>
PREFIX indicators_workflow: <http://www.eea.europa.eu/portal_workflow/indicators_workflow/states/>
SELECT distinct
@michimau
michimau / virtuoso 6.1.8
Created February 28, 2019 13:10
virtuoso 6.1.8
version: '2'
services:
virtuoso:
image: eeacms/virtuoso:6.1.8
environment:
PATH: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
TZ: UTC
volumes:
- /var/local/virtuoso:/var/local/virtuoso
- /var/virtuosotmp:/var/virtuosotmp
@michimau
michimau / zol1
Created March 26, 2019 14:11
zol1
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-attribute: <http://purl.org/linked-data/sdmx/2009/attribute#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX property: <http://rdfdata.eionet.europa.eu/eurostat/property#>
SELECT ?date
WHERE {
_:nrg_100a qb:dataSet <http://rdfdata.eionet.europa.eu/eurostat/data/nrg_100a>.
Error
message:
java.util.NoSuchElementException: Timeout waiting for idle object
stack trace:
java.util.NoSuchElementException: Timeout waiting for idle object
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:449)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134)