from fetcher import Fetcher from filter import Filter import matplotlib.pyplot as plt def show(): data = [] deal = [] x = list(range(len(data))) plt.plot(x, data, label='raw', color='green', linestyle='-') plt.plot(x, deal, label='max', color='red', linestyle='-') plt.title('image') plt.xlabel('x') plt.ylabel('T') plt.legend() plt.show() def main(): fetch = Fetcher() data = fetch.fetch_one("233301011005310", "2023-12-1 00:00:00", "2023-12-20 00:00:00") temp = [itr[5] for itr in data] smooth = Filter(temp, rand=0.2) smooth.max(step=20, hold=(34, 39)) smooth.avg() smooth.show() def test(): for i in range(20): print(i) if i == 5: i = 10 if __name__ == '__main__': test()