Kjppmp commited on
Commit
b483d5e
·
verified ·
1 Parent(s): 430aaa3

Rename README.md to base_ploat.py

Browse files
Files changed (2) hide show
  1. README.md +0 -3
  2. base_ploat.py +12 -0
README.md DELETED
@@ -1,3 +0,0 @@
1
- ---
2
- license: openrail
3
- ---
 
 
 
 
base_ploat.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```python
2
+ import requests
3
+
4
+ def ingest_external_data(url):
5
+ try:
6
+ response = requests.get(url, timeout=5)
7
+ # Zamieniamy tekst strony na liczby (macierz bajtów)
8
+ raw_data = np.frombuffer(response.content[:16384], dtype=np.uint8)
9
+ # Formujemy macierz 128x128 (jeśli mamy dość danych)
10
+ matrix = torch.tensor(raw_data[:16384].reshape(128, 128)).float()
11
+
12
+ #