Skip to content

videlec/aims-python-rwanda-2016

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Scientific Software Development in Python (AIMS Rwanda, 2016)

(Vincent Delecroix, LaBRI, Bordeaux, France)

This github repository contains material used to teach Python at AIMS Rwanda in fall 2016. You can also find complementary information on AIMS Rwanda website.

At the bottom of this page you can find a list of references and some tips for the jupyter notebook.

Week 1: learning Python

To download a document right click on a link and chose "Save link as".

You can also download this demo about Fibonacci numbers

Week 2: application to mathematics

Starting from thursday and up to the end of the course, there will be a quick questions/answers each morning (10min time). A sheet of paper will be distributed to each of you with a list of commands. You will have to write down what would be the output of these commands when run in a Jupyter Notebook. You have to answer without using a computer of course. The material of the two tests of week 2 are contained in worksheet 1, worksheet 2.1 and workheet 2.2.

The assignment (to be submitted before saturday 11:59:59pm) consists in programming in a Jupyter worksheet:

  • a function digits(n, b) that returns the list of digits of n in base b
  • a function prime_range(n) that returns the list of the prime numbers smaller than n
  • a function is_prime(n) that returns True if n is prime and False otherwise
  • a function gcd(x, y) that computes the greatest common divisor of x and y
  • solving various problems from Project Euler with at least:

A solution for the arithmetic function can be found here in pdf format.

You can also download this demo about timings of the is_prime function

Week 3: math and programming project

The program will be confirmed. In each course, there will be 1h dedicated to learning a new Python technique and 1h for your research project (see below).

New Python techniques to be learned:

For the assignment you will have research projects in group. Each group will be made of 3 or 4 students (the constitution will be given on friday evening of week 2). During the week-end, each group will have to chose three subjects by order of preference and submit their choices to the tutors before sunday 7pm. The final decision of project allocation will be made for monday morning.

I compiled all remarks about oral and writing in Remarks about assignment 3 (pdf document).

References

Beyond the material available in this repository, you might want to consult:

  • The "Help" menu available in each Jupyter worksheet
  • Python 3 documentation: contains among others a tutorial and a complete description of the standard Python library
  • Scipy lectures: Python tutorial in 3 sections starting from learning Python up to using advanced features of scipy and pandas
  • Scipy website: information about the SciPY stack. Contains links to other resources.
  • Project Euler: more than 500 exercises that have to be solved with a computer
  • IPython tutorial: tutorial about IPython

Tips and tricks

  1. To start the Jupyter notebook:

    • open a terminal
    • run the command jupyter notebook
  2. To stop the Jupyter notebook

    • for each open worksheet, go to the menu and do "File -> Save and Checkpoint" (in order to save your work) and then "File -> Close and Halt"
    • go in the terminal where you launched the notebook and press Ctrl-C right after you need to press y and Enter (you have 5 seconds to do this second step)
  3. (for AIMS computers) in order to see the matplotlib images embedded in the browser you need to execute the following line in a code cell

    %matplotlib inline
    

Copyright notice

Copyright (C) 2016 Vincent Delecroix [email protected]

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC-SA 4.0). This license allows you to reuse this material at your convenience but:

  • it can not be used as part of a commercial activity
  • you need to specify the original author and sources

You can either read the Creative Commons Deed (Summary) or the Legal Code (Full licence).

About

material for teaching Python at AIMS Rwanda fall 2016

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published