util.py 文件源码

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

项目:cdm 作者: riptano 项目源码 文件源码
def download_dataset(dataset_name, dataset_url):
    local_git = local_dataset_path(dataset_name)
    if not os.path.exists(local_git):
        repo = Repo.clone_from(dataset_url, local_git)
        print "Downloaded"
    else:
        print "Repo exists, pulling latest"
        repo = Repo(local_git)
        git = repo.git
        git.checkout("master")
        repo.remotes[0].pull()
    return repo


# returns a new session
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号