Skip to content

Instantly share code, notes, and snippets.

Avatar

Frederic Peschanski fredokun

View GitHub Profile
@fredokun
fredokun / MPClient.py
Created Aug 30, 2017
Python 3 Client/server using multiprocessing with asynchronous pipes
View MPClient.py
import multiprocessing as mp
import time
import MPServer
if __name__ == "__main__":
#mp.set_start_method('fork')
print("[Client] start")
View gist:20440707c465664c547cd25681dbdc6e
pygmentize -f latex -O full -o mylisting.tex mylisting.src
pdflatex mylisting.tex
@fredokun
fredokun / oddeven.clj
Created Jun 9, 2016
Mutually recursive specs in clojure.spec
View oddeven.clj
;;; Clojure 1.9 spec : an example of a mutually-recursive spec
(ns oddeven
(:require [clojure.spec :as s]))
(s/def ::zero #{:zero})
(s/def ::one #{:one})
(s/def ::succ #{:succ})
(s/def ::odd nil)
(s/def ::even (s/or :zero ::zero
@fredokun
fredokun / gist:2c7a2d66035bb36f9f85
Created Jul 3, 2014
pdfjam command line for printing 2 pages per sheet in landscape mode
View gist:2c7a2d66035bb36f9f85
pdfjam --nup 2x1 --landscape input.pdf --outfile output.pdf