{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#
CS568:Deep Learning
Spring 2020
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Working with Jupyter Notebook\n", "\n", "This is part 1 of Recitation 1 for the course CS-568: Deep Learning. This notebook provides an introduction to interact with Jupyter Notebooks." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### i) Cell types \n", "There are four types of cells including Code, Markdown, Raw NBConvert and Heading. We will mostly use Markdown and Code cells." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### ii) Writing styles\n", "Jupyter Notebook supports markdown language, which is a lightweight mark up language. \n", "Set new cell to markdown and then add the following text to the cell:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "CS-568:Deep learning" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### iii) Headers\n", "Use pound or hash sign (#) to add headers. The more pound sign you use, the smaller the header." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Header 1 \n", "## Header 2\n", "### Header 3\n", "#### Header 4\n", "##### Header 5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### iv) Modes in Notebook\n", "There are two modes in the jupyter notebook. \n", "+ **Edit mode**: which can be accessed by pressing ``Enter``. **Green** border around cell indicates you are in **Edit mode** \n", "+ **Command mode**: which can be accessed by pressing ``Escape``. **Blue** border around cell indicates you are in **Command mode**\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### v) General Jupyter Shortcuts\n", "\n", "These shortcuts work in both **Edit Mode** and **Command Mode**.\n", "\n", "- `shift` + `enter` to run cell, select below\n", "- `control` + `enter` to run selected cells\n", "- `option` + `enter` to run cell and insert below\n", "- `command` + `S` to Save and Checkpoint\n", "\n", "\n", "#### vi) Jupyter Edit Mode\n", "\n", "When in Edit Mode, you can press:\n", "\n", "- `tab` to code completion or indent.\n", "- `shift` + `tab` for tooltip.\n", "- `command` + `]` to indent.\n", "- `command` + `[` to dedent.\n", "- `command` + `A` to select all.\n", "- `command` + `Z` to undo.\n", "- `command` + `shift` + `Z` to redo.\n", "- `command` + `↑` to go to cell start.\n", "- `command` + `↓` to go to cell end.\n", "- `command` + `→` to go to line end.\n", "- `command` + `←` to go to line start.\n", "- `command` + `shift` + `P` to open the command palette.\n", "- `↑` to move cursor up.\n", "- `↓` to move cursor down.\n", "\n", "\n", "#### vii) Jupyter Command Mode\n", "\n", "While in command mode (press Esc to activate):\n", "Enter take you into edit mode\n", "\n", "- `H` to show keyboard shortcuts.\n", "- `↑` to select cell above.\n", "- `↓` to select cell below.\n", "- `shift` + `↑` to extend selected cells above.\n", "- `shift` + `↓` to extend selected cells below.\n", "- `A` to insert cell above.\n", "- `B` to insert cell below.\n", "- `X` to cut selected cells.\n", "- `C` to copy selected cells.\n", "- `V` to paste cells below.\n", "- `shift` + `V` to paste cells above.\n", "- `D`, `D` to delete selected cells.\n", "- `Z` to undo cell deletion.\n", "- `S` to Save and Checkpoint.\n", "- `Y` to change cell to code.\n", "- `M` to change cell to markdown.\n", "- `P` to change cell to raw.\n", "- `shift` + `space` to scroll notebook up.\n", "- `space` to scroll notebook down." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### viii) Export your Notebook\n", "You can share your jupyter notebook with people in other formats using ``nbconvert`` tool. ``nbconvert`` comes with Jupyter Notebook to convert or export your notebooks into following formats:\n", "+ HTML\n", "+ LaTeX\n", "+ PDF\n", "+ Markdown\n", "\n", "To convert Jupyter Notebook into PDF, run this command in the terminal." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "``$ jupyter nbconvert Recitation1-Part1.ipynb --to pdf``" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "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.5.3" } }, "nbformat": 4, "nbformat_minor": 2 }