Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Live demo: this page was computed on Binder

The outputs on this page were computed when the documentation was built, on a Binder session that the GitHub Action started for the build.

Where did this code run?

import platform

print(f"This code ran on: {platform.node()}")
This code ran on: jupyter-binder-examples-requirements-1duf7svj

A hostname starting with jupyter-binder- means the code ran on a mybinder.org pod.

This documentation is built with the following clinder GitHub action configuration, which specifies the repository to use on Binder:

docs.yml
      - uses: 2i2c-org/clinder@HEAD
        with:
          hub-url: https://mybinder.org
          repo: binder-examples/requirements
          ref: HEAD

We can then import any package installed in that Binder image, such as NumPy:

import numpy as np

x = np.linspace(0, np.pi, 5)
np.round(np.sin(x), 3)
array([0. , 0.707, 1. , 0.707, 0. ])