Skip to content

Notebook

Jupyter Notebook

Installation

$ pip install notebook

Running

# Running Notebook
$ jupyter notebook

Jupyter Notebooks are stored in the directory from which you launched the Jupyter Notebook server.

In the address bar, type localhost:8888 and press Enter. This is the default address for Jupyter Notebook. If you have changed the port number during the installation or startup of Jupyter Notebook, replace 8888 with your port number.

Colab

Colab, short for Google Colaboratory, is a free cloud service based on Jupyter Notebooks for machine learning education and research. It provides a platform where you can use and share Jupyter notebooks with others without having to download, install, or run anything on your own computer.

Here's a basic guide on how to use Google Colab:

  1. Go to the Google Colab website.
  2. Sign in with your Google account.
  3. Click on File > New notebook to create a new notebook.
  4. You can write Python code in the cells. To run the code in a cell, click on the play button on the left side of the cell or use the keyboard shortcut Shift + Enter.
  5. You can add new cells by clicking on + Code or + Text buttons in the toolbar. + Code adds a new cell for writing code while + Text adds a new cell for writing text.
  6. You can import data files or notebooks by clicking on File > Upload notebook or File > Upload dataset.
  7. You can save your notebook by clicking on File > Save. The notebook will be saved to your Google Drive.
  8. You can share your notebook with others by clicking on the Share button in the top right corner. You can choose to share the whole notebook or a link to the notebook.

Remember, Google Colab provides a runtime environment, so you don't have to worry about setting up Python or any packages on your local machine. It also provides free access to hardware accelerators like GPUs and TPUs which can be very useful for machine learning tasks.


Last update: May 6, 2024