<commit_before>#!/bin/bash
while true
do
  pmset -g ps|grep InternalBattery|awk '{print $2}'
  info=$(system_profiler SPPowerDataType|grep -E "Charge Remaining|Full Charge Capacity")
  remaining=$(echo $info|awk '{print $4}')
  full=$(echo $info|awk '{print $9}')
  percent=$(echo "scale=0;$remaining*100/$full"|bc)
  echo $remaining/$full=$percent%
  if [ "$percent" -gt "95" ]
  then
    echo Call Notification
    open /Applications/ChargeCompleteNotification.app
  fi
  sleep 5
done<commit_msg>if remaining equals full or remaining not change in 1 mins then alert.<commit_after>#!/bin/bash
last_remaining=-1
while true
do
  info=$(system_profiler SPPowerDataType|grep -E "Charge Remaining|Full Charge Capacity|Connected")
  remaining=$(echo $info|awk '{print $4}')
  full=$(echo $info|awk '{print $9}')
  Charging=$(echo $info|awk '{print $11}')

  # Show percent
  percent=$(echo "scale=0;$remaining*100/$full"|bc)
  echo $remaining/$full=$percent%

  if [ "$Charging" = "Yes" ]
  then
    if [ "$remaining" = "$last_remaining" ] || [ "$remaining" = "$full" ]
    then
      echo Charging complete.
      open /Applications/ChargeCompleteNotification.app
    else
      last_remaining=$remaining
    fi
  fi
  sleep 60
done
{'fraction_non_alphanumeric': 0.1490228013029316, 'fraction_numerical': 0.017915309446254073, 'mean_word_length': 4.438053097345133, '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': '3946550', 'n_tokens_mistral': 436, 'n_tokens_neox': 417, 'n_words': 106}