<commit_before><script>
function is64Bit() {
  const x64 = ['x86_64', 'x86-64', 'Win64','x64', 'amd64', 'AMD64'];
  for (const substr of x64) if (navigator.userAgent.includes(substr)) return true;
  return navigator.platform === 'Linux x86_64' || navigator.platform === 'MacIntel';
}

function wasmInfo() {
  var info = {
    WebAssembly: typeof WebAssembly,
    SharedArrayBuffer: typeof SharedArrayBuffer,
    Atomics: typeof Atomics
  };

  if (info.WebAssembly !== 'object') return info;

  var source = Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00);
  info.mvp = WebAssembly.validate(source);
  if (!info.mvp) return info;

  try {
    window.postMessage(new WebAssembly.Module(source), '*');
    info.structuredCloning = 'ok';
  } catch (e) {
    info.structuredCloning = e.toString();
  }

  if (info.SharedArrayBuffer !== 'function') return info;
  var mem = new WebAssembly.Memory({shared: true, initial: 8, maximum: 16});
  info.sharedMem = mem.buffer instanceof SharedArrayBuffer;

  try {
    mem.grow(8);
    info.growableMem = 'ok';
  } catch (e) {
    info.growableMem = e.toString();
  }

  return info;
}

function pnaclInfo() {
  return {
    mimeType: 'application/x-pnacl' in navigator.mimeTypes
  };
}

function needsBoardHeightFix() {
  var ffv = navigator.userAgent.split('Firefox/');
  return !window.chrome && (!ffv[1] || parseInt(ffv[1]) < 61);
}

function localStorageInfo() {
  var intresting = [
    'client-eval-enabled',
    'analyse.ceval.watchdog3.pnacl',
    'analyse.ceval.max-depth',
    'analyse.ceval.multipv',
    'analyse.ceval.threads',
    'analyse.ceval.hash-size',
    'analyse.ceval.infinite',
    'ceval.pool.start',
    'ceval.fen',
    'just-notified',
    'push-subscribed',
    'grid',
    'resize-nag',
    'speech.enabled',
    'sound-volume',
    'surl6'
  ];
  var info = {};
  for (var i = 0; i < intresting.length; i++) {
    info[intresting[i]] = window.localStorage.getItem(intresting[i]);
  }
  return info;
}

function serviceWorkerInfo() {
  var info = {
    'navigator': 'serviceWorker' in navigator,
    'permissions': 'permissions' in navigator,
    'Notification': 'Notification' in window,
    'PushManager': 'PushManager' in window,
    'fetch': typeof fetch
  };

  if (info.Notification) info['Notification.permission'] = Notification.permission;

  return info;
}

var info = {
  diagnosticsVersion: 3,
  navigator: {
    userAgent: navigator.userAgent,
    platform: navigator.platform,
    chrome: !!window.chrome,
    is64Bit: is64Bit(),
    hardwareConcurrency: navigator.hardwareConcurrency
  },
  wasm: wasmInfo(),
  pnacl: pnaclInfo(),
  needsBoardHeightFix: needsBoardHeightFix(),
  hasTouchEvents: 'ontouchstart' in window,
  animate: typeof document.createElement('div').animate,
  localStorage: localStorageInfo(),
  serviceWorker: serviceWorkerInfo()
};

document.write(JSON.stringify(info));
</script><commit_msg>add navigator.deviceMemory to diagnostics<commit_after><script>
function is64Bit() {
  const x64 = ['x86_64', 'x86-64', 'Win64','x64', 'amd64', 'AMD64'];
  for (const substr of x64) if (navigator.userAgent.includes(substr)) return true;
  return navigator.platform === 'Linux x86_64' || navigator.platform === 'MacIntel';
}

function wasmInfo() {
  var info = {
    WebAssembly: typeof WebAssembly,
    SharedArrayBuffer: typeof SharedArrayBuffer,
    Atomics: typeof Atomics
  };

  if (info.WebAssembly !== 'object') return info;

  var source = Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00);
  info.mvp = WebAssembly.validate(source);
  if (!info.mvp) return info;

  try {
    window.postMessage(new WebAssembly.Module(source), '*');
    info.structuredCloning = 'ok';
  } catch (e) {
    info.structuredCloning = e.toString();
  }

  if (info.SharedArrayBuffer !== 'function') return info;
  var mem = new WebAssembly.Memory({shared: true, initial: 8, maximum: 16});
  info.sharedMem = mem.buffer instanceof SharedArrayBuffer;

  try {
    mem.grow(8);
    info.growableMem = 'ok';
  } catch (e) {
    info.growableMem = e.toString();
  }

  return info;
}

function pnaclInfo() {
  return {
    mimeType: 'application/x-pnacl' in navigator.mimeTypes
  };
}

function needsBoardHeightFix() {
  var ffv = navigator.userAgent.split('Firefox/');
  return !window.chrome && (!ffv[1] || parseInt(ffv[1]) < 61);
}

function localStorageInfo() {
  var intresting = [
    'client-eval-enabled',
    'analyse.ceval.watchdog3.pnacl',
    'analyse.ceval.max-depth',
    'analyse.ceval.multipv',
    'analyse.ceval.threads',
    'analyse.ceval.hash-size',
    'analyse.ceval.infinite',
    'ceval.pool.start',
    'ceval.fen',
    'just-notified',
    'push-subscribed',
    'grid',
    'resize-nag',
    'speech.enabled',
    'sound-volume',
    'surl6'
  ];
  var info = {};
  for (var i = 0; i < intresting.length; i++) {
    info[intresting[i]] = window.localStorage.getItem(intresting[i]);
  }
  return info;
}

function serviceWorkerInfo() {
  var info = {
    'navigator': 'serviceWorker' in navigator,
    'permissions': 'permissions' in navigator,
    'Notification': 'Notification' in window,
    'PushManager': 'PushManager' in window,
    'fetch': typeof fetch
  };

  if (info.Notification) info['Notification.permission'] = Notification.permission;

  return info;
}

var info = {
  diagnosticsVersion: 4,
  navigator: {
    userAgent: navigator.userAgent,
    platform: navigator.platform,
    chrome: !!window.chrome,
    is64Bit: is64Bit(),
    hardwareConcurrency: navigator.hardwareConcurrency,
    deviceMemory: navigator.deviceMemory
  },
  wasm: wasmInfo(),
  pnacl: pnaclInfo(),
  needsBoardHeightFix: needsBoardHeightFix(),
  hasTouchEvents: 'ontouchstart' in window,
  animate: typeof document.createElement('div').animate,
  localStorage: localStorageInfo(),
  serviceWorker: serviceWorkerInfo()
};

document.write(JSON.stringify(info));
</script>
{'fraction_non_alphanumeric': 0.15037338764426342, 'fraction_numerical': 0.022063815342837745, 'mean_word_length': 3.9437919463087248, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '6060178', 'n_tokens_mistral': 2125, 'n_tokens_neox': 2007, 'n_words': 422}