<commit_before>child_process = require 'child_process'
client = require './client'

module.exports =

  escpath: (p) -> '"' + p + '"'
  escape: (sh) -> sh.replace(/"/g, '\\"')

  exec: (sh) ->
    child_process.exec sh, (err, stdout, stderr) ->
      if err?
        console.log err

  term: (sh) ->
    switch process.platform
      when "darwin"
        @exec "osascript -e 'tell application \"Terminal\" to activate'"
        @exec "osascript -e 'tell application \"Terminal\" to do script \"#{@escape(sh)}\"'"
      when "win32"
        @exec "#{@terminal()} \"#{sh}\""
      else
        @exec "#{@terminal()} \"#{@escape(sh)}\""

  terminal: -> atom.config.get("julia-client.terminal")

  jlpath: -> atom.config.get("julia-client.juliaPath")

  repl: -> @term "#{@escpath @jlpath()} -q"

  client: (port) ->
    client.booting()
    @term "#{@escpath @jlpath()} -q -P \"import Atom; Atom.connect(#{port})\""<commit_msg>remove -q from repl<commit_after>child_process = require 'child_process'
client = require './client'

module.exports =

  escpath: (p) -> '"' + p + '"'
  escape: (sh) -> sh.replace(/"/g, '\\"')

  exec: (sh) ->
    child_process.exec sh, (err, stdout, stderr) ->
      if err?
        console.log err

  term: (sh) ->
    switch process.platform
      when "darwin"
        @exec "osascript -e 'tell application \"Terminal\" to activate'"
        @exec "osascript -e 'tell application \"Terminal\" to do script \"#{@escape(sh)}\"'"
      when "win32"
        @exec "#{@terminal()} \"#{sh}\""
      else
        @exec "#{@terminal()} \"#{@escape(sh)}\""

  terminal: -> atom.config.get("julia-client.terminal")

  jlpath: -> atom.config.get("julia-client.juliaPath")

  repl: -> @term "#{@escpath @jlpath()}"

  client: (port) ->
    client.booting()
    @term "#{@escpath @jlpath()} -q -P \"import Atom; Atom.connect(#{port})\""
{'fraction_non_alphanumeric': 0.21586616297895306, 'fraction_numerical': 0.0021586616297895305, 'mean_word_length': 2.7759674134419554, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '2737623', 'n_tokens_mistral': 677, 'n_tokens_neox': 663, 'n_words': 155}