Skip to content

Instantly share code, notes, and snippets.

View Shubhang's full-sized avatar
📈
Baby Steps

Shubhang Shubhang

📈
Baby Steps
View GitHub Profile
@Shubhang
Shubhang / RemoveYTShortVideos.js
Created August 14, 2023 11:50
Remove short videos from youtube recommendations
// Open YouTube: Navigate to the YouTube homepage.
// Open Developer Console: Press F12 or right-click anywhere on the page and select "Inspect" to open the developer console. Then, click on the "Console" tab.
// Paste and Run the Script: Copy and paste the following code into the console, then press Enter.
// This code searches for video duration elements on the page and hides the corresponding video if its duration is less than 10 minutes.
// Repeat as Needed: If you scroll down and more videos load, or if you navigate to a different page, you'll need to run the script again.
@Shubhang
Shubhang / loadGlobalProtect.sh
Created April 18, 2023 16:05
Global Protect Load/Unload Macos
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*
@Shubhang
Shubhang / SortViaCharacters.py
Last active April 11, 2023 16:13
group by using hyphens, underscores and numbers
import os
import shutil
import re
def main():
base_dir = '.' # Set the base directory to search for files
for root, _, files in os.walk(base_dir):
for file in files:
new_folder_name = None
@Shubhang
Shubhang / sortViaSimilarity.py
Last active April 11, 2023 16:13
Group by Similarity
import os
import shutil
from difflib import SequenceMatcher
def similarity(a, b):
return SequenceMatcher(None, a, b).ratio()
def main():
base_dir = '.' # Set the base directory to search for files
similarity_threshold = 0.6
@Shubhang
Shubhang / music_visualizer.py
Created March 29, 2023 23:02
Visualizing Audio with Python: Music Visualizer using NumPy, Matplotlib, MoviePy, and PyDub | GitHub Gist
# Author: Shubhang, 2023
# Description: This Python script demonstrates how to visualize audio using NumPy, Matplotlib, and MoviePy.
# It reads an audio file in WAV format, converts the audio samples to a NumPy array,
# and creates a video animation from a plot of the audio samples.
# The resulting video file shows the amplitude of the audio samples over time.
import numpy as np
import matplotlib.pyplot as plt