![]() ![]() nbconvert helps with this: it’s a tool to convert Jupyter notebooks to other formats, including rich formats such as HTML and PDF, and plain text formats including Markdown. Notebooks can contain images and other binary data, which if printed with cat will fill your terminal with unintelligible Base64 encoded data.Īs a result, instead of printing the notebook contents straight to the terminal, we need to do some rendering. Internally, Jupyter notebooks are JSON documents with a strict schema. This isn’t the case for Jupyter notebooks. As such it’s enough to print the raw file contents with a pager such as less, or even with cat. This is trivial for other literate programming formats for scientific computing, such as R Markdown and Pweave: these formats use lightweight markup languages that don’t need special rendering to be legible. This is convenient when you’re already in a terminal in the correct directory, and even more so when the notebook is on a machine to which you may only have SSH access (for example an EC2 instance), and don’t want to have to start an SSH tunnel. It’s often useful to be able to view the contents of Jupyter notebooks from the command line, without starting a Jupyter notebook or JupyterLab server and navigating to it in your web browser. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |