Code Monkey home page Code Monkey logo

imbizo_2019_python_tutorial's Introduction

Welcome to the IBRO-Simons Computational Neuroscience Imbizo 2019!

The imbizo will involve a lot of Python coding, so please go through this tutorial before the course begins so we can hit the ground running when we get here.

This tutorial assumes some familiarity with programming but not necessarily with Python. If you are brand new to programming, follow the installation steps listed below, then check out Sections 3-5 of the official Python tutorial before starting this one.

What you need

To run this tutorial you'll need a Python 3 installation, along with the following scientific packages: numpy, scipy, pandas, matplotlib, and jupyter.

Installing Python and Jupyter

The easiest way to get going is to follow the Jupyter Notebook Quickstart Guide. This will have you install Anaconda (a scientific Python distribution with all the packages we'll use) and show you how to run your first Jupyter notebook.

If you have a slow connection or are short on hard drive space, you can alternatively install MiniConda for Python 3.7, and install the required packages individually using conda, as described in the link.

If you have any difficulties with your installation

Search around for your problem on Google/Stackoverflow, as many others will probably have encountered and solved the same situation. If you still can't find the answers you need, you can email one of the TAs. Installing Anaconda and Jupyter, however, should be fairly straightforward.

What's in the tutorial

The tutorial is broken into three main instructional notebooks.

1_basic_python goes over the basics of using Python as a programming language.

2_scientific_python introduces common scientific operations and how to do them in Python. By the end of this notebook you should have the bare minimum you need to do a complete course project in Python.

3_tips_tricks_gotchas goes over several important gotchas (things to be aware of that may catch you off guard) and some helpful tips and tricks to speed up your Python and make it more fun.

There is also an exercises notebook to help you test your skills and knowledge.

Note that true Pythonistas may notice that not everything in this notebook is done in the most "Pythonic" way, but rather in a way to emphasize clarity and conceptual simplicty. But there are often many other and better ways of doing what's shown in these notebooks!

Running this tutorial

Click the green "Clone or Download" link in the upper right and save this tutorial to your computer.

Next, set the Jupyter startup folder to be the folder you downloaded the tutorial into, as per section 3.1.1/3.1.2 in the Jupyter Notebook Quickstart Guide. (Alternatively, if launching Jupyter from the command line, just make sure to cd into the tutorial directory before running jupyter notebook.)

Open the Jupyter notebook 0_start_here, put your cursor in the first cell and hit CTRL + ENTER. If it prints out a welcome message you've done everything right and are good to go.

Close and shutdown 0_start_here and open 1_basic_python to begin!

How to get the most from this tutorial

  1. Read over the whole tutorial in detail (notebooks 0-3), running the code cells as you encounter them and ensuring you understand exactly what's going on in each. Don't worry about memorizing syntax. The idea is to show you what Python can do in a scientific context and to give you a reference you can come back to.
  2. With the tutorial open as a reference, work through the exercises. Don't look at the solutions until you finish the exercise or if you really get stuck.
  3. If you feel confident in your ability to do the exercises, you're ready for the big time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.