This is a Jupyter extension that adds continuous line numbering to code cells in a Jupyter Notebook.
pip install git+https://github.com/leukeleu/jupyter-linenumbers
jupyter nbextension install --py linenumbers --user
jupyter nbextension enable --py linenumbers --user