Skip to content

Instantly share code, notes, and snippets.

@NikolasTzimoulis
Created April 10, 2018 22:14
Show Gist options
  • Save NikolasTzimoulis/47a1d088c27b82f3491f836d898de8bc to your computer and use it in GitHub Desktop.
Save NikolasTzimoulis/47a1d088c27b82f3491f836d898de8bc to your computer and use it in GitHub Desktop.
Compares two files and finds the models they don't have in common.
filenames = ("TILS2(4).model", "TILS2(4').model")
index = [set(), set()]
for i in (0,1):
filename = filenames[i]
model = ""
for line in open(filename):
if line.startswith('interpretation'):
index[i].add(model)
model = ""
else:
model += line
print len(index[0]), len(index[1])
print index[1].difference(index[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment