-
Notifications
You must be signed in to change notification settings - Fork 17
Euroscipy 2017 tutorial requirements
Tutorials are hands-on sessions, therefore you should bring your own laptop.
You can either install a selection of packages necessary for the tutorials (using pip
or conda
, or your OS package manager), or install a distribution which ships a large number of Python packages (which is recommended if you're using Windows), such as Anaconda or Canopy.
Required packages for all tutorials
- Python
- NumPy
- SciPy
- Matplotlib
- Jupyter notebook
The Python tutorial will present the basic of the programming language itself. Therefore, no extra package apart of the Jupyter notebook will be required. However, we might have a preference for Python 3.6 over Python 2.7. The tutorial will be based on the SciPy lecture notes.
The corresponding notebooks are available here
NumPy forms the basis of the scientific ecosystem of Python by providing a new data type, the ndarray
. This type allows to represent multi-dimensional homogeneous data as they appear in many scientific applications in the form of vectors and matrices or, for example, images. The use of NumPy arrays allows to significantly speed up numerical calculations in Python and, in addition, permits to write more succinct and readable code.
In this tutorial, we will discuss the basic concepts of ndarray
s and, in particular, how they can be indexed to efficiently work with multi-dimensional data. We will learn how to manipulate ndarray
s with NumPy and explore how typical numerical tasks can be solved either with NumPy or other packages from the Python scientific ecosystem like SciPy (which will be covered in more detail in a subsequent tutorial).
A basic knowledge of Python, at least on the level of the introductory tutorial on Python, is expected. Some familiarity with the slicing syntax of Python lists will be useful.
For the NumPy tutorial, it will be sufficient to have installed the packages mentioned on the top of this page.
Teaching material is available from Github. Make sure that you download the Jupyter notebook containing the exercises.
Everybody developing code can profit from a version control system, no matter whether it is code written in Python or any other programming language or even a paper written, e.g., in LaTeX. A very popular version control system, particularly in the development of open source software, is Git which this tutorial will be devoted to. We will explore the basic workflow of code development with Git and also take a look at how code can be developed collaboratively with the help of Github.
While the example used to gain experience with the Git workflow will be based on Python code, a knowledge of Python is not strictly required for the purpose of this tutorial.
Apart from Python, which is only needed if you want to run the script used in the example, you will need the Git software to follow the Git workflow on your computer. See git-scm.com/downloads for binaries for Mac OS X and Windows as well as installation instructions for Linux and Solaris. There is no need to install a Git GUI as all examples will be demonstrated on the command line.
If you want to follow along the Github workflow at the end of the tutorial, you might want to sign up for Github at github.com. This will require you to choose a user name and a password and to provide your email address. Even if you do not sign up for Github, you will still be able to do most of the examples on your computer.
The tutorial can be obtained from Github. You can get the LaTeX source and the images by downloading a zip file from Github or by cloning the repository once you have Git installed:
git clone https://github.com/gertingold/euroscipy-git-tutorial.git
A PDF file of the presentation is available from Github.
The basic packages listed on top of this page will be sufficient. We work along the SciPy lecture note but will develop or own notebooks.
The scipy tutorial will be based on the next version of the scipy lecture notes (still in progress), visible here.
You can find installation instructions here: https://github.com/jorisvandenbossche/pandas-tutorial#requirements-to-run-this-tutorial
Tutorial materials can be found on https://github.com/emmanuelle/scikit-image-euroscipy2017: you can download a zip on https://github.com/emmanuelle/scikit-image-euroscipy2017/archive/master.zip.
If you installed Anaconda or Canopy, you already have scikit-image installed. Otherwise, see http://scikit-image.org/docs/stable/install.html for installation instructions.
scikit-image version 0.12 or 0.13 is preferable.
Test code
>>> from skimage import io, data
>>> camera = data.camera()
>>> io.imshow(camera)
To follow the Cython tutorial, please have Cython 0.25 or later (pip-)installed, in addition to the general packages listed above. Python 3.5 or 3.6 is recommended.
Note that you will need a C compiler installed that is usable from Python. If you can install native Python libraries from PyPI source packages, you are ready to go. On Windows, consider using the Anaconda distribution and make sure you have the gcc package installed in it. On MacOS-X, you should have XCode installed to make the clang compiler available (or install gcc via brew, macports, etc.). On Linux, install the Python development package, named something like python3-dev
.
The Jupyter notebook(s) used in the tutorial will be made available at
http://kurs.behnel.de/espy2017/
To follow the SymPy tutorial, please go to https://github.com/leosartaj/euroscipy-sympy-tutorial This link contains all the notebooks and instructions to install the required software. Additionally run python test_installation.py
to check your installation. I will be updating the notebooks, so please pull the latest copy before the tutorial.
Please install the following packages (either with pip or conda):
- scikit-learn 0.19.0 (along with numpy and scipy as dependencies)
- pandas
- matplotlib
- jupyter
Check the scikit-learn version with:
python -c "import sklearn; print(sklearn.__version__)"
If you have an old version you can upgrade to scikit-learn 0.19.0 with conda update scikit-learn
if you use conda or pip install -U scikit-learn
otherwise.
We recommend using Python 3.6 but the tutorial material should also work with older Python versions (including Python 2.7, but please please consider using Python 3.6 instead).
In addition you can also install scikit-optimize (if you use a conda environment, you need to first conda install pip
and then pip install scikit-optimize
) in that environment. scikit-optimize has a dependency on scikit-garden which does not yet provide any binary package and can fail to install automatically from source on systems that lack a properly configured C/C++ compiler. If you have trouble installing scikit-garden and scikit-optimize, don't worry you will be able to follow those sections on the video projector while still being able to run the exercises of the other sections that only require scikit-learn.
The notebooks will be published on https://github.com/ogrisel/euroscipy_2017_sklearn (please update on Sunday evening or at the beginning of the tutorial assuming wifi is good enough).
To follow the tutorial please go through the README file https://github.com/MridulS/euroscipy-2017-networkx/blob/master/README.md
To check the installation run python checkenv.py
to make sure everything is alright. There are a couple of datasets so clone the repo to make sure there are no issues even if the wifi is flaky.
Final notebooks should be up by Sunday Evening so make sure to pull the new changes before the tutorial.
You can find the material to download and installation instructions here: https://github.com/jorisvandenbossche/pandas-tutorial#requirements-to-run-this-tutorial. We will do notebooks 05 to 07.
Keras tutorial requires you to have Python version 3.5 (3.4 should be fine, as well). Most likely Python 2.7 should also be fine, but who knows? :P
In addition to numpy
, scipy
, matplotlib
, and jupyter
, the following packages are required:
-
pandas
version 0.16 or later: http://pandas.pydata.org -
scikit-learn
version 0.15 or later: http://scikit-learn.org -
keras
version 2.0 or later: http://keras.io -
tensorflow
version 1.0 or later: https://www.tensorflow.org
(Optional but recommended):
-
hdf5
andh5py
(required if you use model saving/loading functions in keras) - NVIDIA cuDNN if you have NVIDIA GPUs on your machines. https://developer.nvidia.com/rdp/cudnn-download
To date tensorflow
comes in two different packages, namely tensorflow
and tensorflow-gpu
, whether you want to install
the framework with CPU-only or GPU support, respectively.
For this reason, tensorflow
has not been included in the conda envs and has to be installed separately.
pip install tensorflow
pip install tensorflow-gpu
Note: NVIDIA Drivers and CuDNN must be installed and configured before hand. Please refer to the official Tensorflow documentation for further details.
By default, Keras is configured with theano
as backend.
If you want to use tensorflow
instead, these are the simple steps to follow:
- Create the
keras.json
(if it does not exist):
touch $HOME/.keras/keras.json
- Copy the following content into the file:
{
"epsilon": 1e-07,
"backend": "tensorflow",
"floatx": "float32",
"image_data_format": "channels_last"
}