当前位置:网站首页>Geogle colab notes 1-- run the.Py file on the cloud hard disk of Geogle
Geogle colab notes 1-- run the.Py file on the cloud hard disk of Geogle
2022-07-25 15:41:00 【whut_ L】
Catalog
One --Geogle Colab get google drive Authorization of
Two -- Appoint Google Drive The root directory of the cloud hard disk , be known as drive
3、 ... and -- Replication needs to run .py The absolute path of the folder where the file is located
5、 ... and -- Reference resources
One --Geogle Colab get google drive Authorization of
operation : Create a new one Colab ipynb file , Enter the following code :
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
from google.colab import auth
auth.authenticate_user()
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
import getpass
!google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} < /dev/null 2>&1 | grep URL
vcode = getpass.getpass()
!echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret}result : Pop up a link , Click the link to get Code, And enter it in the white box , Repeat twice .



Two -- Appoint Google Drive The root directory of the cloud hard disk , be known as drive
!mkdir -p drive
!google-drive-ocamlfuse drive # here colab It appears that drive Folder , It's yours google drive The root directory file of 3、 ... and -- Replication needs to run .py The absolute path of the folder where the file is located

analysis : Above picture , I will run .py File is ntu_gendata.py( The program is taken from CVPR 2020 A piece of Oral article ), Then the path generated by replication is /content/drive/Shift-GCN-master/data_gen( notes : No ntu_gendata.py The path of , Instead, it is located in the folder data_gen The path of ), According to the copied path Execute the following code :
cd /content/drive/Shift-GCN-master/data_genFour -- To run .py file
stay Colab In the new code box Execute the following code :
!python ntu_gendata.pynotes :! by english Letter .
analysis : The file generated after the code runs , take Automatically save in Geogle Hard disk in the cloud in ( according to .py The path set by the file ).
5、 ... and -- Reference resources
边栏推荐
- Cf566a greed + dictionary tree
- MySQL—用户和权限管控
- Pytorch框架练习(基于Kaggle Titanic竞赛)
- Take you to create your first C program (recommended Collection)
- <栈模拟递归>
- 死锁杂谈
- 2021hncpc-e-difference, thinking
- Find out what happened in the process of new
- No tracked branch configured for branch xxx or the branch doesn‘t exist. To make your branch trac
- var、let、const之间的区别
猜你喜欢

CF888G-巧妙字典树+暴力分治(异或最小生成树)

MySQL—用户和权限管控

Window system black window redis error 20creating server TCP listening socket *: 6379: listen: unknown error19-07-28

JVM knowledge brain map sharing

MySQL—常用SQL语句整理总结

Leetcode - 380 o (1) time to insert, delete and get random elements (design hash table + array)

LeetCode - 232 用栈实现队列 (设计 双栈实现队列)

Leetcode - 707 design linked list (Design)

LeetCode - 379 电话目录管理系统(设计)

LeetCode - 225 用队列实现栈
随机推荐
Box avoiding mouse
2022-07-25日报:微软提出CodeT:代码生成新SOTA,20个点的性能提升
Pytorch框架练习(基于Kaggle Titanic竞赛)
Use cpolar to build a business website (how to buy a domain name)
ICPC2021昆明M-暴力+主席树
GAMES101复习:线性代数
Xcode added mobileprovision certificate file error: Xcode encoded an error
JVM—类加载器和双亲委派模型
Cf750f1 thinking DP
C#精挑整理知识要点9 集合2(建议收藏)
ZOJ - 4114 Flipping Game-dp,合理状态表示
Leetcode - 359 log rate limiter (Design)
LeetCode - 677 键值映射(设计)*
如何解决跨域问题
MySQL—用户和权限管控
Brain racking CPU context switching
Binary complement
微信小程序
UIDocumentInteractionController UIDocumentPickerViewController
MATLAB读取显示图像时数据格式转换原因