Skip to content

Instantly share code, notes, and snippets.

View gretchenleighmiller's full-sized avatar

Gretchen Leigh Miller gretchenleighmiller

  • Internet Archive
  • Vancouver, BC
View GitHub Profile
@gretchenleighmiller
gretchenleighmiller / random-frame-tweeter.py
Last active November 19, 2020 05:46
Tweeting a random frame from a bunch of videos in a directory
# Run this on a timer as a cronjob or Lambda function or whatever works for you.
# I just run it as a cronjob and set the environment variables directly in the crontab.
import cv2
import os
from random import randint
import twitter
videos_directory = os.environ['VIDEOS_DIR']