<commit_before>fs = require 'fs'
path = require 'path'
delegate = require 'atom_delegate'
optimist = require 'optimist'
coffeeScript = require 'coffee-script'

atomApplication = null

delegate.browserMainParts.preMainMessageLoopRun = ->
  commandLineArgs = parseCommandLine()
  require('module').globalPaths.push(path.join(commandLineArgs.resourcePath, "src"))
  AtomApplication = require('atom-application')
  atomApplication = new AtomApplication(commandLineArgs)

getHomeDir = ->
  process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']

parseCommandLine = ->
  args = optimist(process.argv[1..]).argv
  executedFrom = args['executed-from']
  pathsToOpen = if args._.length > 0 then args._ else null
  testMode = true if args['test']
  version = String fs.readFileSync(path.join(__dirname, '..', '..', 'version'))

  if args['resource-path']
    resourcePath = args['resource-path']
  else if args['dev']
    resourcePath = path.join(getHomeDir(), 'github/atom')

  try
    fs.statSync resourcePath
  catch e
    resourcePath = path.dirname(__dirname)

  {resourcePath, executedFrom, pathsToOpen, testMode, version}<commit_msg>Join github and atom dirs<commit_after>fs = require 'fs'
path = require 'path'
delegate = require 'atom_delegate'
optimist = require 'optimist'
coffeeScript = require 'coffee-script'

atomApplication = null

delegate.browserMainParts.preMainMessageLoopRun = ->
  commandLineArgs = parseCommandLine()
  require('module').globalPaths.push(path.join(commandLineArgs.resourcePath, 'src'))
  AtomApplication = require('atom-application')
  atomApplication = new AtomApplication(commandLineArgs)

getHomeDir = ->
  process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']

parseCommandLine = ->
  args = optimist(process.argv[1..]).argv
  executedFrom = args['executed-from']
  pathsToOpen = if args._.length > 0 then args._ else null
  testMode = true if args['test']
  version = String fs.readFileSync(path.join(__dirname, '..', '..', 'version'))

  if args['resource-path']
    resourcePath = args['resource-path']
  else if args['dev']
    resourcePath = path.join(getHomeDir(), 'github', 'atom')

  try
    fs.statSync resourcePath
  catch e
    resourcePath = path.dirname(__dirname)

  {resourcePath, executedFrom, pathsToOpen, testMode, version}
{'fraction_non_alphanumeric': 0.12958963282937366, 'fraction_numerical': 0.0034557235421166306, 'mean_word_length': 5.015584415584415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2173412', 'n_tokens_mistral': 710, 'n_tokens_neox': 695, 'n_words': 162}