Giter Site home page Giter Site logo

develtools's Introduction

develtools

Development tools for Python in Jupyter Notebook

nbconvert

This script simply survives as a reminder to update notebook magic cells. This was formerly a shortcut for converting notebooks now replaced with notebook magic: !jupyter-nbconvert --to python --template python_clean

Update notebook magic cells with the above magic.

Requirements

  • Jupyter Notebook: pip install jupyter

nbconvert_templates

Custom templates for nbconvert. Try nbconvert.py -h to find the custom template directory (this can be a symlink?)

pipenv_jupyter

pipenv_jupyter.sh creates a pipenv virtual environment that will play nice with Jupyter in the current working directory.

Usage:

  • Create a new Jupyter Kernel for Python 3 around the pipenv in this directory: $ pipenv_jupyter.sh -3

  • Clean up an installed kernel and remove symlinks: $ pipenv_jupyter.sh -c

Requirements:

  • Jupyter Notebook: pip install jupyter
  • pipenv pip install pipenv

develtools's People

Contributors

txoof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aikins01 dfkiki

develtools's Issues

nbconvert 6.0+ handles templates in a new way

nbconvert requires a directory in ~/.local/share/jupyter/nbconvert/templates/ with two files that describe the template actions.

Need to rewrite the nbconvert script to handle this for future versions

conf.json

{
    "base_template": "base",
    "mimetypes": {
        "text/x-python": true
    }
}

index.py.j2

{%- extends 'null.j2' -%}

## set to python3
{%- block header -%}
#!/usr/bin/env python3
# coding: utf-8
{% endblock header %}

## remove cell counts entirely
{% block in_prompt %}
{% if resources.global_content_filter.include_input_prompt -%}
{% endif %}
{% endblock in_prompt %}

## remove markdown cells entirely
{% block markdowncell %}
{% endblock markdowncell %}

{% block input %}
{{ cell.source | ipython2python }}
{% endblock input %}


## remove magic statement completely
{% block codecell %}
{{'' if "get_ipython" in super() else super() }}
{% endblock codecell%}

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.