Download base_plot.py from Kjppmp/Math_floath_plot: direct link, hf CLI and curl.
- Browser
- Download file 409 Bytes
-
https://huggingface.co/Kjppmp/Math_floath_plot/resolve/main/base_plot.py
- Command line
-
hf download hf://Kjppmp/Math_floath_plot/base_plot.py
-
curl -L -o base_plot.py https://huggingface.co/Kjppmp/Math_floath_plot/resolve/main/base_plot.py
409 Bytes
| ```python | |
| import requests | |
| def ingest_external_data(url): | |
| try: | |
| response = requests.get(url, timeout=5) | |
| # Zamieniamy tekst strony na liczby (macierz bajtów) | |
| raw_data = np.frombuffer(response.content[:16384], dtype=np.uint8) | |
| # Formujemy macierz 128x128 (jeśli mamy dość danych) | |
| matrix = torch.tensor(raw_data[:16384].reshape(128, 128)).float() | |
| # | |