<commit_before>#!/bin/bash

uname=$(uname);

if [ "$uname" = "Darwin" ]; then
  decode_opt="-D"
else
  decode_opt="-d"
fi

plainfile=$(mktemp)
binfile=$(mktemp)

< ${1}.encrypted > ${binfile} base64 "$decode_opt"

aws kms decrypt \
  --ciphertext-blob fileb://${binfile} \
  --query Plaintext \
  --output text \
  | base64 -D \
  | tee ${plainfile}

mv ${plainfile} ${1}

rm -f ${binfile}<commit_msg>debug base64<commit_after>#!/bin/bash

uname=$(uname);

if [ "$uname" = "Darwin" ]; then
  decode_opt="-D"
else
  decode_opt="-d"
fi

base64 --help

plainfile=$(mktemp)
binfile=$(mktemp)

< ${1}.encrypted > ${binfile} base64 "$decode_opt"

aws kms decrypt \
  --ciphertext-blob fileb://${binfile} \
  --query Plaintext \
  --output text \
  | base64 -D \
  | tee ${plainfile}

mv ${plainfile} ${1}

rm -f ${binfile}
{'fraction_non_alphanumeric': 0.20588235294117646, 'fraction_numerical': 0.0196078431372549, 'mean_word_length': 3.4644808743169397, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7673375', 'n_tokens_mistral': 355, 'n_tokens_neox': 339, 'n_words': 72}