Python is probably the most versatile language in existence. However one of its most useful features is its ability to tie things together and automate the execution of other programs.
This tutorial focuses on using Python in high-performance computing environments. We’ll start with the basics and cover everything you need to get started. Some elements of writing performance-oriented code will be covered, but it is not the main focus. There is no prerequisite knowledge for this tutorial, although having some prior experience with the command-line or a compute cluster will be very helpful.
At the end of this lesson, you will know how to:
-
Work with Python in three different contexts: Interactive computing, Scripting and writing programs.
-
Learn the basics of the language, from simple variables to collections. from methods to classes, modules and packages.
-
Learn the five most used Scientific Python packages: Numpy, Scipy, Matplolib Pandas and Cython.
Python is a general-purpose high-level programming language. For scientific computing Python offers important advantages over other programming languages. This lesson will offer the basic instruction to start creating scripts and programs in Python in particular programs that involve numerical calculations and generation of plots.
Prerequisites
This lesson assumes that you know how to access a computer cluster. You should be confortable with at least one text editor like emacs, vi and the Linux Command Line environment.
Setup
If you want to use your own computer it is fine. You will want to have Python 3 and your favorite Python editor preinstalled and ready to go. If you don’t know where to get things or what to install, just install one of the options in the Setup episode below.
The files used in this lesson can be downloaded from the 2019 Data Repository:
$ git clone https://github.com/WVUHPC/2019-Data-HandsOn