Notes

[Colab] Google drive 연결하기

DevDr 2022. 9. 25. 00:00
반응형
from google.colab import drive
drive.mount('/content/drive')

아래는 예제 문서에 있는 내용으로, 파일을 작성하고 unmount하는 코드 예시를 보여주고 있다.

with open('/content/drive/My Drive/foo.txt', 'w') as f:
  f.write('Hello Google Drive!')
!cat /content/drive/My\ Drive/foo.txt
drive.flush_and_unmount()
print('All changes made in this colab session should now be visible in Drive.')
반응형

'Notes' 카테고리의 다른 글

Mac에 git 설치하기  (0) 2022.10.03
Apple Silicon Mac에서 Homebrew 설치 및 사용  (0) 2022.10.02
티스토리에서 LaTeX 수식 입력하기  (0) 2022.09.24
LaTeX 문법 정리  (0) 2022.09.24
Big-O notation  (0) 2022.09.24