Code Monkey home page Code Monkey logo

ipynb_stripout's Introduction

ipynb_stripout

Output cells make it difficult to manage iPython notebooks under Git. Diffs become noisy and merge conflicts become common.

This has been adapted from cfriedline's ipynb_template and minrk's original gist with the goal of making output stripping as easy as possible.

1) Install (OS X)

First you need to install the ipynb_stripout script. Run the following from your terminal:

wget -O /usr/local/bin/ipynb_stripout "https://raw.githubusercontent.com/jond3k/ipynb_stripout/master/ipynb_stripout"
chmod +x /usr/local/bin/ipynb_stripout

2) Configure git

To make it optionally available to all your git repositories:

git config --global filter.ipynb_stripout.clean ipynb_stripout
git config --global filter.ipynb_stripout.smudge cat
git config --global filter.ipynb_stripout.required

3) Add to repository

Go to the root of the repository you want to add it to and .gitattributes with the following line:

echo "*.ipynb filter=ipynb_stripout" >> .gitattributes

Now you can commit the attributes.

git add .gitattributes
git commit -m "Added ipynb_stripout. See https://github.com/jond3k/ipynb_stripout" .gitattributes 

ipynb_stripout's People

Contributors

cfriedline avatar jond3k avatar rbeagrie 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.