Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (9 sloc) 321 Bytes
from hashes.bloom import bloomfilter
hash1 = bloomfilter('imastring')
print hash1.hashbits, hash1.num_hashes # default values (see below)
hash1.add('imastring string')
# print 'test string' in hash1
for word in 'bloom filters are the best'.split():
if 'machine' in hash1:
print "machine!"
Jump to Line
Something went wrong with that request. Please try again.