def ventilator(p_range, q_range):
    # Setup ZMQ socket
    context = zmq.Context()
    sock = context.socket(zmq.PUSH)
    sock.bind("tcp://0.0.0.0:5557")

    # Iterate over the grid, send each piece of computation to a worker.
    for p in p_range:
        for q in [0.01, 0.1, 1, 10]:
            work = { 'p' : p, 'q': q };
            print "sending work p=%d, q=%d..." % (p, q)
            sock.send_json(work)
dataset/ETHPy150Open mdup/easycluster/ventilatorsink.py/ventilator/original