<commit_before>#!/usr/bin/env python
import os
import fcntl
import struct
from datetime import datetime, timedelta
from time import sleep, strftime
import logging
from logging.handlers import TimedRotatingFileHandler
import glob
import shutil
from ISStreamer.Streamer import Streamer
import hipchat
import math
import requests
import json


class CoffeeScale:
    def __init__(self):
        self._logger = logging.getLogger("coffee_log")
        self._logger.setLevel(logging.INFO)
        self._currentWeight = 0
        self._weightChangedThreshold = 5
        self._emptyPotThreshold = 10
        self._loopCount = 0
        self._logToHipChatLoopCount = 40
        self._logToLedLoopCount = 40
        self._initialStateKey = ''
        self._environment = ''
        self._hipchatKey = ''
        self._ledServiceUrl = ''
        self._mostRecentLiftedTime = datetime.now()
        self._dynamoApiKey = ''
        self._dynamoApiUrl = ''
        # When Adjusting the Pot Weight, you may also need to adjust the
        # 'calculateMugAmounts' value. Pass the full pot weight into
        # that method to automatically calculate mug capacity per pot.
        self._potWeight = 898
        self._mugFluidCapacity = 266
        # The getLedMessage no longer cares what the 
        # full pot capacity is. It will simply display "X mugs - Wed 08:14"
        self._mugAmounts = self.calculateMugAmounts(9999) # Full pot capacity
        self._emptyMessages = ["MAKE MORE COFFEE", "Shaka, when the walls fell", "I doubt you want to drink this",
                "I hope you like Iced Coffee", "Nothing to see here, move along", "Sarah is watching, make more coffee",
                "I wonder if we need more coffee?", "How is the weather today?", "Is it time for another fridge clean-out?",
                "We never talk anymore Dave :("]

    @property
    def initialStateKey(self):
        if not self._initialStateKey:
            self._initialStateKey = os.environ.get('INITIAL_STATE_ACCESS_KEY')
            if not self._initialStateKey:
                self._logger.error("### Initial State Key not set in environment variable")

        return self._initialStateKey
<commit_msg>- Increasing delay in each post to the LED<commit_after>#!/usr/bin/env python
import os
import fcntl
import struct
from datetime import datetime, timedelta
from time import sleep, strftime
import logging
from logging.handlers import TimedRotatingFileHandler
import glob
import shutil
from ISStreamer.Streamer import Streamer
import hipchat
import math
import requests
import json


class CoffeeScale:
    def __init__(self):
        self._logger = logging.getLogger("coffee_log")
        self._logger.setLevel(logging.INFO)
        self._currentWeight = 0
        self._weightChangedThreshold = 5
        self._emptyPotThreshold = 10
        self._loopCount = 0
        self._logToHipChatLoopCount = 40
        self._logToLedLoopCount = 80
        self._initialStateKey = ''
        self._environment = ''
        self._hipchatKey = ''
        self._ledServiceUrl = ''
        self._mostRecentLiftedTime = datetime.now()
        self._dynamoApiKey = ''
        self._dynamoApiUrl = ''
        # When Adjusting the Pot Weight, you may also need to adjust the
        # 'calculateMugAmounts' value. Pass the full pot weight into
        # that method to automatically calculate mug capacity per pot.
        self._potWeight = 898
        self._mugFluidCapacity = 266
        # The getLedMessage no longer cares what the 
        # full pot capacity is. It will simply display "X mugs - Wed 08:14"
        self._mugAmounts = self.calculateMugAmounts(9999) # Full pot capacity
        self._emptyMessages = ["MAKE MORE COFFEE", "Shaka, when the walls fell", "I doubt you want to drink this",
                "I hope you like Iced Coffee", "Nothing to see here, move along", "Sarah is watching, make more coffee",
                "I wonder if we need more coffee?", "How is the weather today?", "Is it time for another fridge clean-out?",
                "We never talk anymore Dave :("]

    @property
    def initialStateKey(self):
        if not self._initialStateKey:
            self._initialStateKey = os.environ.get('INITIAL_STATE_ACCESS_KEY')
            if not self._initialStateKey:
                self._logger.error("### Initial State Key not set in environment variable")

        return self._initialStateKey

{'fraction_non_alphanumeric': 0.07374631268436578, 'fraction_numerical': 0.010437939641479465, 'mean_word_length': 2.69179229480737, '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': '2305292', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1159, 'n_words': 416}