Skip to content

Instantly share code, notes, and snippets.

@mohittalele
mohittalele / whisper-transcribe.bash
Created November 18, 2022 13:10 — forked from DaniruKun/whisper-transcribe.bash
Transcribe (and translate) any VOD (e.g. from Youtube) using Whisper from OpenAI and embed subtitles!
#!/usr/bin/env bash
# Small shell script to more easily automatically download and transcribe live stream VODs.
# This uses YT-DLP, ffmpeg and the CPP version of Whisper: https://github.com/ggerganov/whisper.cpp
# Use `./transcribe-vod help` to print help info.
# MIT License
# Copyright (c) 2022 Daniils Petrovs
@mohittalele
mohittalele / yolov5-cls-image-classification-example.py
Last active December 23, 2022 10:07
Run Yolov5 cls on the image and Get results. This script also takes care of transformation
import torch
from PIL import Image
import torch.nn.functional as F
from torchvision import transforms as T
# ! python classify/predict.py --weights yolov5s-cls.pt --source https://thumbs.dreamstime.com/z/motorcycle-helmet-22053909.jpg --save-txt
model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5s-cls.pt')
IMAGENET_MEAN = 0.485, 0.456, 0.406
@mohittalele
mohittalele / k8s-utils.sh
Created November 30, 2023 14:36
Setup-k8s-utils
#!/bin/sh
wget https://github.com/derailed/k9s/releases/download/v0.26.7/k9s_Linux_x86_64.tar.gz
tar -xf k9s_Linux_x86_64.tar.gz
sudo mv k9s /usr/bin/
rm k9s_Linux_x86_64.tar.gz
# install kubectl
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -