Skip to content

Instantly share code, notes, and snippets.

View Yugsolanki's full-sized avatar
🎯
Focusing

Yug Solanki Yugsolanki

🎯
Focusing
View GitHub Profile
@Yugsolanki
Yugsolanki / simhash_text_diff.py
Last active January 15, 2026 12:52
A Python utility to determine if text has changed meaningfully. It combines normalization, numeric value extraction, and Simhash/SequenceMatcher similarity ratios to ignore whitespace/formatting noise while detecting significant content updates.
from difflib import SequenceMatcher
from simhash import simhash
import re
def normalize(text: str) -> str:
text = text.lower()
text = re.sub(r"\s+", " ", text)
return text.strip()
@Yugsolanki
Yugsolanki / nemo_runner.py
Created November 22, 2025 14:17
For running .nemo model with live transcription.
import gradio as gr
import nemo.collections.asr as nemo_asr
import numpy as np
import soundfile as sf
import tempfile
import os
import librosa # NeMo installs this by default, we use it for resampling
# --- 1. Load and Configure Your Model ---
print("Loading model...")
@Yugsolanki
Yugsolanki / hindi_stt_issue.ipynb
Created October 24, 2025 14:07
hindi_stt_issue.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Yugsolanki
Yugsolanki / leetcode_fastest_runtime.cpp
Created August 31, 2025 19:31
Get leetcode fastest runtime. Just Paste the following code at the botton of your code before submitting.
#include <print>
auto init = std::atexit(
[]() { std::println(std::fopen("display_runtime.txt", "w"), "0"); });
@Yugsolanki
Yugsolanki / task.json
Created August 23, 2025 14:46
C++ file runner with utilities.cpp for DSA practice
{
"tasks": [
{
"label": "Build and Run and Clean",
"type": "shell",
"command": "g++ ${file} utilities.cpp -o program ; .\\program ; Get-ChildItem -Path . -Filter *.exe -Recurse | Remove-Item",
"group": {
"kind": "build",
"isDefault": true
},
@Yugsolanki
Yugsolanki / removeFromWatchLater.js
Created June 14, 2025 19:05
A small javascript script to remove multiple video from Watch Later
(async function removeFromWatchLater() {
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
// Get all buttons with correct label and class
const menuButtons = Array.from(document.querySelectorAll('button.style-scope.yt-icon-button[aria-label="Action menu"]'));
console.log(`Found ${menuButtons.length} action menu buttons`);
for (let i = 0; i < menuButtons.length; i++) {
try {
@Yugsolanki
Yugsolanki / 6-aiml-hons-predict-disease-risk-from-patient-data.ipynb
Created October 3, 2024 15:53
6 AIML Hons: Predict Disease Risk from Patient Data.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Yugsolanki
Yugsolanki / 5-aiml-hons-natural-language-entity-extraction-from-medical-reports.ipynb
Created October 3, 2024 13:45
5 AIML Hons: Natural Language Entity Extraction from Medical Reports.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Yugsolanki
Yugsolanki / 4-aiml-hons-medical-prognosis-based-on-patient-data.ipynb
Created October 3, 2024 13:42
4 AIML Hons: Medical Prognosis based on Patient Data.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Yugsolanki
Yugsolanki / 3-aiml-hons-diagnosis-based-on-mri-x-ray.ipynb
Created October 3, 2024 05:33
3 AIML Hons: Diagnosis based on MRI/X-Ray.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.