MLCC's programming exercises are available for download
in Jupyter notebook (.ipynb
)
format. To run the exercises on your local machine:
- Download exercises
- Install and run Jupyter:
- Run the exercises
Download Exercises
Download the .zip of exercises here:
http://download.mlcc.google.cn/mledu-exercises/mlcc-exercises_zh-CN.zipand unpack the files to the location of your choice.
Next, install and run Jupyter using the appropriate instructions for your OS below.
Install and Run Jupyter on Windows
- From https://www.anaconda.com/download, install the Python 3.6 version of Anaconda. The exercises will not work on the Python 2.7 version.
Once installed, open Anaconda Prompt from the Start menu and enter the following commands:
conda create -n mlcc pip python=3.6
conda activate mlcc
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --ignore-installed --upgrade \ tensorflow matplotlib pandas sklearn scipy seaborn
When all of the packages finish installing, open Anaconda Navigator from the Start menu. In the Navigator:
- Switch to the
mlcc
environment, as shown in the following screenshot. Every time you open Jupyter, you must select themlcc
environment. Install
notebook
within themlcc
environment, as shown here:Once
notebook
is installed, click Launch. This will open a web browser.
- Switch to the
Next, run the exercises.
Install and Run Jupyter on Mac OS X
If you have not installed XCode, install it by running this command (this takes a while):
xcode-select --install
Install
pip
andvirtualenv
:sudo easy_install pip virtualenv
Set up your virtual environment in a new directory (here, we call it `mlcc-exercises):
mkdir mlcc-exercises
cd mlcc-exercises
virtualenv --no-site-package jupyter-env
Set up and run Jupyter.
- Enter the virtual environment:
source jupyter-env/bin/activate
- Install libraries:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --ignore-installed --upgrade \ tensorflow "matplotlib<3" pandas sklearn scipy seaborn ipython==5.7 notebook
- Start Jupyter:
jupyter notebook
- Enter the virtual environment:
Next, run the exercises.
Install and Run Jupyter on Linux
Install Python and
pip
:sudo apt-get install python-dev python-pip
Set up your virtual environment in a new directory (here, we call it
mlcc-exercises
):mkdir mlcc-exercises
cd mlcc-exercises
virtualenv --no-site-package jupyter-env
Set up and run Jupyter.
- Enter the virtual environment:
source jupyter-env/bin/activate
- Install libraries:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --ignore-installed --upgrade \ tensorflow "matplotlib<3" pandas sklearn scipy seaborn ipython==5.7 notebook
- Start Jupyter:
jupyter notebook
- Enter the virtual environment:
Next, run the exercises.
Run Exercises
After installing and starting Jupyter, in the Jupyter web interface, navigate to where you unpacked the exercises:
Click on the link for the exercise you want to open.