<commit_before><commit_msg>Added a script to track certificate expirations<commit_after>#!/bin/bash

THRESHOLD=`expr 86400 \* 90`

TIMESTAMP=$(date +%s)

while IFS= read -r -d '' certificate; do
  DATE=`openssl x509 -in "${certificate}" -text -noout | grep "Not After" | sed -E "s/.*: //"`
  EXPIRATION=`date -jf '%b %d %T %Y %Z' +%s "${DATE}"`
  LEFT=`expr $EXPIRATION - $TIMESTAMP`

  if [ "$LEFT" -lt "$THRESHOLD" ]; then
    echo $DATE $certificate
  fi
done < <(find . -type f -name '*.crt' -print0)
{'fraction_non_alphanumeric': 0.19642857142857142, 'fraction_numerical': 0.021825396825396824, 'mean_word_length': 3.675925925925926, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6222820', 'n_tokens_mistral': 217, 'n_tokens_neox': 195, 'n_words': 59}