<commit_before># -*- coding: utf-8-*-
import socket

WORDS = ["TURN", "ON", "THE", "LIGHTS", "LIGHT", "OFF", "DEFAULT", "SET", "TO"]


def handle(text, mic, profile):
    """
        Responds to user-input, typically speech text, by relaying the
        meaning of life.

        Arguments:
        text -- user-input, typically transcribed speech
        mic -- used to interact with the user (for both input and output)
        profile -- contains information related to the user (e.g., phone
                   number)
    """
    text = text.lower()
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(("localhost",5432))
    status = sock.recv(1024)
    print "Got status: " + status
    if "default" in text:
        sock.send("default")
    else:
        if "on" in text and status == b"False":
            sock.send("on")
        elif "off" in text and status == b"True":
            sock.send("off")


def isValid(text):
    """
        Returns True if the input is related to the meaning of life.

        Arguments:
        text -- user-input, typically transcribed speech
    """
    return "light" in text.lower()<commit_msg>Changed light module to ignore status and force send light update.<commit_after># -*- coding: utf-8-*-
import socket

WORDS = ["TURN", "ON", "THE", "LIGHTS", "LIGHT", "OFF", "DEFAULT", "SET", "TO"]


def handle(text, mic, profile):
    """
        Responds to user-input, typically speech text, by relaying the
        meaning of life.

        Arguments:
        text -- user-input, typically transcribed speech
        mic -- used to interact with the user (for both input and output)
        profile -- contains information related to the user (e.g., phone
                   number)
    """
    text = text.lower()
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(("localhost",5432))
    status = sock.recv(1024)
    print "Got status: " + status
    if "default" in text:
        sock.send("default")
    else:
        if "on" in text:
            sock.send("on")
        elif "off" in text:
            sock.send("off")


def isValid(text):
    """
        Returns True if the input is related to the meaning of life.

        Arguments:
        text -- user-input, typically transcribed speech
    """
    return "light" in text.lower()
{'fraction_non_alphanumeric': 0.1271404109589041, 'fraction_numerical': 0.007705479452054794, 'mean_word_length': 2.254874651810585, 'pattern_counts': {'":': 2, '<': 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': '7355303', 'n_tokens_mistral': 695, 'n_tokens_neox': 660, 'n_words': 237}