<commit_before>from blackwidow.network.device import Device
from blackwidow.network.packet import Packet 

class Host(Device):
    """Simple class for hosts.
    
    Hosts are mainly responsible for recording their time data. 
    They don't trigger events in the simulation, but it will be
    useful to separate host data (end to end data). Flows
    will trigger host behavior.
    """
    def __init__(self, host_id):
        """Constructor for Host class."""
        super(Host, self).__init__(host_id)
        self.host_id = host_id
        self.flows = [] 
    
    def add_flow(self, flow):
        """Add receiving flow to host."""
        self.flows.append(flow)
    
    def set_env(self, env)
        """Set pysim environment."""
        self.env = env

    def send(self, packet): 
        """Connects to a link."""
        self.links[0].receive(packet)

    def receive(self, packet):
        """Send packet to flow to process."""
        for flow in self.flows:
            if packet.flow_id == flow.flow_id:
                flow.receive(packet)
                return
            
            
                



<commit_msg>Added missing colon.<commit_after>from blackwidow.network.device import Device
from blackwidow.network.packet import Packet 

class Host(Device):
    """Simple class for hosts.
    
    Hosts are mainly responsible for recording their time data. 
    They don't trigger events in the simulation, but it will be
    useful to separate host data (end to end data). Flows
    will trigger host behavior.
    """
    def __init__(self, host_id):
        """Constructor for Host class."""
        super(Host, self).__init__(host_id)
        self.host_id = host_id
        self.flows = [] 
    
    def add_flow(self, flow):
        """Add receiving flow to host."""
        self.flows.append(flow)
    
    def set_env(self, env):
        """Set pysim environment."""
        self.env = env

    def send(self, packet): 
        """Connects to a link."""
        self.links[0].receive(packet)

    def receive(self, packet):
        """Send packet to flow to process."""
        for flow in self.flows:
            if packet.flow_id == flow.flow_id:
                flow.receive(packet)
                return
            
            
                




{'fraction_non_alphanumeric': 0.0985178727114211, 'fraction_numerical': 0.0008718395815170009, 'mean_word_length': 1.9574742268041236, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2861800', 'n_tokens_mistral': 647, 'n_tokens_neox': 619, 'n_words': 208}