Last active
January 20, 2023 17:08
-
-
Save JesperDramsch/38319509e648c596f9600d3876415459 to your computer and use it in GitHub Desktop.
Simple script to create shields to view notebooks on Colab, Gradient, and AWS Studio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
## replace these | |
user = "jesperdramsch" | |
folder = "notebooks" | |
repo = "euroscipy-2022-ml-for-science-reproducibility-tutorial" | |
## Add a Binder link once | |
print(f"https://mybinder.org/v2/gh/{user}/{repo}/HEAD", "\n") | |
## Links to individual notebooks | |
for notebook in Path(folder).glob("*.ipynb"): | |
shields = [f"[]({folder}/{notebook.name})", | |
f"[](https://colab.research.google.com/github/{user}/{repo}/blob/main/{folder}/{notebook.name})", | |
f"[](https://console.paperspace.com/github/{user}/{repo}/blob/main/{folder}/{notebook.name})", | |
f"[](https://studiolab.sagemaker.aws/import/github/{user}/{repo}/blob/main/{folder}/{notebook.name})", | |
f"[](https://deepnote.com/launch?url=https%3A%2F%2Fgithub.com%2F{user}%2F{repo}%2Fblob%2Fmain%2F{folder}%2F{notebook.name})",] | |
print("\n" + str(notebook)) | |
print(" ".join([shield.replace(" ", "%20") for shield in shields])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment