<commit_before>function log(message){
    console.log(message);
//    var linebreak = document.createElement('br');
//    logs.appendChild(linebreak);
//    var content = document.createTextNode(message);
//    logs.appendChild(content);
}

function logProperties(characteristic){
    log('> UUID:                 ' + characteristic.uuid);
    log('> Broadcast:            ' + characteristic.properties.broadcast);
    log('> Read:                 ' + characteristic.properties.read);
    log('> Write w/o response:   ' +
      characteristic.properties.writeWithoutResponse);
    log('> Write:                ' + characteristic.properties.write);
    log('> Notify:               ' + characteristic.properties.notify);
    log('> Indicate:             ' + characteristic.properties.indicate);
    log('> Signed Write:         ' +
      characteristic.properties.authenticatedSignedWrites);
    log('> Queued Write:         ' + characteristic.properties.reliableWrite);
    log('> Writable Auxiliaries: ' +
      characteristic.properties.writableAuxiliaries);
    log('> Value (cached):       ' + characteristic.value);
    log(' ');
}

function logRawHexValues(event){
      let value = event.target.value;
      let a = [];
      // Convert raw data bytes to hex values just for the sake of showing something.
      // In the "real" world, you'd use data.getUint8, data.getUint16 or even
      // TextDecoder to process raw data bytes.
      for (let i = 0; i < value.byteLength; i++) {
        a.push('0x' + ('00' + value.getUint8(i).toString(16)).slice(-2));
      }
      log('> ' + a.join(' ') + ' (raw data)');
      document.getElementById("display-raw-data").innerHTML = a.join(' ');
      a.reverse();
      log('> ' + a.join(' ') + ' (bytewise reversed)');
      document.getElementById("display-reversed-data").innerHTML = a.join(' ');
}<commit_msg>changed formatting of raw hex values to line up<commit_after>function log(message){
    console.log(message);
//    var linebreak = document.createElement('br');
//    logs.appendChild(linebreak);
//    var content = document.createTextNode(message);
//    logs.appendChild(content);
}

function logProperties(characteristic){
    log('> UUID:                 ' + characteristic.uuid);
    log('> Broadcast:            ' + characteristic.properties.broadcast);
    log('> Read:                 ' + characteristic.properties.read);
    log('> Write w/o response:   ' +
      characteristic.properties.writeWithoutResponse);
    log('> Write:                ' + characteristic.properties.write);
    log('> Notify:               ' + characteristic.properties.notify);
    log('> Indicate:             ' + characteristic.properties.indicate);
    log('> Signed Write:         ' +
      characteristic.properties.authenticatedSignedWrites);
    log('> Queued Write:         ' + characteristic.properties.reliableWrite);
    log('> Writable Auxiliaries: ' +
      characteristic.properties.writableAuxiliaries);
    log('> Value (cached):       ' + characteristic.value);
    log(' ');
}

function logRawHexValues(event){
      let value = event.target.value;
      let a = [];
      // Convert raw data bytes to hex values just for the sake of showing something.
      // In the "real" world, you'd use data.getUint8, data.getUint16 or even
      // TextDecoder to process raw data bytes.
      for (let i = 0; i < value.byteLength; i++) {
        a.push('0x' + ('00' + value.getUint8(i).toString(16)).slice(-2));
      }
      log('> ' + a.join(' ') + '    (raw data)');
      document.getElementById("display-raw-data").innerHTML = a.join(' ');
      a.reverse();
      log('> ' + a.join(' ') + '    (little endian)');
      document.getElementById("display-reversed-data").innerHTML = ' ' + a.join(' ');
}
{'fraction_non_alphanumeric': 0.1532129580456718, 'fraction_numerical': 0.005841741901221455, 'mean_word_length': 2.6501937984496124, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '2455088', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1056, 'n_words': 234}