|
|
|
@ -112,7 +112,8 @@ def produce_part3(sum_result, lo_weight):
|
|
|
|
|
lo_xmodels = lo_xmodels.union(set(sum_result[i])) |
|
|
|
|
lo_xmodels = sorted(list(lo_xmodels)) |
|
|
|
|
for l in lo_xmodels: |
|
|
|
|
lo_sum = [0, 0, 0, 0, 0, 0] |
|
|
|
|
## build container to store sum of all weight |
|
|
|
|
lo_sum = [0 for k in xrange(0, 25)] |
|
|
|
|
if l not in lo_weight: |
|
|
|
|
continue |
|
|
|
|
for i in ii: |
|
|
|
@ -120,7 +121,7 @@ def produce_part3(sum_result, lo_weight):
|
|
|
|
|
continue |
|
|
|
|
lo_sum = [ |
|
|
|
|
float(x) + float(y) for x, y |
|
|
|
|
in zip(lo_weight[l][i], lo_sum)] |
|
|
|
|
in zip(lo_weight[l][i][9:], lo_sum)] |
|
|
|
|
rows.append([l] + lo_sum) |
|
|
|
|
|
|
|
|
|
_f = '%s-3.csv' % ii |
|
|
|
@ -131,8 +132,8 @@ def main(*argv):
|
|
|
|
|
_r = process_s2_data() |
|
|
|
|
_lw = process_lo_weight() |
|
|
|
|
produce_s2_part1(_r['sum']) |
|
|
|
|
# produce_s2_part2(_r['rank']) |
|
|
|
|
# produce_part3(_r['sum'], _lw) |
|
|
|
|
produce_s2_part2(_r['rank']) |
|
|
|
|
produce_part3(_r['sum'], _lw) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
|