This document lists steps that I follow when starting a new Python project.
I typically do it either on github or bitbucket.
Voila. Now you have an empty folder (with git setup) on your local machine.
Step 3: Ensure that nbstripout is installed.
This is a must if you plan to work with Jupyter Notebooks.
$ sudo apt-get update
$ sudo apt-get -y install python3-pip
$ pip3 install nbstripout
$ nbstripout installThe .git/config will look something like this once the nbstripout is successfully setup for this repo.
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github.com:vclab/axiom-analytics.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main
[filter "nbstripout"]
clean = \"/usr/bin/python3\" -m nbstripout
smudge = cat
[diff "ipynb"]
textconv = \"/usr/bin/python3\" -m nbstripout -tIf you can't seem to find nbstripout even after you have installed it, check out ~/.local/bin.
$ ~/.local/bin/nbstripout installCheck out here for some ideas on how to do Python development using Docker on remote machines.
Happy hacking!