Skip to content

Conversation

@zsdonghao
Copy link
Member

No description provided.

@lgarithm
Copy link
Member

we should use shutil.move instead of
os.system("mv ...
according to
https://stackoverflow.com/questions/8858008/how-to-move-a-file-in-python/16845955#16845955

tag_folder_list.sort(key=lambda s: int(s.split('/')[-1])) # folder/images/ddd
tag_folder_list = load_folder_list(os.path.join(path, "tags"))

from sys import platform as _platform
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use os.path.basename instead of if else platform

import sys
import tarfile
import zipfile
import time
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another import time on #L1130 could be removed now.

>>> images = tl.files.load_flickr1M_dataset(tag='zebra')
"""
import shutil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should almost always put import on top of file:
https://stackoverflow.com/questions/1188640/good-or-bad-practice-in-python-import-in-the-middle-of-a-file
shutil is a standard module in python, it should be cheap to import.

@zsdonghao zsdonghao merged commit 46df7a7 into master Mar 16, 2018
@zsdonghao zsdonghao deleted the load-svhn branch March 16, 2018 17:51
luomai pushed a commit that referenced this pull request Nov 21, 2018
* release load SVHN

* fixed codacy

* fix liguo suggestion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants