Thank you, sure. below is our codes.

**== python code for python terminal:**

from joblib import Parallel, delayed, parallel_backend

import time

def square(i, iterations):

start = i + iterations

res =

start_time = time.time()

for j in range(start, start+iterations):

res.append(j*j)*

time.sleep(1)

if i == 0:

time_elapsed = time.time()-start_time

time_left = time_elapsed(iterations-(j+1-start))/(j+1-start)

print(f"{j+1-start}/{iterations} done in {time_elapsed}s. {time_left}s to go.β, end=β\r")

```
if i == 0:
print(f"\nFinished in {time.time()-start_time}s")
return res
```

def main():

n_jobs=2

iterations = 3

```
print("Start computing...")
results = Parallel(n_jobs=n_jobs, verbose=0, backend='multiprocessing')(\
delayed(square)(i, iterations) for i in range(n_jobs))
print(f"results: {results}")
```

if **name** == β**main**β:

main()

**== Streamlit py script for doing the same thing:**

from joblib import Parallel, delayed, parallel_backend

import time

import streamlit as st

st.set_page_config(layout=βwideβ)

from io import BytesIO

progress_bar = st.progress(0)

overwrite = st.empty()

def square(i, iterations):

start = i + iterations

res =

start_time = time.time()

for j in range(start, start+iterations):

res.append(j*j)*

time.sleep(1)

if i == 0:

progress_bar.progress(round(100(j+1-start)/(iterations)))

time_elapsed = time.time()-start_time

time_left = time_elapsed*(iterations-(j+1-start))/(j+1-start)

overwrite.write(f"{j+1-start}/{iterations} done in {time_elapsed}s. {time_left}s to go.")

```
if i == 0:
st.write(f"\nFinished in {time.time()-start_time}s")
return res
```

def main():

n_jobs=2

iterations = 3

```
st.write("Start computing...")
results = Parallel(n_jobs=n_jobs, verbose=0, backend='multiprocessing')(\
delayed(square)(i, iterations) for i in range(n_jobs))
st.write(f"results: {results}")
```

if **name** == β**main**β:

main()