<commit_before># analysis scripts. THESE DON'T GET MODIFIED
import os
import logging
# import sys, os
# if sys.platform == 'darwin':
#     sys.path.append(os.path.join("/Users", "njchiang", "GitHub", "task-fmri-utils"))
# else:
#     sys.path.append(os.path.join("D:\\", "GitHub", "task-fmri-utils"))


#######################################
# Setup logging
def setup_logger(loc, fname='analysis'):
    from datetime import datetime
    logging.basicConfig(filename=os.path.join(loc, fname + '.log'),
                        datefmt='%m-%d %H:%M',
                        level=logging.DEBUG)
    logger = logging.getLogger(fname)
    logger.info('--------------------------------')
    logger.info("Session started at " + str(datetime.now()))
    return logger


def write_to_logger(msg, logger=None):
    if logger is not None:
        logger.info(msg)
    else:
        print msg
    return


########################################<commit_msg>change logfile name<commit_after># analysis scripts. THESE DON'T GET MODIFIED
import os, sys
import logging
# import sys, os
# if sys.platform == 'darwin':
#     sys.path.append(os.path.join("/Users", "njchiang", "GitHub", "task-fmri-utils"))
# else:
#     sys.path.append(os.path.join("D:\\", "GitHub", "task-fmri-utils"))


#######################################
# Setup logging
def setup_logger(loc, fname='analysis'):
    from datetime import datetime
    logging.basicConfig(filename=os.path.join(loc, fname + sys.logger '.log'),
                        datefmt='%m-%d %H:%M',
                        level=logging.DEBUG)
    logger = logging.getLogger(fname)
    logger.info('--------------------------------')
    logger.info("Session started at " + str(datetime.now()))
    return logger


def write_to_logger(msg, logger=None):
    if logger is not None:
        logger.info(msg)
    else:
        print msg
    return


########################################
{'fraction_non_alphanumeric': 0.24791666666666667, 'fraction_numerical': 0.0, 'mean_word_length': 2.8266932270916336, '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': '1435669', 'n_tokens_mistral': 577, 'n_tokens_neox': 554, 'n_words': 128}