Closed trag1c closed 2 years ago
display_stats
Config.load
cls
Config
Config.save
type(self)
self.__class__
typing
json.loads(f.read())
json.load(f)
f.write(json.dumps(obj))
json.dump(obj, f)
math.log(n, 2)
math.log2(n)
Example for 1007: 2**10 (1.01K) -> 2**9.9 (1K) (2**10 would actually be displayed once 1024 is hit)
2**10 (1.01K)
2**9.9 (1K)
2**10
Example for 1000: 2**10 (1K) -> 2**9.96 (1K)
2**10 (1K)
2**9.96 (1K)
Mcoding bot uses import typing primarily I believe
import typing
Before my PR it was 3x from typing import ... vs 2x import typing
from typing import ...
You need to run isort locally
isort
Added
display_stats
Changed
Config.load
class method actually usecls
overConfig
Config.save
usetype(self)
overself.__class__
typing
imports and typehints consistentjson.loads(f.read())
tojson.load(f)
f.write(json.dumps(obj))
tojson.dump(obj, f)
math.log(n, 2)
tomath.log2(n)
display_stats
display_stats
' exponents and approximate values will now be floored instead of roundeddisplay_stats
will now display 2 decimal places instead of 1 for exponentsRemoved