Colab – automatic authentication of connection to google drive, persistent per-notebook

Automatically mounting to your Drive files is now supported for Colab notebooks which aren’t shared by multiple people. To enable this for a notebook, create a new Drive notebook, open the file browser, and click the ‘Mount Drive’ button. You’ll see a permissions dialog like so: After you complete the permissions once, you’ll see your … Read more

How to import custom modules in google colab?

If your Python file is in Drive, it’s likely simpler to mount your Drive than to upload the file, e.g., from google.colab import drive drive.mount(‘/content/gdrive’) Then, if you have a module, you can import it like so: https://colab.research.google.com/drive/1uvHuizCBqFgvbCwEhK7FvU8JW0AfxgJw Contents of the Notebook follow: Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdocs.test%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.photos.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fpeopleapi.readonly&response_type=code Enter your authorization code: … Read more

Is it possible to connect vscode (on a local machine) with Google Colab (the free service) runtime?

I’ve just found another method without using ssh. # Install jupyterlab and ngrok !pip install jupyterlab==2.2.9 pyngrok -q # Run jupyterlab in background !nohup jupyter lab –ip=0.0.0.0 & # Make jupyterlab accessible via ngrok from pyngrok import ngrok print(ngrok.connect(8888)) It will then show a JupyterLab URL http://f1fe6fb39df6.ngrok.io # for example You can click it to … Read more

Install Python 3.8 kernel in Google Colaboratory

I have found how to run Python 3.8 notebook on Colab. install Anaconda3 add (fake) google.colab library start jupyterlab access it with ngrok Here’s the code # install Anaconda3 !wget -qO ac.sh https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh !bash ./ac.sh -b # a fake google.colab library !ln -s /usr/local/lib/python3.7/dist-packages/google \ /root/anaconda3/lib/python3.8/site-packages/google # start jupyterlab, which now has Python3 = 3.8 … Read more

Google Co-laboratory notebook PDF download

You can also run the solution of mayurmadnani directly on Colab. Therefore create a new Python workbook in Colab and connect it to a runtime. Install the necessary packages into the virtual machine with: !apt-get install texlive texlive-xetex texlive-latex-extra pandoc !pip install pypandoc Mount your google drive to get access to your ipynb files from … Read more

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