1
0
mirror of https://github.com/gsi-upm/sitc synced 2024-11-22 06:22:29 +00:00
sitc/python/1_1_Notebooks.ipynb

217 lines
4.9 KiB
Plaintext
Raw Normal View History

2016-02-01 12:05:58 +00:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](http://www.upm.es/sfs/Rectorado/Gabinete%20del%20Rector/Logos/UPM/EscPolitecnica/EscUpmPolit_p.gif \"UPM\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Course Notes for Learning Intelligent Systems"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2016-02-15 08:01:37 +00:00
"Department of Telematic Engineering Systems, Universidad Politécnica de Madrid, © 2016 Carlos A. Iglesias"
2016-02-01 12:05:58 +00:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# How to install the environment and play with notebooks"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this lecture we will learn (i) how to set up your environment and (ii) how to run notebooks and use them"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. Set up the environment"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Install Anaconda \n",
"* Download the suitable version for your operating system of Python 3 at https://www.continuum.io/downloads\n",
"* Follow the installation instructions. In Linux/Mac, launch a terminal and execute the installer script.\n",
"2. [Optional, anaconda already installs jupyter] Install Jupyter http://jupyter.readthedocs.org/en/latest/install.html\n",
"* Launch a terminal and execute 'conda install jupyter'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Notebooks in a nutshell"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2.1 Launching jupyter"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Launch a terminal from the directory you have your notebook (file extension .ipynb) or you want to create your notebook\n",
"1. Write (without '') 'jupyter notebook' and press click"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In case you have not installed the environment, you can run Jupyter here https://try.jupyter.org/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2.2 Running notebooks"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can create, open or save notebooks from the menu File."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Notebooks have two main types of cells: code (executable) and text (called 'markdown'). You can change the type of a cell in the toolbar. A detailed user manual of Jupyter can be found here: \n",
"* http://jupyter.cs.brynmawr.edu/hub/dblank/public/Jupyter%20Notebook%20Users%20Manual.ipynb\n",
"* http://jupyter-notebook.readthedocs.org/en/latest/notebook.html"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For executing a 'code' cell, you can\n",
"* press Shift+Enter\n",
"* click on the 'run cell' button of the toolbar, or \n",
"* select the Cell-Run menu item"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"Example: we use Jupyter as a calculator, let's execute 2+2"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"2+2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's try: write 2+2 in the cell below and execute the cell"
]
},
{
"cell_type": "code",
2016-03-15 15:18:26 +00:00
"execution_count": 2,
"metadata": {},
2016-02-16 10:38:05 +00:00
"outputs": [
{
"data": {
"text/plain": [
"4"
]
},
2016-03-15 15:18:26 +00:00
"execution_count": 2,
2016-02-16 10:38:05 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2+2"
]
2016-02-01 12:05:58 +00:00
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Licence"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The notebook is freely licensed under under the [Creative Commons Attribution Share-Alike license](https://creativecommons.org/licenses/by/2.0/). \n",
"\n",
2016-02-15 08:01:37 +00:00
"© 2016 Carlos A. Iglesias, Universidad Politécnica de Madrid."
2016-02-01 12:05:58 +00:00
]
}
],
"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"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
"autocomplete": true,
"bibliofile": "biblio.bib",
"cite_by": "apalike",
"current_citInitial": 1,
"eqLabelWithNumbers": true,
"eqNumInitial": 1,
"hotkeys": {
"equation": "Ctrl-E",
"itemize": "Ctrl-I"
},
"labels_anchors": false,
"latex_user_defs": false,
"report_style_numbering": false,
"user_envs_cfg": false
2016-02-01 12:05:58 +00:00
}
},
"nbformat": 4,
"nbformat_minor": 1
2016-02-01 12:05:58 +00:00
}