Skip to content

Instantly share code, notes, and snippets.

View rggassner's full-sized avatar

rggassner rggassner

  • Brazil
View GitHub Profile
@thepacketgeek
thepacketgeek / scapy-multiple-arguments.py
Created October 7, 2013 23:19
Using the scapy 'prn' argument, pass multiple arguments along with packet in a sniff(), s(), or sr() function.
# define API options
url = "http://hosted.app/api/packets"
token = "supersecretusertoken"
# create parent function with passed in arguments
def customAction(url,token):
# uploadPacket function has access to the url & token parameters because they are 'closed' in the nested function
def uploadPacket(packet):
# upload packet, using passed arguments
headers = {'content-type': 'application/json'}
from PIL import Image
import stable_inference
import numpy as np
from einops import repeat
'''
Interpolate between two images with a prompt of what you expect the midstate to be.
Alter the stuff below here to whatever you need it to be.
'''