Inside myProjects/jupyter-env/venv
there is a file expt1.ipynb
. It contains config info and some strange binary-like coding
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"id": "77c430a4-007b-42ec-b364-fcc23d6bf479",
"metadata": {
"scrolled": true
},
"outputs": [
{
"ename": "FileNotFoundError",
"evalue": "[Errno 2] No such file or directory: 'expt1.csv'",
"output_type": "error",
"traceback": [
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
"\u001b[31mFileNotFoundError\u001b[39m Traceback (most recent call last)",
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[3]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mpandas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mpd\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m df = \u001b[43mpd\u001b[49m\u001b[43m.\u001b[49m\u001b[43mread_csv\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[33;43mexpt1.csv\u001b[39;49m\u001b[33;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[32m 4\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumpy\u001
......
When I start jupyter
trinity:[nevj]:~/Projects/jupyter-env$ source venv/bin/activate
(venv) trinity:[nevj]:~/Projects/jupyter-env$ ls
expt1anal.py Untitled1.ipynb Untitled2.ipynb untitled.py
expt1.csv untitled1.py Untitled.ipynb venv
(venv) trinity:[nevj]:~/Projects/jupyter-env$ jupyter lab
I can do File ā Open ā Recents ā expt1.ipynb
and it brings back my Notebook workspace ⦠ie all the cells.
In the Jupyter tab, there seems to be an option to export
I tries Restructured Text
and it made a file expt1.rst
in the ~/Downloads
directory⦠Why there?
It contains the code from my first cell, plus heaps of garbage.
If I choose Executable Script
I get expt1.py
in ~/Downloads, and it contains code only.
So it looks like one can recover code fron Jupyter.