def split(timeseries: list, percent: float):
    """
    Splits the data into train and test sets
    :param timeseries: time series
    :param percent: percent of the length to put the split at
    :return: train set, test set
    """
    l = len(timeseries)
    index = round(l * percent)
    train = timeseries[:index]
    test = timeseries[index:]
    return train, test