Software Carpentry at UCL: Bash, Git, and Python Workshop 30 Sep - 1 Oct 2026

:tada: Welcome!

:calendar: 30 Sep - 1 Oct

Exercises

Lesson Material


DAY 1:

Staff

Instructors: Haroon Chughtai, David Pérez-Suárez (Ruaridh Gollifer, Stephen Thompson)
Helpers: Henry Crosswell, Mary Tziraki

Sign In

DAY 2:

Staff

Instructors: Paul Smith, Kimberly Meechan (Will Graham, Tuomas Koskela)
Helpers: Henry Crosswell, Mary Tziraki

Sign In

Please also include whether you are using Windows/Mac/Linux

Anonymous Questions

If you have a questions during the session and don’t want to ask it publicly, you can write them here!

Feedback and Surveys

Pre-workshop survey

Post-workshop survey

Notes

Shell

Git

Teams

User A / User B

.
.

Python

If conda failing use jupyter lite

# Bash > Python
# Use glob to discover all our data files
filenames = glob("data/inflammation-*.csv")
filenames = sorted(filenames)
print(filenames)

for file in filenames:
    print("Currently at file:", file)
    
    # Load this dataset
    data = np.loadtxt(file, delimiter=",")
    
    # Do our analysis (create our plots)
    avg_inflam = np.mean(data, axis=0)
    min_inflam = np.min(data, axis=0)
    max_inflam = np.max(data, axis=0)
    
    # Create our plot for this dataset and save it!
    fig = plt.figure(figsize=(10, 3))
    avg_axes = fig.add_subplot(1, 3, 1)
    max_axes = fig.add_subplot(1, 3, 2)
    min_axes = fig.add_subplot(1, 3, 3)
    
    # Actually plot things on our figure
    avg_axes.plot(avg_inflam)
    avg_axes.set_ylabel("Average")
    
    max_axes.plot(max_inflam)
    max_axes.set_ylabel("Max")
    
    min_axes.plot(min_inflam)
    min_axes.set_ylabel("Min")
    
    # Tidy things up, save, and display
    max_axes.set_title(file)
    fig.tight_layout()
    
    # Generate a save file location from the current file name, by substituting
    # the .csv extension for .png
    png_file_name = file.split(".")[0] + ".png"
    png_file_name = "outputs/" + png_file_name.split("/")[1]
    fig.savefig(png_file_name)
    
    fig.show()
tags: workshop