make_wikicorpus.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:wiki-sim-search 作者: chrisjmccormick 项目源码 文件源码
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!
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号