Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Python bloom filter implementation extended over ActiveState recipe by Raymond Hettinger here: http://bit.ly/bloom_filter. Tested in CPython-2.7.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
BloomFilter.py
README

README

Bloom filter code expanded over the recipe posted by Raymond Hettinger in ActiveState site: http://bit.ly/bloom_filter.

It requires the number of bits, number of probes, and a yielding hash function as shown in my fork of the recipe: http://code.activestate.com/recipes/577686/ (reproduced here for convenience)

def get_probes(bfilter, key):
    hasher = Random(key).randrange
    for _ in range(bfilter.num_probes):
        array_index = hasher(len(bfilter.arr))
        bit_index = hasher(32)
        yield array_index, 1 << bit_index
Something went wrong with that request. Please try again.