Fast hierarchical clustering routines for R and Python