Skip to content

biof309/fall2019

 
 

Repository files navigation

Syllabus

Introduction to Python Programming - BIOF309 - FAES

Fall 2019

Time: Thursday 6:00PM - 8:00PM

This document is subject to revision!

Changes are tracked using the git version control system.

To interact with the materials in the repo online you may use JupyterLab (via Binder), by clicking the link below.

Binder

Instructors

  • John Lee
  • Ryan Patterson
  • Sydney Hertafeld

Course Description

This course is designed for non-programmers, biologists, or those without specific knowledge of Python to learn how to program. Week by week, we will slowly build up your skills and understanding of computer programming and the Python programming language. There will be in-class demonstrations, using JupyterLab, and activities to be completed outside of class, using DataCamp, for you to practice and learn at your own pace.

Learning Objectives

By the end of this course you should be able to:

  1. Look at a task and determine if you can or should automate it
  2. Create working Python programs
  3. Understand the difference between Python object types (e.g. lists, dicts)
  4. Perform data analysis and visualization with Python
  5. Use git for version control and collaboration
  6. Demonstrate your Python skills with a project

Communication

Please try to ask your questions during class, if at all possible.

Before contacting us, please check to see if your question has already been answered elsewhere, e.g. StackOverflow.

If you cannot find the answer, please make sure to ask your question thoughtfully (https://stackoverflow.com/help/how-to-ask) and provide everything needed to answer e.g. code, error message, dataset, etc.

In general, please use the course gitter channel to communicate with classmates and instructors. In case of personal/private question/concerns, please use the private chat functionality of gitter.

In case of an emergency, please use gitter and an email.

Logistics

This is a one-semester course starting on the 12th of September 2019 and finishing in December 2019.

Unless otherwise notified classes will be held at:

** Building 10, Room B1C209-211, NIH Bethesda campus**

Attendance in class is strongly recommended; however, we realize other commitments may occasionally prevent attendance. If you miss a class, please review the materials available at the course GitHub repository and keep up with activities and homework.

Forming groups to complete the final project is highly encouraged!

Required Materials

Each student is encouraged to bring their own laptop to each class.

Programing without a computer would be an exceptional feat.

Required software installation

With a successful install of the required software, you should be able to open the application "Anaconda Navigator", launch a notebook, and execute a cell (Ctrl + Enter) containing the command !git status. The indication of success will most likely be an error telling you that your current directory is not a git repository:

fatal: not a git repostory (or any of the parent directories): .git

If this is not the case you should follow the instructions below (including instructions specific to your operating system).

Please install the following programs BEFORE the first class, you do not need admin privileges to do this:

  1. The Anaconda Scientific Python Distribution.

    The Anaconda installer will automatically install most of the software we will use during the course, including Jupyter Notebooks.

OSX (Apple) specific requirements:

  1. A working installation of git is required on OSX. Sometimes there is an error on Mac computers where git does not work. This can be resolved by opening the terminal application on OSX and running the command xcode-select --install as described here and selecting "Install".

Windows

If you use Windows 10, please try to set up the Windows subsystem for Linux. This will make things easier.

If this is not possible you can try the following alternative:

  1. When installing gitforwindows be sure to select the option "Use git and other UNIX tools from the command prompt" when provided options to "Adjust your PATH environment", and take a note of the installation directory. Otherwise install the application with all the default settings.

  2. In order to use the software you installed in step 1. within jupyter you need to make a small change to a text file (and you may have to create the text file in the first place). The first option should just work (note though that it assumes that the gitforwindows installed the program "C:\Program Files\Git\bin\bash.exe". If the command below doesn't work you may have to use the second approach and substitute the installation location noted in step 1.)

    • The easiest way to do this is by executing the following command in the "gitbash" application (this will erase pre-existing setup if you have it). Right-click on your mouse is often the way to paste in gitbash. We do not advise attempting to type the command below:

      if [ ! -d ~/.jupyter ]; then mkdir ~/.jupyter;fi ; curl https://afni.nimh.nih.gov/pub/dist/john/jupyter_notebook.py -o ~/.jupyter/jupyter_notebook_config.py

    • Another way to configure your installation is to open the file ~/.jupyter/jupyter_notebook_config.py in a text editor and add the line described here

Optional extras

We recommend that you avail of the following tools as they will help you in your path towards Pythonic stardom:

  1. The PyCharm Integrated Development Environment (IDE)

    The very nice folks at JetBrains have given us free licenses for the Professional Edition of PyCharm Integrated Development Environment (IDE), the best (in my humble opinion) Python Integrated Development Environment (IDE).

    If you have a .edu email address, please install PyCharm Integrated Development Environment (IDE) Professional using this link.

    If not, a installation link will be distributed to you by email and made available on Slack.

    Before the first class, please watch the Getting Started with PyCharm video series.

    Before the second class, please watch the PyCharm In-Depth VCS video series.

  2. DataCamp

    Since Fall 2017, the very nice folks at DataCamp have been generously supporting our class via their DataCamp for the Classroom initiative.

    This program give us free 6 month access to DataCamp's awesome Data Visualization📊, Machine Learning🤖, and Data Science learning materials.

    We will discuss the most interesting examples from DataCamp during class and point out others to be reviewed outside of class.

  3. GitHub

    All of the course materials are available on GitHub. Before accessing the course materials repo, you should know that

    • it is likely to be under constant development throughout the semester and
    • you are not expected to work through everything contained therein!
  4. GitHub student pack

    GitHub is offering some free awesome resources to students, that might be of interest to you, depending on your background:

Schedule

# Date Title Lead
1 2019-09-12 Introduction Martin
2 2019-09-17 Github, binder, jupyter Martin
3 2019-10-01 A python whirlwind John
4 2019-10-04 Git John
5 2019-10-10 A python whirlwind (Part 2) John
6 2019-10-17 Bash overview, magics, iterators, pathlib John
7 2019-10-24 Using what we have learned John
8 2019-10-31 Private methods, and structuring our own code. John
9 2019-11-07 Another look at git John
10 2019-11-14 Packaging our code Ryan
11 2019-11-29 Final Project Clinic All Instructors
12 2019-12-05 Final Project Clinic All Instructors
13 2019-12-12 Final Project Clinic All Instructors

Homework

This semester we are continuing our free-form approach to homework assignments. The due dates below are guidelines. By the end of the semester, you must complete at least one career track or at least two skills tracks on DataCamp.

This will take 28-67 hours total to complete, depending on which you choose to do.

DataCamp Career Tracks (complete at least 1):

DataCamp Skills Tracks (complete at least 2):

Please start on your chosen track(s) on DataCamp as soon as possible and work towards the certificate(s) throughout the semester. This will require substantial work! Do not wait until the end of the semester!

Please use the schedule below as a guide to which DataCampchapters/lessons correspond to what is covered in class.

  1. DUE September 13, 2019 (BEFORE Class)

  2. DUE September 20, 2019 (BEFORE Class)

  3. DUE September 27, 2019 (BEFORE Class)

  4. DUE October 4, 2019 (BEFORE Class)

  5. DUE October 11, 2019 (BEFORE Class)

  6. DUE October 18, 2019 (BEFORE Class)

  7. DUE October 25, 2019 (BEFORE Class)

  8. DUE November 1, 2019 (BEFORE Class)

  9. DUE November 8, 2019 (BEFORE Class)

  10. WORK ON FINAL PROJECTS Depending on your final project, you might find the following topics useful:

Recommended Books

There is no required textbook for this course.

We do, however, highly recommend Python for Data Science and its companion text A Whirlwind Tour of Python by Jake Vanderplas. Both of these books are available free on GitHub in Jupyter Notebook form. The code for Python for Data Analysis by Wes McKinney is also on GitHub but the text is only available in the printed copy of the book. For maximum enjoyment, consider working through the relevant chapters before coming to class.

We will link to relevant online resources throughout the course.

If you would like additional material on the basics, the following resources may be useful:

For more information about Python, please see the official Python Software Foundation website.

Grading

The emphasis of the course is on learning and mastering the skills covered. We hope that everyone will be able to complete one of the Python tracks on DataCamp and submit a final project via GitHub. If some of the material appears unclear, please ask for clarification.

Some details regarding the final project:

  • Record your plans on github as you go
  • Try to show weekly improvement (on github)
  • Pay attention to what your minimally viable product is.
  • Not creating a package is acceptable but must be justified.
  • Joint projects looked on favorably.
  • Breadth of python skills will be noted.
  • Having commits from instructors is fine (though you don't get points for such beautiful code).
  • Pick a project that is interesting to you. You’ll find it easier to work on if you think it is fun or solves a problem that you have encountered in your daily work. Regarding content the sky is the limit.

Grading the final project will be done using the following rubric:

Project description / Specification

  • Goals for the project are discussed and placed in the context of pre-existing work. This could take the form of other python projects or indeed software in any language. Not reinventing the wheel is an important result of good planning (0-5)

Documentation

  • Only comments embedded in the code (0-5)
  • Objects and methods have docstrings (6-10)
  • Documentation is thorough both in the readme and in the code itself(11-15)

Readability and reusability

  • The code is poorly organized and difficult to interpret (1-10)
  • Basic organization and modularity of the code is present (11-20)
  • Careful organization of the code (commented, well-named variables in well-named functions in well-named modules, in a package if appropriate), coupled with attention to style guides for python. (21-30)

Testing

Marks will not necessarily be lost for failing tests.

  • Tests should cover a significant fraction of the python code used. (0-10)
  • Tests have aided development and have helped discover bugs in the code (11-20)

"The product"

  • The code technically works but does not show evidence of engagement (1-5)
  • The project checks the boxes in the rubric effectively and is nicely implemented (6-10)
  • The code attempts to solve a real-life problem, shows great progress both inside and outside class over the weeks of the project (11-20)
  • The project is a roaring success. It's amazing to see what you can now do with python! You have earned the title of pythonista (21-30)

Course Materials

Course materials are available in the course GitHub repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 96.3%
  • Python 2.9%
  • HTML 0.8%