Update README.md
This commit is contained in:
@@ -8,4 +8,13 @@ source "$HOME/.${SHELL##*/}rc"
|
||||
```py
|
||||
__import__('concurrent').futures.ThreadPoolExecutor().submit(
|
||||
lambda x: (print(x * 2) or x ** 2 / 0), 3).result()
|
||||
```
|
||||
|
||||
## zmq.REQ
|
||||
```py
|
||||
def File(blob):
|
||||
try: import zmq; File.sock.send_pyobj(blob); return File.sock.recv_pyobj()
|
||||
except (AttributeError, zmq.Again):
|
||||
(sock := zmq.Context().socket(zmq.REQ)).connect('tcp://localhost:6106')
|
||||
sock.RCVTIMEO = 1000; File.sock = sock; return File(blob)
|
||||
```
|
||||
Reference in New Issue
Block a user