from hyperloglog import HyperLogLog from core import imdb_years from collections import Counter def main_test(): y = HyperLogLog(b = 4) z = Counter() for i, w in enumerate(imdb_years()): y.update(w.encode('utf-8')) z[w] += 1 print("Implemented: {}\nTrue count: {}".format(y.count(), len(z))) if __name__ == "__main__": main_test()