Skip to content

Instantly share code, notes, and snippets.

View ColinMaudry's full-sized avatar

Colin Maudry ColinMaudry

View GitHub Profile
@ColinMaudry
ColinMaudry / ReplaceTabs.xslt
Last active March 2, 2016 19:39
Replacing tabs characters in DITA codeblocks with spaces for PDF (FOP support)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="2.0"
exclude-result-prefixes="xs">
<xsl:template match="*[contains(@class,' pr-d/codeblock ')]">
<xsl:call-template name="generateAttrLabel"/>
<fo:block xsl:use-attribute-sets="codeblock">
<xsl:call-template name="commonattributes"/>
@ColinMaudry
ColinMaudry / sparql.ttl
Created April 7, 2016 20:17
Martly en Turtle
@prefix dbpedia-owl: <http://dbpedia.org/ontology/> .
@prefix dbpedia-fr: <http://fr.dbpedia.org/resource/> .
dbpedia-fr:District_de_Vervins dbpedia-owl:wikiPageWikiLink dbpedia-fr:Canton_de_Marly .
<http://fr.dbpedia.org/resource/Administration_de_l\u0027Aisne> dbpedia-owl:wikiPageWikiLink dbpedia-fr:Canton_de_Marly .
dbpedia-fr:Marly dbpedia-owl:wikiPageDisambiguates dbpedia-fr:Canton_de_Marly ;
dbpedia-owl:wikiPageWikiLink dbpedia-fr:Canton_de_Marly .
dbpedia-fr:Autreppes dbpedia-owl:wikiPageWikiLink dbpedia-fr:Canton_de_Marly .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
dbpedia-fr:Canton_de_Marly rdf:type dbpedia-owl:Territory .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
{
"@context": {
"@vocab": "http://www.w3.org/ns/dcat#",
"dp": "http://dataportals.net/ns/dp#",
"schema": "http://schema.org/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"url": "@id",
"linked_portals": {
@ColinMaudry
ColinMaudry / query.rq
Created October 30, 2016 19:01
Cats on Wikidata
#Cats on Wikidata
#From https://blog.wikimedia.de/2016/10/30/10-cool-queries-for-wikidata-that-will-blow-your-mind-number-7-will-shock-you/
SELECT ?item ?itemLabel
WHERE
{
?item wdt:P31 wd:Q146 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Keybase proof

I hereby claim:

  • I am colinmaudry on github.
  • I am colinmaudry (https://keybase.io/colinmaudry) on keybase.
  • I have a public key whose fingerprint is 7F25 373D 576C B436 449D 843C 90C8 0CB7 D462 C5C3

To claim this, I am signing this object:

@ColinMaudry
ColinMaudry / 0-source.csv
Last active October 3, 2017 23:47
Étapes de transformation du CSV des marchés publics bretons vers le format JSON réglementaire (XSLT 3.0)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Nmarché;SIRETMandataire;LibelleEntiteMandataire;SIRETAcheteur;LibelleAcheteur;Nature;Objet;CodeCPV;Type ;Procedure;CodePostalCommuneExecution;NomCommuneExecution;CodeINSEEExecution;GranulariteINSEEExecution;MillesimeMandatement;DateNotification;Montant mandate TTC;Montant mandate HT;Montant attribue TTC;Montant attribue HT;Date de cloture;Duree;SIRETContractant;DenominationSociale;Role;CodePostal;Dpt ID ;Département;Commune;Taille;Taille des entreprises par categorie officielle;Code NAF;Libelle NAF;Libelle SBA;Libelle CCI;geolocalisation
2013-90006;;Région Bretagne;;;;PBF Formation qualifiante 2013 Monteur en construction bois lot 4;;Services;MAPA - art 30 - au dessus des seuils;;;;;2013;2013-10-01;245526;;245526;;;;300599123;AFPA DIRECTION REGIONALE BRETAGNE;Titulaire;35208;35;Ille-et-Vilaine;RENNES;10 000 et plus;Grande entreprise;8559;ENSEIGNEMENT;Administration publique/enseignement;Tertiaire non marchand;
2013-90144;;Région Bretagne;;;;Dispositif de formations : Compétences clés 2013 - Lot 1;;Services;MA
@ColinMaudry
ColinMaudry / 0-source.csv
Last active October 4, 2017 00:14
Étapes de transformation du CSV des marchés publics bretons vers le format JSON réglementaire (jq 1.5)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Nmarché;SIRETMandataire;LibelleEntiteMandataire;SIRETAcheteur;LibelleAcheteur;Nature;Objet;CodeCPV;Type ;Procedure;CodePostalCommuneExecution;NomCommuneExecution;CodeINSEEExecution;GranulariteINSEEExecution;MillesimeMandatement;DateNotification;Montant mandate TTC;Montant mandate HT;Montant attribue TTC;Montant attribue HT;Date de cloture;Duree;SIRETContractant;DenominationSociale;Role;CodePostal;Dpt ID ;Département;Commune;Taille;Taille des entreprises par categorie officielle;Code NAF;Libelle NAF;Libelle SBA;Libelle CCI;geolocalisation
2013-90006;;Région Bretagne;;;;PBF Formation qualifiante 2013 Monteur en construction bois lot 4;;Services;MAPA - art 30 - au dessus des seuils;35000;Rennes;;;2013;2013-10-01;245526;;245526;;;;300599123;AFPA DIRECTION REGIONALE BRETAGNE;Titulaire;35208;35;Ille-et-Vilaine;RENNES;10 000 et plus;Grande entreprise;8559;ENSEIGNEMENT;Administration publique/enseignement;Tertiaire non marchand;
2013-90144;;Région Bretagne;;;;Dispositif de formations : Compétences clés 2013 - Lot 1;;
@ColinMaudry
ColinMaudry / boamp-context.jsonld
Last active January 23, 2018 15:44
Conversion des données XML du BOAMP vers JSON-LD
{
"@context": {
"@vocab": "https://data.maudry.com/rdf/boamp#",
"boamp": "https://data.maudry.com/voc/boamp#",
"dct": "http://purl.org/dc/terms/",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"attributions": "https://boamp.maudry.com/attributions/",
"appeloffres": "https://boamp.maudry.com/appeloffres/",
@ColinMaudry
ColinMaudry / extension.json
Created May 15, 2019 23:04
Test OCDS extension
{
"name": {
"en": "Contact point identifier",
"fr": "Identifiant du point de contact",
"es": "identificación del punto de contacto"
},
"description": {
"en": "Addition of an identifier to the ContactPoint block",
"fr": "Ajout d'un indentifiant au bloc ContactPoint",
"es": "Adicición de una identificación al objeto ContactPoint"
@ColinMaudry
ColinMaudry / 214439_2019.xml
Last active September 2, 2019 17:44
TED XML data samples
<?xml version="1.0" encoding="UTF-8"?>
<TED_EXPORT xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://publications.europa.eu/resource/schema/ted/R2.0.9/publication" xmlns:n2016="http://publications.europa.eu/resource/schema/ted/2016/nuts" xsi:schemaLocation="http://publications.europa.eu/resource/schema/ted/R2.0.9/publication TED_EXPORT.xsd" VERSION="R2.0.9.S03.E01" DOC_ID="214439-2019" EDITION="2019090">
<TECHNICAL_SECTION>
<RECEPTION_ID>19-214377-001</RECEPTION_ID>
<DELETION_DATE>20190705</DELETION_DATE>
<FORM_LG_LIST>DA DE EN ES FI FR EL IT NL PT SV CS ET HU LT LV MT PL SK SL GA BG RO HR </FORM_LG_LIST>
<COMMENTS>From Convertor</COMMENTS>
</TECHNICAL_SECTION>
<LINKS_SECTION>
<XML_SCHEMA_DEFINITION_LINK xlink:type="simple" xlink:href="http://ted.europa.eu" xlink:title="TED WEBSITE"/>