In [24]:
from tqdm import tnrange, tqdm_notebook
from time import sleep
import os
import pandas as pd
import datetime

In [3]:
for i in tnrange(4, desc='1st loop'):
    for j in tnrange(100, desc='2nd loop'):
        sleep(0.01)




In [9]:
text = ""
for char in tqdm_notebook(["a", "b", "c", "d"]):
    sleep(0.9)
    text = text + char




In [16]:
my_dir = "/seal_the_data/"
class_names = ['adult_females', 'adult_males', 'juveniles', 'pups', 'subadult_males']

In [19]:
test_file_names = os.listdir(my_dir + "Test/")
test_file_names = sorted(test_file_names, key=lambda 
                    item: (int(item.partition('.')[0]) if item[0].isdigit() else float('inf'), item))

# dataframe to store results in
test_coordinates_df = pd.DataFrame(0,index=test_file_names, columns=class_names)
print(len(test_file_names)) # 18636 test images


18636

In [27]:
for filename in tqdm_notebook(test_file_names):
    file_int = int(filename[:-4])
    current_time = datetime.datetime.now().time().isoformat()[:5]
    if file_int%500 == 0:
        print('completed %d images at %s' % (file_int, current_time))
    sleep(0.001)


completed 0 images at 18:50
completed 500 images at 18:50
completed 1000 images at 18:50
completed 1500 images at 18:50
completed 2000 images at 18:50
completed 2500 images at 18:50
completed 3000 images at 18:50
completed 3500 images at 18:50
completed 4000 images at 18:50
completed 4500 images at 18:50
completed 5000 images at 18:50
completed 5500 images at 18:50
completed 6000 images at 18:50
completed 6500 images at 18:50
completed 7000 images at 18:50
completed 7500 images at 18:50
completed 8000 images at 18:50
completed 8500 images at 18:50
completed 9000 images at 18:50
completed 9500 images at 18:50
completed 10000 images at 18:50
completed 10500 images at 18:50
completed 11000 images at 18:50
completed 11500 images at 18:50
completed 12000 images at 18:50
completed 12500 images at 18:50
completed 13000 images at 18:50
completed 13500 images at 18:50
completed 14000 images at 18:50
completed 14500 images at 18:50
completed 15000 images at 18:50
completed 15500 images at 18:50
completed 16000 images at 18:50
completed 16500 images at 18:50
completed 17000 images at 18:50
completed 17500 images at 18:50
completed 18000 images at 18:51
completed 18500 images at 18:51


In [ ]: