Skip to content

esdalmaijer/PyBrain_Python_Intro

Repository files navigation

PyBrain Python Introduction

Welcome all! This is the first part of the MRC Cognition and Brain Sciences Unit's PyBrain workshop, and will provide an introduction to Python. No prior experience is required or expected: we'll start from the very start, and work our way up from there.

What is PyBrain?

A workshop organised by Dr Johan Carlin at the MRC Cognition and Brain Sciences Unit (University of Cambridge). The workshop is a virtual event comprising Zoom sessions and interactive worksheets. If you signed up for the event, you'll have access to both. The workshop comprises several sessions on Python and neuroimaging in Python. See the full programme here: pybrain-workshop.github.io/

Can I use this if I'm not part of the PyBrain workshop?

Sure, go for it! The worksheets should be pretty self-explanatory, so you're very welcome to go through them independently.

Schedule

Mon 2 November

  • 9:30 - 10:30 Jupyter, variables, and functions
  • 10:30 - 11:00 Independent work and break
  • 11:00 - 12:00 Writing functions and classes
  • 12:00 - 13:00 Lunch
  • 13:00 - 14:00 NumPy and reading data
  • 14:00 - 14:30 Independent work and break
  • 14:30 - 15:30 Data handling and visualisation

3 November

  • 9:30 - 10:30 Implementing statistical tests
  • 10:30 - 11:00 Independent work and break
  • 11:00 - 12:00 Model fitting through minimisation
  • 12:00 - 13:00 Lunch
  • 13:00 - 14:00 Programming experiments
  • 14:00 - 14:30 Independent work and break
  • 14:30 - 15:30 Using Python at home and in the lab

Interactive worksheets

The worksheets for this workshop are Jupyter Notebooks. They can be rendered right here, on GitHub, but they won't be interactive in that way. However, you can also open them in MyBinder or Google Colab. These services will render notebooks from GitHub in an interactive environment, allowing you to run Python right in your browser!

MyBinder

Binder is a great open-source website created by some amazing science folks. It's important to realise that mybinder.org is supported by grants and donations. For that reason, it's good practice to not overload them.

As an aside, please avoid using Binder for any for-profit purposes. Financially benefiting from other people's unpaid labour is not cool. What are you, Elsevier?

Google Colaboratory

Google is getting in on the "running Python online" action, and has put their servers at the public's disposal (with some caveats to prevent naughty usage and/or excess traffic).

Follow these steps to use the Jupyter Notebooks:

  1. Log into your Google account.
  2. Open a notebook.
  3. There will come a time during which you will need to read files. Google Colab is a bit weird about that. The Notebooks will tell you how to deal with it, and you can pro-actively follow the rest of these steps.
  4. Open Google Drive.
  5. Create a folder PyBrain on your My Drive space.
  6. Download a handy zipped archive with all files required for the notebooks.
  7. Unzip the files to your local computer.
  8. Upload these files to the PyBrain folder on Google Drive.
  9. Done! You'll be informed about how to use these files in the relevant Notebooks.

About

Python introduction for the PyBrain workshop at the MRC Cognition and Brain Sciences Unit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages