Download tempCodeRunnerFile.python from TRUMO12/LLM_QA: direct link, hf CLI and curl.
- Browser
- Download file 441 Bytes
-
https://huggingface.co/datasets/TRUMO12/LLM_QA/resolve/main/tempCodeRunnerFile.python
- Command line
-
hf download hf://datasets/TRUMO12/LLM_QA/tempCodeRunnerFile.python
-
curl -L -o tempCodeRunnerFile.python https://huggingface.co/datasets/TRUMO12/LLM_QA/resolve/main/tempCodeRunnerFile.python
441 Bytes
| import socket | |
| import threading | |
| client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| client.connect(("127.0.0.1", 12345)) | |
| def receive(): | |
| while True: | |
| try: | |
| msg = client.recv(1024).decode() | |
| print(msg) | |
| except: | |
| break | |
| def write(): | |
| while True: | |
| msg = input() | |
| client.send(msg.encode()) | |
| threading.Thread(target=receive).start() | |
| threading.Thread(target=write).start() |