from datacloud.dev_utils.yt import yt_utils
from datacloud.dev_utils.yt.take_part import Interval
from datacloud.audience.lib import utils
from datacloud.audience.lib.score_info import Score


def main():
    yt_client = yt_utils.get_yt_client()
    score = Score('internal', 'internal_xprod_1467')
    date_str = '2019-10-29'
    interval = Interval(0.9, 1.0)
    audience_table = '//projects/scoring/tmp/prod-tmp/audience/internal-internal_xprod_1467-2019-10-29-0.9-1.0',
    utils.prepare_audience_table(yt_client, score, date_str, interval, audience_table)
    utils.split_table(yt_client, audience_table, 5)


if __name__ == '__main__':
    main()
