Child pages
  • Python Workshop - Numerics (September 18, 2018)
Skip to end of metadata
Go to start of metadata

When: September 18, 2018 (6 - 8 PM)

Where: 33 Oxford St. (Maxwell-Dworkin), Room 119

Who is this for: This is primarily for classes, but beginning researchers might benefit as well. The users are expected to have Harvard affiliation. If you have Harvard affiliation and do not have HUID, please request XID by visiting:

                                          https://xid.harvard.edu/xid-apps/index.jsp 

Registration

What are the topics:

This tutorial will be an introduction to numerics in python via the numpy module. Some of the topics we might cover include

  • Linear algebra
  • FFT
  • Differential Equations
  • Vectorization, Broadcasting

(Material for this tutorial is available below)

Python installation and Jupyter Notebook on your laptop:

1) We plan to have a jupyterhub installation for this tutorial. In order to use it, you need to have HUID or XID. See the link for requesting XID above.

2) You can also install the Anaconda version of python on our laptop and use it instead. This will also allow you to have a python installation locally.

Please visit the link below for Anaconda installation:

https://conda.io/docs/user-guide/install/index.html#regular-installation

Suggestions:

  • Choose Python 3 (3.6 as of this writing)
  • On Mac, if the graphical installer does not work, choose the command line installer.

Running Jupyter Notebook:

https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html

Helpful links on Anaconda, ipython notebooks etc:

        http://docs.continuum.io/anaconda/faq.html

        http://nbviewer.ipython.org/github/catherinedevlin/mpwfw_exercises/blob/master/setup.windows.ipynb

        http://opentechschool.github.io/python-data-intro/core/notebook.html

Tutorial Materials

The rest of this page assumes you have installed Anaconda and the various python binaries are available in a terminal (Mac and Linux) or command prompt (Windows). Download the Ipython Notebooks below  and put them in the same directory.

On Windows, the simplest option is to put these files in the "Ipython Notebooks" directory in the "My Documents" directory under "Documents" (i.e Documents --> My Documents --> IPython Notebooks).

You can open Ipython Notebook on various OSs as follows:

On windows, start the ipython notebook using the launcher under Anaconda in the Start Menu. 

On Mac:

Double click on the launcher (should be available on the desktop) and choose ipython notebook. In the notebook, navigate to the folder which contains the tutorial notebooks.

On LInux, open a terminal (and on Windows, open a command prompt) and change to the directory where your notebooks are. Then type:

jupyter notebook

from the directory where you have all the following files (you need to have Anaconda bin directory in the path). Once the jupyter notebook server and the browser are up, you will see the files with 'ipynb' extension in the dashboard. Clicking on it will open it.

Ipython (jupyter) Notebooks for this tutorial:

Python-and-numerics-02062018.ipynb

Tutorial assumes you are familiar with basic python. You can find material on the web (just google) on introductory python. You may also look at the basic python tutorial in the notebook:

python-basics-python3-02012018.ipynb

custom.css — for changing the appearance of the notebook (optional)