Share a unique version of google colab doc? - google-colaboratory

Does anyone know how exactly I can share a unique version of a google colab doc? I have a colab sheet on my Google Drive and I want to allow for someone to access the file, run, make edits, etc. However, I don't want any of the edits made to be on my version of the doc.
I've searched everywhere...

To share a link to your notebook that allows editing but does not modify your copy, first open the notebook in playground mode using the command palette. (Tools menu -> Command palette)
Then, select the 'Open in playground' command.
This will reload the notebook with a new URL that you can share, allowing others to modify and execute an ephemeral copy of the notebook without modifying the original. If they attempt to save, they will be prompted to create a copy in their own Drive.

Related

Is there a way to download a google slides document of which I have view perms and I just have the link?

This is the google slides document in question: https://docs.google.com/presentation/d/e/2PACX-1vQCYjdh1xx8HY-rP_D33zlJ-DR9s5knPDbBXPUAZJoLCT8Sb5Iwr56MZXhnodGfYSYx1xfXr8jaCvem/pub?start=false&loop=false&delayms=3000#slide=id.p
I'm at the start of my year studying again, and I wanted to download these notes...is there way to achieve this? I tried to save page but that obviously won't work, it's an html, I want the original file to save it to my pc.
Is there maybe any web I can paste the link and get the file?
PS: If this is not the appropriate subforum, please tell me where I could post the issue in the stack exchange forums. Thanks!
Answer:
The publish link is a view-only Presesntation mode copy of the Google Slide file, and making a copy from this is disallowed. This is by design and can not be changed.
More Information:
From the help article on publishing Workspace files:
If you send someone the URL of a published file, they’ll see a version they can’t edit that looks different from yours. Here’s what others will see:
Presentations: A view-only version or a version in presentation mode with full-screen slides.
And from the Publish dialog:
Make your content visible to anyone by publishing it to the web. You can link to or embed your document. Learn more
Note: the wording here is view-only and visible, which is not the same as read-only, which would include file copying.
If you wish to obtain a copy of the presentation, I suggest contacting the owner of the file.

Google Colab notebook preview (thumbnail) not updating in Drive

There used to be an option in Google Colab under File called Update Drive preview. I no longer see that option and my previews are very out of date. I assumed if it was removed that maybe the preview was updated when saving, but that does not appear to be the case. The worst part is that I have renamed the files and the preview still shows the old filename along the top, which can be confusing. Is another way that I can make this update occur?
Edit:
It is important to note that I do not want the URL for sharing to change, so making a copy would not work as a solution.
The Update Drive preview is now available through the command palette in Colab which is available through Tools->command palette, [CMD/CTRL]+SHIFT+P, or in the menu along the left side of the notebook.

Fill form fields in Colab notebook from URL query parameters

How can I dynamically populate a form field in my Colab notebook from a URL query parameter so I can construct preconfigured links to it from another system? I tried adapting Can a Jupyter / IPython notebook take arguments in the URL? but the JS in colab runs in a sandboxed iframe with a referrer policy which removed the path and query from document.referrer.
I would also like to make it as easy as possible for someone following such a link to run the notebook on the data supplied in the form fields. Is it possible to connect and run all automatically on opening a notebook? Is there a way to display a 'Run all' button so the user does not have to hunt for it in the menu?

How can I preserve cell outputs on uploaded notebooks?

I uploaded a previously created Jupyter notebook. I could initially see all the cell outputs in Colab right after uploading it, but if I close the notebook and come back to it later -- or if I share the notebook with a coworker -- then all the cell outputs have been cleared, which is quite annoying.
This is happening even though I've verified that the following two checkboxes are UNCHECKED:
Edit > Notebook settings > Omit code cell output when saving this notebook
Tools > Preferences > New notebooks use private outputs (omit outputs when saving)
From what I can tell, it looks like the cell outputs get preserved across sessions for notebooks created and edited in Colab, but not for notebooks that were created elsewhere and then uploaded. What am I missing? How can I preserve cell outputs across sessions in uploaded notebooks?
Are you trying to open the file from Drive directly in Jupyter?
If so, you'll need to save the full file using the File -> Download ipynb menu item.
By default, Colab saves outputs using a different format to support incremental saves, so the Drive file created during auto-save will show outputs, but only in Colab itself, and you'll need to download the full ipynb to export to other notebook viewing tools.

How to create a hyperlink to a onedrive file or folder without sharing it with anyone - and then use it

(Once the hyperlink is created I will use it in OneNote to link to a file on my own Onedrive, for only me to use !)
When I view a file in Word online the URL displayed is:
https://onedrive.live.com/view.aspx?cid=53B31F7A44698440&resid=53B31F7A44698440%2130033&app=Word
Say I want to insert a link to the file in a website or OneNote page, such that it has NOT been shared with anyone. ie Only I have permissions to view it like the file reference by the above link.
Can I simply use the above URL as a link?
I have used OneDrive sharing, but I think all the methods given result in the file being shared with other named people or publically. eg like this one:
http://1drv.ms/1zOli6p
...which when viewed in word online shows this URL:
https://onedrive.live.com/view.aspx?cid=53B31F7A44698440&resid=53B31F7A44698440%2130035&app=Word
I have been experimenting and using the URL seems to work. However, if the above does work, what I don't get is why OneNote does not allow a link to be created to a file stored on Ondrive. (On my PC it sonly seems to allow links to locally stored files).
I have used GoogleDrive which allows you to select a file and right click it to "receive a link" which you can use in the manner described above. This is a really useful feature.
Note that in a similar way, I would like to create a link that causes onedrive to open and display a chosen folder. This seems to work ok when I use a URL this one that only I have permissions to view:
https://onedrive.live.com/?cid=53B31F7A44698440&id=53B31F7A44698440%2130031
Any advise is really appreciated.
Harvey
The links you copy/paste from your browser's address bar should work just fine, as your experiments have confirmed. If you're not trying to share the content with other people, you don't need to go through the sharing flows. You can just use those URL's.
From within OneNote itself you can also get links to content by right-clicking on a page/section/notebook and clicking 'copy link to page,' 'copy link to section,' etc.
You can open folder in OneDrive online (via browser or right clicking on the folder in File Explorer then selecting "view online") and click "get link" at the top. Just cut and paste into OneNote. From there you can edit/rename the link as usual.
Oddly, OneNote has functionality to copy a FILE link using the Insert > Link, but you can't stop at the folder level.
Ideally, I'd like the above option as well as dragging a folder from OneDrive within Windows File Explorer and have it ask me if I want to copy the entire folder or create a link.
I use links in format
https://onedrive.live.com/edit.aspx?resid=fd5d9e0ac8248db7!3447 (example, not real link)
or
https://onedrive.live.com/?id=fd5d9e0ac8248db7!3447
where
fd5d9e0ac8248db7 - is your ID number, and
3447 - is ID number of element (folder, Word file, OneNote notebook, media etc.)
P.S. Link format for open .one files online and folders inside OneNote online:
https:/ /onenote.officeapps.live.com/o/onenoteframe.aspx?Fi=SDfd5d9e0ac8248db7!3447&H=emul&C=5_810_BN1-SKY-WAC-WSHI&ui=Ru-RU
(example, not real link)
where
https:/ /onenote.officeapps.live.com/o/onenoteframe.aspx?Fi=SD_____yourIDnumber___!___elementID____&H=emul&C=5_810_BN1-SKY-WAC-WSHI&ui=Ru-RU
OneDrive has a "Copy link" function in a few places that you would think does what it states. However, as soon as you select "Copy link", a share is created with the defaults of your OneDrive (which could be your organisation's). In my case, the default is share with editing permissions. This is probably the last thing you would expect when you are requesting to "Copy link". This is really quite dangerous, since the now shared link could be used by anybody if it subsequently forwarded to others.
Why would you want to copy a link? My use case is that I have a folder shared as read only with specific people. I want to give them a link to a sub-folder or file that they already have access to, but I do not want to create new permissions, that in my case give editing to anybody with the link!
It seems that the way to properly "copy a link" (literally) is as suggested ie copy the URL from the address bar.