Spaces:
Runtime error
Runtime error
Download speedtest.py from behaviour01/Supageusu: direct link, hf CLI and curl.
- Browser
- Download file 355 Bytes
-
https://huggingface.co/spaces/behaviour01/Supageusu/resolve/main/speedtest.py
- Command line
-
hf download hf://spaces/behaviour01/Supageusu/speedtest.py
-
curl -L -o speedtest.py https://huggingface.co/spaces/behaviour01/Supageusu/resolve/main/speedtest.py
355 Bytes
| import time | |
| import requests | |
| data = b"x" * 10_000_000 # 10 MB | |
| start = time.time() | |
| response = requests.post("https://httpbin.org/post", data=data) | |
| end = time.time() | |
| duration = end - start | |
| speed_mbps = (len(data) * 8) / (duration * 1_000_000) | |
| print(f"Upload time: {duration:.2f} seconds") | |
| print(f"Estimated outbound upload speed: {speed_mbps:.2f} Mbps") |