# Path: gwsumm/html/static.py
# def get_css():
#     """Return a `dict` of CSS files to link in the HTML <head>
#     """
#     return CSS
# 
# def get_js():
#     """Return a `dict` of javascript files to link in the HTML <head>
#     """
#     return JS
# 
# Path: gwsumm/utils.py
# WARNC = r'\033[93m'
# ERRC = r'\033[91m'
# ENDC = r'\033[0m'
# UNSAFE_EVAL_STRS = [r'os\.(?![$\'\" ])', 'shutil', r'\.rm', r'\.mv']
# UNSAFE_EVAL = re.compile(r'(%s)' % '|'.join(UNSAFE_EVAL_STRS))
# OBSERVATORY_MAP = {
#     'G1': 'GEO',
#     'H1': 'LIGO Hanford',
#     'K1': 'KAGRA',
#     'L1': 'LIGO Livingston',
#     'V1': 'Virgo',
# }
# def elapsed_time():
# def vprint(message, verbose=True, stream=sys.stdout, profile=True):
# def mkdir(*paths):
# def nat_sorted(iterable, key=None):
#     def convert(text):
#     def alphanum_key(key):
# def get_odc_bitmask(odcchannel):
# def safe_eval(val, strict=False, globals_=None, locals_=None):
# def get_default_ifo(fqdn=getfqdn()):


import configparser
import os
import re
import sys
import math  # noqa: F401
import numpy  # noqa: F401
from collections import OrderedDict
from importlib import import_module
from io import StringIO
from http.client import HTTPException
from matplotlib import rcParams
from astropy import units
from gwpy.detector import (Channel, ChannelList)
from gwpy.time import tconvert
from .channels import (get_channels, split as split_channels,
                       update_channel_params)
from .html import (get_css, get_js)
from .utils import (nat_sorted, re_cchar, re_quote, safe_eval, OBSERVATORY_MAP)
            from lal import GPSLeapSeconds as leap_seconds
        from .state import (register_state, SummaryState,
                            ALLSTATE, generate_all_state, get_state)
        for section in self.sections():
            s = section
            for key in self._interpvar_re.findall(section):
                try:
                    val = kwargs[key]
                except KeyError:
                    raise configparser.InterpolationMissingOptionError(
                        '[%s]' % section, section, key, '%%(%s)s' % key)
                s = section % {key: val}
            self._sections[s] = self._sections.pop(section)

    def set_ifo_options(self, ifo, observatory=None,
                        section=configparser.DEFAULTSECT):
        """Set configurations options in [DEFAULT] based on the given `ifo`

        The following options are set

        - `IFO` - the two-character interferometer prefix, e.g. ``L1``
        - `ifo` - the two-character interferometer prefix in lower-case,
           e.g. ``l1``
        - `SITE` - the single-character site ID, e.g. ``L``
        - `site` - the single-character site ID,n lower-case e.g. ``l``

        Additionally, if `observatory` is given, or the `ifo` matches known
        observatories, the following option is set

        - `observatory` - the name of the observatory, e.g. ``LIGO Livingston``

        """
        if observatory is None:

# Path: gwsumm/html/static.py
# def get_css():
#     """Return a `dict` of CSS files to link in the HTML <head>
#     """
#     return CSS
# 
# def get_js():
#     """Return a `dict` of javascript files to link in the HTML <head>
#     """
#     return JS
# 
# Path: gwsumm/utils.py
# WARNC = r'\033[93m'
# ERRC = r'\033[91m'
# ENDC = r'\033[0m'
# UNSAFE_EVAL_STRS = [r'os\.(?![$\'\" ])', 'shutil', r'\.rm', r'\.mv']
# UNSAFE_EVAL = re.compile(r'(%s)' % '|'.join(UNSAFE_EVAL_STRS))
# OBSERVATORY_MAP = {
#     'G1': 'GEO',
#     'H1': 'LIGO Hanford',
#     'K1': 'KAGRA',
#     'L1': 'LIGO Livingston',
#     'V1': 'Virgo',
# }
# def elapsed_time():
# def vprint(message, verbose=True, stream=sys.stdout, profile=True):
# def mkdir(*paths):
# def nat_sorted(iterable, key=None):
#     def convert(text):
#     def alphanum_key(key):
# def get_odc_bitmask(odcchannel):
# def safe_eval(val, strict=False, globals_=None, locals_=None):
# def get_default_ifo(fqdn=getfqdn()):


# Path: gwsumm/config.py
import configparser
import os
import re
import sys
import math  # noqa: F401
import numpy  # noqa: F401
from collections import OrderedDict
from importlib import import_module
from io import StringIO
from http.client import HTTPException
from matplotlib import rcParams
from astropy import units
from gwpy.detector import (Channel, ChannelList)
from gwpy.time import tconvert
from .channels import (get_channels, split as split_channels,
                       update_channel_params)
from .html import (get_css, get_js)
from .utils import (nat_sorted, re_cchar, re_quote, safe_eval, OBSERVATORY_MAP)
            from lal import GPSLeapSeconds as leap_seconds
        from .state import (register_state, SummaryState,
                            ALLSTATE, generate_all_state, get_state)

        for section in self.sections():
            s = section
            for key in self._interpvar_re.findall(section):
                try:
                    val = kwargs[key]
                except KeyError:
                    raise configparser.InterpolationMissingOptionError(
                        '[%s]' % section, section, key, '%%(%s)s' % key)
                s = section % {key: val}
            self._sections[s] = self._sections.pop(section)

    def set_ifo_options(self, ifo, observatory=None,
                        section=configparser.DEFAULTSECT):
        """Set configurations options in [DEFAULT] based on the given `ifo`

        The following options are set

        - `IFO` - the two-character interferometer prefix, e.g. ``L1``
        - `ifo` - the two-character interferometer prefix in lower-case,
           e.g. ``l1``
        - `SITE` - the single-character site ID, e.g. ``L``
        - `site` - the single-character site ID,n lower-case e.g. ``l``

        Additionally, if `observatory` is given, or the `ifo` matches known
        observatories, the following option is set

        - `observatory` - the name of the observatory, e.g. ``LIGO Livingston``

        """
        if observatory is None:

            observatory = OBSERVATORY_MAP.get(ifo)