Coder Social home page Coder Social logo

notebook-templates's Introduction

This repository contains notebook templates, code snippets, and banners to accompany the Callysto curriculum-notebooks repository.

Notebook Templates

Templates contributed here are available in a Jupyter notebook through nbtemplate, one of our notebook extensions. With nbtemplate installed, click on its icon. Any templates found in templateConfig.json will be displayed, and choosing a notebook template copies its cells into the current notebook.

Contributions should be added to the /templates directory. Then, create an entry in templateConfig.json to point to the templates source url. Each entry must be a JSON object with an id and url key, at minimum.

e.g.

{
    "id": "A sample JSON object",
    "url": "https://raw.githubusercontent.com/path/to/template.ipynb",
    "someKey": "someValue"
}

Code Snippets

We are aggregating useful snippets, "shorts," that provide minimal and self-contained examples of the many libraries, tools, and methods available to us in Jupyter. These snippets are available through nbtemplate. With nbtemplate installed, click on "Blocks" in the menubar to see a dropdown list of shorts. Selecting a short copies it cells into the current notebook, and executes these cells.

Contributions should be added to the /blocks directory. Then, create an entry in blockConfig.json to point to the templates source url. Each entry must be a JSON object with an id, text, and url key, at minimum.

e.g.

{
    "id": "a_short_id",
    "title": "A description that appears as a tooltip",
    "text": "The Short Name",
    "url": "https://raw.githubusercontent.com/path/to/short.ipynb",
    "someKey": "someValue",
    "submenu": [
      { ... },
      { ... }
    ]
}

Banners

We have developed a Jupyter magics implementation of the Callysto banners. In Jupyter, within a code cell (Python 3):

!git clone https://github.com/callysto/notebook-templates.git
!cd notebook-templates; cp -f banner_magics.py ~/.ipython/profile_default/startup

Then, restart the kernel. Use %top_banner and %bottom_banner in separate code cells to insert the top and bottom banners, respectively.

These magics will be initialized upon kernel startup in any notebook.

Contributing

Commit directly to master, or from your developer branch to master. If you want your code to be reviewed before committing, open a pull request with the word "review" in the pull request title.

notebook-templates's People

Contributors

lfunderburk avatar ericeasthope avatar inygy avatar

Watchers

Joe Topjian avatar James Cloos avatar James Colliander avatar Preethi Kumar avatar Byron Chu avatar  avatar Michael Lamoureux avatar  avatar

Forkers

lukeodair

notebook-templates's Issues

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.