<commit_before>import argparse, sys, logging, os, signal, codecs

from . import client, server, crypto


def main(args=None):
    args = sys.argv[1:] if args is None else args

    parser = argparse.ArgumentParser(
        description="Use ACME to sign a certificate"
    )
    parser.add_argument(
        "--account-key", required=False, help="path to your Let's Encrypt account private key"
    )
    parser.add_argument(
        "--csr", required=False, help="path to your certificate signing request"
    )
    parser.add_argument(
        "--challenge-dir", required=False,
        help="path to the directory that serves .well-known/acme-challenge/"
    )
    parser.add_argument(
        "--account-email", default=None, help="email to be associated with the account key"
    )
    parser.add_argument(
        "--ca", default=client.DEFAULT_CA_DIRECTORY,
        help="certificate authority, default is Let's Encrypt"
    )
    parser.add_argument(
        "--quiet", action="store_const", const=logging.ERROR,
        help="suppress output except for errors"
    )

    args = parser.parse_args(args)
    sign_csr(args)


def server_main(args=None):
    args = sys.argv[1:] if args is None else args

    parser = argparse.ArgumentParser(
        description="Serves the challenge to ACME to prove you control the domain"
    )
    parser.add_argument(
        "--challenge-dir", required=True,
        help="path to the directory that serves .well-known/acme-challenge/"
    )
    parser.add_argument("--port", type=int, default=8000)<commit_msg>Add required options to certsign command.<commit_after>import argparse, sys, logging, os, signal, codecs

from . import client, server, crypto


def main(args=None):
    args = sys.argv[1:] if args is None else args

    parser = argparse.ArgumentParser(
        description="Use ACME to sign a certificate"
    )
    parser.add_argument(
        "--account-key", required=True, help="path to your Let's Encrypt account private key"
    )
    parser.add_argument(
        "--csr", required=True, help="path to your certificate signing request"
    )
    parser.add_argument(
        "--challenge-dir", required=True,
        help="path to the directory that serves .well-known/acme-challenge/"
    )
    parser.add_argument(
        "--account-email", default=None, help="email to be associated with the account key"
    )
    parser.add_argument(
        "--ca", default=client.DEFAULT_CA_DIRECTORY,
        help="certificate authority, default is Let's Encrypt"
    )
    parser.add_argument(
        "--quiet", action="store_const", const=logging.ERROR,
        help="suppress output except for errors"
    )

    args = parser.parse_args(args)
    sign_csr(args)


def server_main(args=None):
    args = sys.argv[1:] if args is None else args

    parser = argparse.ArgumentParser(
        description="Serves the challenge to ACME to prove you control the domain"
    )
    parser.add_argument(
        "--challenge-dir", required=True,
        help="path to the directory that serves .well-known/acme-challenge/"
    )
    parser.add_argument("--port", type=int, default=8000)
{'fraction_non_alphanumeric': 0.11118190506530742, 'fraction_numerical': 0.003822873526600828, 'mean_word_length': 2.969658659924147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '5157145', 'n_tokens_mistral': 935, 'n_tokens_neox': 891, 'n_words': 260}