can we customize files. Upload() in google colab? - python

I have tried several ways ,but not able to resolve the problem .can we customize browsing functionality in colab?
I am using uploaded = files.upload() for browse button functionality in colab, but I want whenever user click browse direct dialogue box for given path should open rather than choose files option.

The situation that you discuss is possible if you build your own customized application. But google collab is a proprietary application of google and it has a certain set of operations to do tasks smoothly. Apart from that as you say
"user click browse direct dialogue box for given path should open rather than choose files option"
how it is possible that google colab now what you want to upload. That's why google colab gives you the facility to upload the file as per your requirement. It makes the application more robust and easy to use.
As per Google colab documentation, it is not possible.

Related

How to download a file from google drive without showing this action in the change history

If I have access to a folder with some files in google drive, it's possible to download this folder without showing any changes in history? The owner of the folder should not see that the file was downloaded. If it's possible in python please tell me how to do it.
I used to think about some script (with using Google API) or some service/site to resolve this problem.

Connecting to google colab via local system

I've been tasked to solve a ML/DL problem.
But due to the processing limitations of my system the progress of developing the program further has come to a halt. It is a requirement of my program that it uses a GUI for the layman user, which I've already designed and implemented.
Now due to system limitations, I was wondering if I could somehow connect this python GUI instance on my local machine to Google Colab. The user could then use the GUI interface to upload files to google colab and upon pressing the submit button google colab would import these files. It would then do the ML/DL processing on these files and return some output back to the GUI interface for the user.
Any ideas of how I would achieve this?

How to really share a Jupyter notebook uploaded to Google Colab?

I uploaded a Jupyter .ipynb notebook to Google CoLab using File->Upload Notebook.
Renamed it, made some edits, and saved it. Great.
However, when I do "Share"->"Anyone with a link can view", then copy the link and open it in another (or private) browser window, I
(1) am required to log in to a Google account, and
(2) get this pop-up: "Notebook loading error. There was an error loading this notebook. Ensure that the file is accessible and try again."
and buried in the displayed error is: "403 This file cannot be downloaded by the authenticated user."
This confuses me about the behaviour of Colab notebooks vs. other Drive files. Ordinarily, the "anyone with a link can view" on a Drive file does not require the viewing user to be logged in to a Google account. That's confusion #1. Confusion #2: why is Colab trying to "download" anything at all, as indicated in the 403? I assumed the file would be viewable within Colaboratory within the user's browser, just as it is for the notebook owner.
I would like to invite (non-coding) colleagues to view my Colab notebook, with or without a Google account, and without any particular coding or Google savvy. Any ideas on how to do this?
Possibly this is useful until a better solution is available...
This happens to me when "Disable options to download, print, and copy for commenters and viewers" is selected in advanced options...
I was able to share the notebook by deselecting this option...

Uploading and serving media files from google drive on django

I'm working on an app in django that allows users to upload documents to google drive and share them with friends. The problem is I want to restrict the shared documents to view only (no download option). How can I go about doing this?
You can insert/upload files using the Drive API and set the "restricted" label to prevent downloading of the file. You would then set the appropriate permissions to this file to allow anyone or a specified set of users to access the file.
Download restrictions may or may not apply for files that are converted to one of the Google Apps formats because the option to prevent downloading seems unavailable for these files through the Google Drive UI. You would have to test this yourself.

How can I use Google documents list APIs with the none-document files such as .jpeg .gif?

I'm now using gdata-python-client(Google document List API) to access my google drive on Terminal in Linux OS and I have problem to show the image files -- It's just show only the .doc .xls or .pdf files
Is it has some solutions to solve my problem in still using gdata-python-client? I hope there is some solutions better than changing my APIs to Google drive API,that's mean I should restart my project!!. So sad :(
And If I change to use Google Drive APIs.how to do it? or can i reuse my project working compatibility with the new APIs?
Please give me some advice or tutorial.
Thank you very very very much :)
Use the Drive API. We have a Python command line sample to get you started, and python snippets for every API method including files.list.

Categories