Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to access data from one drive using google colab?

I have started using google colab to train neural networks, however the data I have is quite large (4GB and 18GB). I have all this data currently stored in one drive and I don't have enough space on my google drive to transfer these files over.

Is there a way for me to directly access the data from one drive in google colab?

I have tried directly loading the data from my own machine, however I feel this process is too time consuming and my machine really doesn't have enough space to store these files. I have also tried adding download=1 after the ? in the file's hyperlink however this does not download and only displays the hyperlink. While using wget produces a 'ERROR 403: Forbidden.' message.

I would like for the google colab file to download this zipped file and to unzip the data from it in order to preform training.

like image 432
JoshWilde Avatar asked Apr 17 '19 14:04

JoshWilde


2 Answers

ok, here is the method download to colab, choose file and right-click download button in onedrive but pause it immediately

enter image description here

then go to the download interface, right-click the paused item, and copy the link address enter image description here

!wget --no-check-certificate \
https://public.sn.files.1drv.com/xxx\ 
-O /content/filename.zip

Note: it will invalid in some minutes

like image 166
yuhang.tao Avatar answered Sep 20 '22 13:09

yuhang.tao


For download only, to download folders:

  • cliget in Firefox (wget didn't work for me, but curl is fine)
  • curlwget in Chrome (sorry, haven't tried, i don't use Chrome)

With cliget, you just have to install the add-on in firefox, than start a download of the folder. (Don't have to actually finish.) And at the add-ons' icons, click on cliget, than choose curl, and copy(-paste) the created command.

Note: these are not 'safe' methods, probably shouldn't be used with sensitive contents

(Probably other OneDrive folders stay safe, but I'm not sure. Please confirm me.)

To unzip, one can use unzip command.

A year passed since the question, but I leave this here, for others. :)

Edit:

For many small files it seems to be really slow, for some reason. (I'm not sure why.) Also (with OneDrive) it seems that reliable only up to a few (2-3) GBs... :(

like image 37
fanyul Avatar answered Sep 23 '22 13:09

fanyul