You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#https://stackoverflow.com/questions/12523586/python-format-size-application-converting-b-to-kb-mb-gb-tbdef b2hum(n): if n<1024: return str(n)+"B" n = float(n) unit = '' precision = 1 if (n / 1024) >= 1: n /= 1024 unit = 'KB' if (n / 1024) >= 1: n /= 1024 unit = 'MB' precision = 2 if precision: n = round(n, precision) else: n = round(n) return str(n) + unit