Giter Club home page Giter Club logo

jcat's Introduction

JCAT

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.

Example notebook (link)

nb

  • 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']
=========================================================================

Prerequisites

Most systems with g++ and make installed should be fine.

Looking for easier installation? Checkout the python implementation.

Build and Install

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, which puts jat into /usr/local/bin).

Usage

Usage: jcat FILE [OPTION]

FILE:	A json parsable notebook file (*.ipynb).

OPTION:
  -a:	Align prompt (In/Out) for copy.

Use jcat with grep to get rid of annoying image datas

  • output of cat:

grep_cat

  • output of `jcat':

grep_jcat

Uninstall

rm /usr/local/bin/jcat, if no extra $PREFIX is supplied during installation.

License

Distributed uder the Boost Software License.

Acknoledgement

jcat parse notebook with jsoncons, a header only c++ json library.
Example notebook from: https://github.com/09rohanchopra/cifar10/blob/master/cifar10-basic.ipynb

jcat's People

Contributors

zhifanzhu avatar

Stargazers

ARKANYOTA avatar nh_codem avatar bubu avatar Simon Zeng avatar Josiah Outram Halstead avatar kruse avatar  avatar Jo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.