├── Chapter-01 ├── README.md ├── jupyternotebook │ ├── Dockerfile │ ├── build-notebook.sh │ └── push-notebook.sh ├── matplotlib │ ├── Dockerfile │ ├── build-notebook.sh │ └── push-notebook.sh ├── numpy │ ├── Dockerfile │ ├── build-notebook.sh │ └── push-notebook.sh ├── pandas │ ├── Dockerfile │ ├── build-notebook.sh │ └── push-notebook.sh ├── scikit-audiolab │ ├── Dockerfile │ ├── build-notebook.sh │ └── push-notebook.sh ├── scikit-image │ ├── Dockerfile │ ├── build-notebook.sh │ └── push-notebook.sh ├── scikit-learn │ ├── Dockerfile │ ├── build-notebook.sh │ └── push-notebook.sh └── simplecv │ ├── Dockerfile │ ├── build-notebook.sh │ └── push-notebook.sh ├── Chapter-02 └── README.md ├── Chapter-03 └── README.md ├── LICENSE ├── README.md └── setup_workstation ├── macosx └── install_dependencies.sh ├── ubuntu ├── install_dependencies.sh └── install_docker_ce.sh └── windows └── install_dependencies.bat /Chapter-01/README.md: -------------------------------------------------------------------------------- 1 | # Python-Data-Mining-Cookbook - Chapter 01 2 | Python Data Mining Cookbook by Packt 3 | -------------------------------------------------------------------------------- /Chapter-01/jupyternotebook/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:2.7-alpine 2 | RUN apk add --no-cache g++ freetype-dev libpng-dev && \ 3 | ln -s /usr/include/locale.h /usr/include/xlocale.h && \ 4 | pip install \ 5 | cython==0.25.2 \ 6 | jupyter==1.0.0 \ 7 | matplotlib==1.5.1 \ 8 | numpy==1.12.0 && \ 9 | pip install pandas==<%= pandas %> 10 | EXPOSE 8888 11 | WORKDIR /notebooks 12 | VOLUME /notebooks 13 | HEALTHCHECK CMD ["curl", "-f", "http://localhost:8888/"] 14 | CMD jupyter notebook --ip 0.0.0.0 --no-browser 15 | -------------------------------------------------------------------------------- /Chapter-01/jupyternotebook/build-notebook.sh: -------------------------------------------------------------------------------- 1 | docker build . -t mohitsethi/jupyternotebook:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/jupyternotebook/push-notebook.sh: -------------------------------------------------------------------------------- 1 | docker push mohitsethi/jupyternotebook:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/matplotlib/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | # Update the repository sources list 4 | RUN apt-get update 5 | 6 | # Install pip, Python and matplotlib required libraries 7 | RUN apt-get update && apt-get install -y python python-dev python-pip \ 8 | libxft-dev libfreetype6 libfreetype6-dev 9 | 10 | # Install matplotlib 11 | RUN pip install 'matplotlib' 12 | -------------------------------------------------------------------------------- /Chapter-01/matplotlib/build-notebook.sh: -------------------------------------------------------------------------------- 1 | docker build . -t mohitsethi/python-matplotlib:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/matplotlib/push-notebook.sh: -------------------------------------------------------------------------------- 1 | docker push mohitsethi/python-matplotlib:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/numpy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN sudo apt-get update && \ 4 | sudo apt-get install -y \ 5 | python python-numpy python-setuptools python-nose python-pandas \ 6 | pep8 python-pip python-wheel \ 7 | python-sphinx 8 | -------------------------------------------------------------------------------- /Chapter-01/numpy/build-notebook.sh: -------------------------------------------------------------------------------- 1 | docker build . -t mohitsethi/python-numpy:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/numpy/push-notebook.sh: -------------------------------------------------------------------------------- 1 | docker push mohitsethi/python-numpy:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/pandas/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN sudo apt-get update && \ 4 | sudo apt-get install -y \ 5 | python3 python3-numpy python3-setuptools python3-nose python3-pandas \ 6 | python python-numpy python-setuptools python-nose python-pandas \ 7 | pep8 python-pip python-wheel \ 8 | python-sphinx 9 | -------------------------------------------------------------------------------- /Chapter-01/pandas/build-notebook.sh: -------------------------------------------------------------------------------- 1 | docker build . -t mohitsethi/python-pandas:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/pandas/push-notebook.sh: -------------------------------------------------------------------------------- 1 | docker push mohitsethi/python-pandas:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/scikit-audiolab/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN apt-get update; \ 4 | DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install --yes \ 5 | git wget build-essential python-dev ipython ipython-notebook python-pip \ 6 | python-numpy python-scipy python-matplotlib python-pandas python-sympy \ 7 | python-nose python-sklearn libsndfile-dev; \ 8 | pip install scikits.audiolab 9 | -------------------------------------------------------------------------------- /Chapter-01/scikit-audiolab/build-notebook.sh: -------------------------------------------------------------------------------- 1 | docker build . -t mohitsethi/python-scikit-audiolab:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/scikit-audiolab/push-notebook.sh: -------------------------------------------------------------------------------- 1 | docker push mohitsethi/python-scikit-audiolab:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/scikit-image/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y pkg-config libopenblas-dev liblapack-dev git-core build-essential gfortran python-dev curl libfreetype6-dev libjpeg-dev libhdf5-dev liblzo2-dev libbz2-dev && \ 5 | curl https://bootstrap.pypa.io/get-pip.py | python && \ 6 | pip install cython && \ 7 | pip install numpy && \ 8 | pip install six && \ 9 | pip install pillow && \ 10 | pip install scikit-image && \ 11 | pip install scipy && \ 12 | pip install scikit-learn && \ 13 | pip install matplotlib && \ 14 | pip install ipython[all] && \ 15 | pip install h5py && \ 16 | pip install pandas && \ 17 | pip install numexpr && \ 18 | pip install tables 19 | -------------------------------------------------------------------------------- /Chapter-01/scikit-image/build-notebook.sh: -------------------------------------------------------------------------------- 1 | docker build . -t mohitsethi/python-scikit-image:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/scikit-image/push-notebook.sh: -------------------------------------------------------------------------------- 1 | docker push mohitsethi/python-scikit-image:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/scikit-learn/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mohitsethi/jupyter 2 | 3 | RUN apt-get update && apt-get install -y \ 4 | build-essential \ 5 | gfortran \ 6 | libblas-dev \ 7 | liblapack-dev \ 8 | libxft-dev \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | # order matters 12 | RUN pip3 install --upgrade \ 13 | numpy \ 14 | scipy \ 15 | scikit-learn \ 16 | matplotlib \ 17 | pandas 18 | -------------------------------------------------------------------------------- /Chapter-01/scikit-learn/build-notebook.sh: -------------------------------------------------------------------------------- 1 | docker build . -t mohitsethi/python-scikit-learn:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/scikit-learn/push-notebook.sh: -------------------------------------------------------------------------------- 1 | docker push mohitsethi/python-scikit-learn:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/simplecv/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | # Install system dependencies 4 | RUN apt-get update 5 | RUN apt-get install -y apt-utils 6 | RUN apt-get install -y unzip 7 | RUN apt-get install -y wget 8 | RUN apt-get install -y clang 9 | RUN apt-get install -y cmake 10 | RUN apt-get install -y python2.7 11 | RUN apt-get install -y python2.7-dev 12 | RUN apt-get install -y python-setuptools 13 | RUN wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py -O - | python 14 | 15 | # SimpleCV Specific 16 | RUN apt-get install -y libopencv-* 17 | RUN apt-get install -y python-opencv 18 | RUN apt-get install -y python-numpy 19 | RUN apt-get install -y python-scipy 20 | RUN apt-get install -y python-pygame 21 | # RUN pip install PIL 22 | RUN pip install ipython 23 | RUN pip install pyzmq 24 | RUN pip install jinja2 25 | RUN pip install tornado 26 | 27 | # SimpleCV Install 28 | RUN wget https://github.com/sightmachine/SimpleCV/archive/master.zip 29 | RUN unzip master 30 | RUN cd SimpleCV-master; pip install -r requirements.txt; python setup.py install 31 | 32 | # Use clang 33 | ENV CC clang 34 | ENV CXX clang++ 35 | -------------------------------------------------------------------------------- /Chapter-01/simplecv/build-notebook.sh: -------------------------------------------------------------------------------- 1 | docker build . -t mohitsethi/simplecv:latest 2 | -------------------------------------------------------------------------------- /Chapter-01/simplecv/push-notebook.sh: -------------------------------------------------------------------------------- 1 | docker push mohitsethi/simplecv:latest 2 | -------------------------------------------------------------------------------- /Chapter-02/README.md: -------------------------------------------------------------------------------- 1 | # Python-Data-Mining-Cookbook - Chapter 02 2 | Python Data Mining Cookbook by Packt 3 | -------------------------------------------------------------------------------- /Chapter-03/README.md: -------------------------------------------------------------------------------- 1 | # Python-Data-Mining-Cookbook - Chapter 03 2 | Python Data Mining Cookbook by Packt 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Python-Data-Mining-Cookbook 2 | Python Data Mining Cookbook by Packt 3 | -------------------------------------------------------------------------------- /setup_workstation/macosx/install_dependencies.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Python-Data-Mining-Cookbook/6cd35388fb34ca9c9aa2b8184e1f363953893831/setup_workstation/macosx/install_dependencies.sh -------------------------------------------------------------------------------- /setup_workstation/ubuntu/install_dependencies.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Python-Data-Mining-Cookbook/6cd35388fb34ca9c9aa2b8184e1f363953893831/setup_workstation/ubuntu/install_dependencies.sh -------------------------------------------------------------------------------- /setup_workstation/ubuntu/install_docker_ce.sh: -------------------------------------------------------------------------------- 1 | sudo apt-get update -y 2 | sudo apt-get upgrade -y 3 | sudo apt-get -y install linux-image-extra-$(uname -r) aufs-tools 4 | 5 | sudo apt-get install \ 6 | apt-transport-https \ 7 | ca-certificates \ 8 | curl \ 9 | software-properties-common -y 10 | curl -k -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 11 | sudo apt-key fingerprint 0EBFCD88 12 | sudo add-apt-repository \ 13 | "deb https://download.docker.com/linux/ubuntu \ 14 | $(lsb_release -cs) \ 15 | stable" 16 | sudo apt-get update -y 17 | apt-get install -y docker-ce 18 | -------------------------------------------------------------------------------- /setup_workstation/windows/install_dependencies.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Python-Data-Mining-Cookbook/6cd35388fb34ca9c9aa2b8184e1f363953893831/setup_workstation/windows/install_dependencies.bat --------------------------------------------------------------------------------