evfro / ipypb Goto Github PK
View Code? Open in Web Editor NEWPython progress bar with rich output that uses native ipython functionality. Widget-free. Works even in JupyterLab.
License: MIT License
Python progress bar with rich output that uses native ipython functionality. Widget-free. Works even in JupyterLab.
License: MIT License
Setting option keep=False
does not affect the behavior of the printing of the inner track.
Input:
from ipypb import track
pb = track(total=10)
pb.update()
Error:
216
217 def update(self, *args, **kwargs):
--> 218 time_delta = timer() - self.last_updated
219 # control refresh rate
220 if (time_delta >= self.update_interval) or (self._progress == self.total):
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
There should be some way to initialize a timer for manual updating. Ideally, the first step just should be out of time statistics, and timer to be initialized at first update.
Due to below line in the code, the updates do not arrive when they come in bursts.
In practice, I encountered a case where 3/4 of the process happened immediately (due to caching), but the progress bar stayed at 0 for the next hour.
Line 220 in 2cc079d
Instead of only basing updates based on time, perhaps it would be good to also update if the progress was significantly changed or maybe just based on the progress difference instead of time? I think updates based on the amount of progress - say at least 1/4000th of progress - might make sense, because most displays cannot display more than 4000 pixels in the width anyway.
can you maybe change showprogress to something shorter? maybe simply show?
Currently, the track
function docstring only describes the total
parameter:
track(iterable=None, total=0, keep=True, cycle=False, label=None)
Docstring:
Progressbar supports displaying a progressbar like element
Init docstring:
Creates a new progressbar
Parameters
----------
total : int
maximum size of the progressbar
Please consider adding a brief description of the remaining parameters to the docstring. This helps developers to understand how to use the library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.