From f343459d6198352964dbb6779f15c352fe2d5794 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sun, 28 Jul 2013 09:54:54 +0100 Subject: init --- filter.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 filter.py (limited to 'filter.py') diff --git a/filter.py b/filter.py new file mode 100755 index 0000000..6ee4f3c --- /dev/null +++ b/filter.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python2 + +import sys + +while True: + lfrac = sys.stdin.readline() + if not lfrac: + break + monolingual = sys.stdin.readline() + ul_only = sys.stdin.readline() + + print lfrac, monolingual, ul_only, + + p = 0 + r = 0 + f = 0 + + for i in range(10): + lp = float(sys.stdin.readline().split()[1]) + lr = float(sys.stdin.readline().split()[1]) + lf = float(sys.stdin.readline().split()[1]) + + p += lp + r += lr + f += lf + + p /= 10 + r /= 10 + f /= 10 + + print 'p:', p + print 'r:', r + print 'f:', f -- cgit v1.2.3