<commit_before>{modprobe, doHardwareScan, kernelModules}:

{
  name = "hardware-scan";
  
  job = "
start on udev

script
    for i in ${toString kernelModules}; do
        echo \"Loading kernel module $i...\"
        ${modprobe}/sbin/modprobe $i || true
    done

    if test -n \"${toString doHardwareScan}\" -a ! -e /var/run/safemode; then
    
        # Try to load modules for all PCI devices.
        for i in /sys/bus/pci/devices/*/modalias; do
            echo \"Trying to load a module for $(basename $(dirname $i))...\"
            ${modprobe}/sbin/modprobe $(cat $i) || true
            echo \"\"
        done

    fi
end script

  ";

}
<commit_msg>* hardware-scan: load modules for all supported USB devices   automatically.  Of course this should be triggered when   a USB device is plugged in (from udev).<commit_after>{modprobe, doHardwareScan, kernelModules}:

{
  name = "hardware-scan";
  
  job = ''
    start on udev

    script
        for i in ${toString kernelModules}; do
            echo "Loading kernel module $i..."
            ${modprobe}/sbin/modprobe $i || true
        done

        if test -n "${toString doHardwareScan}" -a ! -e /var/run/safemode; then

            # Try to load modules for all PCI and USB devices.
            for i in /sys/bus/pci/devices/*/modalias /sys/bus/usb/devices/*/modalias; do
                echo "Trying to load a module for $(basename $(dirname $i))..."
                ${modprobe}/sbin/modprobe $(cat $i) || true
                echo ""
            done

        fi
    end script
  '';

}

{'fraction_non_alphanumeric': 0.1245985870263327, 'fraction_numerical': 0.0, 'mean_word_length': 1.9340866290018832, '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': '5807419', 'n_tokens_mistral': 477, 'n_tokens_neox': 471, 'n_words': 159}