<commit_before>Client    = require 'hangupsjs'
Q         = require 'q'
login     = require './login'
ipc       = require 'ipc'
fs        = require 'fs'
path      = require 'path'
tmp       = require 'tmp'
clipboard = require 'clipboard'

tmp.setGracefulCleanup()

app = require 'app'
BrowserWindow = require 'browser-window'

paths =
    rtokenpath:  path.normalize path.join app.getPath('userData'), 'refreshtoken.txt'
    cookiespath: path.normalize path.join app.getPath('userData'), 'cookies.json'
    chromecookie: path.normalize path.join app.getPath('userData'), 'Cookies'

client = new Client
    rtokenpath:  paths.rtokenpath
    cookiespath: paths.cookiespath

if fs.existsSync paths.chromecookie
    fs.unlinkSync paths.chromecookie

plug = (rs, rj) -> (err, val) -> if err then rj(err) else rs(val)

logout = ->
    promise = client.logout()
    promise.then (res) ->
      argv = process.argv
      spawn = require('child_process').spawn
      spawn argv.shift(), argv,
        cwd: process.cwd
        env: process.env
        stdio: 'inherit'
      app.quit()
    return promise # like it matters<commit_msg>Query proxy information from Electron and set it as env var<commit_after>Client    = require 'hangupsjs'
Q         = require 'q'
login     = require './login'
ipc       = require 'ipc'
fs        = require 'fs'
path      = require 'path'
tmp       = require 'tmp'
clipboard = require 'clipboard'

tmp.setGracefulCleanup()

app = require 'app'

app.resolveProxy 'https://google.com', (proxyURL) ->
  process.env.HTTPS_PROXY ?= proxyURL

app.resolveProxy 'http://google.com', (proxyURL) ->
  process.env.HTTP_PROXY ?= proxyURL

BrowserWindow = require 'browser-window'

paths =
    rtokenpath:  path.normalize path.join app.getPath('userData'), 'refreshtoken.txt'
    cookiespath: path.normalize path.join app.getPath('userData'), 'cookies.json'
    chromecookie: path.normalize path.join app.getPath('userData'), 'Cookies'

client = new Client
    rtokenpath:  paths.rtokenpath
    cookiespath: paths.cookiespath

if fs.existsSync paths.chromecookie
    fs.unlinkSync paths.chromecookie

plug = (rs, rj) -> (err, val) -> if err then rj(err) else rs(val)

logout = ->
    promise = client.logout()
    promise.then (res) ->
      argv = process.argv
      spawn = require('child_process').spawn
      spawn argv.shift(), argv,
        cwd: process.cwd
        env: process.env
        stdio: 'inherit'
      app.quit()
    return promise # like it matters
{'fraction_non_alphanumeric': 0.12202020202020201, 'fraction_numerical': 0.0, 'mean_word_length': 3.0858085808580857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 1, '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': '2078405', 'n_tokens_mistral': 810, 'n_tokens_neox': 812, 'n_words': 207}