This file contains hidden or 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
1 | |
00:01:22,064 --> 00:01:27,070 | |
I should've known that you would | |
be here, Professor McGonagall. | |
2 | |
00:01:38,290 --> 00:01:41,460 | |
Good evening, Professor Dumbledore. | |
3 |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import sys, argparse | |
def columnize(fname, ncols): | |
f = open(fname, 'r') | |
lines = list(map(lambda l: l.split(), f.readlines())) | |
col = 0 | |
cols = zip(*lines) | |
cols = list(map(lambda c: max((len(w) for w in c)), cols))[:ncols] |