nbcommands bring the goodness of Unix commands to Jupyter notebooks.

Overview

nbcommands

image image image image

nbcommands bring the goodness of Unix commands to Jupyter notebooks.

Installation

You can simply use pip to install nbcommands:

$ pip install nbcommands

or conda:

$ conda install -c conda-forge nbcommands

Usage

nbcommands installs the following commands which let you interact with your Jupyter notebooks without spinning up a notebook server.

  • nbtouch: Update the access and modification times of each Jupyter notebook to the current time.

      $ nbtouch notebook1.ipynb notebook2.ipynb

    nbtouch

  • nbgrep: Search for a pattern in Jupyter notebooks.

      $ nbgrep "os" notebook1.ipynb notebook2.ipynb
      $ nbgrep "os" directory/

    nbgrep

  • nbhead: Print the first 5 cells of a Jupyter notebook to standard output.

      $ nbhead notebook1.ipynb

    nbhead

    Note: You can also specify the number of cells you want to print using the -n option.

      $ nbhead -n 10 notebook1.ipynb
  • nbtail: Print the last 5 cells of a Jupyter notebook to standard output.

      $ nbtail notebook2.ipynb

    nbtail

    Note: You can also specify the number of cells you want to print using the -n option.

      $ nbtail -n 10 notebook2.ipynb
  • nbcat: Concatenate Jupyter notebooks to standard output.

      $ nbcat notebook1.ipynb notebook2.ipynb

    nbcat

    Note: You can create a new notebook by concatenating multiple notebooks using the -o option.

      $ nbcat notebook1.ipynb notebook2.ipynb -o notebook3.ipynb
  • nbless: Print a Jupyter notebook using a pager program.

      $ nbless notebook1.ipynb

    nbless

And some non-Unix goodness,

  • nbblack: Blacken Jupyter notebooks.

      $ nbblack notebook1.ipynb notebook2.ipynb

    nbblack


Planned enhancements:

  • nbstrip: Strip outputs from Jupyter notebooks.
  • nbdiff: Find the diff between two Jupyter notebooks.
  • nbecho: Add a code cell to a Jupyter notebook.
  • nbedit: Interactively edit a Jupyter notebook.
  • nbtime: Run and time a Jupyter notebook.
  • nbwc: Print word count for a Jupyter notebook.

Versioning

nbcommands uses Semantic Versioning. For the available versions, see the tags on this repository.

License

This project is licensed under the Apache License, see the LICENSE file for details.

Owner
Vinayak Mehta
Working on open source tools
Vinayak Mehta
Analysis of a daily word game "Wordle"

Wordle Analysis of a daily word game "Wordle" https://www.powerlanguage.co.uk/wordle/ Description Worlde is a daily word game in which a player attemp

Bartek 1 Feb 07, 2022
CLI client for RFC 4226's HOTP and RFC 6238's TOTP.

One Time Password (OTP, TOTP/HOTP) OTP serves as additional protection in case of password leaks. onetimepass allows you to manage OTP codes and gener

Apptension 4 Jan 05, 2022
Custom 64 bit shellcode encoder that evades detection and removes some common badchars (\x00\x0a\x0d\x20)

x64-shellcode-encoder Custom 64 bit shellcode encoder that evades detection and removes some common badchars (\x00\x0a\x0d\x20) Usage Using a generato

Cole Houston 2 Jan 26, 2022
CLI program that allows you to change your Alacritty config with one command without editing the config file.

Pycritty Change your alacritty config on the fly! Installation: pip install pycritty By default, only the program itself will be installed, but you ca

Antonio Sarosi 184 Jan 07, 2023
💻VIEN is a command-line tool for managing Python Virtual Environments.

vien VIEN is a command-line tool for managing Python Virtual Environments. It provides one-line shortcuts for: creating and deleting environments runn

Artёm IG 5 Mar 19, 2022
A small system that allow you to manage hosts stored in your .ssh/config file

A small system that allow you to manage hosts stored in your .ssh/config using simple commands.

Simone Ostini 1 Jan 24, 2022
Todo - You could use terminal to set your todo

Python Tutorial You can learn how to build a terminal application(CLI applicatio

29 Jun 29, 2022
Project scoped command execution to just do your work

Judoka is a command line utility that lets you define project scoped commands and call them through their alias. It lets you just do (= judo) your work.

Eelke van den Bos 2 Dec 17, 2021
A Bot Which Send Automatically Commands To Karuta Hub to Gain it's Currency

A Bot Which Send Automatically Commands To Karuta Hub to Gain it's Currency

HarshalWaykole 1 Feb 09, 2022
Python CLI vm manager for remote access of docker images via noVNC

vmman is a tool to quickly boot and view docker-based VMs running on a linux server through noVNC without ssh tunneling on another network.

UCSD Engineers for Exploration 1 Nov 29, 2021
A python package to display progress of loops to the user

ProgressBars A python package to display progress of loops to the user. Installation This package can be installed using pip. pip install progressbars

Matthias 3 Jan 16, 2022
Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections.

code-connect Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections. Motivation VS Code supports opening

Christian Volkmann 56 Nov 19, 2022
A simple Python CLI tool that draws routes/paths on a given map.

Map Router A simple Python CLI tool that draws routes/paths on a given map. Index Installation Usage Docs Why? License Support Installation Coming soo

Pedro Morim 1 Nov 07, 2021
EODAG is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a unified API for data access regardless of the data provider

EODAG (Earth Observation Data Access Gateway) is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a un

CS GROUP 205 Jan 03, 2023
Low-Cost Open Source Ventilator or PAPR

Last updated 2020/04/19 Low-Cost Open-Source Ventilator-ish Device or PAPR NOTE: This is currently an independent project not affiliated with any comm

Johnny Lee 1.7k Dec 21, 2022
Ntfy - 🖥️📱🔔 A utility for sending notifications, on demand and when commands finish.

About ntfy ntfy brings notification to your shell. It can automatically provide desktop notifications when long running commands finish or it can send

Daniel Schep 4.5k Jan 01, 2023
Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications.

Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications. Quo is making headway towards composing speedy and orderly CLI applications while forestalling any disappointments

Secretum Inc. 16 Oct 15, 2022
Konsave lets use save your KDE Plasma customizatios and restore them very easily!

Konsave (Save Plasma Customization) A CLI program that will let you save and apply your KDE Plasma customizations with just one command! Als

439 Jan 02, 2023
Output Analyzer for you terminal commands

Output analyzer (OZER) You can specify a few words inside config.yaml file and specify the color you want to be used. installing: Install command usin

Ehsan Shirzadi 1 Oct 21, 2021
Python implementation of SSH file transfer across servers.

SSH Transfer Python implementation of SSH file transfer across servers. Requirements paramiko=2.7.2 Usage Config Preparation Configure some informatio

Zhe Kong 1 Nov 23, 2021