upgini 1.1.180a5__py3-none-any.whl → 1.1.180a6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of upgini might be problematic. Click here for more details.
- upgini/utils/progress_bar.py +15 -17
- {upgini-1.1.180a5.dist-info → upgini-1.1.180a6.dist-info}/METADATA +1 -1
- {upgini-1.1.180a5.dist-info → upgini-1.1.180a6.dist-info}/RECORD +6 -6
- {upgini-1.1.180a5.dist-info → upgini-1.1.180a6.dist-info}/LICENSE +0 -0
- {upgini-1.1.180a5.dist-info → upgini-1.1.180a6.dist-info}/WHEEL +0 -0
- {upgini-1.1.180a5.dist-info → upgini-1.1.180a6.dist-info}/top_level.txt +0 -0
upgini/utils/progress_bar.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
from typing import Tuple
|
|
2
|
-
from IPython.display import DisplayObject
|
|
3
|
-
from IPython.core import display_functions
|
|
4
|
-
from binascii import hexlify
|
|
5
1
|
import os
|
|
2
|
+
from binascii import hexlify
|
|
3
|
+
from typing import Tuple
|
|
4
|
+
|
|
5
|
+
from IPython.display import DisplayObject, display
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class CustomProgressBar(DisplayObject):
|
|
9
|
-
"""Progressbar supports displaying a progressbar like element
|
|
10
|
-
|
|
9
|
+
"""Progressbar supports displaying a progressbar like element"""
|
|
10
|
+
|
|
11
11
|
def __init__(self, total=100):
|
|
12
12
|
"""Creates a new progressbar
|
|
13
13
|
|
|
@@ -18,29 +18,27 @@ class CustomProgressBar(DisplayObject):
|
|
|
18
18
|
"""
|
|
19
19
|
self.total = total
|
|
20
20
|
self._progress = 0
|
|
21
|
-
self.html_width =
|
|
21
|
+
self.html_width = "60ex"
|
|
22
22
|
self.text_width = 60
|
|
23
|
-
self._display_id = hexlify(os.urandom(8)).decode(
|
|
23
|
+
self._display_id = hexlify(os.urandom(8)).decode("ascii")
|
|
24
24
|
self._stage = ""
|
|
25
25
|
|
|
26
26
|
def __repr__(self):
|
|
27
27
|
fraction = self.progress / self.total
|
|
28
|
-
filled =
|
|
29
|
-
rest =
|
|
30
|
-
return
|
|
31
|
-
filled, rest,
|
|
32
|
-
self.progress, self._stage
|
|
33
|
-
)
|
|
28
|
+
filled = "=" * int(fraction * self.text_width)
|
|
29
|
+
rest = " " * (self.text_width - len(filled))
|
|
30
|
+
return "[{}{}] {}% {}".format(filled, rest, self.progress, self._stage)
|
|
34
31
|
|
|
35
32
|
def _repr_html_(self):
|
|
36
33
|
return "<progress style='width:{}' max='{}' value='{}'></progress> {}% {}".format(
|
|
37
|
-
self.html_width, self.total, self.progress, self.progress, self._stage
|
|
34
|
+
self.html_width, self.total, self.progress, self.progress, self._stage
|
|
35
|
+
)
|
|
38
36
|
|
|
39
37
|
def display(self):
|
|
40
|
-
|
|
38
|
+
display(self, display_id=self._display_id)
|
|
41
39
|
|
|
42
40
|
def update(self):
|
|
43
|
-
|
|
41
|
+
display(self, display_id=self._display_id, update=True)
|
|
44
42
|
|
|
45
43
|
@property
|
|
46
44
|
def progress(self):
|
|
@@ -40,13 +40,13 @@ upgini/utils/format.py,sha256=Yv5cvvSs2bOLUzzNu96Pu33VMDNbabio92QepUj41jU,243
|
|
|
40
40
|
upgini/utils/ip_utils.py,sha256=ChIq-XOzo3woKA_NNxbrp68aXLwtQnu8DqTJ8G6EANI,1672
|
|
41
41
|
upgini/utils/phone_utils.py,sha256=JNSkF8G6mgsN8Czy11pamaJdsY6rBINEMpi7jbVt_RA,408
|
|
42
42
|
upgini/utils/postal_code_utils.py,sha256=_8CR9tBqsPptQsmMUvnrCAmBaMIQSWH3JfJ4ly3x_zs,409
|
|
43
|
-
upgini/utils/progress_bar.py,sha256=
|
|
43
|
+
upgini/utils/progress_bar.py,sha256=5WCbJ6YQuxin086WifST0ZaJZQGMnF01WRDQKF27BfU,1484
|
|
44
44
|
upgini/utils/sklearn_ext.py,sha256=IMx2La70AXAggApVpT7sMEjWqVWon5AMZt4MARDsIMQ,43847
|
|
45
45
|
upgini/utils/target_utils.py,sha256=cu52icjhDIPpEStHYMXrD2hIl9gzvfnxZr0Ra5osV0k,1616
|
|
46
46
|
upgini/utils/track_info.py,sha256=2IGGyHPXBLhWcLO8-Q-5qir52k_kD6DtdU-sv_Z2hHY,5325
|
|
47
47
|
upgini/utils/warning_counter.py,sha256=vnmdFo5-7GBkU2bK9h_uC0K0Y_wtfcYstxOdeRfacO0,228
|
|
48
|
-
upgini-1.1.
|
|
49
|
-
upgini-1.1.
|
|
50
|
-
upgini-1.1.
|
|
51
|
-
upgini-1.1.
|
|
52
|
-
upgini-1.1.
|
|
48
|
+
upgini-1.1.180a6.dist-info/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
|
49
|
+
upgini-1.1.180a6.dist-info/METADATA,sha256=YMKJExvqyKo47zwOBXmXdcRP2uNyN_FGka5s9Fg-ioY,48000
|
|
50
|
+
upgini-1.1.180a6.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
51
|
+
upgini-1.1.180a6.dist-info/top_level.txt,sha256=OFhTGiDIWKl5gFI49qvWq1R9IKflPaE2PekcbDXDtx4,7
|
|
52
|
+
upgini-1.1.180a6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|