Workshop on Programming using Python

April 27-28, 2021

09:00 am - 14:00 pm

Instructors: Bezaye Tesfaye, Christian Meeßen, Hannes Fuchs, Maximilian Dolling, Nils Brinkmann

Helpers: Stefan Lüdtke

General Information

Together with the advancement of new tools and techniques, and the availability of large datasets in different research domains, a solid understanding of common scripting languages and version control systems is becoming more and more important for many researchers. Having the knowledge and skills on how to use tools and techniques to analyze data efficiently, to preserve research output and to collaborate with peers benefit every research domain. So its important to close the gap between researchers and the know-how for new tools and techniques. Software Carpentry aims to provide this support. It is an interactive workshop including sessions from concepts to practice on topics that can be used in many research domain. The sessions are organized in a friendly environment, where people can learn from each other and share experience. Participants also get support throughout the whole sessions.

Who: The workshop targets audience from graduate students to advanced researchers, and doesn't require previous knowledge of topics that will be covered.

When: April 27-28, 2021. Add to your Google Calendar.

Requirements: The workshop will be held virtually and participants should prepare the following items before the workshop: (1) prepare a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.), and a headset if possible, and (2) install required software packages for the workshop (listed below).

Contact: If you have any question on the workshop, please contact us through swc-workshop-org@gfz-potsdam.de


Code of Conduct

Everyone who participates in Carpentries activities is required to conform to the Code of Conduct.This document also outlines how to report an incident if needed.


Collaborative Notes

We will use this collaborative document for chatting, taking notes, and sharing URLs and bits of code.


Surveys

Please be sure to complete these surveys before and after the workshop.

Pre-workshop Survey

Post-workshop Survey


Schedule

Day 1

09:00 Welcome & introduction
09:10 Icebreaker
09:30 Python fundamentals
10:30 Coffee
11:00 Data analysis
12:15 Data visualization
13:15 Q&A

Day 2

09:00 Welcome
09:05 Repeating actions with Loop
09:45 Lists
11:00 Coffee
11:30 Working with multiple files
12:00 Conditionals and functions
13:30 Q&A
13:45 Wrap-up

Syllabus

Programming in Python

  • Using Libraries
  • Working with Arrays
  • Reading and Plotting Data
  • Creating and Using Functions
  • Loops and Conditionals
  • Reference...

Setup

To participate in a Software Carpentry workshop, you will need access to the software described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

Python

Python is a popular language for research computing, and great for general-purpose programming as well.

Regardless of how you choose to install it, please make sure you install Python version 3.x (e.g., 3.6 is fine).

We will teach Python using the Spyder IDEk, a programming environment that makes it easier to write Python code (Spyder will be installed by Anaconda).

Video Tutorial
  1. Open https://www.anaconda.com/distribution/#download-section with your web browser.
  2. Download the Anaconda for Windows installer with Python 3. (If you are not sure which version to choose, you probably want the 64-bit Graphical Installer Anaconda3-...-Windows-x86_64.exe)
  3. Install Python 3 by running the Anaconda Installer, using all of the defaults for installation except make sure to check Add Anaconda to my PATH environment variable.
  1. Open https://www.anaconda.com/distribution/#download-section with your web browser.
  2. Download the Anaconda Installer with Python 3 for Linux.
    (The installation requires using the shell. If you aren't comfortable doing the installation yourself stop here and request help at the workshop.)
  3. Open a terminal window and navigate to the directory where the executable is downloaded (e.g., `cd ~/Downloads`).
  4. Type
    bash Anaconda3-
    and then press Tab to autocomplete the full file name. The name of file you just downloaded should appear.
  5. Press Enter. You will follow the text-only prompts. To move through the text, press Spacebar. Type yes and press enter to approve the license. Press Enter to approve the default location for the files. Type yes and press Enter to prepend Anaconda to your PATH (this makes the Anaconda distribution the default Python).
  6. Close the terminal window.