"""Multiprocessing related Jupyter notebook tools."""
import sys
import time

from IPython.display import display
from ipywidgets import FloatProgress, IntProgress
from numpy import linspace


def progress_display(results, objectlist, sleep=10):
    while not results.ready():
        print("{:.1f} % done.".format(100*results.progress/len(list(objectlist))))
        sys.stdout.flush()
        time.sleep(sleep)


def display_multi_progress(results, objectlist, sleep=1):
    prog = IntProgress(min=0, max=len(list(objectlist))-1)
    display(prog)
    while not results.ready():
        prog.value = results.progress
        time.sleep(sleep)


class ListProgressBar(object):
    def __init__(self, objectlist, min_=0):
        self.list = objectlist
        self.prog = IntProgress(min=min_, max=len(list(objectlist))-1)
        display(self.prog)

    @property
    def value(self):
        return self.prog.value

    @value.setter
    def value(self, newvalue):
        self.prog.value = self.list.index(newvalue)


class IntProgressBar(object):
    def __init__(self, objectlist, min_=0):
        self.prog = IntProgress(min=min_, max=len(list(objectlist))-1)
        display(self.prog)

    @property
    def value(self):
        return self.prog.value

    @value.setter
    def value(self, newvalue):
        self.prog.value = newvalue


def float_progress(min_, max_):
    prog = FloatProgress(min=min_, max=max_)
    display(prog)
    for i in linspace(min_, max_, 100):
        time.sleep(0.1)
        prog.value = i

@@ -184,16 +184,55 @@
 inspace%0A
+from tqdm import tqdm_notebook as tqdm%0A
 %0A%0Adef pr
@@ -351,12 +351,27 @@
 mat(
-100*
+%0A            100 * 
 resu
@@ -386,9 +386,11 @@
 ress
-/
+ / 
 len(
@@ -530,81 +530,62 @@
     
-prog = IntProgress(min=0, max=len(list(objectlist))-1)%0A    display(prog)%0A
+with tqdm(objectlist) as prog:%0A        n_prev = 0%0A    
     
@@ -619,26 +619,25 @@
         
+    
-prog.value
+n_now
  = resul
@@ -648,16 +648,87 @@
 rogress%0A
+            prog.update(n_now - n_prev)%0A            n_prev = n_now%0A    
         
@@ -912,33 +912,35 @@
 ist(objectlist))
--
+ - 
 1)%0A        displ
@@ -1265,17 +1265,19 @@
 ctlist))
--
+ - 
 1)%0A     

Use tqdm for progressbars and some PEP8