jcat is a self-contained command line tool for viewing jupyter notebook files in terminal. It parses notebook's underlying json content, hence it runs without the dependency of jupyter/ipython core.
Most systems with g++ and make installed should be fine.
Clone this repo, if you want to be able to easily uninstall jcat use checkinstall.
sudo apt install checkinstall
cd jcat
sudo checkinstall
Otherwise, you can use make to install.
cd jcat
make
sudo make install
Optionally, one could use ./jcat without runing sudo make install;
or use make install PREFIX=/path/to/install for alternative installation directory (by default is /usr/local/bin).
Usage: jcat FILE [OPTION]
FILE: A json parsable notebook file (*.ipynb).
OPTION:
-a: Align prompt (In/Out) for copy.
- Running with
jcat examples/example-cifar10.ipynb:
=========================================================================
`markdown` # CIFAR - 10
## Decode data
=========================================================================
`markdown` Activate virtual environment
=========================================================================
In [1]: %%bash
source ~/kerai/bin/activate
=========================================================================
`markdown` ### Imports
=========================================================================
In [2]: %matplotlib inline
from helper import get_class_names, get_train_data, get_test_data, plot_images
-------------------------------------------------------------------------
`stderr` Using TensorFlow backend.
=========================================================================
`markdown` Get class names
=========================================================================
In [3]: class_names = get_class_names()
class_names
-------------------------------------------------------------------------
`stdout` Decoding file: data/batches.meta
Out[3]: ['airplane',
'automobile',
'bird',
'cat',
'deer',
'dog',
'frog',
'horse',
'ship',
'truck']
=========================================================================
- Running with
jcat examples/example-cifar10.ipynb -a:
Output (click to expand)
=========================================================================
# `markdown`
# CIFAR - 10
## Decode data
=========================================================================
# `markdown`
Activate virtual environment
=========================================================================
# In [1]:
%%bash
source ~/kerai/bin/activate
=========================================================================
# `markdown`
### Imports
=========================================================================
# In [2]:
%matplotlib inline
from helper import get_class_names, get_train_data, get_test_data, plot_images
-------------------------------------------------------------------------
# `stderr`
Using TensorFlow backend.
=========================================================================
# `markdown`
Get class names
=========================================================================
# In [3]:
class_names = get_class_names()
class_names
-------------------------------------------------------------------------
# `stdout`
Decoding file: data/batches.meta
# Out[3]:
['airplane',
'automobile',
'bird',
'cat',
'deer',
'dog',
'frog',
'horse',
'ship',
'truck']
=========================================================================
- output of
cat:
- output of `jcat':
rm /usr/local/bin/jcat, if no extra $PREFIX is supplied during installation.
Distributed uder the Boost Software License.
jcat parse notebook with jsoncons, a header only c++ json library.
Example notebook from: https://github.com/09rohanchopra/cifar10/blob/master/cifar10-basic.ipynb