This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import webvtt | |
from collections import defaultdict | |
import cv2 | |
import glob | |
import os | |
from pprint import pprint | |
sub_files = glob.glob('*.srt') | |
sub_files.append( glob.glob('*.vtt') ) | |
#print(sub_files) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Averages a number of frames from your timelapse to create a smoother output. | |
#The number of frames you might want to average depends on the issues you're running into, but | |
#if you average too many it will make the world look like it's melting, and its slow. | |
#My timelapses tend to be multiday, and have long shooting intervals(5-20 minutes), so 6 frames | |
#averaged covers the day/night and night/day transition pretty well. 6-24 might be a reasonable range, | |
#but I would test ~10 seconds of frames at different averages, maybe try 6, 12, & 24. | |
#Place in a folder of JPGs that will sort correctly with a natsort, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#convert pngs to jpg | |
#find . -type d -exec bash -c 'cd "{}" && mogrify -format jpg *.png' \; | |
#find . -type f -name '*.png' -delete | |
#convert gifs to jpg | |
#find . -type d -exec bash -c 'cd "{}" && mogrify -format jpg *.gif' \; | |
#find . -type f -name '*.gif' -delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run like: | |
# python3 llm_page.py "https://www.cnn.com/2023/12/09/business/cosmcs-mcdonalds-drinks/index.html" | |
# you can optionally pass in a debug flag as the second argument, like: | |
# python3 llm_page.py "https://www.cnn.com/2023/12/09/business/cosmcs-mcdonalds-drinks/index.html" True | |
import json | |
import requests | |
from termcolor import cprint | |
from collections import OrderedDict | |
from readability import Document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Reads a text file -- domains.txt -- containing one domain per line and checks to see if the ssl cert is expiring in the next 30 days | |
#Config varaiables, | |
#days is the number of days you'll get an alert for, | |
#phone number | |
#api key from https://textbelt.com/ | |
days=30 | |
phone="##########" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#########SETUP######### | |
#textbelt_key: you get one free text per day with the key 'textbelt' or if you think you need more get an api key from https://textbelt.com/ | |
#phone_numbers: a single phone number as a list, just the digits, or if you want to send to multiple people, add addtional numbers in the list | |
#lat_lon: your latitude and longitude in the format "xxx.xxxx,-xxx.xxxx". https://mapper.acme.com/ is helpful here, though note to change the formatting (ie "N 45.52300 W 122.67600" to "45.52300,-122.67600") | |
#freezing_notification_temp: default is that you will be notified for temperatures at or below 35, but change that if you want | |
textbelt_key = "textbelt" | |
phone_numbers = ["5555555555","5555554444"] | |
lat_lon = "45.52300,-122.67600" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# create a file 'config.sh' where you set two variables one is your phone number the other is an api key from https://textbelt.com/ | |
#phone=########## | |
#apikey=####################################### | |
#the tool read through a file called "sites-to-diff.txt" which is a list of sites with one url per line. | |
source config.sh #get phone number & api key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://alttext.ai/api/v1/images \ | |
-s \ | |
-X POST \ | |
--header "X-Api-Key:API-KEY" \ | |
-H 'Content-Type: application/json' \ | |
-d "$( printf "{ \"image\": { \"raw\": \"$(base64 test.jpg)\" } }" )" \ | |
| jq \ | |
| grep -i alt_text \ | |
| perl -pe 's/^[^"]*"[^"]*"[^"]*"([^"]*)".+/$1/i' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//pass a text file with one url per line: | |
//node wave-screenshotter.js urls.txt | |
const fs = require( 'fs' ); | |
//get the arguments from the terminal | |
const myArgs = process.argv.slice( 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# takes a text file and makes an audiobook of it ex: | |
# ./generate_audiobook.sh input_book.txt | |
# a few notes, | |
# first, you'll need to install edge-tts (pip3 install edge-tts), sox (sudo apt-get install sox), and |