summaryrefslogtreecommitdiff
path: root/pt_bloom
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-11-12 13:57:07 +0100
committerPatrick Simianer <p@simianer.de>2015-11-12 13:57:07 +0100
commit5c2833c505dda0d1646b8f8c1e62abd391f0401e (patch)
tree0259c7c2bdb531c09587a744869848d87f4bbd9e /pt_bloom
parentef282dbe4fef1b0ae0c8544f0bb84ba674c68de7 (diff)
parent8151031373c08ccd714a99f50783eafcb54d2010 (diff)
Merge branch 'master' of github.com:pks/scripts
Diffstat (limited to 'pt_bloom')
-rwxr-xr-xpt_bloom4
1 files changed, 2 insertions, 2 deletions
diff --git a/pt_bloom b/pt_bloom
index 2c3928f..5c2cf01 100755
--- a/pt_bloom
+++ b/pt_bloom
@@ -6,12 +6,12 @@ require 'trollop'
STDIN.set_encoding 'utf-8'
STDOUT.set_encoding 'utf-8'
-cfg = Trollop::options do
+conf = Trollop::options do
opt :size, "number of entries in the filter", :type => :int, :required => true
opt :error_rate, "error rate", :type => :float, :default => 0.01
end
-f = BloomFilter.new cfg[:size], cfg[:error_rate]
+f = BloomFilter.new conf[:size], conf[:error_rate]
while line = STDIN.gets
src, tgt = splitpipe(line)[0..1]
src.strip!