Skip to content

Instantly share code, notes, and snippets.

@hibi-myzk
Last active September 4, 2023 02:01
Show Gist options
  • Save hibi-myzk/be398d4d4323f3c5456d7931fb2e141b to your computer and use it in GitHub Desktop.
Save hibi-myzk/be398d4d4323f3c5456d7931fb2e141b to your computer and use it in GitHub Desktop.
from google.colab import drive
def mount_drive(project_name):
drive.mount("/content/drive")
colab_dir_path = "/content/drive/MyDrive/Colab Notebooks"
project_dir_path = f"{colab_dir_path}/{project_name}"
data_path = f"{project_dir_path}/data"
return colab_dir_path, project_dir_path, data_path
@hibi-myzk
Copy link
Author

hibi-myzk commented Sep 1, 2023

PROJECT = "Project Name"
# mount google drive
!pip install gist-import | tail -n 1
from gist_import import GistImporter
gi = GistImporter("be398d4d4323f3c5456d7931fb2e141b")
colab_dir_path, project_dir_path, data_path = gi["mount_drive"](PROJECT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment