<commit_before>const { app, BrowserWindow } = require('electron')
const Pathname               = require('node-pathname')
const url                    = require('url')

function App() {
  this.__window = null
}

App.root = new Pathname(app.getAppPath())

App.prototype = {
  createWindow: function() {
    this.__window = new BrowserWindow({})
    this.__window.loadURL(this.__appURL())
    this.__window.on('closed', () => this.__window = null)
  },

  __appURL: function() {
    if (process.env.NODE_ENV === 'production') {
      return url.format({
        pathname: App.root.join('htdocs/index.html').toString(),
        protocol: 'file:',
        slashes: true,
      })
    } else {
      return 'http://localhost:3000'
    }
  }
}

app.on('ready', () => {
  global.app = new App()
  global.app.createWindow()
})

app.on('window-all-closed', app.quit)<commit_msg>:+1: configure window settings<commit_after>const { app, BrowserWindow } = require('electron')
const Pathname               = require('node-pathname')
const url                    = require('url')

function App() {
  this.__window = null
}

App.root = new Pathname(app.getAppPath())

App.prototype = {
  createWindow: function() {
    this.__window = new BrowserWindow({
      width: 400,
      height: 640,
    })
    this.__window.loadURL(this.__appURL())
    this.__window.on('closed', () => this.__window = null)
    if (!this.__isProduction()) {
      this.__window.webContents.openDevTools()
    }
  },

  __appURL: function() {
    if (this.__isProduction()) {
      return url.format({
        pathname: App.root.join('htdocs/index.html').toString(),
        protocol: 'file:',
        slashes: true,
      })
    } else {
      return 'http://localhost:3000'
    }
  },

  __isProduction: function() {
    return process.env.NODE_ENV === 'production'
  }
}

app.on('ready', () => {
  global.app = new App()
  global.app.createWindow()
})

app.on('window-all-closed', app.quit)
{'fraction_non_alphanumeric': 0.16734902763561924, 'fraction_numerical': 0.007676560900716479, 'mean_word_length': 2.7452107279693485, 'pattern_counts': {'":': 0, '<': 3, '<?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': '282300', 'n_tokens_mistral': 642, 'n_tokens_neox': 612, 'n_words': 113}