citations.py 文件源码

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

项目:manubot 作者: greenelab 项目源码 文件源码
def get_citation_id(standard_citation):
    """
    Get the citation_id for a standard_citation.
    """
    assert '@' not in standard_citation
    as_bytes = standard_citation.encode()
    blake_hash = hashlib.blake2b(as_bytes, digest_size=6)
    digest = blake_hash.digest()
    citation_id = base62.encodebytes(digest)
    return citation_id
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号