<commit_before>// Math
function absorbance(calib, transmittance) {
  return (calib - transmittance) / calib;
}
function duty_cycle_to_percent(duty_cycle) {
  return ~~(duty_cycle * 100)
}

// Strings
function start_text(data) {
  if (data) {
    return "Fermenter started at: " + data;
  } else {
    return "Fermenter has not yet started.";
  }
}
function stop_text(data, now) {
  if (data) {
    return "Fermenter stopped at: " + data;
  } else {
    var data_date = new Date(data);
    var now_date = new Date(now);
    var since = now_date.getTime() - data_date.getTime();
    return "Fermenter has been running for " + (since / (1000 * 3600)).toFixed(2) + " hours.";
  }
}
function temp_text(data) {
  if (data) {
    return "Vessel temperature: " + data[1] + "(as of " + data[0] + ")";
  } else {
    return "Vessel temperature will be updated soon!";
  }<commit_msg>Gave up on trying to display time differences.<commit_after>// Math
function absorbance(calib, transmittance) {
  return (calib - transmittance) / calib;
}
function duty_cycle_to_percent(duty_cycle) {
  return ~~(duty_cycle * 100)
}

// Strings
function start_text(data) {
  if (data) {
    return "Fermenter started at: " + data;
  } else {
    return "Fermenter has not yet started.";
  }
}
function stop_text(data, now) {
  if (data) {
    return "Fermenter stopped at: " + data;
  } else {
    return "It is currently: " + now;
  }
}
function temp_text(data) {
  if (data) {
    return "Vessel temperature: " + data[1] + "(as of " + data[0] + ")";
  } else {
    return "Vessel temperature will be updated soon!";
  }
{'fraction_non_alphanumeric': 0.14052697616060225, 'fraction_numerical': 0.01191969887076537, 'mean_word_length': 3.3579234972677594, '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': '7010953', 'n_tokens_mistral': 585, 'n_tokens_neox': 556, 'n_words': 156}