Code to calculate minhash similarity matrix