fastbook/clean/app_jupyter.ipynb
2023-03-29 15:56:24 -07:00

253 lines
3.9 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"idx_": 0,
"metadata": {},
"outputs": [],
"source": [
"#hide\n",
"! [ -e /content ] && pip install -Uqq fastbook\n",
"import fastbook\n",
"fastbook.setup_book()"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 1,
"metadata": {},
"outputs": [],
"source": [
"from fastbook import *"
]
},
{
"cell_type": "markdown",
"idx_": 3,
"metadata": {},
"source": [
"# Appendix: Jupyter Notebook 101"
]
},
{
"cell_type": "markdown",
"idx_": 5,
"metadata": {},
"source": [
"## Introduction"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 7,
"metadata": {},
"outputs": [],
"source": [
"1+1"
]
},
{
"cell_type": "markdown",
"idx_": 9,
"metadata": {},
"source": [
"## Writing"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 13,
"metadata": {},
"outputs": [],
"source": [
"3/2"
]
},
{
"cell_type": "markdown",
"idx_": 14,
"metadata": {},
"source": [
"## Modes"
]
},
{
"cell_type": "markdown",
"idx_": 16,
"metadata": {},
"source": [
"## Other Important Considerations"
]
},
{
"cell_type": "markdown",
"idx_": 19,
"metadata": {},
"source": [
"## Markdown Formatting\n"
]
},
{
"cell_type": "markdown",
"idx_": 20,
"metadata": {},
"source": [
"### Italics, Bold, Strikethrough, Inline, Blockquotes and Links"
]
},
{
"cell_type": "markdown",
"idx_": 22,
"metadata": {},
"source": [
"### Headings"
]
},
{
"cell_type": "markdown",
"idx_": 24,
"metadata": {},
"source": [
"### Lists"
]
},
{
"cell_type": "markdown",
"idx_": 26,
"metadata": {},
"source": [
"## Code Capabilities"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 28,
"metadata": {},
"outputs": [],
"source": [
"# Import necessary libraries\n",
"from fastai.vision.all import * \n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 29,
"metadata": {},
"outputs": [],
"source": [
"from PIL import Image"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 30,
"metadata": {},
"outputs": [],
"source": [
"a = 1\n",
"b = a + 1\n",
"c = b + a + 1\n",
"d = c + b + a + 1\n",
"a, b, c ,d"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 31,
"metadata": {},
"outputs": [],
"source": [
"plt.plot([a,b,c,d])\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 33,
"metadata": {},
"outputs": [],
"source": [
"Image.open(image_cat())"
]
},
{
"cell_type": "markdown",
"idx_": 34,
"metadata": {},
"source": [
"## Running the App Locally"
]
},
{
"cell_type": "markdown",
"idx_": 36,
"metadata": {},
"source": [
"## Creating a Notebook"
]
},
{
"cell_type": "markdown",
"idx_": 38,
"metadata": {},
"source": [
"## Shortcuts and Tricks"
]
},
{
"cell_type": "markdown",
"idx_": 40,
"metadata": {},
"source": [
"### Command Mode Shortcuts"
]
},
{
"cell_type": "markdown",
"idx_": 42,
"metadata": {},
"source": [
"### Cell Tricks"
]
},
{
"cell_type": "markdown",
"idx_": 44,
"metadata": {},
"source": [
"### Line Magics"
]
},
{
"cell_type": "code",
"execution_count": null,
"idx_": 46,
"metadata": {},
"outputs": [],
"source": [
"%timeit [i+1 for i in range(1000)]"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "python3",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 2,
"path_": "app_jupyter.ipynb"
}