<commit_before>let container = null

Array
  .from(document.querySelectorAll('code.lang-javascript'))
  .forEach(element => {
    container = createContainer(element.parentNode)
    eval(element.textContent)
  })

function createElementFrom (string) {
  const div = document.createElement('div')
  div.innerHTML = string
  return div.firstChild
}

function createContainer (element) {
  const div = document.createElement('div')
  div.innerHTML = '<div class="result-container"></div>'
  return element.parentNode.insertBefore(div.firstChild, element.nextSibling)
}

function loadScript (url, callback) {
  const head = document.getElementsByTagName('head')[0]
  const script = document.createElement('script')
  script.type = 'text/javascript'
  script.src = url
<commit_msg>run code on animation end<commit_after>let container = null

const whichAnimationEvent = () => {
  var el = document.createElement('fakeelement')
  var animations = {
    'animation': 'animationend',
    'OAnimation': 'oAnimationEnd',
    'MozAnimation': 'animationend',
    'WebkitAnimation': 'webkitAnimationEnd'
  }

  for (let a in animations) {
    if (el.style[a] !== undefined) {
      return animations[a]
    }
  }
}

const heart = document.querySelector('.sidebar-about .fa')

/* Listen for a transition! */
var animationEvent = whichAnimationEvent()
animationEvent && heart.addEventListener(animationEvent, () => {
  Array
  .from(document.querySelectorAll('code.lang-javascript'))
  .forEach(element => {
    container = createContainer(element.parentNode)
    eval(element.textContent)
  })
})

function createElementFrom (string) {
  const div = document.createElement('div')
  div.innerHTML = string
  return div.firstChild
}

function createContainer (element) {
  const div = document.createElement('div')
  div.innerHTML = '<div class="result-container"></div>'
  return element.parentNode.insertBefore(div.firstChild, element.nextSibling)
}

function loadScript (url, callback) {
  const head = document.getElementsByTagName('head')[0]
  const script = document.createElement('script')
  script.type = 'text/javascript'
  script.src = url

{'fraction_non_alphanumeric': 0.12933458294283037, 'fraction_numerical': 0.0009372071227741331, 'mean_word_length': 4.801630434782608, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '80258', 'n_tokens_mistral': 606, 'n_tokens_neox': 609, 'n_words': 132}