AIProductivity
AIProductivity
interactive state of the notebook. QR codes are static representations of text or URLs.
However, you can generate a QR code that links to the shareable URL of your Google Colab
notebook. This allows others to open and view (or copy and run, depending on the sharing settings)
your notebook.
b. Click on the "Share" button located in the top right corner of the Colab interface.
* To allow anyone to view: Under the "Get link" section, click "Change to anyone with the link" and
select the "Viewer" permission.
* To allow anyone to edit (be cautious with this): Select the "Editor" permission.
* For specific people: Add their email addresses and set their permissions.
d. Copy the generated link. This is the URL you will encode into the QR code.
There are many free online QR code generators available. Here are a few popular options:
https://www.qr-code-generator.com/
https://www.the-qrcode-generator.com/1
https://goqr.me/
Simply visit one of these websites (or any other QR code generator you prefer).
a. Locate the input field on the QR code generator website (it might be labeled "Enter text or URL,"
"Your URL," etc.).
b. Paste the shareable link you copied from Google Colab into this field.
Python
import qrcode
colab_link = "YOUR_COLAB_SHAREABLE_LINK_HERE"
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
qr.add_data(colab_link)
qr.make(fit=True)
img.save("colab_notebook_qr.png")
display(Image("colab_notebook_qr.png"))
Important Considerations:
Sharing Permissions: The QR code will only be useful if the sharing permissions of your
Google Colab notebook are set appropriately for the intended recipients.
Static Link: The QR code represents the URL at the time of generation. If the shareable link of
your notebook changes, you'll need to generate a new QR code.
No Interactive State: The QR code will only open the notebook in a browser. It won't transfer
any currently running code, variables, or output from your active Colab session.
By following these steps, you can easily create a QR code that directs others to your Google Colab
notebook.