Return true if two records 'match': if they share the same values for
        ``interaction``, ``direction``, ``call_duration``, and ``datetime``.
342204
def matches(self, other):
        
        return self.interaction == other.interaction and \
            self.direction != other.direction and \
            self.call_duration == other.call_duration and \
            abs((self.datetime - other.datetime).total_seconds()) < 30
1142530
def is_match(self, subject: Union[Expression, FlatTerm]) -> bool:
        
        try:
            next(self.match(subject))
        except StopIteration:
            return False
        return True
643491
def _compare_records(src, sink, strict=False):
    # type: (MutableMapping[Text, Any], MutableMapping[Text, Any], bool) -> bool
    

    def _rec_fields(rec):  # type: (MutableMapping[Text, Any]) -> MutableMapping[Text, Any]
        out = {}
        for field in rec["fields"]:
            name = shortname(field["name"])
            out[name] = field["type"]
        return out

    srcfields = _rec_fields(src)
    sinkfields = _rec_fields(sink)
    for key in six.iterkeys(sinkfields):
        if (not can_assign_src_to_sink(
                srcfields.get(key, "null"), sinkfields.get(key, "null"), strict)
                and sinkfields.get(key) is not None):
            _logger.info("Record comparison failure for %s and %s\n"
                         "Did not match fields for %s: %s and %s",
                         src["name"], sink["name"], key, srcfields.get(key),
                         sinkfields.get(key))
            return False
    return True
1293993
def identical?(a, b)
        return true if a.nil? && b.nil?
        return false if a.nil? || b.nil?
        return false unless a.bytesize == b.bytesize
        a.bytes.zip(b.bytes).reduce(0) { |memo, (a, b)| memo += a ^ b } == 0
      end
834694
def _compare_match(dict1, dict2):
    '''
    
    '''
    for karg, warg in six.iteritems(dict1):
        if karg in dict2 and dict2[karg] != warg:
            return False
    return True
1060827
def overlaps?(other)
      max_seconds = TimeOfDay::NUM_SECONDS_IN_DAY

      # Standard case, when Shifts are on the same day
      a, b = [self, other].map(&:range).sort_by(&:first)
      op = a.exclude_end? ? :> : :>=
      return true if a.last.send(op, b.first)

      # Special cases, when Shifts span to the next day
      return false if (a.last < max_seconds) && (b.last < max_seconds)

      a = Range.new(a.first, a.last - max_seconds, a.exclude_end?) if a.last > max_seconds
      b = Range.new(b.first, b.last - max_seconds, b.exclude_end?) if b.last > max_seconds
      a, b = [a, b].sort_by(&:last)
      b.last.send(op, a.last) && a.last.send(op, b.first)
    end
1022520
def match?(time, base)
      aligned?(time, base) && @filters.all? { |f| f.match?(time) }
    end
1297044
def _match(self, query):
        
        response = self._match_dialog(query)
        if response is not None:
            return response

        response = self._match_getters(query)
        if response is not None:
            return response

        response = self._match_registers(query)
        if response is not None:
            return response

        response = self._match_errors_queues(query)
        if response is not None:
            return response

        response = self._match_setters(query)
        if response is not None:
            return response

        if response is None:
            for channel in self._channels.values():
                response = channel.match(query)
                if response:
                    return response

        return None
104684
def hour_match(data, hours):
    
    hours = [hours] if isinstance(hours, int) else hours
    return data.isin(hours)
758293
def identical(self, other):
        
        try:
            return (utils.dict_equiv(self.attrs, other.attrs) and
                    self.equals(other))
        except (TypeError, AttributeError):
            return False
282488
def matches_pattern(self, other):
        """"""
        matches = False
        if hasattr(other, 'addr'):
            if self.addr is None or other.addr is None:
                matches = True
            else:
                matches = self.addr == other.addr
        return matches
468649
def matches_querytime(instance, querytime):
        
        if not querytime.active:
            return True

        if not querytime.time:
            return instance.version_end_date is None

        return (instance.version_start_date <= querytime.time and
                (instance.version_end_date is None or
                 instance.version_end_date > querytime.time))
30948
function areTermsMatching (buyerTerms, sellerTerms) {

  if (buyerTerms.maxPrice >= sellerTerms.minPrice &&
      buyerTerms.maxLock >= sellerTerms.minLock &&
      buyerTerms.minNumberOfSellers <= sellerTerms.maxNumberOfSellers &&
      buyerTerms.maxContractFeePerKb >= sellerTerms.minContractFeePerKb
  ) {
    return true
  } else {
    return false
  }
}
684927
def is_same(type1, type2):
    """"""
    nake_type1 = remove_declarated(type1)
    nake_type2 = remove_declarated(type2)
    return nake_type1 == nake_type2
275693
def matches(self, a, b, **config):
        
        package_a = self.processor._u2p(a['msg']['update']['title'])[0]
        package_b = self.processor._u2p(b['msg']['update']['title'])[0]
        if package_a != package_b:
            return False
        return True
253647
def in_same_table(self):
        """"""
        if self._tc.tbl is self._other_tc.tbl:
            return True
        return False
67496
def check_matching_coordinates(func):
    """"""
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        data_arrays = ([a for a in args if isinstance(a, xr.DataArray)]
                       + [a for a in kwargs.values() if isinstance(a, xr.DataArray)])
        if len(data_arrays) > 1:
            first = data_arrays[0]
            for other in data_arrays[1:]:
                if not first.metpy.coordinates_identical(other):
                    raise ValueError('Input DataArray arguments must be on same coordinates.')
        return func(*args, **kwargs)
    return wrapper