<commit_before><commit_msg>Script to report disk usage.<commit_after>#!/usr/bin/env perl

use strict;
use warnings;

my @output = `df`;

sub print_line {
    my (@cols) = @_;
    $cols[4] =~ s/%//;
    print "\"$cols[5]\": {\n";
    print "\"total\": $cols[1],\n";
    print "\"used\": $cols[2],\n";
    print "\"available\": $cols[3],\n";
    print "\"device\": \"$cols[0]\",\n";
    print "\"use%\": $cols[4]\n";
    print "}\n";
}

print "{\n";
foreach my $line (@output[1..(scalar(@output) - 2)]) {
    my @cols = split(/\s+/, $line);
    print_line(@cols);
    print ','
}

print_line(split(/\s+/, $output[-1]));

print "}\n";
{'fraction_non_alphanumeric': 0.2884310618066561, 'fraction_numerical': 0.01584786053882726, 'mean_word_length': 2.9254658385093166, 'pattern_counts': {'":': 6, '<': 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': '6671110', 'n_tokens_mistral': 260, 'n_tokens_neox': 254, 'n_words': 56}