Skip to content

Instantly share code, notes, and snippets.

@cr2007
cr2007 / add_subtitles.py
Created February 7, 2024 15:33 — forked from sarmadgulzar/add_subtitles.py
Launchpad Presentation
import cv2
from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip
from moviepy.video.VideoClip import ImageClip, TextClip
img = cv2.imread("input.png")
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
vid = ImageClip(img)
frame_height = img.shape[0]
@cr2007
cr2007 / 🐐.py
Created February 3, 2024 08:28
🐐
import json
import os
import pathlib
import subprocess
import time
import whisper
import yt_dlp
from whisper.utils import get_writer
@cr2007
cr2007 / transcript.js
Created July 9, 2023 12:58
Extracting Microsoft Stream Transcripts
// Credit: https://www.rushworth.us/lisa/?p=6854
var objTranscriptionLines = window.angular.element(window.document.querySelectorAll('.transcript-list')).scope().$ctrl.transcriptLines;
var strRunningText = "";
for(var i = 0; i < objTranscriptionLines.length; i++){
if( objTranscriptionLines[i] ){
var strLineText = objTranscriptionLines[i].eventData.text;
strRunningText = strRunningText + "\n" + strLineText;
}
}
@cr2007
cr2007 / README.md
Last active November 14, 2022 18:08
GNS3 Common Commands
@cr2007
cr2007 / README.md
Created January 1, 2022 14:18
Getting Verified Commits in GitHub while using VS Code

If you also want to have verified commits on GitHub while editing your files locally via VS Code, like this A screenshot of the commit history of the Node.js repository on GitHub

Here's how to do it:

First, you have to make sure that you have gpg installed
You can do so by entering the following command

gpg --version
@cr2007
cr2007 / README.md
Last active January 13, 2023 12:48
Automating Dark, Light Mode for Windows 10

Using the Task Scheduler, you can schedule when to enable Dark Mode for apps by using these Powershell commands and setting them to be triggered at the time you prefer.

Switching to Dark Theme

New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force

Switching back to Light Mode

New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1 -Type Dword -Force;