プリンキピア

第5章多層パーセプトロン

5.7.1. Downloading Data5.7.1 データのダウンロード

Throughout the book, we will train and test models on various downloaded datasets. Here, we implement two utility functions for downloading and extracting zip or tar files. Again, we skip implementation details of such utility functions.
英語のヒント
この本全体を通じて、ダウンロードしたさまざまなデータセットでモデルを訓練し、テストする。ここでは、zipやtarのファイルをダウンロードして展開するための、二つのユーティリティ関数を実装する。ここでも、こうしたユーティリティ関数の実装の詳細は飛ばす。
def download(url, folder, sha1_hash=None):
    """Download a file to folder and return the local filepath."""

def extract(filename, folder):
    """Extract a zip/tar file into folder."""