mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
Move datasets to project ageron/data to shrink this repo
This commit is contained in:
@@ -1635,8 +1635,8 @@
|
||||
" filepath = titanic_path / filename\n",
|
||||
" if filepath.is_file():\n",
|
||||
" continue\n",
|
||||
" root = \"https://raw.githubusercontent.com/ageron/handson-ml3/main/\"\n",
|
||||
" url = root + \"/datasets/titanic/\" + filename\n",
|
||||
" data_root = \"https://github.com/ageron/data/raw/main/\"\n",
|
||||
" url = data_root + \"titanic/\" + filename\n",
|
||||
" print(\"Downloading\", filename)\n",
|
||||
" urllib.request.urlretrieve(url, filepath)\n",
|
||||
" return [pd.read_csv(titanic_path / filename) for filename in filenames]"
|
||||
@@ -2123,9 +2123,9 @@
|
||||
"import tarfile\n",
|
||||
"\n",
|
||||
"def fetch_spam_data():\n",
|
||||
" root = \"http://spamassassin.apache.org/old/publiccorpus/\"\n",
|
||||
" ham_url = root + \"20030228_easy_ham.tar.bz2\"\n",
|
||||
" spam_url = root + \"20030228_spam.tar.bz2\"\n",
|
||||
" spam_root = \"http://spamassassin.apache.org/old/publiccorpus/\"\n",
|
||||
" ham_url = spam_root + \"20030228_easy_ham.tar.bz2\"\n",
|
||||
" spam_url = spam_root + \"20030228_spam.tar.bz2\"\n",
|
||||
"\n",
|
||||
" spam_path = Path() / \"datasets\" / \"spam\"\n",
|
||||
" spam_path.mkdir(parents=True, exist_ok=True)\n",
|
||||
|
||||
Reference in New Issue
Block a user