summaryrefslogtreecommitdiff
path: root/avg_weights
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 /avg_weights
parentef282dbe4fef1b0ae0c8544f0bb84ba674c68de7 (diff)
parent8151031373c08ccd714a99f50783eafcb54d2010 (diff)
Merge branch 'master' of github.com:pks/scripts
Diffstat (limited to 'avg_weights')
-rwxr-xr-xavg_weights4
1 files changed, 2 insertions, 2 deletions
diff --git a/avg_weights b/avg_weights
index 2e23440..36b051a 100755
--- a/avg_weights
+++ b/avg_weights
@@ -4,7 +4,7 @@ require 'zipf'
require 'trollop'
require 'zlib'
-cfg = Trollop::options do
+conf = Trollop::options do
opt :weights_files, "a number of weights files: name value", :required => true
opt :filter, "Filter if key does not appear in every file.", :type => :bool, :default => false
end
@@ -27,7 +27,7 @@ ARGV.each { |fn|
n = ARGV.size.to_f
h.each_pair { |k,w|
- next if cfg[:filter] and w.size < n
+ next if conf[:filter] and w.size < n
puts "#{k} #{w.inject(:+)/n}"
}