Skip to content

Instantly share code, notes, and snippets.

View kashifulhaque's full-sized avatar
🙏
Malevolent Shrine

Kashif kashifulhaque

🙏
Malevolent Shrine
View GitHub Profile
@kashifulhaque
kashifulhaque / BERT101-notes.md
Created November 8, 2023 10:11
Notes from the HuggingFace article on BERT 101

An ML model for Natural Language Processing (NLP), developed in 2018 by folks at Google AI Language.

What is BERT used for?

  • Sentiment Analysis
  • Question Answering
  • Text prediction
  • Text generation
  • Summarization
  • Polysemy resolution (Can differentiate words that have multiple meanings, like "bank")
@kashifulhaque
kashifulhaque / docker-ubuntu.sh
Last active December 2, 2023 15:17
Install Docker on Ubuntu
#!/bin/bash
# Remove existing docker installations
echo "Removing existing docker ..."
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
@kashifulhaque
kashifulhaque / MariaDB.md
Last active November 28, 2023 04:11
Some handy MariaDB commands

To run MariaDB in docker (quickly) 🛢

Create a docker volume for MariaDB 🏐

# Make sure to persist the data by creating a volume first
docker volume create mariadb-volume

Run a docker container 🛳

docker run --name mariadb-instance \
 -v mariadb-volume:/var/lib/mysql:Z \
@kashifulhaque
kashifulhaque / docker-arch.md
Last active January 30, 2025 22:10
How to install Docker and Docker Compose on Arch Linux

If you do not have yay installed, then follow these steps to install it first

Update

yay

Install

yay -S docker docker-compose
@kashifulhaque
kashifulhaque / NvChad.md
Last active March 4, 2025 13:28
Neovim stuff with NvChad

Neovim keybinds

  • Capital letters do the opposite of small letters in command (Press shift to trigger capital letters)
  • _ (underscore) to move the cursor at the beginning of line (doesn't switch to insert mode)
    • 0 (zero) moves the cursor to the zeroth position of the line (doesn't switch to insert mode)
  • $ (dollar) to move the cursor at the end of line (doesn't switch to insert mode)
  • d$ will delete from wherever your cursor is till the end of the line
  • f<character> to move cursor to the first occurrence of <character>
    • f( to move cursor to first occurence of (
  • t<character> to move cursor to upto but not on the first occurrence of <character>
  • t( to move cursor to first occurence of (
@kashifulhaque
kashifulhaque / OhMyPosh_Environment.json
Created December 29, 2023 18:23
Show Python Environment in Oh My Posh
{
"background": "#181818",
"foreground": "p:white",
"style": "powerline",
"properties": {
"display_mode": "environment",
"fetch_virtual_env": true,
"home_enabled": true
},
"type": "python",
@kashifulhaque
kashifulhaque / conda.md
Created January 17, 2024 11:16
Conda environment

To export and share your conda environment

conda activate your_env_name
conda env export > environment.yml

To import environment from YAML file

@kashifulhaque
kashifulhaque / Bash-Hotkeys.md
Created February 13, 2024 18:29
Bash hotkeys
  • Ctrl + X kill active process
  • Ctrl + D exit active shell
  • Ctrl + L clear screen
  • Ctrl + Z put current process in background (fg to bring it back to foregorund)
  • Ctrl + A to go to front of a line
  • Ctrl + E to go the end of a line
  • Ctrl + F to go forward one character (right arrow)
  • Ctrl + B to go backward one character (left arrow)
  • Alt + F to go forward one word (vim w motion)
  • Alt + B to go backward one word (vim b motion)