Skip to content

Instantly share code, notes, and snippets.

@sanette
sanette / dot.ml
Last active January 18, 2023 16:04
(** Here is a very simple OCaml implementation of the computation of the dot
product of two large arrays of floats, using the new [Domain]
module. This requires ocaml >= 5.0.0
Here is how to compile to byte-code:
ocamlfind ocamlc -package unix -linkpkg -o dot dot.ml
Here is how to compile to native code:
ocamlfind ocamlopt -package unix -linkpkg -o dot dot.ml
@sanette
sanette / pdf2up.tex
Last active April 2, 2019 08:22
use LaTeX to print PDF with 2 pages per sheet and zoom factor to make it readable
\documentclass[a4paper,landscape,twoside]{article}
% By running pdflatex on this file, this will transform the file
% "these.pdf" into a new pdf file with 2 pages per new page, side by
% side, with reduced margins and zoom factor, so that text is not too
% small; and suitable for printing double sided/short edge, and
% stamping on the short edge.
% 2019, San Vu Ngoc