Skip to content

Instantly share code, notes, and snippets.

View ptaberg's full-sized avatar
🇬🇪

Mikola ptaberg

🇬🇪
View GitHub Profile
@fiddyschmitt
fiddyschmitt / speech_to_text.py
Created May 29, 2023 05:37
Generate subtitles/captions for MP4 file using OpenAI Whisper
import os
import whisper
from pathlib import Path
from concurrent.futures import ProcessPoolExecutor
#Requirements:
#pip install -U openai-whisper
#winget install ffmpeg
#copy ffmpeg.exe from this folder
#C:\Users\foo\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-6.0-full_build\bin\ffmpeg.exe
@afternoon
afternoon / rename_js_files.sh
Created February 15, 2014 18:04
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
@keeguon
keeguon / countries.json
Created April 5, 2012 11:11
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},