Skip to content

Instantly share code, notes, and snippets.

@flashton2003
Created March 21, 2019 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flashton2003/6518a4a877f5a1dae781c75ff02c57a1 to your computer and use it in GitHub Desktop.
Save flashton2003/6518a4a877f5a1dae781c75ff02c57a1 to your computer and use it in GitHub Desktop.
converts disty output from symetrical matrix to upper rectangular, one value per line
import fileinput
lines = []
for line in fileinput.input():
lines.append(line.strip())
lines = lines[1:]
lines = [x.split()[1:] for x in lines]
i = 1
all_pwd = []
for x in lines:
all_pwd.extend(x[i:])
i += 1
for x in all_pwd:
print x(base)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment