Utility functions for fastprogress

Display

format_time[source]

format_time(t)

Format t (in seconds) to (h):mm:ss

assert format_time(12) == '00:12'
assert format_time(512) == '08:32'
assert format_time(3712) == '1:01:52'

html_progress_bar[source]

html_progress_bar(value, total, label, interrupted=False)

Html code for a progress bar value/total with label

text2html_table[source]

text2html_table(items)

Put the texts in items in an HTML table.

Detect if in or out notebook

in_colab[source]

in_colab()

Check if the code is running in Google Colaboratory

in_notebook[source]

in_notebook()

Check if the code is running in a jupyter notebook

assert IN_NOTEBOOK
assert not IN_COLAB
from nbdev.export import notebook2script
notebook2script()
Converted 00_core.ipynb.
Converted 01_fastprogress.ipynb.