Skip to content

Instantly share code, notes, and snippets.

View kashifulhaque's full-sized avatar
🤞
Infinite Void

Kashif kashifulhaque

🤞
Infinite Void
View GitHub Profile
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import Select
import time
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 8 columns, instead of 5. in line 8.
iter,random_start,ad_start,actual_ad,in_db,detected_ad,input_confidence,result
0,362419,362419,Ad for Cult fit fitness #advertising #ranveersingh #gym #fitness #motivation-enc,False,Ad for Cult fit fitness #advertising #ranveersingh #gym #fitness #motivation-enc,0.06,True
1,362419,372419,Ad for Cult fit fitness #advertising #ranveersingh #gym #fitness #motivation-enc,False,Ad for Cult fit fitness #advertising #ranveersingh #gym #fitness #motivation-enc,0.04,True
2,362419,382419,Ad for Cult fit fitness #advertising #ranveersingh #gym #fitness #motivation-enc,False,Ad for Cult fit fitness #advertising #ranveersingh #gym #fitness #motivation-enc,0.03,True
0,769514,769514,saajna,True,Gujarat Tourism Advertisement Ft. Amitabh Bachan Ahmedabad Tourism-enc,0.02,True
1,769514,779514,saajna,True,Great for the Good ft. Neeraj Chopra CRED-enc,0.01,True
2,769514,789514,saajna,True,OnePlus 11R 5G Solar Red Relive the Red Rush-enc,0.02,True
0,9424,9424,subway-enc,False,subway-enc,0.06,True
1,9424,19424,subway-enc,False
@kashifulhaque
kashifulhaque / NixOS-Unstable.md
Created April 13, 2024 10:07
To enable "unstable" branch in NixOS

Add the unstable NixOS channel

sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable

Update the unstable NixOS channel

sudo nix-channel --update nixos-unstable
@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)
@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 / decompress.sh
Created January 5, 2024 20:38
To decompress the tar file
#!/bin/bash
tar --use-compress-program=pigz -xvf archlinux_kde_${TIMESTAMP}.tar.gz
@kashifulhaque
kashifulhaque / compress.sh
Created January 5, 2024 20:34
Compress the config files (Arch + KDE setup)
#!/bin/bash
echo "A simple script compress my dotfiles"
echo "------------------------------------"
# Check if 'pigz' is installed or not
command_exists() {
command -v "$1" >/dev/null 2>&1
}
@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 / NvChad.md
Last active May 7, 2024 23:44
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 (