GithubHelp home page GithubHelp logo

fagan2888 / nbviewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rlabbe/nbviewer

0.0 1.0 0.0 9.59 MB

Nbconvert as a webservice (rendering ipynb to static HTML)

Home Page: http://nbviewer.ipython.org

License: Other

Python 79.74% CSS 20.26%

nbviewer's Introduction

Jupyter Notebook Viewer

![Gitter](https://badges.gitter.im/Join Chat.svg)

Jupyter nbviewer is the web application behind The Jupyter Notebook Viewer, which is graciously hosted by Rackspace.

Run this locally to get most of the features of nbviewer on your own network.

Quick Run

If you have docker installed, you can pull and run the currently built version of the Docker container by

$ docker pull jupyter/nbviewer
$ docker run -p 8080:8080 jupyter/nbviewer

It automatically gets built with each push to master, so you'll always be able to get the freshest copy.

For speed and friendliness to GitHub, be sure to set GITHUB_OAUTH_KEY and GITHUB_OAUTH_SECRET:

$ docker run -p 8080:8080 -e 'GITHUB_OAUTH_KEY=YOURKEY' \
                          -e 'GITHUB_OAUTH_SECRET=YOURSECRET' \
                          jupyter/nbviewer

Or to use your GitHub personal access token, you can set just GITHUB_API_TOKEN.

GitHub Enterprise

To use nbviewer on against your own GitHub Enterprise instance you need to set GITHUB_API_URL. The relevant API endpoints for GitHub Enterprise are prefixed with http://hostname/api/v3. You must also specify your OAUTH or API_TOKEN as explained above. For example:

$ docker run -p 8080:8080 -e 'GITHUB_OAUTH_KEY=YOURKEY' \
                          -e 'GITHUB_OAUTH_SECRET=YOURSECRET' \
                          -e 'GITHUB_API_URL=https://ghe.example.com/api/v3/' \
                          jupyter/nbviewer

With this configured all GitHub API requests will go to you Enterprise instance so you can view all of your internal notebooks.

Local Development

With Docker

You can build a docker image that uses your local branch

Build

docker build -t nbviewer .

Run

docker run -p 8080:8080 nbviewer

Local Installation

The Notebook Viewer requires several binary packages to be installed on your system. The primary ones are libmemcached-dev libcurl4-openssl-dev pandoc libevent-dev. Package names may differ on your system, see salt-states for more details.

If they are installed, you can install the required Python packages via pip.

pip install -r requirements.txt`

Static Assets

Static assets are maintained with bower.

$ cd <path to repo>
$ invoke bower

This will download the relevant assets into nbewier/static/components.

Running Locally

$ cd <path to repo>
$ python -m nbviewer --debug --no-cache

This will automatically relaunch the server if a change is detected on a python file, and not cache any results. You can then just do the modifications you like to the source code and/or the templates then refresh the pages.

nbviewer's People

Contributors

minrk avatar carreau avatar rgbkrk avatar bollwyvl avatar ellisonbg avatar chdoig avatar bmyerz avatar adamw523 avatar jvns avatar takluyver avatar msund avatar spenczar avatar yaph avatar ahmadia avatar chriddyp avatar westurner avatar gitter-badger avatar pierrickkoch avatar pelson avatar ivanov avatar nicktimko avatar jiffyclub avatar qbilius avatar icook avatar waltherg avatar fperez avatar dennisobrien avatar bmabey avatar ajtulloch avatar

Watchers

James Cloos 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.