If you want to run deep learning models or GPU-accelerated tasks on Ubuntu, having an NVIDIA GPU and the correct drivers is essential. This guide will help you check if a GPU is available and set it up properly for PyTorch. 1 Check if your system has an NVIDIA GPU Open a terminal and run: lspci | grep -i nvidia ✅ If output appears , your system has an NVIDIA GPU. 0000:01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce MX350] (rev a1) ❌ If no output , your system either doesn't have a GPU or it's disabled in BIOS. 💡 Tip: Take note of your GPU model. You'll need it to choose the correct driver. 2 Check if NVIDIA drivers are installed Run: nvidia-smi ✅ If working , you will see a table with GPU info, driver version, and CUDA version: +-----------------------------------------------------------------------------+ | N...
To use the Google Custom Search JSON API to retrieve images, you need two things : ✅ 1. Google API Key 🔧 Steps: Go to the Google Cloud Console. Create a new project (or select an existing one). In the left sidebar, go to APIs & Services > Credentials . Click "Create credentials" > "API key" . Copy the API Key shown — you'll use this in your code. ✅ 2. Custom Search Engine ID (cx) 🔧 Steps: Go to the Custom Search Engine (CSE) page. Click "Get Started" . Enter a domain to search (e.g., www.google.com or leave it as *.com to search the whole web). Click "Create" . After it's created, go to the Control Panel . Under "Search engine ID" , you'll see your cx value — copy this . 🛠Enable Image Search: In the Custom Search Engine settings (Control Panel): Go to "Basics" > Sites to search → make sure it’s set to “Search the entire web” . Go to ...
How to Remove a File or Folder from Git Without Losing It Locally How to Remove a File or Folder from Git Without Losing It Locally Safely untrack sensitive or noisy files (like .env ) from your repository while keeping them on your machine. When working on projects, you often have files that shouldn’t be tracked by Git , such as .env files containing sensitive credentials or configuration data. Committing these files can expose secrets and clutter your repository. But what if they are already tracked? You can safely remove them from Git while keeping them on your local machine . Here’s how. Remove the file from Git index Use the --cached option to untrack the file: Copy git rm --cached .env --cached tells Git to remove the file from version co...
Comments
Post a Comment
What is your thought about this?