python-bloom-filter icon indicating copy to clipboard operation
python-bloom-filter copied to clipboard

Bloom filter for Python

Results 11 python-bloom-filter issues
Sort by recently updated
recently updated
newest added

``` >>> f = BloomFilter(max_elements=10_000_000, error_rate=0.02, filename=('/tmp/bloom.bin', -1)) >>> f.add('test') Traceback (most recent call last): File "", line 1, in File "site-packages/bloom_filter/bloom_filter.py", line 560, in add self.backend.set(bitno) File "site-packages/bloom_filter/bloom_filter.py", line...

Fix incorrect use of XOR operator to use correct POWER operator. In Python "2 ^ N" means "2 XOR N" whereas "2 ** N" means "2 to the power N"....

can we get position of elemet?

I've tried to use this for floating point numbers and got a type error on line 403 for "mask = 1

To make it easier to use a bloom filter for any type of object I added a 'key' parameter that you can use to insert data from some sort of...

Hey there, I don't see any information in the docs about the hashing fashion used here, could you provide some insight? Thanks!

Added support for Redis backends.

Example: ``` import bloom_filter f = bloom_filter.BloomFilter(max_elements=10,error_rate=1E-6) for x in range(10): f.add(x) false_positives = 0 for y in range(10, 1000000): if y in f: false_positives += 1 print("Got %d false...

The filter lacks checks for empty strings or lists. Simple example: ``` from bloom_filter import BloomFilter bloom=BloomFilter() '' in bloom ``` ``` .../bloom_filter/bloom_filter.py in get_bitno_lin_comb(bloom_filter, key) 478 int_list.append(remainder) 479 temp...