<commit_before>#!/bin/bash -e
##-------------------------------------------------------------------
## @copyright 2016 <EMAIL>
## Licensed under MIT
## https://raw.githubusercontent.com/DennyZhang/devops_public/master/LICENSE
##
## File : inject_kitchen_ci_key.sh
## Author : Denny <<EMAIL>>
## Description :
## --
## Created : <2016-04-20>
## Updated: Time-stamp: <2016-06-15 11:58:05>
##-------------------------------------------------------------------
if [ -d .kitchen ]; then
    echo "Inject ssh key for Kitchen CI test: .kitchen/docker_id_rsa and .kitchen/docker_id_rsa.pub"
    cat > .kitchen/docker_id_rsa <<EOF
-----BEGIN RSA PRIVATE KEY-----
<KEY>
-----END RSA PRIVATE KEY-----
EOF

    chmod 400 .kitchen/docker_id_rsa

    cat >.kitchen/docker_id_rsa.pub <<EOF
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwp69ZIA8Usz5EgSh5gBXKGFZBUawP8nDSgZVW6Vl/+NDhij5Eo5BePYvUaxg/5aFxrxROOyLGE9xhNBk7PP49Iz1pqO9T/QNSIiuuvQ/Xhpvb4OQfD5xr6l4t/9gLf+OYGvaFHf/xzMnc9cKzZ+azLlDHbeewu1GMI/XNFWo4VWAsH+6xM8VIpdJSaR7alJn/<KEY>VFk4zalAzXquU0BX1ne+DLB/LW8ZanN5PWECabSi4dXYLfxC2rDhDcQdXU3MwV5b7TtR5rFoNS8IGcyHoeq5tasAtAAaD2sEzyJbllAfFsNyxNQ+Yh8935HcWqx2/T0r <EMAIL>
EOF
else
    echo "Warning: inject kitchen ci key fails, since .kitchen directory not found"
fi
## File : inject_kitchen_ci_key.sh ends
<commit_msg>defensive coding<commit_after>#!/bin/bash -e
##-------------------------------------------------------------------
## @copyright 2016 DennyZhang.com
## Licensed under MIT
## https://raw.githubusercontent.com/DennyZhang/devops_public/master/LICENSE
##
## File : inject_kitchen_ci_key.sh
## Author : Denny <<EMAIL>>
## Description :
## --
## Created : <2016-04-20>
## Updated: Time-stamp: <2016-06-15 12:03:06>
##-------------------------------------------------------------------
if [ -d .kitchen ]; then
    echo "Inject ssh key for Kitchen CI test: .kitchen/docker_id_rsa and .kitchen/docker_id_rsa.pub"
    if [ -f .kitchen/docker_id_rsa ]; then
        echo "Skip inject .kitchen/docker_id_rsa, since it already exists"
    else
        cat > .kitchen/docker_id_rsa <<EOF
-----<KEY>
EOF
        chmod 400 .kitchen/docker_id_rsa
    fi

    if [ -f .kitchen/docker_id_rsa.pub ]; then
        echo "Skip inject .kitchen/docker_id_rsa.pub, since it already exists"
    else
        cat >.kitchen/docker_id_rsa.pub <<EOF
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwp69ZIA8Usz5EgSh5gBXKGFZBUawP8nDSgZVW6Vl/+NDhij5Eo5BePYvUaxg/5aFxrxROOyLGE9xhNBk7PP49Iz1pqO9T/QNSIiuuvQ/Xhpvb4OQfD5xr6l4t/9gLf+OYGvaFHf/xzMnc9cKzZ+azLlDHbeewu1GMI/XNFWo4VWAsH+6xM8VIpdJSaR7alJn/W6dmyRBbk0uS3Yut63jVFk4zalAzXquU0BX1ne+DLB/LW8ZanN5PWECabSi4dXYLfxC2rDhDcQdXU3MwV5b7TtR5rFoNS8IGcyHoeq5tasAtAAaD2sEzyJbllAfFsNyxNQ+Yh8935HcWqx2/T0r <EMAIL>
EOF
    fi
else
    echo "Warning: inject kitchen ci key fails, since .kitchen directory not found"
fi
## File : inject_kitchen_ci_key.sh ends

{'fraction_non_alphanumeric': 0.1985964912280702, 'fraction_numerical': 0.05719298245614035, 'mean_word_length': 2.9874125874125874, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 21, 'https://': 2, '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': '7460396', 'n_tokens_mistral': 1339, 'n_tokens_neox': 1217, 'n_words': 173}