9ef50183c43700fea3bfbacaa70b2283631373e8,pymc/progressbar.py,ProgressBar,animate_ipython,#ProgressBar#Any#,35
Before Change
// time.sleep(0.5)
def animate_ipython(self, iter):
try:
clear_output()
except Exception:
// terminal IPython has no clear_output
pass
print("\r", self, end="")
sys.stdout.flush()
self.update_iteration(iter)
After Change
self.update_iteration(iter)
def animate_ipython(self, iter):
elapsed = time.time() - self.start
iter = iter + 1
if elapsed - self.last > .5 or iter == self.iterations:
self.last = elapsed
self.update_iteration(iter)
fraction = int(100*iter/float(self.iterations))
display(Javascript("$("div//%s").width("%i%%")" % (self.divid, fraction)))
display(Javascript("$("label//%s").text("%i%% in %.1f sec")" % (self.sec_id, fraction, round(elapsed, 1))))
def update_iteration(self, elapsed_iter):
self.__update_amount((elapsed_iter / float(self.iterations)) * 100.0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: pymc-devs/pymc3
Commit Name: 9ef50183c43700fea3bfbacaa70b2283631373e8
Time: 2013-04-14
Author: jsalvatier@gmail.com
File Name: pymc/progressbar.py
Class Name: ProgressBar
Method Name: animate_ipython
Project Name: jhfjhfj1/autokeras
Commit Name: b048efa4f956b80266942caea6ee8b4311e1d17a
Time: 2018-04-08
Author: jin@tamu.edu
File Name: autokeras/classifier.py
Class Name: ClassifierBase
Method Name: fit