<commit_before>#!/bin/sh 

convert=`echo /usr/local/bin/convert`

ring_col=white
meter_col=white
out=/tmp/cpu-ring.png

myCPU=`top -l 1 | awk '/CPU usage/ {print $3}' | sed s/%//`
myCPU=`echo "tmp=$myCPU; tmp /= 1; tmp" | bc`

typeset -i b=9

x=`echo $myCPU`

unset myCPU
unset b
			
p=`echo $x`
z=`echo "3.6 * ${p}" | bc`;y=`echo "-90 + $z" | bc`;
if [ "$p" = "100" ]
then
$convert -size 200x200 xc:transparent -stroke ${ring_col} -strokewidth 10 -fill none -draw "arc 190,190 10,10 0,360" -fill none -stroke ${meter_col} -strokewidth 10 -draw "arc 170,170 30,30 0,${y}" $out
elif [ "$p" = "0" ]<commit_msg>add user and system to get full CPU percent<commit_after>#!/bin/sh 

convert=`echo /usr/local/bin/convert`

ring_col=white
meter_col=white
out=/tmp/cpu-ring.png

myCPU=`top -l 1 | awk '/CPU usage/ {print $3 + $5}' | sed s/%//`
myCPU=`echo "tmp=$myCPU; tmp /= 1; tmp" | bc`

typeset -i b=9

x=`echo $myCPU`

unset myCPU
unset b
			
p=`echo $x`
z=`echo "3.6 * ${p}" | bc`;y=`echo "-90 + $z" | bc`;
if [ "$p" = "100" ]
then
$convert -size 200x200 xc:transparent -stroke ${ring_col} -strokewidth 10 -fill none -draw "arc 190,190 10,10 0,360" -fill none -stroke ${meter_col} -strokewidth 10 -draw "arc 170,170 30,30 0,${y}" $out
elif [ "$p" = "0" ]
{'fraction_non_alphanumeric': 0.20783373301358912, 'fraction_numerical': 0.0759392486011191, 'mean_word_length': 3.7245283018867923, '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': '5592713', 'n_tokens_mistral': 626, 'n_tokens_neox': 527, 'n_words': 157}