arr = [ { "date": "2022-2-7", "other": [123] },
{ "date": "2022-2-7", "other": [456] },
{ "date": "2022-2-8", "other": [789] } ]
new_dict = {}
for i in arr:
if not i['date'] in new_dict.keys():
new_dict[i['date']] = i['other']
else:
new_dict[i['date']] += i['other']
print(new_dict)
>> {'2022-2-7': [123, 456], '2022-2-8': [789]}
from proglog import TqdmProgressBarLogger
class MyBarLogger(TqdmProgressBarLogger):
def callback(self, **changes):
try:
index = self.state['bars']['t']['index']
total = self.state['bars']['t']['total']
percent = index / total * 100
# send percent to UI
except KeyError as e:
pass
my_logger = MyBarLogger()
#...
clip.write_videofile(filename, logger=my_logger)
P.S. Сам вопрос задал, сам и ответил. Походу у меня шиза)