core.py 文件源码

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

项目:hivemind 作者: steemit 项目源码 文件源码
def sync_from_file(file_path, skip_lines, chunk_size=250, is_initial_sync=False):
    with open(file_path) as f:
        # each line in file represents one block
        # we can skip the blocks we already have
        remaining = drop(skip_lines, f)
        for batch in partition_all(chunk_size, remaining):
            process_blocks(map(json.loads, batch), is_initial_sync)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号