Skip to content

Instantly share code, notes, and snippets.

View vyannick's full-sized avatar

Yannick vyannick

  • Securimind
  • Belgium
View GitHub Profile
import uuid
import datetime
import base64
from lxml import etree
from signxml import XMLSigner, methods
SAML_ASSERTION_NS = "urn:oasis:names:tc:SAML:2.0:assertion"
DSIG_NS = "http://www.w3.org/2000/09/xmldsig#"
NSMAP = {"saml": SAML_ASSERTION_NS, "ds": DSIG_NS}
@vyannick
vyannick / rand-distr.clj
Created April 23, 2017 10:04
Clojure rand-int distribution
def REPEATS 100
(def v [(atom 0)(atom 0)(atom 0)(atom 0)(atom 0)(atom 0)(atom 0)(atom 0)(atom 0)(atom 0)])
(dotimes [_ REPEATS] (swap! (nth v (rand-int 10)) inc))
(map #(do(dotimes [_ @%] (print "|"))(println)) v)