Skip to content

Instantly share code, notes, and snippets.

View thuvh's full-sized avatar
😀
hello world

Hoai-Thu Vuong thuvh

😀
hello world
View GitHub Profile
@krisbolton
krisbolton / vscode-import-could-not-be-resolved-by-pylance.md
Last active June 25, 2025 06:31
VSCode import could not be resolved by Pylance (reportMissingImports)

Problem

Visual Studio Code (VSCode) reports an error (yellow squiggly lines) saying "Import [nameOfModule] could not be resolved by Pylance (reportMissingImports)". You may be using a virtual environment (e.g., venv).

Solution

You need to tell Pylance where pip has installed the module you are trying to import. This is called an "additional path".

  1. Find the location of the module. In the VSCode terminal within your project enter the python interpreter by typing python.
  2. Once the interpreter is active (shown by >>> instead of $ or %) type import [nameOfModule] and press enter.
@zendobk
zendobk / 01-install-nvidia-driver.sh
Last active November 14, 2022 08:08
Steps to install CUDA 10.1 on Ubuntu 18.04
#!/bin/bash
set -eo pipefail
# Purge existing drivers first if needed
sudo apt-get purge --auto-remove -y "nvidia*"
sudo ubuntu-drivers autoinstall
sudo apt-mark manual nvidia-prime nvidia-settings libnvidia-compute-440:i386 libnvidia-decode-440:i386 libnvidia-encode-440:i386 libnvidia-gl-440:i386
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English