Scientific Programming: A Crash Course

Overview

Scientific Programming: A Crash Course

Welcome to the Scientific Programming course. My name is Jon Carr and I am a postdoc in Davide Crepaldi's lab. I will be your guide to programming over the next four weeks — I look forward to meeting you all soon! This document outlines how I plan to run the course and what you need to do in preparation.

Organizational Details

The course will be in-presence in Room 139 on Tuesdays and Thursdays over the next four weeks. However, I will also open a Zoom session for people who are not able to attend in person. Nevertheless, I would encourage you all to attend the class in person because you will be able to learn a lot by talking to the people around you and it will be easier for me to help you with individual problems.

Although I will do a little bit of lecturing, the class will mostly be very interactive with lots of practical exercises and independent working. It is therefore important that everyone has access to a laptop computer. I also think it's important for you to use your own daily computer (rather than a random computer in a lab) because then you can get things set up in a way that works well for you and you can use a computer that is familiar.

Although this course is intended for beginners, I'm sure that you all have a diverse range of backgrounds and experiences. For some people, the pace might be too fast; for others, the pace might be too slow. I will try by best to adapt the course depending on your collective needs and interests. If you find the pace too fast, please try to do lots more practice at home; coding is a skill that takes a lot of time to develop. If you find the pace too slow, please use the time in class to dig more deeply into a particular topic.

Syllabus

My aim with this course is to be relatively broad rather than deep. I would like to cover a variety of different programming languages, paradigms, and applications, as well as more theoretical issues relating to programming practices in science. I hope to give you a broad picture of the options available to you, so that you can feel confident exploring particular areas more deeply by yourself. That being said, I also want to make sure that you have a solid grounding in the core concepts of programming before you progress to more advanced topics.

We will start with Python, which is great general-purpose programming language. The language is pretty friendly, which makes it relatively easy to learn the basic concepts. However, in a few weeks, I also want to introduce the R language, which is very important in statistics, and also some web programming. Please also feel free to tell me stuff that you would like to learn about – I certainly don't know everything, but I'll try to adapt the material accordingly.

At the moment, this is the schedule I have in mind:

  1. Tue Feb 15, 10:00–12:00 – Core concepts

  2. Thu Feb 17, 10:00–12:00 – Abstraction

  3. Tue Feb 22, 10:00–12:00 – Handling data

  4. Thu Feb 24, 10:00–12:00 – Visualization

  5. Tue Mar 01, 13:00–15:00 – Experiments

  6. Thu Mar 03, 13:00–15:00 – R

  7. Tue Mar 08, 13:00–15:00 – Web development

  8. Thu Mar 10, 13:00–14:00 – Open-science and best practices

Software Installation

Before attending the first class, please try to get your computer set up with a working Python installation and the Jupyter Notebook package. Sometimes it can be tricky to get things set up correctly, but I will be available to help you during the first class in case of any problems.

The easiest way to install everything is to use Anaconda: https://www.anaconda.com/products/individual This is a special distribution of Python that includes many scientific packages, including Jupyter Notebook. Once you've installed Anaconda you should be able to run the following command in the terminal or command prompt:

jupyter notebook

This should open a browser window with the Jupyter Notebook interface. Note that, although this looks like a website, it is actually a website running locally on your computer. If you're still finding it difficult to open Jupyter Notebook, check this link, which shows a few different options: https://pythonforundergradengineers.com/opening-a-jupyter-notebook-on-windows.html

Alternative installation options

The Anaconda distribution is quite large, so if you prefer to be more minimalist, an alternative option is to install the official "vanilla" version of Python: https://www.python.org Once this is installed, you will then need to install the Jupyter Notebook package by running this command:

pip install notebook

Once it has finished installing, you should be able to launch Jupyter as above:

jupyter notebook

If you use Linux or Mac, Python is installed by default as part of the operating system, so it's also possible to use that directly. Alternatively, you may already have a Python installation from previous projects you've worked on. If you go down this route, I would suggest you first create a new virtual environment, so that the packages you install do not conflict with other stuff you might be doing:

mkdir sciprog22
cd sciprog22
python3 -m venv venv
source venv/bin/activate
pip install notebook
jupyter notebook

If this looks a bit scary, don't worry, I can help in class.

Last resort: Web version

Finally, if you encounter major issues getting stuff installed, you can also use the web version of Jupyter Notebook from here: https://jupyter.org/try This is not a good long-term solution, but you will at least be able to follow along with the course.

Owner
Jon Carr
Jon Carr
This repository provides a set of easy to understand and tested Python samples for using Acronis Cyber Platform API.

Base Acronis Cyber Platform API operations with Python !!! info Copyright © 2019-2021 Acronis International GmbH. This is distributed under MIT licens

Acronis International GmbH 3 Aug 11, 2022
A password genarator/manager for passwords uesing a pseudorandom number genarator

pseudorandom-password-genarator a password genarator/manager for passwords uesing a pseudorandom number genarator when you give the program a word eg

1 Nov 18, 2021
Minutaria is a basic educational Python timer used to learn python and software testing libraries.

minutaria minutaria is a basic educational Python timer. The project is educational, it aims to teach myself programming, python programming, python's

1 Jul 16, 2021
A web-based analysis toolkit for the System Usability Scale providing calculation, plotting, interpretation and contextualization utility

System Usability Scale Analysis Toolkit The System Usability Scale (SUS) Analysis Toolkit is a web-based python application that provides a compilatio

Jonas Blattgerste 3 Oct 27, 2022
An extended, game oriented, turtle

Burtle A Better TURTLE. Makes making games easier. write less do more!! Documentation & guide: https://alannxq.github.io/burtle/ Installation pip inst

5 May 19, 2022
It is convenient to quickly import Python packages from the network.

It is convenient to quickly import Python packages from the network.

zmaplex 1 Jan 18, 2022
Heads Down Application for Mac OSX

Heads Down A Mac app that lives in your ribbon—with a click of the mouse, temporarily block distracting websites and applications to encourage "heads

20 Mar 10, 2021
A simple project which is a ecm to found a good way to provide a path to img_dir in gooey

ECM to find a good way for img_dir Path in Gooey This code is just an ECM to find a good way to indicate a path of image in image_dir variable. We loo

Jean-Emmanuel Longueville 1 Oct 25, 2021
1cak - An Indonesian web that provide lot of fun.

An unofficial API of 1cak.com 1cak - An Indonesian web that provide lot of fun. Endpoint Lol - 10 Recent stored posts on database Example: https://on

Dicky Mulia Fiqri 5 Sep 27, 2022
Awesome open-source alternatives to SaaS

Awesome-oss-alternatives - Awesome list of open-source startup alternatives to well-known SaaS products

Runa Capital 12.7k Jan 03, 2023
More granular intermediaries for legacy Minecraft versions

Orinthe/Intermediary mappings This repository contains the match information between different versions of Minecraft created by the Orinthe project, a

4 Jan 11, 2022
A conda-smithy repository for boost-histogram.

The official Boost.Histogram Python bindings. Provides fast, efficient histogramming with a variety of different storages combined with dozens of composable axes. Part of the Scikit-HEP family.

conda-forge 0 Dec 17, 2021
Un Assistente Vocale scritto in Python e altamente personalizzabile

Un Assistente Vocale scritto in Python e altamente personalizzabile

Marco 2 May 06, 2022
Osu statistics right on your desktop, made with pyqt

Osu!Stat Osu statistics right on your desktop, made with Qt5 Credits Would like to thank these creators for their projects and contributions. ppy, osu

Aditya Gupta 21 Jul 13, 2022
BMI-Calculator: Program to Calculate Body Mass Index (BMI)

The Body Mass Index (BMI) or Quetelet index is a value derived from the mass (weight) and height of an individual, male or female.

PyLaboratory 0 Feb 07, 2022
Object-data mapper and advanced query manager for non relational databases

Object data mapper and advanced query manager for non relational databases. The data is owned by different, configurable back-end databases and it is

Luca Sbardella 121 Aug 11, 2022
A small site to list shared directories

Nebula Server Directories This site can be used to list folder and subdirectories in your server : Python It's required to have Python 3.8 or more ins

Adrien J. 1 Dec 28, 2021
A sage package for working with circular genomes represented by signed or unsigned permutations

Circular genome tools (cgt) A sage package for working with circular genomes represented by signed or unsigned permutations. It includes tools for con

Joshua Stevenson 1 Mar 10, 2022
Purge all transformation orientations addon for Blender 2.8 and newer versions

CTO Purge This add-on adds a new button to Blender's Transformation Orientation panel which empowers the user to purge all of his/her custom transform

MMMrqs 10 Dec 29, 2022
🎅🏻 Helping santa understand ✨ python ✨

☃️ Advent of code 2021 ☃️ Helping santa understand ✨ python ✨

Fluffy 2 Dec 25, 2021