# Path: deepcpg/utils.py
# def make_dir(dirname):
#     """Create directory `dirname` if non-existing.
# 
#     Parameters
#     ----------
#     dirname: str
#         Path of directory to be created.
# 
#     Returns
#     -------
#     bool
#         `True`, if directory did not exist and was created.
#     """
#     if os.path.exists(dirname):
#         return False
#     else:
#         os.makedirs(dirname)
#         return True


import os
import sys
import argparse
import logging
from deepcpg.utils import make_dir
        p.add_argument(
            '--log_file',
            help='Write log messages to file')
        return p

    def main(self, name, opts):
        logging.basicConfig(filename=opts.log_file,
                            format='%(levelname)s (%(asctime)s): %(message)s')
        log = logging.getLogger(name)
        if opts.verbose:
            log.setLevel(logging.DEBUG)
        else:
            log.setLevel(logging.INFO)
        log.debug(opts)

        if opts.show:
            print('Available models: %s' % MODEL_ZOO)
            for name in sorted(list(MODELS.keys())):
                print(name)
            return 0

        if not opts.model_id:
            raise ValueError('Model ID required!')

        if opts.model_id not in MODELS:
            raise ValueError('Invalid model ID "%s"!' % opts.model_id)

        log.info('Downloading model ...')
        model_url = "%s/%s" % (DATA_HOST, MODELS[opts.model_id])
        log.info('Model URL: %s' % model_url)

# Path: deepcpg/utils.py
# def make_dir(dirname):
#     """Create directory `dirname` if non-existing.
# 
#     Parameters
#     ----------
#     dirname: str
#         Path of directory to be created.
# 
#     Returns
#     -------
#     bool
#         `True`, if directory did not exist and was created.
#     """
#     if os.path.exists(dirname):
#         return False
#     else:
#         os.makedirs(dirname)
#         return True


# Path: scripts/dcpg_download.py
import os
import sys
import argparse
import logging
from deepcpg.utils import make_dir

        p.add_argument(
            '--log_file',
            help='Write log messages to file')
        return p

    def main(self, name, opts):
        logging.basicConfig(filename=opts.log_file,
                            format='%(levelname)s (%(asctime)s): %(message)s')
        log = logging.getLogger(name)
        if opts.verbose:
            log.setLevel(logging.DEBUG)
        else:
            log.setLevel(logging.INFO)
        log.debug(opts)

        if opts.show:
            print('Available models: %s' % MODEL_ZOO)
            for name in sorted(list(MODELS.keys())):
                print(name)
            return 0

        if not opts.model_id:
            raise ValueError('Model ID required!')

        if opts.model_id not in MODELS:
            raise ValueError('Invalid model ID "%s"!' % opts.model_id)

        log.info('Downloading model ...')
        model_url = "%s/%s" % (DATA_HOST, MODELS[opts.model_id])
        log.info('Model URL: %s' % model_url)

        make_dir(opts.out_dir)