In [1]:
# Styling
from IPython.core.display import HTML
def css_styling():
    sheet = './css/custom.css'
    styles = open(sheet, "r").read() 
    return HTML(styles)
css_styling()


Out[1]:
/* * @Author: paul * @Date: 2016-02-25 17:35:32 * @Last Modified by: paul * @Last Modified time: 2016-02-25 17:45:54 */

Setup instructions

Choose one option of the following that applies to you, then follow the Starting the Material Instructions:

The recommended way to obtain the prerequisites for this course is by installing the latest Python 3 Anaconda python distribution (currently 3.5). This will download all the necessary material to open the material as a jupyter notebook and run examples and exercises.

2. Current conda Python Users

Current Python 2.7 users with access to the conda package manager who do not wish to interfere with their installation can create a minimal working 'conda environment' by entering the following command into a terminal/command prompt:

conda create -n py3_oop python=3.5 jupyter numpy matplotlib

And switching to this environment with

source activate py3_oop    # Linux/Mac
activate py3_oop           # Windows

(closing the terminal or using source deactivate will return to the default python version)

3. Non conda Users

Advanced Python users not using conda should install the aforementioned packages with their preferred package manager. See Jupyter installation instructions for more detail.

Starting the Material

Testing

A test script is provided to ensure you have installed the requirements correctly. Either save This file and run python installation_test_2.py from a terminal, or if you have curl (might not work with Windows), simply enter the following one-liner:

curl -L https://raw.githubusercontent.com/p-chambers/Python_OOP_Workshop/master/installation_test_2.py | python


The slides and exercises should be followed as live Jupyter notebooks so that you can run and develop your own code. The instructions and terminal commands of how to do this are provided on the Github repository, but for convenience this is repeated here:

  1. Clone the repository with

    git clone https://github.com/p-chambers/Python_OOP_Workshop.git

    OR if you don't have/want git, download as a .zip (you'll need to extract the files), then navigate to the directory with

    cd Python_OOP_Workshop

    and view the 'index.ipynb' as a jupyter notebook with

    jupyter notebook index.ipynb

    You should also remove output by clicking (in the notebook)

    Kernel > Restart > Clear all outputs and restart


In [ ]: