Skip to content

Instantly share code, notes, and snippets.

Avatar
🔭

Shiplu Mokaddim shiplu

🔭
View GitHub Profile
@1kastner
1kastner / reflect.py
Last active Jun 3, 2021 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
View reflect.py
#!/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 Aug 6, 2012
stress PyZMQ to trigger the 'missing event' problem
View stress_client.py
#!/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'