{
"metadata": {
"name": "",
"signature": "sha256:9679b33394fae2695772ec437c7e03b31d757dddb5e76802275a91897f5bb26f"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Getting started - A guide to IPython Notebooks"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"What you will need for this course"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this course you will work with [Python](https://www.python.org/) as the language to work with, since it allows for fast prototyping and is supported by a great variety of scientific (and, specifically, data related) libraries. "
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Installing Python"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There are many ways to install Python. One way is the free **Anaconda Scientific Python** distribution, which you can download from https://store.continuum.io/cshop/anaconda/. This Python distribution contains most of the packages that we will be using throughout the course. It also includes an easy-to-use but powerful packagin system, *conda*. For compabitility reasons, we will be using **Python 2.7**, so make sure to download the correct version of Anaconda."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"-----"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"IPython Notebook"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"IPython has become the standard for interactive computing in Python. After installing *Anaconda*, you can access IPython (and the Notebooks) either through the Anaconda **Launcher** or the **Anaconda command prompt**. \n",
"\n",
"To run the IPython Notebook server from the command line, type ```ipython notebook``` from the terminal. Your web browser will open and load the environment."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the notebook, you can type and run code:"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print \"hi!\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"hi!\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"If you do not want to install iPython launchers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Go to: http://nbviewer.ipython.org/url/ + url where the ipython notebook is located"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"-----"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Conda Package Manager"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Anaconda also installs a package manager, that makes it easy to install and update Python packages. To call it, you need to type ```conda``` in the *Anaconda command prompt*. You can read a brief FAQ for ```conda``` [here](http://conda.pydata.org/docs/faq.html#pkg-installation)."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Code for setting the style of the notebook\n",
"from IPython.core.display import HTML\n",
"def css_styling():\n",
" styles = open(\"theme/custom.css\", \"r\").read()\n",
" return HTML(styles)\n",
"css_styling()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"\r\n",
"\r\n",
"\r\n",
"\r\n",
""
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 4,
"text": [
""
]
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}