<commit_before><commit_msg>fish: add aws mfa authorization<commit_after>
function aws-auth
    set token $argv[1]
    if [ -z "$token" ]
        echo "Usage: $0 TOKEN"
        return 1
    end
    set arn (aws sts get-caller-identity --output text --query 'Arn' | sed 's/user/mfa/g'); or return $status
    set result (aws sts get-session-token --serial-number $arn --token-code $token); or return $status
    set -gx AWS_ACCESS_KEY_ID (echo $result | jq -r '.Credentials.AccessKeyId')
    set -gx AWS_SECRET_ACCESS_KEY (echo $result | jq -r '.Credentials.SecretAccessKey')
    set -gx AWS_SESSION_TOKEN (echo $result | jq -r '.Credentials.SessionToken')
end
{'fraction_non_alphanumeric': 0.12613981762917933, 'fraction_numerical': 0.004559270516717325, 'mean_word_length': 3.2243589743589745, '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': '1998895', 'n_tokens_mistral': 225, 'n_tokens_neox': 226, 'n_words': 71}