<commit_before>/* Declare to Typescript that window has an extra app_base_path
   string attribute that is defined. */

import { join } from "path";

declare global {
  interface Window {
    app_base_path: string;
  }
}

declare var __webpack_public_path__: any;

const { pathname } = window.location;
console.log("pathname = ", pathname);
let i = pathname.lastIndexOf("/static");
if (i != -1) {
  window.app_base_path = pathname.slice(0, i);
} else {
  // This is a fallback that *should* never happen, since the hub
  // should redirect everything to /static/app.html.
  window.app_base_path = "/";
}

// See https://webpack.js.org/guides/public-path/
// and it's pretty cool this is supported!!
__webpack_public_path__ = join(window.app_base_path, "static/");<commit_msg>make app_base_path correct in case of /<commit_after>/* Declare to Typescript that window has an extra app_base_path
   string attribute that is defined. */

import { join } from "path";

declare global {
  interface Window {
    app_base_path: string;
  }
}

const { pathname } = window.location;
console.log("pathname = ", pathname);
let i = pathname.lastIndexOf("/static");
if (i != -1) {
  window.app_base_path = i == 0 ? "/" : pathname.slice(0, i);
} else {
  // This is a fallback that *should* never happen, since the hub
  // should redirect everything to /static/app.html.
  window.app_base_path = "/";
}

// See https://webpack.js.org/guides/public-path/
// and it's pretty cool this is supported!!
declare var __webpack_public_path__: any;
__webpack_public_path__ = join(window.app_base_path, "static/");
{'fraction_non_alphanumeric': 0.13081761006289308, 'fraction_numerical': 0.0031446540880503146, 'mean_word_length': 3.8803680981595092, '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': '6193246', 'n_tokens_mistral': 524, 'n_tokens_neox': 516, 'n_words': 153}