Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krishnasun82/Bloom-Filter
Python bloom filter implementation extended over ActiveState recipe by Raymond Hettinger here: http://bit.ly/bloom_filter. Tested in CPython-2.7.
https://github.com/krishnasun82/Bloom-Filter
Last synced: 3 months ago
JSON representation
Python bloom filter implementation extended over ActiveState recipe by Raymond Hettinger here: http://bit.ly/bloom_filter. Tested in CPython-2.7.
- Host: GitHub
- URL: https://github.com/krishnasun82/Bloom-Filter
- Owner: krishnasun82
- Created: 2011-05-05T07:46:14.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-05-05T08:44:00.000Z (over 13 years ago)
- Last Synced: 2024-07-19T22:48:05.258Z (4 months ago)
- Homepage: http://sunnyeves.blogspot.com/
- Size: 93.8 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
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