MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _human_bytes

Method _human_bytes

IntelOSINT.py:11113–11125  ·  view source on GitHub ↗
(self, size_bytes)

Source from the content-addressed store, hash-verified

11111 return {"error": f"Errore confronto facciale: {e}"}
11112
11113 def _human_bytes(self, size_bytes):
11114 try:
11115 size = int(size_bytes)
11116 except (TypeError, ValueError):
11117 return str(size_bytes)
11118 units = ["B", "KB", "MB", "GB", "TB"]
11119 value = float(size)
11120 for unit in units:
11121 if value < 1024 or unit == units[-1]:
11122 if unit == "B":
11123 return f"{int(value)} {unit}"
11124 return f"{value:.2f} {unit}"
11125 value /= 1024
11126
11127 def _google_maps_get_public(self, url, headers):
11128 try:

Callers 1

analyze_gdrive_docMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected