Skip to content

Commit a276e7c

Browse files
authored
Add files via upload
1 parent fecc66d commit a276e7c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

fmz.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ def __init__(self, task = None, autoRun=False, gApis = None, progressCallback=No
13451345
js = os.path.join(tmpCache, 'md5.json')
13461346
if os.path.exists(js):
13471347
b = open(js, 'rb').read()
1348-
if os.getenv("BOTVS_TASK_UUID") is None or "21dc3fac221a039fd726f88d76432c74" in str(b):
1348+
if os.getenv("BOTVS_TASK_UUID") is None or "b106b87acf05b5295567b4a76126e03f" in str(b):
13491349
hdic = json_loads(b)
13501350
loader = os.path.join(tmpCache, soName)
13511351
update = False
@@ -1620,8 +1620,12 @@ def g__T(self, a, b=None):
16201620
return '[trans]'+r+'[/trans]'
16211621

16221622
def g__N(self, n, precision=4):
1623-
d = pow(10, precision)
1624-
return int(n*d) / float(d)
1623+
if precision < 0:
1624+
precision_factor = 10 ** -precision
1625+
return n - (n % precision_factor)
1626+
else:
1627+
small_factor = 1 / (10 ** (max(10, precision + 5)))
1628+
return int((n + small_factor) * (10 ** precision)) / (10 ** precision)
16251629

16261630
def Show(self):
16271631
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)