Skip to content

Instantly share code, notes, and snippets.

View fortierq's full-sized avatar

Quentin Fortier fortierq

View GitHub Profile
@mjambon
mjambon / Tree.ml
Created June 2, 2019 00:47
OCaml functions for printing a tree in a terminal like the 'tree' command
(*
Created by Martin Jambon and placed in the Public Domain on June 1, 2019.
Print a tree or a DAG as tree, similarly to the 'tree' command.
*)
open Printf
let rec iter f = function
| [] -> ()
@flamableconcrete
flamableconcrete / pull-mtgo-prices-from-goatbots.py
Last active September 6, 2020 18:46
This snippet creates CSV files for each Magic the Gathering card from goatbots.com
# written to be used with Python 3
from pprint import pprint
import csv
import json
import pathlib
import random
import time
import requests
@philtomson
philtomson / graphics_in_toplevel
Created October 23, 2012 17:09
Using Graphics module in Ocaml toplevel
(* SEE: http://mirror.ocamlcore.org/wiki.cocan.org/tips_for_using_the_ocaml_toplevel.html *)
$ ocaml
# #use "topfind" ;;
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates