Update app.py
Browse files
app.py
CHANGED
|
@@ -1,26 +1,11 @@
|
|
| 1 |
-
# bucket_test.py
|
| 2 |
import os
|
|
|
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
f.write(CONTENT)
|
| 10 |
-
print(f"Written {len(CONTENT)} bytes to {TEST_PATH}")
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
result = f.read()
|
| 15 |
-
|
| 16 |
-
if result == CONTENT:
|
| 17 |
-
print("PASS — bytes match exactly")
|
| 18 |
-
else:
|
| 19 |
-
print("FAIL — bytes differ")
|
| 20 |
-
print(f"Expected: {CONTENT}")
|
| 21 |
-
print(f"Got: {result}")
|
| 22 |
-
|
| 23 |
-
# List /data
|
| 24 |
-
print("\n/data contents:")
|
| 25 |
-
for f in os.listdir("/data"):
|
| 26 |
-
print(f" - {f}")
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
+
from pathlib import Path
|
| 3 |
|
| 4 |
+
total = sum(f.stat().st_size for f in Path("/data/matches").rglob("*") if f.is_file())
|
| 5 |
+
print(f"/data/matches: {total / 1024**3:.2f} GB")
|
| 6 |
|
| 7 |
+
total2 = sum(f.stat().st_size for f in Path("/data/by-language").rglob("*") if f.is_file())
|
| 8 |
+
print(f"/data/by-language: {total2 / 1024**3:.2f} GB")
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
total3 = sum(f.stat().st_size for f in Path("/data/image-shards").rglob("*") if f.is_file())
|
| 11 |
+
print(f"/data/image-shards: {total3 / 1024**3:.2f} GB")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|