Monday, May 13, 2013

intersect two list of files

useful check to ensure that there's zero overlap between training/ test/ val splits:

set(open('testFree.jpgl')) & set(open('trainFree.jpgl'))

if you put into a bash script it should look like this

echo -e "for i in set(open('$1')) & set(open('$2')):print i" |  python   

credit: @larsmans in stackoverflow 

No comments:

Post a Comment