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/python | |
| import sys | |
| import json | |
| # open grid file | |
| with open(sys.argv[1]) as f: | |
| lines = [line.rstrip('\n') for line in f] | |
| # make the grid but padded on left right and bottom sides with a sentinel like this (makes it easy to grab diagonals) |
OlderNewer