Adding dirichlet sampling code sketch from numpy so I can translate it later