Skip to content

Instantly share code, notes, and snippets.

Avatar

John Ellis deckerego

View GitHub Profile
@legastero
legastero / send_image.py
Last active Apr 10, 2020
Send an image in a chat message with SleekXMPP
View send_image.py
import logging
import threading
import sleekxmpp
logging.basicConfig(level=logging.DEBUG)
class Bot(sleekxmpp.ClientXMPP):
def __init__(self, jid, password):
@russss
russss / grab_mjpeg_frame.py
Created Aug 13, 2011
Grab a single frame from an MJPEG stream
View grab_mjpeg_frame.py
#!/usr/bin/env python
import socket
import sys
if len(sys.argv) != 3:
print "Usage: %s host:port destfile.jpg" % sys.argv[0]
sys.exit(1)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host, port = sys.argv[1].split(':')
You can’t perform that action at this time.