sampletools.py 文件源码

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

项目:PeekabooAV 作者: scVENUS 项目源码 文件源码
def next_job_hash(size=8):
    """
    Generates a job hash (default: 8 characters).

    :param size The amount of random characters to use for a job hash.
                Defaults to 8.
    :return Returns a job hash consisting of a static prefix, a timestamp
            representing the time when the method was invoked, and random characters.
    """
    job_hash = 'peekaboo-run_analysis-'
    job_hash += '%s-' % datetime.now().strftime('%Y%m%dT%H%M%S')
    job_hash += ''.join(
        choice(string.digits + string.ascii_lowercase + string.ascii_uppercase)
        for _ in range(size)
    )
    return job_hash
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号