<commit_before>#!/usr/bin/env python
# Copyright (c) 2014-2015, NVIDIA CORPORATION.  All rights reserved.

import sys
import os
import argparse
import logging

import PIL.Image

# Add path for DIGITS package
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from digits import utils

logger = logging.getLogger('digits.tools.resize_image')

def validate_output_file(filename):
    if filename is None:
        return True
    if os.path.exists(filename):
        if not os.access(filename, os.W_OK):
            logger.error('cannot overwrite existing output file "%s"' % filename)
            return False
    output_dir = os.path.dirname(filename)
    if not output_dir:<commit_msg>Fix logging in resize_image tool<commit_after>#!/usr/bin/env python
# Copyright (c) 2014-2015, NVIDIA CORPORATION.  All rights reserved.

import sys
import os
import argparse
import logging

import PIL.Image

# Add path for DIGITS package
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from digits import utils, log

logger = logging.getLogger('digits.tools.resize_image')

def validate_output_file(filename):
    if filename is None:
        return True
    if os.path.exists(filename):
        if not os.access(filename, os.W_OK):
            logger.error('cannot overwrite existing output file "%s"' % filename)
            return False
    output_dir = os.path.dirname(filename)
    if not output_dir:
{'fraction_non_alphanumeric': 0.09889349930843706, 'fraction_numerical': 0.011065006915629323, 'mean_word_length': 3.698051948051948, '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': '5135333', 'n_tokens_mistral': 466, 'n_tokens_neox': 438, 'n_words': 124}