Skip to content

Instantly share code, notes, and snippets.

View rivaldi8's full-sized avatar

Àlex Magaz Graça rivaldi8

View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import requests
import json
import xml.etree.ElementTree as ElementTree
from javax.servlet.http import HttpServlet
from net.sf.ehcache import Cache;
@rivaldi8
rivaldi8 / chapter10.clj
Last active November 2, 2018 16:20
Exercises from the book Clojure for the brave and true (http://www.braveclojure.com/)
; This is free and unencumbered software released into the public domain.
(ns chapter10.core
(require [clojure.string :as str])
(:gen-class))
(defn print-exercise-result
[exercise-function, number]
(println (str "== Exercise " number " =="))
(println (str (exercise-function) "\n")))
@rivaldi8
rivaldi8 / dim2crossref.xsl
Created August 28, 2017 08:15
XSLT to convert OAI XML with DIM metadata to Crossref submission XML for DOI registration
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: Converts metadata from DSpace Intermediat Format (DIM) into
metadata following the Crossref Schema version 4.3.6.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:oai="http://www.openarchives.org/OAI/2.0/"
xmlns:dspace="http://www.dspace.org/xmlns/dspace/dim"
xmlns:uuid="java:java.util.UUID"
set ignorecase
set incsearch
set smartcase
set hlsearch
set matchpairs+=<:>,":",/*:*/
set timeoutlen=0
map U <C-R>