Skip to content

Quick guide and tutorial to scientific data python programming

Notifications You must be signed in to change notification settings

faturita/python-scientific

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

node-express-starter node-express-starter

πŸ“Ÿ Python Scientific

Nowadays, python is ruling the world. This very humble language that was once the realm of enlighted developers that loved to create the most beautiful scripting language is now becoming the programming language of the world, and particularly of the data deluge.

This repository allows you to install all the necesary stuff to start working with python on scientific applications, and particularly, to work with sensor data and neuroscience time-series. It allows you to install everything you need and start coding with NumPy, SciPy, OpenAI and MNE.

If you don't know anything at all about python, and you want to know something that will help you to do what you need, this is one place to be.

Contents

  • πŸ”ͺ Python Introduction
  • πŸ“₯ Workspace Setup
  • πŸ“ˆ Signal Processing Overview
  • πŸ”Ž Signal Analysis and Feature Extraction
  • πŸ›  Python ML/DL Tools and Techniques
  • 🧠 Neurodata Processing

Procedure

Download and install it from https://code.visualstudio.com/download

  • Clone this repository

From the Git Bash console, run

git clone https://github.com/faturita/python-scientific.git
  • Run an Anaconda Prompt
  • Move with "cd" to the directory that you just downloaded ("cd python-scientific")
  • Create the environment with:
conda env update --name mne3 --file config/environmentw.yml

(or this one if any error occurs

conda env update --prefix ./env --file config/environmentw.yml 

)

  • Activate the newly created environment
conda activate mne3

NOTE: if you receive an error about 'umap package missing' or similar, just ''edit'' your local file environmentw.yaml and erase the umap line from the file. You can later install this package directly from an Anaconda prompt by doing:

conda config --add channels conda-forge
conda config --set channel_priority strict
  • Install umap (or any package that you want)
conda install -n mne3 umap

Γ³

conda install -n mne3 umap-learn

Conda Cheat sheet: https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf

Installation with PIP

Up to date, the scripts are compatible with python 3.11.4. So you need to download this python version and install it somewhere (PYTHON@3.11.4@PATH).

Then, you need to create a virtual envirnonment

python -m venv --python PYTHON@3.11.4@PATH ps

This will create the directory ''ps'' on current directory. And then, activate the directory

source ps/bin/activate

(or run **ps\bin\Activate on windows)

Finally you can install all the minimal requirements for this python version:

pip install -r config/requirements.txt
πŸ—„ What's on each file

How to update your own repository with new changes from the server repository ?

Run gitbash (windows) or start a new Console on Mac or Linux.

First you need to upload your own changes to your OWN repository.

git commit -m"Just write down whatever comes to your mind here" .

After that you need to PULL fresh changes from the server repository at github.

git pull origin master

If you have happened to modify a file, the previous command will trigger an automatic merge. If the merge is successful it will open a VI console (just press ':' and 'x') to add a merging comment. If there is any conflict, check the modified files looking for any sign of conflict (you will clearly notice it). After you fix the merging, mark it as resolved with 'git add filename' and finish the operation with 'git commit -m"Merge fixed"'

How to update your own repository (if it is forked) with new changes from the original repository

First, in the upper right corner of the repository page, click on the "Fork" button. This will create a copy of the repository in your own github account. Then, go to your github profile, find the forked repository, and clone it to your local machine:

git clone https://github.com/your-username/python-scientific.git

Optional: Add your files and changes to your own repository:

git add .
git commit -m "Just write down whatever comes to your mind here"
git push origin master

Add a reference to the original repository, so you can sync changes in the future. This is known as adding an upstream remote:

git remote add upstream https://github.com/faturita/python-scientific.git

Fetch the latest changes from the original repository and merge them into your local master branch:

git fetch upstream
git merge upstream/master

Finally, after merging the changes, you can update your forked repository on github to reflect the local changes:

git push origin master

Python Roadmap

Probably, there are TONS of online resource to learn python. Those listed here are focused on '''Crash Courses''' that are handy for dealing with scientific data, time series, and some data science applications.

Something else about Git

Documentation

Awesome Lists

Some cheatsheets

Excellent Online Courses

Datasets

More info

References and sources