I would like to load my own data set with images in order to test my CNN algorithm. I've got two folders, one for training and another one for validation. I have loaded that folders into the Google Drive. I would like to ask how to download folders from Drive into the Colab ? Or maybe there are another better ways to do that ? I look forward to hearing from You soon. Best wishes!
Since you already have the folder in drive , go to google colab and run the following:
#Mounting your Google Drive in the runtime's virtual machine
from google.colab import drive
drive.mount('/content/drive/')
On running the above code you will find a URL from where you can obtain the authorisation code. Paste the code in the space provided and click enter
If you are able to access Google Drive, your google drive files should be all under:
You can then copy the path and move to the directory using :
%cd /content/drive/MyDrive/foldername
Related
My LISP routines are on the Google Share Drive at my work. I have buttons in my custom ribbon that calls my routines using a mapped drive letter URL link.
URL Link example in my custom Macro:
Goal:
Trying to share this with the other CAD users in the office.
Problem:
Various CAD Users have different mapped drive letters (Ex: H:\ or S:\ instead of G:).
Trying to avoid going around and manually changing the drive letter to match their mapping every time I updated the CUIX file (since path would be overwritten).
Would like to use the universal Google Share Drive web based link (by selecting the file and choose "get link" in Google Drive and copy the link).
The Swap:
Current URL Mapping in my Macro example (if image above not showing):
^C^C(load "G:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;
Example of swapping with the Google Share Drive link (not working):
^C^C(load "https://drive.google.com/file/d/0BlU92IihdhhcnRlcl9mWxl/view?usp=sharing&resourcekey=0-0VxGZXU_D8YjtjgjzQZnQ");My_routine;
Another method I tried
^C^C(command-s "_browser" "https://drive.google.com/file/d/0BlU92IihdhhcnRlcl9mWxl/view?usp=sharing&resourcekey=0-0VxGZXU_D8YjtjgjzQZnQ/");My_routine;
Anyone know the proper syntax for the macro?
Thanks in advance!
Sounds like a more configurable approach is needed, where the users can map the drives with whatever path they want (G:, S:\ or whatever). But they can still use the tools that are inside said drive.
To do this there are three things that would help:
1.) start using AutoCAD profiles. It's possible write a setup script to create the profile for the user. This profile would contain a support file path entry for the location of your LISP code. The path would vary depending on where the user has google drive mapped to.
2.) load all LISP from the profile when AutoCAD starts up, this can be done with the acaddoc.lsp file.
3.) remove all hard-coded load statements from the CUI buttons
For the issue I mentioned in my comment above about opening a folder through the CUIX macro only (and not through a LISP routine), I found this possible solution:
^C^C(startapp "explorer" (vl-string-translate "/" (chr 92) "C:/TEMP"));
Credit to Paul_Gander and his comments located here:
https://forums.autodesk.com/t5/autocad-forum/open-a-folder-with-a-button/td-p/3010928
More testing needed but so far so good...
Thank you Paul!
I downloaded the Flicker8k_Dataset (a folder with lots of pictures). I am looking for a way to load that into Google Colab without using Google Drive (it would take 5 hours to upload to Google Drive). What would be the best way to do this?
You can use wget command to download the dataset into your google drive and use it from there. The other way to use colab on your local dataset would be to run the colab on a local machine.
I am working on a class project where we're working with a large dataset in Google Colabs. Notably, the file is not saved if the runtime disconnects. I thus downloaded the dataset to my personal drive, but am struggling to get it accessible to the Colabs project. I also can't just mount my drive because there are other people working on this.
Is there some way to download a link-sharing=on drive file in Colabs?
A way to save the trained model would also be useful, but the same issue of sharing it and the saved files still applies.
There are 2 ways that I know.
If you only want to share with your friends, not making it public, you can share via google drive. Each friend will need to auth.authenticate_user() and then use pydrive to load the file given its FILE_ID.
If you can make it public, it's even easier. Anyone can download the file with
!gdown --id xxxxxxxxx
Where xxxxxxx is the FILE_ID.
I am trying to migrate an Excel sheet to Google sheets and having a problem with the links to folders as can not get them to work. Tried to use this format:
=HYPERLINK("Folder/sub Folder","link label")
Is there a way to get the folders to open or is it just not possible because Google sheets is web based and the security permissions won't allow it to open a windows folder?
The HYPERLINK() function of Google Sheets requires as first parameter a URL.
If you want to include a link to a Google Drive folder you should use the URL of that folder. The sharing URl of a folder looks like the following one
https://drive.google.com/folderview?id=1B5xqUTMMK_n6NmdkTUhsbUd9SE0&usp=sharing
The URL of a folder taken from the Google Drive UI looks like the following one
https://drive.google.com/drive/u/0/folders/1B5xqUTMMK_n6NmdkTUhsbUd9SE0
Note: I changed some characters of the real folder ID to prevent access requests.
I am dealing with mobile and desktop applications. I am trying to use Google Drive as a permanent storage folder. Unfortunately I am at a loss because I cannot find any examples. Can someone point me at an example of storing or retrieving a file from Google Drive?
I would really like to see a simple example in code or maybe a library which can handle this. I am stuck at Retrieve and Use OAuth 2.0 Credentials https://developers.google.com/drive/credentials
Did you look at the sample app on the drive API page?
edit
google moved the examples to github
I don't know if I figured out your problem. What I have understood is that you are looking for a way that makes you able to work on the same project from different computers.
If so, you simply have to download Drive. Once install it will ask you what folder you want to keep syncronized with Drive. If you select your workspace, it will be syncronized with Drive. So, on another pc, if you have installed Drive, you will be able to use the workspace folder too, with the same files.
I hope this is helpful.
Marco
You should look into Documents List API.
The Google Drive API & SDK are meant to be a mean to integrate applications into the Web-UI of Google Drive. To protect the security of the user's files, it puts some restrictions to the application developer, like:
The app has to be installed from the Chrome Web Store
The app can only access files created from the app itself,
or files selected by the user using the Google Picker UI.
All these restrictions make the Google Drive API not a good choice for most non-web applications.
E.g. installing the app from the Chrome Web Store is probably something you would find cumbersome to request from your users for a mobile or desktop application. Nonetheless, without being installed from the Chrome Web Store your application will always receive an error when accessing a file from Google Drive.
The Documents List API allows you to store and load files (not only Google Documents!) into Google Drive.
This question is a little bit old, still. You can look at this example: https://code.google.com/p/google-api-dotnet-client/wiki/OAuth2
They do the OAuth2 for accessing task. But I just used the same code to access the files using the v2 API. http://code.google.com/p/google-api-dotnet-client/wiki/APIs#Drive_API
I only retrieved the file list, but it is working (from .NET, desktop app).