<commit_before>(function(window) {
  function isArray(obj) {
    return Array.isArray(obj) ||
      obj instanceof NodeList;
  }

  var h = window.h = function(selector, props = {}, children) {
    if (props != null && (isArray(props) ||
      typeof props === 'string' ||
      props.tagName)) {
      children = props;
      props = {};
    }

    var attrs = {};
    var attrsRe = /\[([^\s=]+)=(?:"([^"]*)"|([^\]]*))\]/;
    var res;
    while ((res = attrsRe.exec(selector))) {
      attrs[res[1]] = res[2] || res[3];
      selector = selector.slice(0, res.index) +
        selector.slice(res.index + res[0].length);
    }

    var m = selector.split(/(\.|#)/);
    var tagName = m[0] === '.' || m[0] === '#' || m[0] === '' ? 'div' : m[0];
    var el = document.createElement(tagName);
    for (let i = 1; i < m.length; i += 2) {
      if (m[i] === '.') {
        el.classList.add(m[i + 1]);
      } else if (m[i] === '#') {
        attrs.id = m[i + 1];
      }
    }

    for (let key in attrs) {
      el.setAttribute(key, attrs[key]);
    }

    for (let key in props) {
      let r = /^on(\w+)/.exec(key);
      let val = props[key];
      if (r) {
        el.addEventListener(r[1], val);
      } else if (key === 'innerHTML'){
        el[key] = val;
      } else if (val !== false){
        el.setAttribute(key, val);
      }
    }

    if (children != null) {
      if (isArray(children)) {
        el.append(...children);
      } else {
        el.append(children);
      }
    }

    return el;
  };

  const animTime = 500;
  const animFunc = 'ease-in-out';
  window.slideYShow = function($node, ms = animTime) {
    $node.style.display = 'block';
    $node.style.height = 'auto';
    $node.style.paddingTop = '';
    $node.style.paddingBottom = '';
    $node.style.marginTop = '';
    $node.style.marginBottom = '';
    var height = window.getComputedStyle($node).height;
    var heightInt = parseInt(height, 10);
    $node.style.height = '0px';
    $node.style.paddingTop = '0';
    $node.style.paddingBottom = '0';<commit_msg>slideYShow can start in the middle of the slideYHide animation<commit_after>(function(window) {
  function isArray(obj) {
    return Array.isArray(obj) ||
      obj instanceof NodeList;
  }

  var h = window.h = function(selector, props = {}, children) {
    if (props != null && (isArray(props) ||
      typeof props === 'string' ||
      props.tagName)) {
      children = props;
      props = {};
    }

    var attrs = {};
    var attrsRe = /\[([^\s=]+)=(?:"([^"]*)"|([^\]]*))\]/;
    var res;
    while ((res = attrsRe.exec(selector))) {
      attrs[res[1]] = res[2] || res[3];
      selector = selector.slice(0, res.index) +
        selector.slice(res.index + res[0].length);
    }

    var m = selector.split(/(\.|#)/);
    var tagName = m[0] === '.' || m[0] === '#' || m[0] === '' ? 'div' : m[0];
    var el = document.createElement(tagName);
    for (let i = 1; i < m.length; i += 2) {
      if (m[i] === '.') {
        el.classList.add(m[i + 1]);
      } else if (m[i] === '#') {
        attrs.id = m[i + 1];
      }
    }

    for (let key in attrs) {
      el.setAttribute(key, attrs[key]);
    }

    for (let key in props) {
      let r = /^on(\w+)/.exec(key);
      let val = props[key];
      if (r) {
        el.addEventListener(r[1], val);
      } else if (key === 'innerHTML'){
        el[key] = val;
      } else if (val !== false){
        el.setAttribute(key, val);
      }
    }

    if (children != null) {
      if (isArray(children)) {
        el.append(...children);
      } else {
        el.append(children);
      }
    }

    return el;
  };

  const animTime = 500;
  const animFunc = 'ease-in-out';
  window.slideYShow = function($node, ms = animTime) {
    var startingHeight = $node.offsetParent ?
      window.getComputedStyle($node).height : '0';
    $node.style.display = 'block';
    $node.style.height = 'auto';
    $node.style.paddingTop = '';
    $node.style.paddingBottom = '';
    $node.style.marginTop = '';
    $node.style.marginBottom = '';
    var height = window.getComputedStyle($node).height;
    var heightInt = parseInt(height, 10);
    $node.style.height = startingHeight;
    $node.style.paddingTop = '0';
    $node.style.paddingBottom = '0';
{'fraction_non_alphanumeric': 0.203585751356452, 'fraction_numerical': 0.010379806558150507, 'mean_word_length': 2.234172387490465, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7596541', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1484, 'n_words': 311}