<commit_before>%% Copyright (c) 2013 <NAME>
%% See MIT-LICENSE for licensing information.

%%% -------------------------------------------------------------------
%%% Author  : <NAME> <EMAIL>
%%% Description :
%%%
%%% Created : 

-module(leni_sup).

-behaviour(supervisor).

%% API
-export([start_link/0]).

%% Supervisor callbacks
-export([init/1]).

%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type, Arg), {I, {I, start_link, [Arg]}, permanent, 5000, Type, [I]}).

%% ===================================================================
%% API functions
%% ===================================================================

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

%% ===================================================================
%% Supervisor callbacks
%% ===================================================================

init([]) ->
    Ip = case os:getenv("WEBMACHINE_IP") of false -> "0.0.0.0"; Any -> Any end,
    {ok, Dispatch} = file:consult(filename:join(
                         [filename:dirname(code:which(?MODULE)),
                          "..", "priv", "dispatch.conf"])),
    WebConfig = [
                 {ip, Ip},
                 {port, 8001},
                 {log_dir, "priv/log"},
                 {dispatch, Dispatch}],               
    Web = {webmachine_mochiweb, {webmachine_mochiweb, start, [WebConfig]}, permanent, 5000, worker, dynamic},
    Processes = [Web, ?CHILD(account_sup, supervisor, [leni])],
    {ok, { {one_for_one, 10, 10}, Processes} }.<commit_msg>changed port from 8001 to 8080<commit_after>%% Copyright (c) 2013 <NAME>
%% See MIT-LICENSE for licensing information.

%%% -------------------------------------------------------------------
%%% Author  : <NAME> <EMAIL>
%%% Description :
%%%
%%% Created : 

-module(leni_sup).

-behaviour(supervisor).

%% API
-export([start_link/0]).

%% Supervisor callbacks
-export([init/1]).

%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type, Arg), {I, {I, start_link, [Arg]}, permanent, 5000, Type, [I]}).

%% ===================================================================
%% API functions
%% ===================================================================

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

%% ===================================================================
%% Supervisor callbacks
%% ===================================================================

init([]) ->
    Ip = case os:getenv("WEBMACHINE_IP") of false -> "0.0.0.0"; Any -> Any end,
    {ok, Dispatch} = file:consult(filename:join(
                         [filename:dirname(code:which(?MODULE)),
                          "..", "priv", "dispatch.conf"])),
    WebConfig = [
                 {ip, Ip},
                 {port, 8080},
                 {log_dir, "priv/log"},
                 {dispatch, Dispatch}],               
    Web = {webmachine_mochiweb, {webmachine_mochiweb, start, [WebConfig]}, permanent, 5000, worker, dynamic},
    Processes = [Web, ?CHILD(account_sup, supervisor, [leni])],
    {ok, { {one_for_one, 10, 10}, Processes} }.
{'fraction_non_alphanumeric': 0.35970765808706706, 'fraction_numerical': 0.019065776930409915, 'mean_word_length': 2.944862155388471, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '632787', 'n_tokens_mistral': 943, 'n_tokens_neox': 848, 'n_words': 189}