Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/L0garithmic/FastColabCopy
/ sizeof_fmt
Function
sizeof_fmt
fastcopy.py:11–16 ·
view source on GitHub ↗
(num, suffix='B')
Source
from the content-addressed store, hash-verified
9
10
11
def
sizeof_fmt(num, suffix=
'B'
):
12
for
unit in [
''
,
'K'
,
'M'
,
'G'
]:
13
if
abs(num) < 1000.0:
14
return
"%3.1f%s%s"
% (num, unit, suffix)
15
num /= 1000.0
16
return
"%.1f%s%s"
% (num,
'T'
, suffix)
17
18
19
class
FastCopy:
Callers
1
__init__
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected