write_text

This commit is contained in:
Jeremy Howard 2020-11-29 06:51:47 -08:00
parent 169ee1797b
commit bb0dadf1ec
4 changed files with 614 additions and 442 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@ -14,19 +14,11 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {
"hide_input": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Warning: Your Kaggle API key is readable by other users on this system! To fix this, you can run 'chmod 600 /home/sgugger/.kaggle/kaggle.json'\n"
]
}
],
"outputs": [],
"source": [
"#hide\n",
"from fastbook import *\n",
@ -317,7 +309,7 @@
"cred_path = Path('~/.kaggle/kaggle.json').expanduser()\n",
"if not cred_path.exists():\n",
" cred_path.parent.mkdir(exist_ok=True)\n",
" cred_path.write(creds)\n",
" cred_path.write_text(creds)\n",
" cred_path.chmod(0o600)"
]
},
@ -9828,6 +9820,31 @@
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": true,
"skip_h1_title": true,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,