Skip to content

Instantly share code, notes, and snippets.

View shiplu's full-sized avatar
🔭

Shiplu Mokaddim shiplu

🔭
View GitHub Profile
@1kastner
1kastner / reflect.py
Last active April 3, 2024 13:52 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@bombela
bombela / stress_client.py
Created August 6, 2012 18:59
stress PyZMQ to trigger the 'missing event' problem
#!/usr/bin/env python
import zerorpc.gevent_zmq as zmq
context = zmq.Context()
c = zmq.Socket(context, zmq.XREQ)
c.connect('tcp://127.0.0.1:9998')
print 'running'