GithubHelp home page GithubHelp logo

epogrebnyak / handout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danijar/handout

1.0 1.0 1.0 63 KB

Turn Python scripts into handouts with Markdown and figures

License: Apache License 2.0

Python 79.39% CSS 18.62% JavaScript 1.99%

handout's Introduction

Python Handout

PyPI

Turn Python scripts into handouts with Markdown comments and inline figures. An alternative to Jupyter notebooks without hidden state that supports any text editor.

Code Handout
Code Handout

Getting started

You use Python Handout as a library inside a normal Python program:

  1. Install via pip3 install -U handout.
  2. Run your script via python3 script.py. (You can start with the example.py from the repository.)
  3. Open output/index.html in your browser to view the result.
  4. Iterate and refresh your browser.

Features

Create the handout via doc = handout.Handout(outdir) to access these features:

Feature Example
Add Markdown text as multi-line comments. """Markdown text"""
Add text via print() syntax. doc.add_text('text:', variable)
Add image from array or url. doc.add_image(image, 'png', width=1)
Add video from array or url. doc.add_video(video, 'gif', fps=30, width=1)
Add matplotlib figure. doc.add_figure(fig, width=1)
Add custom HTML. doc.add_html(string)
Insert added items and save to <outdir>/index.html. doc.show()

Questions

Feel free to create an issue on Github.

handout's People

Contributors

danijar avatar epogrebnyak avatar

Stargazers

Michael Corrado avatar

Watchers

 avatar

Forkers

juansapena

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.