If you are new to python, this is a good tutorial.
To keep good coding standards we try to stick to the PEP8 (the 8th Python Enhancements Proposals which is the most extensively used). If you haven't read it already, give it a try.
Also, it might be a good idea to have a look at this link: Code Like a Pythonista: Idiomatic Python. It is a bit old, but definitely a good reference for coding style, tips and good practices.
Other good resources are listed in The Hitchhiker's Guid to Python (you can scroll down to where additoinal learning resources are listed).
A nice list of Python based resources to "do stuff" is maintend on GitHub under "Awesome Python".
Matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in python scripts, the python and ipython shell (ala MATLAB®* or Mathematica®†), web application servers, and six graphical user interface toolkits.
Reference manual link
Machine Learning in Python. Simple and efficient tools for data mining and data analysis.
http://scikit-learn.org/stable/index.html.
IDEs
Python code and programs can be entirely written using just you favorite test editor (VIM, Emacs, Nano, Notepad, etc.). However, you might also use an Integrated Development Environment (IDE) which facilitates the development and help you in several different ways (code styling, refactoring, exploratory analysis..). The main IDEs used in the lab are:
IPython Notebook
IPython Notebook is a nice web-based server-client tool for reporting and exploratory analysis (although using a very different approach, it could be compared with Canopy). I've successfully set up a locally accesible IPython Notebook server on my machine (cronopio, Mac OSX) and in a public instance in a linux machine (naxos2, CentOS 7). Setting up the server to work in local is pretty straight forward. First you need to install ipython and the notebook extension using PIP:
pip install "ipython[notebook]".
Then, you can start the server with:
ipython notebook
and access notebooks with your favorite browser via http://localhost:8888.
Currently, only naxos2 is configured. To start your own instance of the service:
> ipython profile create nbserver. This will create a profile folder under your $HOME/
> cp /data/ipython-nb/ $HOME/.ipython/profile-nbserver/ipython_notebook_config.py
> ipython notebook --profile=nbserver
Access via https://naxos2:9999, biociphers as psswd.
Configuring CentOS7 for Public Notebooks
Setting up a public instance it's a little bit more involved. Here is a good reference to follow and some notes from my experience with naxos2 (CentOS 7) :
Virtual Environments
If you want to install a specific version of a Python package on any of our machines, you will need to do so in a Python virtual environment.
Setup
python -m venv ./my_environment
. ./my_environment/bin/activate
# Now your python and pip commands will call the executables in ./my_environment/bin/.
pip install -U pip setuptools # Make sure you have the latest versions of pip and setuptools.
pip install {package} {package} ...
Migrating a virtual environment from one machine to another
# On the origin machine
pip freeze > requirements.txt
# Copy this file to the new machine
# On the new machine, run
pip install -U -r requirements.txt