# Path: abkhazia/utils/config.py
# class AbkhaziaConfig(object):
#     def default_config_file(name='abkhazia'):
#     def __init__(self, config_file=None):


import codecs
import collections
import multiprocessing
import re
from .config import config
# Copyright 2016 Thomas Schatz, Xuan-Nga Cao, Mathieu Bernard
#
# This file is part of abkhazia: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Abkhazia is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with abkhazia. If not, see <http://www.gnu.org/licenses/>.
"""Provides some misc functions usefull to abkhazia"""




def default_njobs(nj_queue=20, local=False):
    """Return `nj_queue` if running on a queue, ncores if running locally

    Default for `nj_queue` is 20, the standard number of jobs for
    features computation in the kaldi WSJ recipe.

    """

# Path: abkhazia/utils/config.py
# class AbkhaziaConfig(object):
#     def default_config_file(name='abkhazia'):
#     def __init__(self, config_file=None):


# Path: abkhazia/utils/misc.py
import codecs
import collections
import multiprocessing
import re
from .config import config

# Copyright 2016 Thomas Schatz, Xuan-Nga Cao, Mathieu Bernard
#
# This file is part of abkhazia: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Abkhazia is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with abkhazia. If not, see <http://www.gnu.org/licenses/>.
"""Provides some misc functions usefull to abkhazia"""




def default_njobs(nj_queue=20, local=False):
    """Return `nj_queue` if running on a queue, ncores if running locally

    Default for `nj_queue` is 20, the standard number of jobs for
    features computation in the kaldi WSJ recipe.

    """

    cmd = config.get('kaldi', 'train-cmd')