1. 程式人生 > 其它 >在google colab中解壓資料夾

在google colab中解壓資料夾

技術標籤:教程

rar格式

 !pip install pyunpack
 !pip install patool
 from pyunpack import Archive

然後

Archive('/content/drive/Shareddrives/yunpan/data/CCTSDB/CCTSDB.rar').extractall('/content/drive/Shareddrives/yunpan/data/CCTSDB')

前面一個是要解壓的資料夾,後面一個是要解壓到的位置

zip格式

# Mount google drive
from google.colab import drive
drive.
flush_and_unmount() drive.mount('/content/drive', force_remount=False)

先給許可權:執行完這個程式碼後,會出現一行網址,開啟這個網址,然後將最後出現的那一串東西複製過來,回車就行了
然後執行

!unzip '/content/drive/My Drive/sparse cnn data/data_depth_annotated.zip' -d '/content/NFFL Assignment'

其他格式待續