<commit_before>import argparse
import logging
import os
import sys

import appdirs
import hangups.auth

from .server import Server

if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO, stream=sys.stdout)
    logging.getLogger('hangups').setLevel(logging.WARNING)
    dirs = appdirs.AppDirs('hangups', 'hangups')
    default_cookies_path = os.path.join(dirs.user_cache_dir, 'cookies.json')
    cookies = hangups.auth.get_auth_stdin(default_cookies_path)

    parser = argparse.ArgumentParser(description='IRC Gateway for Hangouts')
    parser.add_argument('--address', help='bind address', default='127.0.0.1')
    parser.add_argument('--port', help='bind port', default=6667)
    parser.add_argument('--ascii-smileys', action='store_true',
                        help='display smileys in ascii')
    args = parser.parse_args()

    Server(cookies, args.ascii_smileys).run(args.address, args.port)<commit_msg>Add custom cookies param<commit_after>import argparse
import logging
import os
import sys

import appdirs
import hangups.auth

from .server import Server

if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO, stream=sys.stdout)
    logging.getLogger('hangups').setLevel(logging.WARNING)
    dirs = appdirs.AppDirs('hangups', 'hangups')

    parser = argparse.ArgumentParser(description='IRC Gateway for Hangouts')
    parser.add_argument('--cookies', help='cookies filename', default='cookies.json')
    parser.add_argument('--address', help='bind address', default='127.0.0.1')
    parser.add_argument('--port', help='bind port', default=6667)
    parser.add_argument('--ascii-smileys', action='store_true',
                        help='display smileys in ascii')
    args = parser.parse_args()

    default_cookies_path = os.path.join(dirs.user_cache_dir, args.cookies)
    cookies = hangups.auth.get_auth_stdin(default_cookies_path)

    Server(cookies, args.ascii_smileys).run(args.address, args.port)
{'fraction_non_alphanumeric': 0.12923076923076923, 'fraction_numerical': 0.010256410256410256, 'mean_word_length': 4.590257879656161, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7617129', 'n_tokens_mistral': 639, 'n_tokens_neox': 614, 'n_words': 114}