<commit_before>-module(ns_server_sup).
-behavior(supervisor).

-export([start_link/0]).

-export([init/1]).

start_link() ->
    supervisor:start_link({local, ?MODULE}, ?MODULE, []).

init([]) ->
    {ok, {{rest_for_one,
           get_env_default(max_r, 3),
           get_env_default(max_t, 10)},
          get_child_specs()}}.

get_env_default(Var, Def) ->
    case application:get_env(Var) of
        {ok, Value} -> Value;
        undefined -> Def
    end.

get_child_specs() ->
    [
     % Insert stuff to be supervised here.
    ].<commit_msg>Launch ns_config.<commit_after>-module(ns_server_sup).
-behavior(supervisor).

-export([start_link/0]).

-export([init/1]).

start_link() ->
    supervisor:start_link({local, ?MODULE}, ?MODULE, []).

init([]) ->
    {ok, {{rest_for_one,
           get_env_default(max_r, 3),
           get_env_default(max_t, 10)},
          get_child_specs()}}.

get_env_default(Var, Def) ->
    case application:get_env(Var) of
        {ok, Value} -> Value;
        undefined -> Def
    end.

get_child_specs() ->
    [
     % TODO:  Figure out what to pass into ns_config
     {ns_config, {ns_config, start_link, [undefined]},
      permanent, 10, worker, [ns_config, ns_config_default]}
    ].
{'fraction_non_alphanumeric': 0.16504065040650406, 'fraction_numerical': 0.00975609756097561, 'mean_word_length': 2.8589341692789967, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3789060', 'n_tokens_mistral': 453, 'n_tokens_neox': 439, 'n_words': 80}