Code Monkey home page Code Monkey logo

jupyter_web's Introduction

Jupyter Notebook Web Page integration

This repository demonstrates how to perform a full integration of a jupyter notebook in a web page.

The code is highlighted with pygments. Math equations are rendered with MathJax. The jupyter notebook is converted to HTML with nbconvert. The main style is from bootstrap. Custom CSS classes are provided in this repo for a consistent style between the included jupyter HTML file, and the mother HTML page.

This setup is fully explained in my article https://thedatafrog.com/jupyter-notebooks-web-pages.

Description of the repository

The file templates/overfitting.html has been generated with

jupyter nbconvert --execute --template basic overfitting.ipynb

templates/main.html is the template web page in which we want to include

render.py is a simple custom python script that generates index.html from the template. This script is just for demonstration purposes. For real websites, I use django and its template engine.

the css directory contains custom CSS classes for the styling of the various elements in the web page:

Rendering the HTML file

Just do

python render.py

And open the resulting index.html in your browser to see the results.

If you edit template.html do not forget to render again.

Results

Here is what I get in my django website:

jupyter_web's People

Contributors

cbernet 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.