LAION-AI /
Open-Assistant
OpenAssistant is a chat-based assistant that understands tasks, can interact with third-party systems, and retrieve information dynamically to do so.
Loading repository data…
dpallot / repository
A python based websocket server that is simple and easy to use.
You can install SimpleWebSocketServer by running the following command...
pip install SimpleWebSocketServer
Or by downloading the repository and running sudo python setup.py install.
Installation via pip is suggested.
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
class SimpleEcho(WebSocket):
def handleMessage(self):
# echo message back to client
self.sendMessage(self.data)
def handleConnected(self):
print(self.address, 'connected')
def handleClose(self):
print(self.address, 'closed')
server = SimpleWebSocketServer('', 8000, SimpleEcho)
server.serveforever()
Open websocket.html and connect to the server.
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
clients = []
class SimpleChat(WebSocket):
def handleMessage(self):
for client in clients:
if client != self:
client.sendMessage(self.address[0] + u' - ' + self.data)
def handleConnected(self):
print(self.address, 'connected')
for client in clients:
client.sendMessage(self.address[0] + u' - connected')
clients.append(self)
def handleClose(self):
clients.remove(self)
print(self.address, 'closed')
for client in clients:
client.sendMessage(self.address[0] + u' - disconnected')
server = SimpleWebSocketServer('', 8000, SimpleChat)
server.serveforever()
Open multiple websocket.html and connect to the server.
There is an example which provides a simple echo and chat server
Echo Server
python SimpleExampleServer.py --example echo
Chat Server (open up multiple websocket.html files)
python SimpleExampleServer.py --example chat
Generate a certificate with key
openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout key.pem
Run the secure TLS/SSL server (in this case the cert.pem file is in the same directory)
python SimpleExampleServer.py --example chat --ssl 1 --cert ./cert.pem
Offer the certificate to the browser by serving websocket.html through https. The HTTPS server will look for cert.pem in the local directory. Ensure the websocket.html is also in the same directory to where the server is run.
sudo python SimpleHTTPSServer.py
Open a web browser to: https://localhost:443/websocket.html
Change ws://localhost:8000/ to wss://localhost:8000 and click connect.
Note: if you are having problems connecting, ensure that the certificate is added in your browser against the exception https://localhost:8000 or whatever host:port pair you want to connect to.
handleConnected: called when handshake is complete
handleClose: called when the endpoint is closed or there is an error
handleMessage: gets called when there is an incoming message from the client endpoint
sendMessage: send some text or binary data to the client endpoint
sendClose: send close frame to endpoint
The MIT License (MIT)
Selected from shared topics, language and repository description—not editorial ratings.
LAION-AI /
OpenAssistant is a chat-based assistant that understands tasks, can interact with third-party systems, and retrieve information dynamically to do so.
ScrapeGraphAI /
Python scraper based on AI
lightgbm-org /
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
ansible /
AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
pyodide /
Pyodide is a Python distribution for the browser and Node.js based on WebAssembly
deeplearning4j /
Suite of tools for deploying and training deep learning models using the JVM. Highlights include model import for keras, tensorflow, and onnx/pytorch, a modular and tiny c++ library for running math code and a java based math library on top of the core c++ library. Also includes samediff: a pytorch/tensorflow like library for running deep learn...