Skip to content

Instantly share code, notes, and snippets.

@kbravh
kbravh / adjust-cron-for-dst.py
Last active March 26, 2023 17:14
Adjust cron events for DST (Daylight Savings Time) automatically with a Python function to be run on AWS Lambda.
from datetime import datetime
import pytz
import boto3
# define our CloudEvents client
client = boto3.client('events')
# Let's grab our current time in GMT and convert it to local time (US Central)
utc_time = datetime.utcnow().replace(tzinfo=pytz.utc)
# Set your timezone here! See timezones here: https://gist.github.com/heyalexej/8bf688fd67d7199be4a1682b3eec7568
@robzwolf
robzwolf / Hollywood.md
Created April 18, 2021 17:37
Hollywood

How to Launch Hollywood on Windows, macOS or Linux

  1. Install Docker Desktop.
  2. Open a Terminal (Windows / Mac / Linux) and maximise it to the full size of your screen.
  3. $ docker run --rm -it bcbcarl/hollywood
  4. To exit: Try mashing Ctrl-D and Ctrl-C. If you get to a terminal you can type exit to close the container.

    If this fails, just quit your terminal. 😁

@yasinuygun
yasinuygun / whisper_subtitle_generator.py
Last active January 6, 2024 08:43
Whisper Subtitle Generator
import sys
import whisper
from whisper.utils import write_srt
def run(input_path: str, output_path: str) -> None:
model = whisper.load_model("base")
result = model.transcribe(input_path)