From 9d2bf3642b2391381672a0d8c7db835683a7d719 Mon Sep 17 00:00:00 2001 From: mlefter <m.lefter@lumc.nl> Date: Fri, 15 Sep 2017 14:23:15 +0200 Subject: [PATCH] Moved into a special folder the 2014 course session materials. --- .../2014_july/01 - Welcome.ipynb | 0 .../02 - Introduction to Python (1).ipynb | 0 .../02 - Introduction to Python (2).ipynb | 0 .../02 - Introduction to Python (3).ipynb | 0 .../03 - More Python goodness (1).ipynb | 0 .../03 - More Python goodness (2).ipynb | 0 .../04 - Working with NumPy arrays.ipynb | 0 .../2014_july/05 - IPython Notebook.ipynb | 0 .../06 - Plotting with matplotlib.ipynb | 0 .../2014_july/07 - Painting Pandas.ipynb | 0 .../08 - Object-oriented programming.ipynb | 0 .../09 - A sip of Biopython (1).ipynb | 0 .../09 - A sip of Biopython (2).ipynb | 0 .../2014_july/INSTALL.md | 0 past_sessions/2014_july/README.md | 132 ++++++++++++++++++ .../2014_july/person.py | 0 .../More_goodness_progression.ipynb | 0 .../2014_july/solutions}/matplotlib.ipynb | 0 .../solutions}/more_python_seq_toolbox.py | 0 .../2014_july/solutions}/notebook.ipynb | 0 .../2014_july/solutions}/numpy.ipynb | 0 .../solutions}/python_01_bottles_of_beer.py | 0 .../solutions}/python_02_repeat_structure.py | 0 .../solutions}/python_03_combining_lists.py | 0 .../solutions}/python_04_dictionaries.py | 0 .../solutions}/python_05_kmer_counting.py | 0 .../python_08_scientific_calculator.py | 0 reveal.js | 2 +- 28 files changed, 133 insertions(+), 1 deletion(-) rename 01 - Welcome.ipynb => past_sessions/2014_july/01 - Welcome.ipynb (100%) rename 02 - Introduction to Python (1).ipynb => past_sessions/2014_july/02 - Introduction to Python (1).ipynb (100%) rename 02 - Introduction to Python (2).ipynb => past_sessions/2014_july/02 - Introduction to Python (2).ipynb (100%) rename 02 - Introduction to Python (3).ipynb => past_sessions/2014_july/02 - Introduction to Python (3).ipynb (100%) rename 03 - More Python goodness (1).ipynb => past_sessions/2014_july/03 - More Python goodness (1).ipynb (100%) rename 03 - More Python goodness (2).ipynb => past_sessions/2014_july/03 - More Python goodness (2).ipynb (100%) rename 04 - Working with NumPy arrays.ipynb => past_sessions/2014_july/04 - Working with NumPy arrays.ipynb (100%) rename 05 - IPython Notebook.ipynb => past_sessions/2014_july/05 - IPython Notebook.ipynb (100%) rename 06 - Plotting with matplotlib.ipynb => past_sessions/2014_july/06 - Plotting with matplotlib.ipynb (100%) rename 07 - Painting Pandas.ipynb => past_sessions/2014_july/07 - Painting Pandas.ipynb (100%) rename 08 - Object-oriented programming.ipynb => past_sessions/2014_july/08 - Object-oriented programming.ipynb (100%) rename 09 - A sip of Biopython (1).ipynb => past_sessions/2014_july/09 - A sip of Biopython (1).ipynb (100%) rename 09 - A sip of Biopython (2).ipynb => past_sessions/2014_july/09 - A sip of Biopython (2).ipynb (100%) rename INSTALL.md => past_sessions/2014_july/INSTALL.md (100%) create mode 100644 past_sessions/2014_july/README.md rename person.py => past_sessions/2014_july/person.py (100%) rename {solutions => past_sessions/2014_july/solutions}/More_goodness_progression.ipynb (100%) rename {solutions => past_sessions/2014_july/solutions}/matplotlib.ipynb (100%) rename {solutions => past_sessions/2014_july/solutions}/more_python_seq_toolbox.py (100%) rename {solutions => past_sessions/2014_july/solutions}/notebook.ipynb (100%) rename {solutions => past_sessions/2014_july/solutions}/numpy.ipynb (100%) rename {solutions => past_sessions/2014_july/solutions}/python_01_bottles_of_beer.py (100%) rename {solutions => past_sessions/2014_july/solutions}/python_02_repeat_structure.py (100%) rename {solutions => past_sessions/2014_july/solutions}/python_03_combining_lists.py (100%) rename {solutions => past_sessions/2014_july/solutions}/python_04_dictionaries.py (100%) rename {solutions => past_sessions/2014_july/solutions}/python_05_kmer_counting.py (100%) rename {solutions => past_sessions/2014_july/solutions}/python_08_scientific_calculator.py (100%) diff --git a/01 - Welcome.ipynb b/past_sessions/2014_july/01 - Welcome.ipynb similarity index 100% rename from 01 - Welcome.ipynb rename to past_sessions/2014_july/01 - Welcome.ipynb diff --git a/02 - Introduction to Python (1).ipynb b/past_sessions/2014_july/02 - Introduction to Python (1).ipynb similarity index 100% rename from 02 - Introduction to Python (1).ipynb rename to past_sessions/2014_july/02 - Introduction to Python (1).ipynb diff --git a/02 - Introduction to Python (2).ipynb b/past_sessions/2014_july/02 - Introduction to Python (2).ipynb similarity index 100% rename from 02 - Introduction to Python (2).ipynb rename to past_sessions/2014_july/02 - Introduction to Python (2).ipynb diff --git a/02 - Introduction to Python (3).ipynb b/past_sessions/2014_july/02 - Introduction to Python (3).ipynb similarity index 100% rename from 02 - Introduction to Python (3).ipynb rename to past_sessions/2014_july/02 - Introduction to Python (3).ipynb diff --git a/03 - More Python goodness (1).ipynb b/past_sessions/2014_july/03 - More Python goodness (1).ipynb similarity index 100% rename from 03 - More Python goodness (1).ipynb rename to past_sessions/2014_july/03 - More Python goodness (1).ipynb diff --git a/03 - More Python goodness (2).ipynb b/past_sessions/2014_july/03 - More Python goodness (2).ipynb similarity index 100% rename from 03 - More Python goodness (2).ipynb rename to past_sessions/2014_july/03 - More Python goodness (2).ipynb diff --git a/04 - Working with NumPy arrays.ipynb b/past_sessions/2014_july/04 - Working with NumPy arrays.ipynb similarity index 100% rename from 04 - Working with NumPy arrays.ipynb rename to past_sessions/2014_july/04 - Working with NumPy arrays.ipynb diff --git a/05 - IPython Notebook.ipynb b/past_sessions/2014_july/05 - IPython Notebook.ipynb similarity index 100% rename from 05 - IPython Notebook.ipynb rename to past_sessions/2014_july/05 - IPython Notebook.ipynb diff --git a/06 - Plotting with matplotlib.ipynb b/past_sessions/2014_july/06 - Plotting with matplotlib.ipynb similarity index 100% rename from 06 - Plotting with matplotlib.ipynb rename to past_sessions/2014_july/06 - Plotting with matplotlib.ipynb diff --git a/07 - Painting Pandas.ipynb b/past_sessions/2014_july/07 - Painting Pandas.ipynb similarity index 100% rename from 07 - Painting Pandas.ipynb rename to past_sessions/2014_july/07 - Painting Pandas.ipynb diff --git a/08 - Object-oriented programming.ipynb b/past_sessions/2014_july/08 - Object-oriented programming.ipynb similarity index 100% rename from 08 - Object-oriented programming.ipynb rename to past_sessions/2014_july/08 - Object-oriented programming.ipynb diff --git a/09 - A sip of Biopython (1).ipynb b/past_sessions/2014_july/09 - A sip of Biopython (1).ipynb similarity index 100% rename from 09 - A sip of Biopython (1).ipynb rename to past_sessions/2014_july/09 - A sip of Biopython (1).ipynb diff --git a/09 - A sip of Biopython (2).ipynb b/past_sessions/2014_july/09 - A sip of Biopython (2).ipynb similarity index 100% rename from 09 - A sip of Biopython (2).ipynb rename to past_sessions/2014_july/09 - A sip of Biopython (2).ipynb diff --git a/INSTALL.md b/past_sessions/2014_july/INSTALL.md similarity index 100% rename from INSTALL.md rename to past_sessions/2014_july/INSTALL.md diff --git a/past_sessions/2014_july/README.md b/past_sessions/2014_july/README.md new file mode 100644 index 0000000..75c9c3e --- /dev/null +++ b/past_sessions/2014_july/README.md @@ -0,0 +1,132 @@ +Programming course +================== + +This repository contains material for the second installment (July 2014) of a +programming course for scientists organised by the department of Human +Genetics of the Leiden University Medical Center. + +The course is targeted at PhD students, Postdocs, or anyone willing to learn +how to program in Python. Students are assumed to have some experience with +programming, but not necessarily in Python, and the UNIX shell. + +The program consists of four mornings with lessons and some assignments to +be done in your own time (i.e., during the afternoons). + +See the +[Trac Wiki](https://humgenprojects.lumc.nl/trac/humgenprojects/wiki/ProgrammingCourse) +for more information. + +Software installation +--------------------- + +See the instructions in `INSTALL.md`. + + +Materials +--------- + +The top-level directory contains materials for the following lessons: + +1. Welcome ([slides][lesson_01]) +2. Introduction to Python ([slides 1][lesson_02_01], [slides 2][lesson_02_02], + [slides 3][lesson_02_03]) +3. More Python Goodness ([notebook 1][lesson_03_01], [notebook 2][lesson_03_02]) +4. Working with NumPy arrays ([slides][lesson_04]) +5. IPython Notebook ([notebook][lesson_05]) +6. Plotting with matplotlib ([notebook][lesson_06]) +7. Painting Pandas ([slides][lesson_07]) +8. Object-oriented programming ([slides][lesson_08]) +9. A sip of Biopython ([notebook 1][lesson_09_01], [notebook 2][lesson_09_02]) + +[lesson_01]: http://nbviewer.ipython.org/urls/git.lumc.nl/courses/programming-course/raw/master/past_sessions/2014_july/01%20-%20Welcome.ipynb +[lesson_02_01]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/02%20-%20Introduction%20to%20Python%20(1).ipynb +[lesson_02_02]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/02%20-%20Introduction%20to%20Python%20(2).ipynb +[lesson_02_03]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/02%20-%20Introduction%20to%20Python%20(3).ipynb +[lesson_03_01]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/03%20-%20More%20Python%20goodness%20(1).ipynb +[lesson_03_02]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/03%20-%20More%20Python%20goodness%20(2).ipynb +[lesson_04]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/04%20-%20Working%20with%20NumPy%20arrays.ipynb +[lesson_05]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/05%20-%20IPython%20Notebook.ipynb +[lesson_06]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/06%20-%20Plotting%20with%20matplotlib.ipynb +[lesson_07]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/07%20-%20Painting%20Pandas.ipynb +[lesson_08]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/08%20-%20Object-oriented%20programming.ipynb +[lesson_09_01]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/09%20-%20A%20sip%20of%20Biopython%20(1).ipynb +[lesson_09_02]: http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/09%20-%20A%20sip%20of%20Biopython%20(2).ipynb + +As indicated, some of the lessons are slideshows, whereas others are just +notebooks we scroll through during class. The links above are all one-page +static renderings on [IPython Notebook Viewer](http://nbviewer.ipython.org/). + +We also have a +[repository with material for the assignments](https://git.lumc.nl/humgen/programming-course-assignments). + + +Notebooks +--------- + +We apply some custom styling to the notebooks (e.g., body width, font), which +is loaded in the last cell. This loads `styles/notebook.css` and +`styles/notebook.js`. + +A variant `styles/notebook.css.small` is provided that is more suitable for +use on low-resolution displays. To use it, manually change the reference to +this file in the bottom cell, and rerun it. + + +Slideshows +---------- + +The sources for the slideshows are also IPython notebooks and you can edit +them by starting a notebook server: + + ipython notebook + +Choose *Slideshow* in the *Cell Toolbar* menu. + +Some aditional information on editing slides in the Notebook can be found +here in +[this presentation](http://www.slideviper.oquanta.info/tutorial/slideshow_tutorial_slides.html). + +We also apply some custom styling to the slideshows, which is loaded in the +last cell. + + +Live rendering of the slides +---------------------------- + +You can use nbconvert to convert the slides to HTML and serve them. For +example: + + ipython nbconvert --to slides --post serve numpy.ipynb + +This will open the slides in a new browser window. If you don't want that, add +this argument: + + --ServePostProcessor.open_in_browser=False + +To serve on another IP address than the default 127.0.0.1, use the `ip` +configuration of the serve postprocessing. For example, to listen on all IP +addresses: + + --ServePostProcessor.ip=0.0.0.0 + +Changing the port can be done similarly with `port`. + +By default, the reveal.js library is loaded over the internet from a CDN. I +think it's usually not a good idea to rely on internet connectivity for your +slides, so you can also place a copy of reveal.js on your local computer and +specify the location like this: + + --reveal-prefix reveal.js + +This would look for the reveal.js library in the `reveal.js` directory. A Git +submodule is already setup for this, so you can just do: + + git submodule init + git submodule update + +(Unfortunately, there are other online dependencies such Font Awesome, so +without an internet connection, not everything will look ok, but it will +work.) + +Also, if you just want to compile the slides to HTML without serving them to +your browser, leave out the `--post serve` argument. diff --git a/person.py b/past_sessions/2014_july/person.py similarity index 100% rename from person.py rename to past_sessions/2014_july/person.py diff --git a/solutions/More_goodness_progression.ipynb b/past_sessions/2014_july/solutions/More_goodness_progression.ipynb similarity index 100% rename from solutions/More_goodness_progression.ipynb rename to past_sessions/2014_july/solutions/More_goodness_progression.ipynb diff --git a/solutions/matplotlib.ipynb b/past_sessions/2014_july/solutions/matplotlib.ipynb similarity index 100% rename from solutions/matplotlib.ipynb rename to past_sessions/2014_july/solutions/matplotlib.ipynb diff --git a/solutions/more_python_seq_toolbox.py b/past_sessions/2014_july/solutions/more_python_seq_toolbox.py similarity index 100% rename from solutions/more_python_seq_toolbox.py rename to past_sessions/2014_july/solutions/more_python_seq_toolbox.py diff --git a/solutions/notebook.ipynb b/past_sessions/2014_july/solutions/notebook.ipynb similarity index 100% rename from solutions/notebook.ipynb rename to past_sessions/2014_july/solutions/notebook.ipynb diff --git a/solutions/numpy.ipynb b/past_sessions/2014_july/solutions/numpy.ipynb similarity index 100% rename from solutions/numpy.ipynb rename to past_sessions/2014_july/solutions/numpy.ipynb diff --git a/solutions/python_01_bottles_of_beer.py b/past_sessions/2014_july/solutions/python_01_bottles_of_beer.py similarity index 100% rename from solutions/python_01_bottles_of_beer.py rename to past_sessions/2014_july/solutions/python_01_bottles_of_beer.py diff --git a/solutions/python_02_repeat_structure.py b/past_sessions/2014_july/solutions/python_02_repeat_structure.py similarity index 100% rename from solutions/python_02_repeat_structure.py rename to past_sessions/2014_july/solutions/python_02_repeat_structure.py diff --git a/solutions/python_03_combining_lists.py b/past_sessions/2014_july/solutions/python_03_combining_lists.py similarity index 100% rename from solutions/python_03_combining_lists.py rename to past_sessions/2014_july/solutions/python_03_combining_lists.py diff --git a/solutions/python_04_dictionaries.py b/past_sessions/2014_july/solutions/python_04_dictionaries.py similarity index 100% rename from solutions/python_04_dictionaries.py rename to past_sessions/2014_july/solutions/python_04_dictionaries.py diff --git a/solutions/python_05_kmer_counting.py b/past_sessions/2014_july/solutions/python_05_kmer_counting.py similarity index 100% rename from solutions/python_05_kmer_counting.py rename to past_sessions/2014_july/solutions/python_05_kmer_counting.py diff --git a/solutions/python_08_scientific_calculator.py b/past_sessions/2014_july/solutions/python_08_scientific_calculator.py similarity index 100% rename from solutions/python_08_scientific_calculator.py rename to past_sessions/2014_july/solutions/python_08_scientific_calculator.py diff --git a/reveal.js b/reveal.js index 131c006..43eada7 160000 --- a/reveal.js +++ b/reveal.js @@ -1 +1 @@ -Subproject commit 131c00689a4c7a18e5c991fc8102347e4594b5d4 +Subproject commit 43eada79901830702bd40dce857831aef8e76759 -- GitLab