In the jupyter notebook Bloom Filter and and Flajolet Martin algorithms can seen. The hashes that used in this notebook are not optimal, if you want the improve the quality of the algorithms, better and state of the art hash algorithms can be used.
The methods are self explanatory. In the FM algorithm I tried some other alternatives to mean and median. If you want the best performance look for HyperLogLog algorithm.
I did not use the better hashes and the Hyperloglog algorithm in this notebook due to its my school homework