<commit_before>#!/usr/bin/env python3

"""This is a Raspberry network scanner application"""

import subprocess
import time
import re
from Node import Node
from listener import *
import threading
import logging

subprocess.call("/home/pi/pyNet/install.sh", shell=True)

__credits__ = [""]
__version__ = "2.0.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Development"
__Group__ = "Database"
__GroupMembers__ = "['Michael', '<NAME>', 'Linda']"



def initialize():
    """This function initializes the application"""

    #Gather information about the current device and display it
    thisNode = Node(fetch_IP_address(), fetch_MAC_address(), fetch_broadcast_address(), scanHosts())
    print("My IP is {} and MAC is {}\n".format(thisNode.getIPAddress, thisNode.getMACAddress))

    #Register this device as a listener for incoming messages
    listener = Listener(thisNode)

    #Election of a master node
    begin_election_process(thisNode, listener)

    #Initialises threads for scanning devices and messaging
    scanner_thread = threading.Thread(target=network_scanner, args=(thisNode,listener))
    listener_thread = threading.Thread(target=network_listener, args=(listener,))

    #start scanning and listener threads<commit_msg>Added git version<commit_after>#!/usr/bin/env python3

"""This is a Raspberry network scanner application"""

import subprocess
import time
import re
from Node import Node
from listener import *
import threading
import logging

__credits__ = [""]
__version__ = "2.0.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Development"
__Group__ = "Database"
__GroupMembers__ = "['Michael', '<NAME>', 'Linda']"



def initialize():
    """This function initializes the application"""

    #Gather information about the current device and display it
    thisNode = Node(fetch_IP_address(), fetch_MAC_address(), fetch_broadcast_address(), scanHosts())
    print("My IP is {} and MAC is {}\n".format(thisNode.getIPAddress, thisNode.getMACAddress))

    #Register this device as a listener for incoming messages
    listener = Listener(thisNode)

    #Election of a master node
    begin_election_process(thisNode, listener)

    #Initialises threads for scanning devices and messaging
    scanner_thread = threading.Thread(target=network_scanner, args=(thisNode,listener))
    listener_thread = threading.Thread(target=network_listener, args=(listener,))

    #start scanning and listener threads
{'fraction_non_alphanumeric': 0.10667752442996743, 'fraction_numerical': 0.003257328990228013, 'mean_word_length': 5.3, 'pattern_counts': {'":': 0, '<': 9, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2025634', 'n_tokens_mistral': 721, 'n_tokens_neox': 686, 'n_words': 215}