<commit_before>#!/usr/env/python

from __future__ import division, print_function

## Import General Tools
import sys
import os
import argparse
import logging
import time
import numpy as np
import urllib2

import DHT22
import DS18B20
import Carriots
import humiditycalc

# import astropy.io.ascii as ascii
# import astropy.table as table

'''
Crontab to run ShedMonitor.py:

PYTHONPATH = /home/joshw/bin/RasPiProjects/
@reboot  /sbin/modprobe w1-gpio ; /sbin/modprobe w1-therm
*/3  * * * * nice /usr/bin/python2.7 /home/joshw/bin/RasPiProjects/ShedMonitor.py
*/15 * * * * nice /usr/bin/python2.7 /home/joshw/bin/RasPiProjects/PlotShed.py
'''

threshold_humid = 55
threshold_wet = 75

##-------------------------------------------------------------------------
## Main Program
##-------------------------------------------------------------------------
def measure(verbose=False):
    ##-------------------------------------------------------------------------
    ## Create logger object
    ##-------------------------------------------------------------------------
    logger = logging.getLogger('MyLogger')
    logger.setLevel(logging.DEBUG)
    ## Set up console output
    LogConsoleHandler = logging.StreamHandler()
    if verbose:
        LogConsoleHandler.setLevel(logging.DEBUG)
    else:
        LogConsoleHandler.setLevel(logging.INFO)
    LogFormat = logging.Formatter('%(asctime)23s %(levelname)8s: %(message)s')
    LogConsoleHandler.setFormatter(LogFormat)
    logger.addHandler(LogConsoleHandler)
    ## Set up file output
    LogFileName = os.path.join('/', 'home', 'joshw', 'logs', 'ShedLog.txt')
    LogFileHandler = logging.FileHandler(LogFileName)
    LogFileHandler.setLevel(logging.DEBUG)
    LogFileHandler.setFormatter(LogFormat)
    logger.addHandler(LogFileHandler)

    ##-------------------------------------------------------------------------
    ## Get Temperature and Humidity Values
    ##-------------------------------------------------------------------------
    logger.info('#### Reading Temperature and Humidity Sensors ####')
    logger.info('Reading DHT22')
    DHT = DHT22.DHT22()
    temps = []
    temps_C = []
    hums = []<commit_msg>Tweak to log file name<commit_after>#!/usr/env/python

from __future__ import division, print_function

## Import General Tools
import sys
import os
import argparse
import logging
import time
import numpy as np
import urllib2

import DHT22
import DS18B20
import Carriots
import humiditycalc

# import astropy.io.ascii as ascii
# import astropy.table as table

threshold_humid = 55
threshold_wet = 75

##-------------------------------------------------------------------------
## Main Program
##-------------------------------------------------------------------------
def measure(verbose=False):
    ##-------------------------------------------------------------------------
    ## Create logger object
    ##-------------------------------------------------------------------------
    logger = logging.getLogger('MyLogger')
    logger.setLevel(logging.DEBUG)
    ## Set up console output
    LogConsoleHandler = logging.StreamHandler()
    if verbose:
        LogConsoleHandler.setLevel(logging.DEBUG)
    else:
        LogConsoleHandler.setLevel(logging.INFO)
    LogFormat = logging.Formatter('%(asctime)23s %(levelname)8s: %(message)s')
    LogConsoleHandler.setFormatter(LogFormat)
    logger.addHandler(LogConsoleHandler)
    ## Set up file output
    LogFileName = os.path.join('/', 'home', 'joshw', 'logs', time.strftime('HumidityLog_%Y%m%d.txt', time.localtime()))
    LogFileHandler = logging.FileHandler(LogFileName)
    LogFileHandler.setLevel(logging.DEBUG)
    LogFileHandler.setFormatter(LogFormat)
    logger.addHandler(LogFileHandler)

    ##-------------------------------------------------------------------------
    ## Get Temperature and Humidity Values
    ##-------------------------------------------------------------------------
    logger.info('#### Reading Temperature and Humidity Sensors ####')
    logger.info('Reading DHT22')
    DHT = DHT22.DHT22()
    temps = []
    temps_C = []
    hums = []
{'fraction_non_alphanumeric': 0.30440068076829563, 'fraction_numerical': 0.011913445173839047, 'mean_word_length': 1.673164392462638, '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': '65666', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1052, 'n_words': 234}