// Second folder -> test set
print("Downloading 2/2:", url2)
with urlopen(url2) as remotedata:
with open(foldertar, "wb") as tar:
tar.write(remotedata.read())
After Change
for d in range(1, n_datasets):
if not os.path.isdir("examples/enron%d" % d):
print("Downloading %d/%d:" % (d, n_datasets), url1)
foldertar = "examples/emails.tar.gz"
with urlopen(url1) as remotedata: