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: HEADWe 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. ])