Commit 63f6afb5 authored by timkittel's avatar timkittel Committed by GitHub
Browse files

wrote roughly down the outline (:

parent bcb82ca4
......@@ -10,22 +10,83 @@
### Session PM2 Python Intro
#### Python Intro
- done by rgieseke
- introduction to the python notebook
- basic language features (print, int, variables, type, ...)
- basic operators: math, string, comparison, boolean
- len, round
- import numpy as np
- tab complettion
- example functions np
- using a method
- lists, indexing, slicing
- **not included**: list comprehensions
- tuples
- traceback error (short explanation for understanding)
- dictionaries
- numpy arrays and basic operations
- for loops, enumerate, zip
- matplotlib.pyplot.plt
- if elif else
#### Numpy Intro
- np.loadtxt the example and short analysis of the loaded data
- slcing in multiple dimensions
- apply all the numpy operations (e.g. mean)
- demonstrate axis keyword
## DAY 2 AM
### Session AM1 Python Basics I
#### functions and modules
- functions
- positional arguments
- keyword a.
- functions as arguments (write your own `map` function)
- **not included**: \*, \*args, \*\*kwargs, mandatory keyword arguments
- formatted strings, i.e. `f"Hello {variable}"`
- write a function in a module and load it in the notebook, including `help`
- readable functions ... i.e. use long, meaningful variable names (and take advantage of autocompletion)
#### speeding up code with numba
- demonstrate simple loop example
- *comment*: the second `idx` definition in `process_numpy` could be replaced by `idx = ~idx` and that should be (marginally and probably irrelevantly) faster (:
- use `nb.vectorize` to create an np ufunc
### Session AM2: Python Basics II
#### Defensive Programming
- assertions
- simple example for test-driven development
- Debuggung ... long monologue and emphasize the important points, not going to repeat all of that here ... [I put some work into the presentation here, so they can take it home](
#### command line programs
- that was fun
- explain the shebang and how to make a script executable
- using sys.argv and showing how useless it is
- go to argparse and show how awesome it is
- ad different kinds of arguments, let them play around if possible
- read from stdin
- show the argcomplete magic
## DAY 2 PM
### Session PM1: Python Final Project
- load stuff in pandas and plot it
- use `describe`, `loc`, `T`, various ways of pandas indexing
- the actual project:
- easily get nice results so everybody is happy
- give the loading of the data file for free as this could set people back
- but then have some backup questions so even the quick people have enough to do
- finally do a challenge that actually involves some reading of the docs and thinking
### Session PM2: Wrap up
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment