Based on ChatGPT reply https://chat.openai.com/share/991bdeb0-628a-4eed-b267-39f873f38af9
Can calculate any empty textbox.
| .PHONY: venv install run clean | |
| # Create virtual environment | |
| venv: | |
| python3 -m venv .venv | |
| # Install dependencies | |
| install: venv | |
| . .venv/bin/activate && pip install fastapi "uvicorn[standard]" pydantic |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>EastMoney K-line Picture Viewer</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| margin: 2em; | |
| } |
| import asyncio | |
| import random | |
| import time | |
| from contextlib import asynccontextmanager | |
| from fastapi import FastAPI, WebSocket, WebSocketDisconnect | |
| from fastapi.responses import HTMLResponse | |
| # Store connected WebSocket clients globally | |
| connected_clients = [] | |
| # Task references to properly manage background tasks |
| # Python 3.11 | |
| # https://peps.python.org/pep-0673/ | |
| from typing import Literal, Self | |
| import pandas as pd | |
| import networkx as nx | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| class NegCycleDetector: |
| from urllib.parse import urlparse | |
| # pip install -i https://pypi.tuna.tsinghua.edu.cn/simple PySocks websockets asyncio | |
| import asyncio | |
| import ssl | |
| # https://github.com/Anorov/PySocks | |
| import socks | |
| # https://github.com/python-websockets/websockets | |
| import websockets | |
| import json |
| from typing import Tuple | |
| import GPUtil | |
| import torch | |
| import time | |
| import os | |
| from filelock import FileLock | |
| from tap import Tap | |
| # pip install gputil torch filelock typed-argument-parser |
| # ~/.s3cfg | |
| [default] | |
| access_key = AAAAAAAAAAAAAAAAAAAA | |
| bucket_location = US | |
| host_base = url.to.minio | |
| secret_key = 0000000000000000000000000000000000000000000 |
Based on ChatGPT reply https://chat.openai.com/share/991bdeb0-628a-4eed-b267-39f873f38af9
Can calculate any empty textbox.