File size: 350 Bytes
1ead5e3 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import random
domains = ["clipart", "infograph", "painting", "quickdraw", "real", "sketch"]
random.seed(42)
for domain in domains:
with open(domain + '_test.txt', 'r') as f:
domain_data = f.readlines()
random.shuffle(domain_data)
with open(domain + '_test_fold.txt', 'w') as f:
f.write("".join(domain_data))
|