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
An kind of operating system portal to a variety of apps with pure python

pyos An kind of operating system portal to a variety of apps. Installation Run this on your terminal: git clone https://github.com/arjunj132/pyos.git

1 Jan 22, 2022
A simply dashboard to view commodities position data based on CFTC reports

commodities-dashboard A simply dashboard to view commodities position data based on CFTC reports This is a python project using Dash and plotly to con

71 Dec 19, 2022
Install packages with pip as if you were in the past!

A PyPI time machine Do you wish you could just install packages with pip as if you were at some fixed date in the past? If so, the PyPI time machine i

Thomas Robitaille 51 Jan 09, 2023
Python library for Minitel communication through serial port

Python library for Minitel communication through serial port

Noël 3 Aug 14, 2022
🎅🏻 Helping santa understand ✨ python ✨

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

Fluffy 2 Dec 25, 2021
Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.

Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.

WayDroid 4.7k Jan 08, 2023
Synthetik Python Mod - A save editor tool for the game Synthetik written in python

Synthetik_Python_Mod A save editor tool for the game Synthetik written in python

2 Sep 10, 2022
p5 is a Python package based on the core ideas of Processing.

p5 p5 is a Python library that provides high level drawing functionality to help you quickly create simulations and interactive art using Python. It c

p5py 645 Jan 04, 2023
WriteAIr is a website which allows users to stream their writing.

WriteAIr is a website which allows users to stream their writing. It uses HSV masking to detect a pen which the user writes with. Plus, users can select a wide range of options through hand gestures!

Atharva Patil 1 Nov 01, 2021
reproduces experiments from

Installation To enable importing of modules, from the parent directory execute: pip install -e . To install requirements: python -m pip install requir

Meta Research 15 Aug 11, 2022
Multi-Probe Attention for Semantic Indexing

Multi-Probe Attention for Semantic Indexing About This project is developed for the topic of COVID-19 semantic indexing. Directories & files A. The di

Jinghang Gu 1 Dec 18, 2022
Simple card retirement plugin for Anki

Anki Retirement Addon Allow users to suspend, tag, delete, or move cards that reach a specific retirement interval Supports Anki version 2.1.45 Licens

3 Dec 23, 2022
An example using debezium and mysql with docker-compose

debezium-mysql An example using debezium and mysql with docker-compose The docker compose starts the Zookeeper, Kafka, Mysql and Debezium Connect. Aft

Horácio Dias Baptista Neto 4 May 21, 2022
LinuxHelper - A collection of utilities for non-technical Linux users accessible via a GUI

Linux Helper A collection of utilities for non-technical Linux users accessible via a GUI This app is still in very early development, expect bugs and

Seth 7 Oct 03, 2022
Objetivo: de forma colaborativa pasar de nodos de Dynamo a Python.

ITTI_Ed01_De-nodos-a-python ITTI. EXPERT TRAINING EN AUTOMATIZACIÓN DE PROCESOS BIM: OFFICIAL DE AUTODESK. Edición 1 Enlace al Master Enunciado: Traba

1 Jun 06, 2022
Procedural 3D data generation pipeline for architecture

Synthetic Dataset Generator Authors: Stanislava Fedorova Alberto Tono Meher Shashwat Nigam Jiayao Zhang Amirhossein Ahmadnia Cecilia bolognesi Dominik

Computational Design Institute 49 Nov 25, 2022
The Python Achievements Framework!

Pychievements: The Python Achievements Framework! Pychievements is a framework for creating and tracking achievements within a Python application. It

Brian 114 Jul 21, 2022
This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

Andre 1 Oct 24, 2022
A replacement of qsreplace, accepts URLs as standard input, replaces all query string values with user-supplied values and stdout.

Bhedak A replacement of qsreplace, accepts URLs as standard input, replaces all query string values with user-supplied values and stdout. Works on eve

Eshan Singh 84 Dec 31, 2022
奇遇淘客服务器端

奇遇淘客 APP 服务器端 警告 正在使用 v0.2.0 版本的用户,请尽快升级到 v0.2.1。 v0.2.0 版本的 Docker 镜像中包含了有问题的 aiohttp。 奇遇淘客代码库 奇遇淘客 iOS APP 奇遇淘客 Android APP 奇遇淘客文档 服务器端文档 Docker 使用

奇遇科技 92 Nov 09, 2022