Python Tutorial: Difference between revisions

From Master of Neuroscience Wiki
Line 188: Line 188:
* [[Get CUDA ready!]]
* [[Get CUDA ready!]]
* [[Converting the original MNIST files into numpy]]
* [[Converting the original MNIST files into numpy]]
* [[Interfacing Data]]
* [[Data augmentation]]
* [[Layers]]
* [[Creating networks]]
* [[Train the network]]
* [[Fisher Exact Test: Test if your performance difference is significant]]
* [[Write your own layer]]
** [[Replace the automatic autograd with your own torch.autograd.Function]]
*[[How to take advantage of an optimizer for your non-Pytorch project]]
*[[How to take advantage of a learning rate scheduler for your non-Pytorch project]]
*[[Unfold: How to manually calculate the indices for a sliding 2d window]]
=== PyBind11 ===
* [[Expanding Python with C++ modules]]
* [[The fast and furious way (CPU and GPU CUDA)]]
* [[PyBind11 Stub-Generation]]
=== Tensorflow / Keras ===
* [[A fast non-introduction]]
=== Sympy ===
* [[Symbolic Computation]]
=== Numerical Integration, Differentiation, and Differential Equations ===
* [[Integration and Differentiation]]
* [[Differential Equations]]
=== Arduino ===
* [[Basics with Python / Matlab]]

Revision as of 09:44, 21 October 2025

How to Python in computational neuroscience, data mining, and more

All the tutorials are tested with Python 3.11.x. Older version might have a problem with the new versions of type anotations.

Flow chart

Workflow

Important VS Code notes:

  • You can mark segments of source node with your mouse (or keyboard) and use the TAB key to increase the level of the indentation or use SHIFT + TAB do decrease the indentation level.
  • Linux: CTRL + SHIFT + 7 toggles between comment and normal source code.
  • The function key F2 allows you to change variable and function names. VS Code goes through all the node in your Project directory and changes all occurrences of the function or variable name accordingly. The same is true if you change a file name in a project directory.

Python: The Basics of the basics

Python: Special topics

Numpy: The Basics of the basics

Numpy: Special topics

Numpy: Matlab topics

In the case you know Matlab check here: NumPy for MATLAB users

Matplotlib.pyplot

Pandas

Machine learning: Sci-kit Learn

Machine learning: Pure numpy

SciPy

Python: Questions of spectral nature

Python: Daily little helper

OpenCV2 and Python

PyTorch

PyBind11

Tensorflow / Keras

Sympy

Numerical Integration, Differentiation, and Differential Equations

Arduino