Muennighoff commited on
Commit
c063a54
1 Parent(s): 5c627fa

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -0
README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import difflib
2
+ comms_neg = {'d6a51edc3e1cc7e7890b551c4f85d996e208153a', 'a5335eb51e6f26be07617599aa100fa18e5c3bb3', '7626b811492867af0eb76972135fd9e57f89badf', '4f38cab0095951af83ea628611c27363b3038c93', 'ac5035cb0c469261b27bbc1b290deb2d211bf0eb'}
3
+ neg = ds.filter(lambda x: x["commit"] in comms_neg)
4
+ diff = difflib.ndiff(neg[1]["old_contents"], neg[1]["new_contents"])
5
+ for i,s in enumerate(diff):
6
+ if s[0]==' ': continue
7
+ elif s[0]=='-':
8
+ print(u'Delete "{}" from position {}'.format(s[-1],i))
9
+ elif s[0]=='+':
10
+ print(u'Add "{}" to position {}'.format(s[-1],i))