<commit_before><?php

    namespace Modules;

    class recent_account_logins extends \ld\Modules\Module {
        protected $name = 'recent_account_logins';

        public function getData($args=array()) {
            $result = array();
            $data = array();

            exec(
                '/usr/bin/lastlog --time 365 |' .
                ' /usr/bin/awk \'{print $1","$3","$4" "$5" "$6" "$7" "$8}\'',
                $result
            );
            
            $x = 0;
            foreach ($result as $a) {
                $temp = explode(',', $result[$x]);

                $data[] = array(
                    'user' => $temp[0],
                    'from' => $temp[1],
                    'when' => date('Y-m-d H:i:s', strtotime($temp[2])),
                );

                unset($result[$x],$a);
                $x++;
            }

            return $data;
        }
    }<commit_msg>recent login header issue resolved<commit_after><?php

    namespace Modules;

    class recent_account_logins extends \ld\Modules\Module {
        protected $name = 'recent_account_logins';

        public function getData($args=array()) {
            $result = array();
            $data = array();

            exec(
                '/usr/bin/lastlog --time 365 |' .
                ' /usr/bin/awk \'{print $1","$3","$4" "$5" "$6" "$7" "$8}\'',
                $result
            );
            
            array_shift($result); // remove headers

            $x = 0;
            foreach ($result as $a) {
                $temp = explode(',', $result[$x]);

                $data[] = array(
                    'user' => $temp[0],
                    'from' => $temp[1],
                    'when' => date('Y-m-d H:i:s', strtotime($temp[2])),
                );

                unset($result[$x],$a);
                $x++;
            }

            return $data;
        }
    }
{'fraction_non_alphanumeric': 0.17088607594936708, 'fraction_numerical': 0.014767932489451477, 'mean_word_length': 1.1605922551252847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '4026696', 'n_tokens_mistral': 582, 'n_tokens_neox': 536, 'n_words': 111}