util.py 文件源码

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

项目:rnn-morpheme-analyzer 作者: mitaki28 项目源码 文件源码
def progress(prompt, percent, bar_length=20):
    hashes = '#' * int(round(percent * bar_length))
    spaces = ' ' * (bar_length - len(hashes))    
    return "\r{}: [{}] {}%".format(
        prompt,
        hashes + spaces,
        int(round(percent * 100)))

#ref: https://docs.python.org/3.5/library/itertools.html#itertools.zip_longest
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号