def sample(self):
    import utils.processing.sample_tweets as sample_tweets
    parser = ArgParseDefault(description='Sample cleaned data to generate `data/2_sampled`')
    parser.add_argument('-s', '--size', type=int, required=True, dest='size', help='Number of tweets to sample')
    parser.add_argument('-bs', '--bin_size', type=int, required=False, help='Number of tweets per bin')
    parser.add_argument('-m', '--mode', choices=['monthly', 'random'], required=False, default='random', help='Sampling mode. Random: Sample randomly. Monthly: Try to sample evenly within months.')
    parser.add_argument('-l', '--langs', default=[], nargs='+', required=False, help='Filter by language(s)')
    parser.add_argument('--contains_keywords', default=False, action='store_true', help='Only sample from tweets which include keywords')
    parser.add_argument('--min_token_count', default=3, type=int, required=False, help='Minimum number of tokens')
    parser.add_argument('--include_replies', default=False, action='store_true', help='Include replies')
    parser.add_argument('--seed', type=int, required=False, default=None, help='Random state split')
    parser.add_argument('--extend', action='store_true', help='Extending existing sample given by seed by removing already labelled tweets. If size is <= original sample size this has no effect except removing labelled tweets')
    add_bool_arg(parser, 'anonymize', default=True, help='Replace usernames and URLs with filler (@user and <url>)')
    parser.add_argument('--max_date', required=False, default=None, help='Sample until date (YYYY-MM-DD), default: No max')
    parser.add_argument('--min_date', required=False, default=None, help='Sample from date (YYYY-MM-DD), default: No min')
    args = parser.parse_args(sys.argv[2:])
    sample_tweets.run(size=args.size, contains_keywords=args.contains_keywords, anonymize=args.anonymize, min_token_count=args.min_token_count, langs=args.langs, include_replies=args.include_replies, mode=args.mode, seed=args.seed, extend=args.extend, bin_size=args.bin_size, min_date=args.min_date, max_date=args.max_date)
def sample(self):
    import utils.processing.sample_tweets as sample_tweets
    parser = ArgParseDefault(description='Sample cleaned data to generate `data/2_sampled`')
    parser.add_argument('-s', '--size', type=int, required=True, dest='size', help='Number of tweets to sample')
    parser.add_argument('-bs', '--bin_size', type=int, required=False, help='Number of tweets per bin')
    parser.add_argument('-m', '--mode', choices=['monthly', 'random'], required=False, default='random', help='Sampling mode. Random: Sample randomly. Monthly: Try to sample evenly within months.')
    parser.add_argument('-l', '--langs', default=[], nargs='+', required=False, help='Filter by language(s)')
    parser.add_argument('--contains_keywords', default=False, action='store_true', help='Only sample from tweets which include keywords')
    parser.add_argument('--min_token_count', default=3, type=int, required=False, help='Minimum number of tokens')
    parser.add_argument('--include_replies', default=False, action='store_true', help='Include replies')
    parser.add_argument('--seed', type=int, required=False, default=None, help='Random state split')
    parser.add_argument('--extend', action='store_true', help='Extending existing sample given by seed by removing already labelled tweets. If size is <= original sample size this has no effect except removing labelled tweets')
    add_bool_arg(parser, 'anonymize', default=True, help='Replace usernames and URLs with filler (@user and <url>)')
    parser.add_argument('--max_date', required=False, default=None, help='Sample until date (YYYY-MM-DD), default: No max')
    parser.add_argument('--min_date', required=False, default=None, help='Sample from date (YYYY-MM-DD), default: No min')
    args = parser.parse_args(sys.argv[2:])
    sample_tweets.run(size=args.size, contains_keywords=args.contains_keywords, anonymize=args.anonymize, min_token_count=args.min_token_count, langs=args.langs, include_replies=args.include_replies, mode=args.mode, seed=args.seed, extend=args.extend, bin_size=args.bin_size, min_date=args.min_date, max_date=args.max_date)