<commit_before><?php
require("../functions.php");

$time=validate_time($_GET['start'], $_GET['end']);
$server=validate_server($_GET['server']);

$timestamp = rrd_timestamp($time);

$command = <<<EOT
--imgformat PNG --start {$time['start']} --end {$time['end']} \
--width 600 --height 200 \
DEF:pressure=/mnt/data/rrdtool/elco/00-pressure.rrd:pressure:AVERAGE \
"LINE1:pressure#ff0000:Pressure" \
VDEF:pressure_avg=pressure,AVERAGE \
VDEF:pressure_min=pressure,MINIMUM \
VDEF:pressure_max=pressure,MAXIMUM \
VDEF:pressure_last=pressure,LAST \
"GPRINT:pressure_avg:avg=%4.1lfbar" \
"GPRINT:pressure_min:min=%4.1lfbar" \
"GPRINT:pressure_max:max=%4.1lfbar" \
"GPRINT:pressure_last:last=%4.1lfbar" \
"COMMENT:\\n" \
\
{$timestamp} \
--vertical-label "bar"  \
--title "Water pressure"
EOT;

serve_png($command);
?><commit_msg>Added lower-bound to pressure graph<commit_after><?php
require("../functions.php");

$time=validate_time($_GET['start'], $_GET['end']);
$server=validate_server($_GET['server']);

$timestamp = rrd_timestamp($time);

$command = <<<EOT
--imgformat PNG --start {$time['start']} --end {$time['end']} \
--width 600 --height 200 \
-l 0 \
DEF:pressure=/mnt/data/rrdtool/elco/00-pressure.rrd:pressure:AVERAGE \
"LINE1:pressure#ff0000:Pressure" \
VDEF:pressure_avg=pressure,AVERAGE \
VDEF:pressure_min=pressure,MINIMUM \
VDEF:pressure_max=pressure,MAXIMUM \
VDEF:pressure_last=pressure,LAST \
"GPRINT:pressure_avg:avg=%4.1lfbar" \
"GPRINT:pressure_min:min=%4.1lfbar" \
"GPRINT:pressure_max:max=%4.1lfbar" \
"GPRINT:pressure_last:last=%4.1lfbar" \
"COMMENT:\\n" \
\
{$timestamp} \
--vertical-label "bar"  \
--title "Water pressure"
EOT;

serve_png($command);
?>
{'fraction_non_alphanumeric': 0.20646319569120286, 'fraction_numerical': 0.02573309395571514, 'mean_word_length': 6.301310043668122, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5910940', 'n_tokens_mistral': 707, 'n_tokens_neox': 643, 'n_words': 82}