google-colaboratory

Initializing an earth engine project in Colab

Initializing an earth engine project in Colab Question: I can no longer initailize my own earth engine project on Google colab using Python. I tried initializing using the ee.Initialize() method on Colab with used to provide with a link that will generate a token to my project but instead i get this error: WARNING:googleapiclient.http:Encountered 403 …

Total answers: 2

Conversion to .lmdb format of PNG Images

Conversion to .lmdb format of PNG Images Question: I ran a python script below to convert my png images to .lmdb files: import sys import os import os.path import glob import pickle import lmdb import cv2 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from utils.progress_bar import ProgressBar # configurations img_folder = "/content/drive/MyDrive/sub-dataset-2/divk/*" # glob matching pattern lmdb_save_path = "/content/drive/MyDrive/sub-dataset-2/trainHR_lmdb/" #’/mnt/SSD/xtwang/BasicSR_datasets/DIV2K800/DIV2K800.lmdb’ # …

Total answers: 1

ImportError: Using the Trainer with PyTorch requires accelerate = 0.20.1

ImportError: Using the Trainer with PyTorch requires accelerate = 0.20.1 Question: Please help me when I tried to use it in my Google Colab for transformers error: ImportError: Using the Trainer with PyTorch requires accelerate=0.20.1: Please run pip install transformers[torch] or pip install accelerate -U` NOTE: If your import is failing due to a missing …

Total answers: 2

How to set up geckodriver with Selenium in google-colaboratory?

How to set up geckodriver with Selenium in google-colaboratory? Question: For some context, I’m using Google Collab to try to make a webscraper, and for that I want to use selenium. But I can’t seem to set up the web driver properly. Google uses Ubuntu servers I believe. This is my first time trying to …

Total answers: 1

kivy app closes immediately i launch it on phone

kivy app closes immediately i launch it on phone Question: hey i have been compiling several kivy apps and they have been working just fine on my phone. however, recently all apps have been crashing immediately i launch them on my phone. i have been using google colab and python. it might be important to …

Total answers: 3

How to use an unlisted Python Package with 'pyproject.toml' file in Google Colab

How to use an unlisted Python Package with 'pyproject.toml' file in Google Colab Question: I am trying to use an Unofficial Twitter API using python library called RedGalaxy on Google Colab. This package is not yet available on Pypi platform. I have tried to build the package in Google colab itself but wasn’t able to …

Total answers: 2

How to import a class/function in google Colab from a .py file on google drive

How to import a class/function in google Colab from a .py file on google drive Question: I am trying to import a class from a .py file which is stored in my google drive. Initially, I have mounted google drive as follows: from google.colab import drive drive.mount(‘/content/drive’) Then navigate into the destination folder using: %cd …

Total answers: 1

How to copy a folder with all the subfolders from colab to drive?

How to copy a folder with all the subfolders from colab to drive? Question: I need to copy a folder I created in the temporary space of Google Colab to Drive. This is the command %cp Thesis2023 /drive/MyDrive/Thesis2023 Thesis 2023 is the folder I need to copy to drive, but I get this error cp: …

Total answers: 1

How to cure Google Colab with miniconda installed and get on import ModuleNotFoundError?

How to cure Google Colab with miniconda installed and get on import ModuleNotFoundError? Question: I have used Google Colab for more than half a year successfully for a special application. In the beginning of my Colab-notebook script I install conda and use conda-forge for installing a key Python package. At the beginning of this year …

Total answers: 1