GithubHelp home page GithubHelp logo

jupyter / ngcm-tutorial Goto Github PK

View Code? Open in Web Editor NEW
46.0 12.0 33.0 19.22 MB

Materials for the IPython/Jupyter workshop at the NGCM Summer Academy, at Southampton University, Boldrewood campus.

Python 0.47% Shell 0.05% HTML 2.77% JavaScript 0.13% Smarty 0.03% Jupyter Notebook 96.56%

ngcm-tutorial's Introduction

IPython/Jupyter Workshop at the NGCM Summer Academy

Materials for the IPython/Jupyter workshop at the Next-Generation Computational Modeling Summer Academy:

  • 2-day course
  • 27 and 28 June 2017
  • At Southampton University, Boldrewood campus

Course URL: http://ngcm.soton.ac.uk/summer-academy/ipython.html

Teaching is from 10am to 6pm, broken up by half-hour tea breaks morning and afternoon, and an hour lunch break. See the programme for details.

Course content

Jupyter and IPython provide tools for interactive and parallel computing that are widely used in scientific computing. We will show some uses of IPython for scientific applications, focusing on exciting recent developments, web-based notebooks with code, graphics, and rich HTML.

Day 1 morning: Core Jupyter and IPython

  • Notebook Basics
  • IPython - beyond plain python
  • Markdown Cells
  • Rich Display System
  • Beyond Python: the Jupyter architecture with Julia and R

Day 1 afternoon: Working with notebook files

  • Converting notebooks to other formats with nbconvert
  • Using notebooks in version control, with git and nbdime
  • Sharing notebooks online using nbviewer
  • Notebooks in continuous integration with nbval

Day 2 morning: Interactive widgets in notebooks

  • Using interact() to explore a function
  • Creating widgets manually and connecting them to Python functions
  • Laying out widgets on the page
  • The architecture of interactive widgets

Day 2 afternoon: Parallel computing with IPython

  • Overview of the ipyparallel model
  • Controller and engines
  • Basics of remote execution
  • Direct vs task execution
  • Integration with MPI codes
  • Handling dependencies between tasks
  • Performance considerations

Software Requirements

  • Python 3.x
  • Jupyter, including the Notebook and IPython. It should be available through the usual distribution channels, such as Anaconda.
  • Your favorite text editor.
  • If you have trouble installing Anaconda, this blog entry may help.
  • For the material related to nbconvert, the pandoc package, together with a latex installation, would be useful.

To install the packages required for this course and the Pandas course in a new environment with Anaconda, run:

conda create -n ngcm python=3 numpy scipy jupyter ipywidgets pandas matplotlib requests scikit-image sympy

Then, to use this environment, enter:

source activate ngcm

On Windows, this command is just activate ngcm.

Checking your installation

You can download and run this version_check.py script, and execute it using python version_check.py to check you have fulfilled the installation requirements.

Required knowledge

  • Basic Python,
  • some vague notion of html would be great.

The trainers

Infrastructure

ngcm-tutorial's People

Contributors

carreau avatar fperez avatar ianhawke avatar maxalbert avatar minrk avatar takluyver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngcm-tutorial's Issues

requests

The requests library is mentioned twice: once on day 3 (download images), and once on day 1 (nbconvert as a library). Should I add this to the conda install list on the website (and update the README), or are we not expecting to cover those lessons?

Tutorial not working: ipkernel_wxapp.py

Hello,

I've been trying to get this tutorial to run, which seems to be exactly what I need for my project:
https://github.com/jupyter/ngcm-tutorial/blob/master/Part-1/Embedding/ipkernel_wxapp.py

However, the problem is that one of the references files, https://github.com/jupyter/ngcm-tutorial/blob/master/Part-1/Embedding/internal_ipkernel.py, is trying to import a module which I don't have: from IPython.lib.kernel import connect_qtconsole, which yields ModuleNotFoundError: No module named 'IPython.lib.kernel'

The thing is, I have everything until IPython.lib. Only the kernel part is missing. Where do I get that from?

I installed so many modules that I lost track of them. I definitely installed jupyter, notebook, qtconsole, ipython, ipykernel.

I'm on macOS with Python 3.9, everything is installed using pip, not conda, and ideally I would like to keep it that way for simplicity of installation.

Notes from 2017

  • We ran out of material for part 2 (notebook tools) before the end of the session. We cut the nbconvert templating stuff out of this after last year, and added nbviewer, ndime and nbval. Possibly we can cover a bit more detail or another tool, or come up with some more interesting exercises.

  • A few changes to the widgets broke some of the exercises for part 3:

    • Matplotlib plots in interact don't automatically work any more - you need to display the figure and close it inside the function.
    • Widget styling has been removed (or heavily changed), which was involved in a couple of exercises.
    • The Popup widget, used in one exercise, is gone.

Notes from 2016

  • Introduction to Jupyter and IPython is too lengthy, e.g. I never actually use most of the history variables like _i. We should decide what is actually useful for people to know rather than talking through lots of obscure IPython features.
  • Some people hadn't programmed before the course, so they've had a day's combined Python and git training the day before they come to our workshop. The examples need to ramp up the difficulty more gradually. I think we should also accept that we're teaching people a little bit of Python, matplotlib, pandas... etc. - it might not be in the title, but it's more useful than a bunch of obscure details about IPython.
  • We tried to push an update after people had already cloned the material; this gets confusing for people who open the updated notebook and then try to pull it and get a conflict. Resolving that is tricky enough that it probably doesn't teach git novices anything useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.