- [Notebook, Slides] How Close Are NBS Students To Their Classmates? Cheng Jin Yee (Jinny), Jeremy Jerome Chia
- [Notebook, Slides] Predicting HDB Resale Prices in Singapore, Thomas ten Hacken, Maxime Kayser, Mei-Jun Yeh
Run the notebooks from the cloud using Binder: Simply click here.
Follow the following instructions to install Miniconda and create a Python environment for the course:
-
Download the Python 3.6 installer for Windows, macOS, or Linux from https://conda.io/miniconda.html and install with default settings. Note for Windows: If you don't know if your operating system is 32-bit or 64-bit, then open Settings-System-About-System type to find out your xx-bit system.
- Windows: Double-click on the
Miniconda3-latest-MacOSX-x86_64.exe
file. - macOS: Run
bash Miniconda3-latest-MacOSX-x86_64.sh
in your terminal. - Linux: Run
bash Miniconda3-latest-Linux-x86_64.sh
in your terminal.
- Windows: Double-click on the
-
Windows: Open the Anaconda Prompt terminal from the Start menu. MacOS, Linux: Open a terminal.
-
Install git:
conda install git
. -
Download the GitHub repository of the course:
git clone https://github.com/xbresson/CE9010_2018
. -
Go to folder CE9010_2018 with
cd CE9010_2018
, and create a Python virtual environment with the packages required for the course:conda env create -f environment.yml
. Note that the environment installation may take some time.Notes:
The installed conda packages can be listed withconda list
.
Some useful Conda commands arepwd
,cd
,ls -al
,rm -r -f folder/
Add a python library to the Python environment:conda install -n CE9010_2018 numpy
(for example)
Read Conda command lines for packages and environments
Read managing Conda environments
First time:
-
Windows: Open the Anaconda Prompt terminal from the Start menu. MacOS, Linux: Open a terminal.
-
Activate the environment. Windows:
activate CE9010_2018
, macOS, Linux:source activate CE9010_2018
. -
Start Jupyter with
jupyter notebook
. The command opens a new tab in your web browser. -
Go to the folder
tutorials
and duplicate the original notebooktutorial01.ipynb
with a new namemy_tutorial01.ipynb
(for example) to avoid future conflicts, see understanding git conflicts. -
Open, edit and run the notebook
my_tutorial01.ipynb
from your browser. -
When your tutorial is completed, you can go back to the terminal command by shutting down the juypter kernels with
Control-C
. -
Save your notebook with git:
git add .
, andgit commit -m tutorial01
.Notes:
Windows: Folder CE9010_2018 is located atC:\Users\user_name\CE9010_2018
. MacOS, Linux:/Users/user_name/CE9010_2018
.
Check the status of your git folder:git status
List of git commands
Windows systems may print thewarning: LF will be replaced by CRLF
when git commit. You can deactivate this warning withgit config core.autocrlf false
.
The next times:
- Windows: Open the Anaconda Prompt terminal from the Start menu. MacOS, Linux: Open a terminal.
- Activate the environment. Windows:
activate CE9010_2018
, macOS, Linux:source activate CE9010_2018
. - Download the new Python notebooks: Go to folder CE9010_2018 with
cd CE9010_2018
, andgit pull
. - Start Jupyter with
jupyter notebook
. The command opens a new tab in your web browser. - Go to the folder
tutorials
and duplicate the original notebooktutorial02.ipynb
with a new namemy_tutorial02.ipynb
(for example) to avoid future conflicts, see understanding git conflicts. - Open, edit and run the notebook
my_tutorial02.ipynb
from your browser. - When your tutorial is completed, you can go back to the terminal by shutting down the juypter kernels with
Control-C
. - Save your notebook with git:
git add .
, andgit commit -m tutorial02
.
Clean re-installation of the GitHub repository:
- For GitHub beginners who wish to re-start from a clean GitHub repository of the course.
- Backup the current folder by changing the folder name
CE9010_2018
toCE9010_2018_backup
(for example). - Re-download the GitHub repository of the course:
git clone https://github.com/xbresson/CE9010_2018
. - Copy-paste your own notebooks from
CE9010_2018_backup/tutorials
to the new folderCE9010_2018/tutorials
. - Follow instructions
The next times
.