<commit_before>/* global math */
// Variables
var buttons = ['7','8','9','+','4','5','6','-','1','2','3','*','0','.','=','/'];
var lastNum = '=';

function prep() {
  // Create base elements for the page
  var container = document.createElement('div');
  var header = document.createElement('div');
  var nav = document.createElement('div');
  var main = document.createElement('div');
  var aside = document.createElement('div');
  var footer = document.createElement('div');

  // Apply IDs to the base elements
  container.id = 'container';
  header.id = 'header';
  nav.id = 'nav';
  main.id = 'main';
  aside.id = 'aside';
  footer.id = 'footer';

  // Append main elements to container
  container.appendChild(header);
  container.appendChild(nav);
  container.appendChild(main);
  container.appendChild(aside);
  container.appendChild(footer);

  // Add container to page
  document.body.appendChild(container);

  header.appendChild(heading());
  main.appendChild(calculator());
  footer.appendChild(themeButton());

  var about = document.createElement('p');
  var a = document.createElement('a');
  a.href = 'https://github.com/keawade';
  a.textContent = '@keawade';
  about.appendChild(document.createTextNode('Created by '));
  about.appendChild(a);
  footer.appendChild(about);

  document.getElementById('cal-box').focus();
}

function heading() {
  // Add heading to header
  var title = document.createElement('h1');
  title.className = 'title';
  title.textContent = 'Calculon';
  return title;
}

function calculator() {
  // Add calculator wrapper div
  var calculatorWrap = document.createElement('div');
  calculatorWrap.id = 'calculator';

  // Add input box
  var box = document.createElement('input');
  box.className = 'cal-box';
  box.id = 'cal-box';
  calculatorWrap.appendChild(box);

  // Add calculator buttons
  buttons.forEach(function(buttonContent){
    var button = document.createElement('button');
    button.className = 'cal-button';
    button.id = buttonContent;
    button.appendChild(document.createTextNode(buttonContent));<commit_msg>Cleaned up code<commit_after>/* global math */
// Variables
var buttons = ['7','8','9','+','4','5','6','-','1','2','3','*','0','.','=','/'];
var lastNum = '=';

function prep() {
  // Create base elements for the page
  var container = document.createElement('div');
  var header = document.createElement('div');
  var nav = document.createElement('div');
  var main = document.createElement('div');
  var aside = document.createElement('div');
  var footer = document.createElement('div');

  // Apply IDs to the base elements
  container.id = 'container';
  header.id = 'header';
  nav.id = 'nav';
  main.id = 'main';
  aside.id = 'aside';
  footer.id = 'footer';

  // Append main elements to container
  container.appendChild(header);
  container.appendChild(nav);
  container.appendChild(main);
  container.appendChild(aside);
  container.appendChild(footer);

  // Add container to page
  document.body.appendChild(container);

  header.appendChild(heading());
  main.appendChild(calculator());
  footer.appendChild(themeButton());

  var about = document.createElement('p');
  var a = document.createElement('a');
  a.href = 'https://github.com/keawade';
  a.textContent = '@keawade';
  about.textContent = 'Created by ';
  about.appendChild(a);
  footer.appendChild(about);

  document.getElementById('cal-box').focus();
}

function heading() {
  // Add heading to header
  var title = document.createElement('h1');
  title.className = 'title';
  title.textContent = 'Calculon';
  return title;
}

function calculator() {
  // Add calculator wrapper div
  var calculatorWrap = document.createElement('div');
  calculatorWrap.id = 'calculator';

  // Add input box
  var box = document.createElement('input');
  box.className = 'cal-box';
  box.id = 'cal-box';
  calculatorWrap.appendChild(box);

  // Add calculator buttons
  buttons.forEach(function(buttonContent){
    var button = document.createElement('button');
    button.className = 'cal-button';
    button.id = buttonContent;
    button.appendChild(document.createTextNode(buttonContent));
{'fraction_non_alphanumeric': 0.16876208897485492, 'fraction_numerical': 0.005319148936170213, 'mean_word_length': 4.400783289817232, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1620876', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1189, 'n_words': 272}