πŸ“ How to Write Your Own Notes Using Jupyter & Google Colab

In this guide, you'll learn how to create, save, and push notes to GitHub using,

  1. Jupyter Notebook (Installed on PC)

  2. Google Colab (Online, No Installation Needed)

πŸ“Œ Part 1: Jupyter Notebook

1️⃣ Installing Python & Jupyter Notebook

Before using Jupyter Notebook, you need to install Python and Jupyter.

βœ… Step 1: Install Python

Download Python from python.org and install it.

βœ… Step 2: Install Jupyter Notebook

Once Python is installed, open the terminal and run:

In [ ]:

pip install notebook

2️⃣ Creating Your First Jupyter Notebook

To open Jupyter Notebook, run:

In [ ]:

jupyter notebook
  1. Click New β†’ Python 3 Notebook.

  2. Rename it to MyNotes.ipynb.

  3. Use Markdown cells for writing text and Code cells for calculations.

3️⃣ How to Push Your Notes to GitHub

There are two ways to upload your Jupyter Notebook to GitHub:

  1. Using Git Command Line (CLI)

  2. Using GitHub Desktop

πŸ‘‰ Using Git CLI

In [ ]:

git add MyNotes.ipynb
git commit -m "Added Jupyter Notebook notes"
git push origin main

πŸ‘‰ Using GitHub Desktop

  1. Open GitHub Desktop and select your repository.

  2. Click Commit to main β†’ Then Push to GitHub.

image.png

πŸ“Œ Part 2: Google Colab

Google Colab is an online alternative to Jupyter Notebook that requires no installation.

βœ… Steps to Use Google Colab

  1. Go to Google Colab.

  2. Click File β†’ New Notebook.

  3. Rename it and start writing your notes.

βœ… Saving Google Colab Notes to GitHub

To push a notebook from Google Colab to GitHub:

  1. Click File β†’ Save a copy in GitHub.

  2. Select the repo and add a commit message.

  3. Click OK, and it will be uploaded!

image.png

Β