This file contains hidden or 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
#!/usr/bin/env python3 | |
# Script to extract song/video title, artist, album, etc. metadata from screenshots w/ GPT-4. | |
### Example Usage: ############################################################################### | |
# | |
# ➜ ~/Desktop # python3 music_in_screnshots.py --prompt=prompt.txt --attach=spotify_screenshot.PNG | |
# { | |
# "found_prominent_media": true, | |
# "all_strings": [ |
This file contains hidden or 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
from builtins import object | |
import weakref | |
from time import sleep | |
from threading import Thread, Event, Lock | |
from pymavlink import mavutil | |
import pymavlink.dialects.v20.ardupilotmega as mavlink | |
class WriteLockedFile(object): |
This file contains hidden or 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
from imutils.object_detection import non_max_suppression | |
import numpy as np | |
import imutils | |
import cv2 | |
import requests | |
import time | |
import argparse | |
import time | |
import base64 |
This file contains hidden or 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
#!/usr/bin/env python | |
import sys, os, socket, pickle | |
from time import time | |
from optparse import OptionParser | |
UDP_IP = "127.0.0.1" | |
UDP_PORT = 31200 | |
# tell python where to find mavlink so we can import it |