Last active
June 1, 2021 16:38
-
-
Save vsay01/12ff13b05d768dc2d4f4646fbf41cd33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone github repository setup | |
# import join used to join ROOT path and MY_GOOGLE_DRIVE_PATH | |
from os.path import join | |
# path to your project on Google Drive | |
MY_GOOGLE_DRIVE_PATH = 'My Drive/MyDrive/Udacity/deep-learning-v2-pytorch' | |
# replace with your Github username | |
GIT_USERNAME = "vsay01" | |
# definitely replace with your | |
GIT_TOKEN = "{YOUR_GITHUB_TOKEN}" | |
# Replace with your github repository in this case we want | |
# to clone deep-learning-v2-pytorch repository | |
GIT_REPOSITORY = "deep-learning-v2-pytorch" | |
PROJECT_PATH = join(ROOT, MY_GOOGLE_DRIVE_PATH) | |
# It's good to print out the value if you are not sure | |
print("PROJECT_PATH: ", PROJECT_PATH) | |
# In case we haven't created the folder already; we will create a folder in the project path | |
!mkdir "{PROJECT_PATH}" | |
#GIT_PATH = "https://{GIT_TOKEN}@github.com/{GIT_USERNAME}/{GIT_REPOSITORY}.git" this return 400 Bad Request for me | |
GIT_PATH = "https://" + GIT_TOKEN + "@github.com/" + GIT_USERNAME + "/" + GIT_REPOSITORY + ".git" | |
print("GIT_PATH: ", GIT_PATH) |
If you follow this tutorial https://towardsdatascience.com/google-drive-google-colab-github-dont-just-read-do-it-5554d5824228. ROOT was defined in https://gist.github.com/vsay01/fc0b174d60e3cebe2fa5c3000f622264#file-mount_google_drive-sh. Let me know if it helps.
Thanks, i see now where is my mistake, THANKS,
i made a different code with .mount
from google.colab import drive
drive.mount("/content/drive")
df1 = pd.read_csv("drive/MyDrive/foldername/dataname.csv")
df1.head(3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, i have an error when i execute this code, " NameError: name 'ROOT' is not defined", please can you help me to solve it?