This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import websockets | |
uri = "ws://localhost:5511" | |
async def query(x): | |
async with websockets.connect(uri) as websocket: | |
params = f'ClientResponse `{x}' | |
await websocket.send(params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import websockets | |
import json | |
import asyncio | |
uri = "ws://localhost:5511" | |
async def subscribe(*args): | |
async with websockets.connect(uri) as websocket: | |
# subcription |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ handle websocket messages | |
.z.ws: {value x} | |
/ handle closure of websockets | |
.z.wc: {delete from `subs where handle = x} | |
/ function to generate data | |
gendata: { | |
/ convert to a list if x is atom (to handle random generating function '?' | |
if [0 > type x; x: 1#x]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set noerrorbells | |
set tabstop=4 softtabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set smartindent | |
set nu | |
set nowrap | |
set smartcase |