# Path: ifcb/data/adc.py
# SCHEMA = {
#     1: SCHEMA_VERSION_1,
#     2: SCHEMA_VERSION_2,
#     SCHEMA_VERSION_1._name: SCHEMA_VERSION_1,
#     SCHEMA_VERSION_2._name: SCHEMA_VERSION_2
# }
# 
# Path: ifcb/data/hdr.py
# TEMPERATURE = 'temperature'
# 
# HUMIDITY = 'humidity'
# 
# Path: ifcb/data/utils.py
# class BaseDictlike(object):
#     """
#     Provides as complete a readonly dict interface as possible,
#     based on anything that implements ``keys`` and ``__getitem__``.
#     when overriding, override ``has_key`` rather than ```__contains__``.
# 
#     Override any method if a more efficient implementation
#     is available.
#     """
#     def keys(self):
#         """
#         Default implementation raises ``NotImplementedError``.
#         This must be overridden for correct behavior.
#         """
#         raise NotImplementedError
#     def __getitem__(self, k):
#         """
#         Default implementation raises ``NotImplementedError``.
#         This must be overridden for correct behavior.
# 
#         :param k: the key
#         :type k: hashable
#         """
#         raise NotImplementedError
#     def __iter__(self):
#         yield from self.keys()
#     def has_key(self, k):
#         """
#         Iterates over keys and returns first key for
#         which equality test passes. This method is
#         called by the ``__contains__`` special method.
# 
#         :param k: the key to test
#         :type k: hashable
#         """
#         for ek in self.keys():
#             if ek == k:
#                 return True
#         return False
#     def __contains__(self, k):
#         return self.has_key(k)
#     def items(self):
#         """
#         Yields item pairs, based on calling keys
#         and then accessing each item.
#         """
#         for k in self.keys():
#             yield k, self[k]
#     def values(self):
#         """
#         Yields all values. Calls ``items``.
#         """
#         for k, v in self.items():
#             yield v
#     def __len__(self):
#         n = 0
#         for k in self.keys():
#             n += 1
#         return n
# 
# Path: ifcb/metrics/ml_analyzed.py
# def compute_ml_analyzed(abin):
#     """returns ml_analyzed, look time, run time"""
#     s = abin.schema
#     if s is SCHEMA_VERSION_1:
#         return compute_ml_analyzed_s1(abin)
#     elif s is SCHEMA_VERSION_2:
#         return compute_ml_analyzed_s2(abin)


from functools import lru_cache
from .adc import SCHEMA
from .hdr import TEMPERATURE, HUMIDITY
from .utils import BaseDictlike
from ..metrics.ml_analyzed import compute_ml_analyzed
        from .hdf import bin2hdf
        from .zip import bin2zip
        from .matlab import bin2mat
        """
        return self.pid.timestamp
    @property
    def schema(self):
        return SCHEMA[self.pid.schema_version]
    # context manager default implementation
    def __enter__(self):
        return self
    def __exit__(self, *args):
        pass
    # dictlike interface
    def keys(self):
        yield from self.adc.index
    def has_key(self, k):
        return k in self.adc.index
    def __len__(self):
        return len(self.adc.index)
    def get_target(self, target_number):
        """
        Retrieve a target record by target number

        :param target_number: the target number
        """
        d = tuple(self.adc[c][target_number] for c in self.adc.columns)
        return d
    def __getitem__(self, target_number):
        return self.get_target(target_number)
    # metrics
    @lru_cache()
    def _get_ml_analyzed(self):

# Path: ifcb/data/adc.py
# SCHEMA = {
#     1: SCHEMA_VERSION_1,
#     2: SCHEMA_VERSION_2,
#     SCHEMA_VERSION_1._name: SCHEMA_VERSION_1,
#     SCHEMA_VERSION_2._name: SCHEMA_VERSION_2
# }
# 
# Path: ifcb/data/hdr.py
# TEMPERATURE = 'temperature'
# 
# HUMIDITY = 'humidity'
# 
# Path: ifcb/data/utils.py
# class BaseDictlike(object):
#     """
#     Provides as complete a readonly dict interface as possible,
#     based on anything that implements ``keys`` and ``__getitem__``.
#     when overriding, override ``has_key`` rather than ```__contains__``.
# 
#     Override any method if a more efficient implementation
#     is available.
#     """
#     def keys(self):
#         """
#         Default implementation raises ``NotImplementedError``.
#         This must be overridden for correct behavior.
#         """
#         raise NotImplementedError
#     def __getitem__(self, k):
#         """
#         Default implementation raises ``NotImplementedError``.
#         This must be overridden for correct behavior.
# 
#         :param k: the key
#         :type k: hashable
#         """
#         raise NotImplementedError
#     def __iter__(self):
#         yield from self.keys()
#     def has_key(self, k):
#         """
#         Iterates over keys and returns first key for
#         which equality test passes. This method is
#         called by the ``__contains__`` special method.
# 
#         :param k: the key to test
#         :type k: hashable
#         """
#         for ek in self.keys():
#             if ek == k:
#                 return True
#         return False
#     def __contains__(self, k):
#         return self.has_key(k)
#     def items(self):
#         """
#         Yields item pairs, based on calling keys
#         and then accessing each item.
#         """
#         for k in self.keys():
#             yield k, self[k]
#     def values(self):
#         """
#         Yields all values. Calls ``items``.
#         """
#         for k, v in self.items():
#             yield v
#     def __len__(self):
#         n = 0
#         for k in self.keys():
#             n += 1
#         return n
# 
# Path: ifcb/metrics/ml_analyzed.py
# def compute_ml_analyzed(abin):
#     """returns ml_analyzed, look time, run time"""
#     s = abin.schema
#     if s is SCHEMA_VERSION_1:
#         return compute_ml_analyzed_s1(abin)
#     elif s is SCHEMA_VERSION_2:
#         return compute_ml_analyzed_s2(abin)


# Path: ifcb/data/bins.py
from functools import lru_cache
from .adc import SCHEMA
from .hdr import TEMPERATURE, HUMIDITY
from .utils import BaseDictlike
from ..metrics.ml_analyzed import compute_ml_analyzed
        from .hdf import bin2hdf
        from .zip import bin2zip
        from .matlab import bin2mat

        """
        return self.pid.timestamp
    @property
    def schema(self):
        return SCHEMA[self.pid.schema_version]
    # context manager default implementation
    def __enter__(self):
        return self
    def __exit__(self, *args):
        pass
    # dictlike interface
    def keys(self):
        yield from self.adc.index
    def has_key(self, k):
        return k in self.adc.index
    def __len__(self):
        return len(self.adc.index)
    def get_target(self, target_number):
        """
        Retrieve a target record by target number

        :param target_number: the target number
        """
        d = tuple(self.adc[c][target_number] for c in self.adc.columns)
        return d
    def __getitem__(self, target_number):
        return self.get_target(target_number)
    # metrics
    @lru_cache()
    def _get_ml_analyzed(self):

        return compute_ml_analyzed(self)