Install new version of Python and virtualenv using that version on Ubuntu

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9
sudo apt install python3.9-dev
sudo apt install python3.9-distutils
sudo apt install python3.9-venv

From directory in which we want to install virtual env:

python3.9 -m venv env
Notes 

Install psycopg2 package in python

sudo apt update
sudo apt install python3.9-dev
sudo apt install libpq-dev
sudo apt install build-essential
pip install psycopg2
Notes 

Fix git loose object corrupt

To fix the following error: fatal: loose object cbcaa4621da26a9ca57e97d797c6df867c824173 (stored in .git/objects/cb/caa4621da26a9ca57e97d797c6df867c824173) is corrupt

rm -fr .git
git init
git remote add origin [repo-url]
git fetch
git reset --mixed origin/master
git branch --set-upstream-to=origin/master master

Example repo-url: https://[user]@bitbucket.org/[user]/[repo].git

Notes 

What I Read or Listened to This Week

Here is some non-basketball content I read or listened to this week that I found interesting: