weekday filter na run gui, delete batch

This commit is contained in:
David Brazda
2023-11-23 16:39:10 +01:00
parent b087024ae6
commit 576745d8f9
7 changed files with 106 additions and 6 deletions

View File

@ -27,6 +27,16 @@ from collections import deque
import socket
import numpy as np
def concatenate_weekdays(weekday_filter):
# Mapping of weekdays where 0 is Monday and 6 is Sunday
weekdays = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
# Convert the integers in weekday_filter to their corresponding weekday strings
weekday_strings = [weekdays[day] for day in weekday_filter]
# Concatenate the weekday strings
return '-'.join(weekday_strings)
def slice_dict_lists(d, last_item, to_tmstp = False):
"""Slices every list in the dictionary to the last last_item items.