Importing .py files in Google Colab

You can save it first, then import it. from google.colab import files src = list(files.upload().values())[0] open(‘mylib.py’,’wb’).write(src) import mylib Update (nov 2018): Now you can upload easily by click at [>] to open the left pane choose file tab click [upload] and choose your [mylib.py] import mylib Update (oct 2019): If you don’t want to upload … Read more

Import data into Google Colaboratory

An official example notebook demonstrating local file upload/download and integration with Drive and sheets is available here: https://colab.research.google.com/notebooks/io.ipynb The simplest way to share files is to mount your Google Drive. To do this, run the following in a code cell: from google.colab import drive drive.mount(‘/content/drive’) It will ask you to visit a link to ALLOW … Read more

wget/curl large file from google drive

June 2022 You can use gdown. Consider also visiting that page for full instructions; this is just a summary and the source repo may have more up-to-date instructions. Instructions Install it with the following command: pip install gdown After that, you can download any file from Google Drive by running one of these commands: gdown … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)