<commit_before>module Launcher where

import qualified Data.List          as L
import           Data.Monoid        ((<>))
import           System.FilePath    (pathSeparator)

-- OS dependent configuration
data Launcher = Launcher
    { nodePath :: String
    , nodeLogPath :: String
    , walletPath :: String
    , installerPath :: String
    , runtimePath :: String
    }

launcherArgs :: Launcher -> String
launcherArgs launcher = unwords $
  [ "--node", quote (nodePath launcher)
  , "--node-log-path", quote (nodeLogPath launcher)
  , "--wallet", quote (walletPath launcher)
  , "--updater ", quote (installerPath launcher)
  , "--node-timeout 5"
  , (" -n " ++ (L.intercalate " -n " nodeArgs))
  ]
    where
      nodeArgs = [
        "--listen", "0.0.0.0:12100",
        "--report-server", "http://192.168.127.12:8080",
        "--log-config", "log-config-prod.yaml",
        "--update-latest-path", quote (installerPath launcher),
        "--keyfile", quote (runtimePath launcher <> "Secrets" <> (pathSeparator : "secret.key")),
        "--logs-prefix", quote (runtimePath launcher <> "Logs"),
        "--db-path", quote (runtimePath launcher <> "DB-0.2"),
        "--wallet-db-path", quote (runtimePath launcher <> "Wallet-0.2"),
        "--peers-file", "ip-dht-mappings",
        "--system-start", "1490651980",
        "--wallet"
        ]
<commit_msg>installers: listen on 127.0.0.1 for the wallet<commit_after>module Launcher where

import qualified Data.List          as L
import           Data.Monoid        ((<>))
import           System.FilePath    (pathSeparator)

-- OS dependent configuration
data Launcher = Launcher
    { nodePath :: String
    , nodeLogPath :: String
    , walletPath :: String
    , installerPath :: String
    , runtimePath :: String
    }

launcherArgs :: Launcher -> String
launcherArgs launcher = unwords $
  [ "--node", quote (nodePath launcher)
  , "--node-log-path", quote (nodeLogPath launcher)
  , "--wallet", quote (walletPath launcher)
  , "--updater ", quote (installerPath launcher)
  , "--node-timeout 5"
  , (" -n " ++ (L.intercalate " -n " nodeArgs))
  ]
    where
      nodeArgs = [
        "--listen", "127.0.0.1:12100",
        "--report-server", "http://192.168.127.12:8080",
        "--log-config", "log-config-prod.yaml",
        "--update-latest-path", quote (installerPath launcher),
        "--keyfile", quote (runtimePath launcher <> "Secrets" <> (pathSeparator : "secret.key")),
        "--logs-prefix", quote (runtimePath launcher <> "Logs"),
        "--db-path", quote (runtimePath launcher <> "DB-0.2"),
        "--wallet-db-path", quote (runtimePath launcher <> "Wallet-0.2"),
        "--peers-file", "ip-dht-mappings",
        "--system-start", "1490651980",
        "--wallet"
        ]

{'fraction_non_alphanumeric': 0.1716769286490402, 'fraction_numerical': 0.031148134733792104, 'mean_word_length': 2.4611528822055138, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, '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': '774023', 'n_tokens_mistral': 916, 'n_tokens_neox': 862, 'n_words': 198}