diff options
author | 2015-08-24 17:28:17 +0300 | |
---|---|---|
committer | 2015-08-24 17:28:17 +0300 | |
commit | 7d3be8c612e295820649779335288c197b80ccb2 (patch) | |
tree | 78e9636bc8780dedc919c30378a621f425e1cbfc /external_libs/python/pyzmq-14.7.0/examples/heartbeat/pong.py | |
parent | dab741a80699f86e86c91718872a052cca9bbb25 (diff) |
Changes location of console and fixed dependencies
Diffstat (limited to 'external_libs/python/pyzmq-14.7.0/examples/heartbeat/pong.py')
-rw-r--r-- | external_libs/python/pyzmq-14.7.0/examples/heartbeat/pong.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/external_libs/python/pyzmq-14.7.0/examples/heartbeat/pong.py b/external_libs/python/pyzmq-14.7.0/examples/heartbeat/pong.py deleted file mode 100644 index 524f3947..00000000 --- a/external_libs/python/pyzmq-14.7.0/examples/heartbeat/pong.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -"""This launches an echoing rep socket device using -zmq.devices.ThreadDevice, and runs a blocking numpy action. -The rep socket should remain responsive to pings during this time. - -Use ping.py to see how responsive it is. - -Authors -------- -* MinRK -""" -from __future__ import print_function - -import time -import numpy -import zmq -from zmq import devices - -ctx = zmq.Context() - -dev = devices.ThreadDevice(zmq.FORWARDER, zmq.REP, -1) -dev.bind_in('tcp://127.0.0.1:10111') -dev.setsockopt_in(zmq.IDENTITY, b"whoda") -dev.start() - -#wait for connections -time.sleep(1) - -A = numpy.random.random((2**11,2**12)) -print("starting blocking loop") -while True: - tic = time.time() - numpy.dot(A,A.transpose()) - print("blocked for %.3f s"%(time.time()-tic)) |