def formatTime(seconds):
"""
Takes a number of elapsed seconds and returns a string in the format h:mm.
"""
m, s = divmod(seconds, 60)
h, m = divmod(m, 60)
return "%d:%02d" % (h, m)
# TODO - Add example code for loading each item back from disk (if needed).
# - Maybe a commented line below the 'save' command?
# ======== main ========
# Main entry point for the script.
# This little check has to do with the multiprocess module (which is used by
# WikiCorpus). Without it, the code will spawn infinite processes and hang!
make_wikicorpus.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录