2-Day Python Workshop 11/14-15/2018 Gables Campus
Our trained instructors will lead you through a comprehensive, hands-on overview of an introductory data analysis using Python. We will cover topics like data types, functions, conditional statements, loops, errors and exceptions, debugging, and some key Python libraries and writing Python programs that will work like Linux command-line tools. This workshop is designed to provide a foundation of basic concepts that all programming depends on, using Python as an example.
Register Now | NOTE: Bring your own laptop (any OS).
Instructors: Nick O’Neill, PhD student in Neuroscience | Tim Norris, PhD, Research Data Scientist
WHEN
Wednesday and Thursday, 11/14-15/2018
9:00 AM – 5:00 PM
WHERE
Richter Library, Learning Commons Flexible Program Space (1st Floor), Gables Campus
Getting Started – Set up
To participate in a Software Carpentry workshop, you will need access to the software described below (Bash Shell, Git, and Python). 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.
The Bash Shell
Bash is a commonly-used shell that gives you the power to do simple tasks more quickly.
Windows
- Download the Git for Windows installer.
- Run the installer and follow the steps bellow:
- Click on “Next”.
- Click on “Next”.
- Keep “Use Git from the Windows Command Prompt” selected and click on “Next”. If you forgot to do this programs that you need for the workshop will not work properly. If this happens rerun the installer and select the appropriate option.
- Click on “Next”.
- Keep “Checkout Windows-style, commit Unix-style line endings” selected and click on “Next”.
- Keep “Use Windows’ default console window” selected and click on “Next”.
- Click on “Install”.
- Click on “Finish”.
- If your “HOME” environment variable is not set (or you don’t know what this is):
- Open command prompt (Open Start Menu then type
cmd
and press [Enter]) - Type the following line into the command prompt window exactly as shown:
setx HOME "%USERPROFILE%"
- Press [Enter], you should see
SUCCESS: Specified value was saved.
- Quit command prompt by typing
exit
then pressing [Enter]
- Open command prompt (Open Start Menu then type
This will provide you with both Git and Bash in the Git Bash program.
macOS
The default shell in all versions of macOS is Bash, so no need to install anything. You access Bash from the Terminal (found in/Applications/Utilities
). See the Git installation video tutorial for an example on how to open the Terminal. You may want to keep Terminal in your dock for this workshop.
Linux
The default shell is usually Bash, but if your machine is set up differently you can run it by opening a terminal and typing bash. There is no need to install anything.
Git
Git is a version control system that lets you track who made changes to what when and has options for easily updating a shared or public version of your code on github.com. You will need a supported web browser (current versions of Chrome, Firefox or Safari, or Internet Explorer version 9 or above).
You will need an account at github.com for parts of the Git lesson. Basic GitHub accounts are free. We encourage you to create a GitHub account if you don’t have one already. Please consider what personal information you’d like to reveal. For example, you may want to review these instructions for keeping your email address private provided at GitHub.
Windows Git should be installed on your computer as part of your Bash install (described above).
macOS There are several ways to install Git on a Mac. The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal (in the finder applications/utilities/terminal) the very first time.
$ git --version
If you don’t have git installed already, it will prompt you to install it.
If you want a more up to date version, you can also install it via a binary installer. A macOS Git installer is maintained and available for download at the Git website, at http://git-scm.com/download/mac.
Linux If Git is not already available on your machine you can try to install it via your distro’s package manager. For Debian/Ubuntu run sudo apt-get install git
and for Fedora run sudo dnf install git
.
Python
Python is a popular language for research computing, and great for general-purpose programming as well. Installing all of its research packages individually can be a bit difficult, so we recommend Anaconda, an all-in-one installer.
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 Jupyter notebook, a programming environment that runs in a web browser. For this to work you will need a reasonably up-to-date browser. The current versions of the Chrome, Safari and Firefox browsers are all supported (some older browsers, including Internet Explorer version 9 and below, are not).
Windows
-
- Open https://www.anaconda.com/download/#windowswith your web browser.
- Download the Python 3 installer for Windows.
- Install Python 3 using all of the defaults for installation except make sure to check Make Anaconda the default Python.
macOS
-
- Open https://www.anaconda.com/download/#macos with your web browser.
- Download the Python 3 installer for OS X.
- Install Python 3 using all of the defaults for installation.
Linux
-
- Open https://www.anaconda.com/download/#linuxwith your web browser.
- Download the Python 3 installer 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.) - Open a terminal window.
- Type
bash Anaconda3-
and then press tab. The name of the file you just downloaded should appear. If it does not, navigate to the folder where you downloaded the file, for example with:
cd Downloads
Then, try again.
- Press enter. You will follow the text-only prompts. To move through the text, press the space key. Type
yes
and press enter to approve the license. Press enter to approve the default location for the files. Typeyes
and press enter to prepend Anaconda to yourPATH
(this makes the Anaconda distribution the default Python). - Close the terminal window.
SPONSORS