Created
May 19, 2019 22:27
-
-
Save shipof123/b669b13a940fd48818e3423137f9bdb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
# Connell Paxton | |
import sys | |
input = open(sys.argv[1], "r") | |
row = 1 | |
max_lines = [] | |
lines = input.readlines() | |
chunk_sofar = 0 | |
for i in range(int(len(lines) / 10)): | |
chunk = lines[i*10:i*10+10] | |
(cxr, mut) = chunk[1].split()[0:2] | |
max = 0.0 | |
sum = 0.0 | |
for line in chunk: | |
sum += float(line.split()[9]) | |
if float(line.split()[9]) > max: | |
max = float(line.split()[9]) | |
max_lines.append((cxr, mut, sum/10.0, max)) | |
for i in max_lines: | |
print(str(i[0]) + '\t' + str(i[1]) + '\t' + str(i[2]) + '\t' + str(i[3])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment