Code Monkey home page Code Monkey logo

example_notebook's Introduction

Example Jupyter notebook with Binder & Colab integration

Binder Open in Colab

This simple Jupyter notebook -- written to accompany a Nature Toolbox feature published on 30 October 2018 -- demonstrates how the computational notebook format allows users to interleave text, code, and results in a single file.

But, unless you have Jupyter notebook installed on your computer, all you can do is view the notebooks, not play with them. (See for yourself: If you click My_sample_notebook.ipynb in this GitHub repository, you will be able to read the notebook, but only as a static document.) This is where Binder and Google's Colaboratory environment come in. Binder is a free, open-source web service that packages Jupyter notebooks inside an executable container, which can be run within a web browser, no installation required. Colab allows users with Google accounts to execute Jupyter notebooks on the Google cloud.

To use Binder:

  1. Click the launch binder button above. Once the demo launches, click My_sample_notebook.ipynb in the file listing.
  2. Run the notebook by selecting Cell > Run All.
  3. Take a look at the graph below the fifth cell (labeled 'The First 25 Fibonacci Numbers').
  4. Uncomment the line in the fifth cell that reads # ax.plot (range(25), ar) by removing the leading hashtag (#)
  5. Click Cell > Run All again. You should see a change in the graph below that cell.

To use Colab:

  1. Click the Open in Colab button above. It will launch the notebook directly.
  2. Make the notebook live by clicking 'Connect' in the Colab toolbar.
  3. You'll need to uncomment a few lines of code to make the notebook work. Navigate to the first cell, which reads:
    # !pip install biopython
    # !pip install folium
    # !curl -O https://raw.githubusercontent.com/jperkel/example_notebook/master/NC_005816.gb
  4. Uncomment this cell by removing the three leading #.
  5. Select Runtime > Run All in the menu to execute the notebook. (You may get a warning that the page was not authored by Google.)
  6. Take a look at the graph below the fifth cell (labeled 'The First 25 Fibonacci Numbers').
  7. Uncomment the line in the fifth cell that reads # ax.plot (range(25), ar) by removing the leading hashtag (#)
  8. Click Runtime > Run All again. You should see a change in the graph below that cell.

example_notebook's People

Contributors

jperkel avatar levenleven avatar

Watchers

 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.