Get `NFKC QUICK CHECK` property.
969035
def get_nfkc_quick_check_property(value, is_bytes=False):
    """"""

    obj = unidata.ascii_nfkc_quick_check if is_bytes else unidata.unicode_nfkc_quick_check

    if value.startswith('^'):
        negated = value[1:]
        value = '^' + unidata.unicode_alias['nfkcquickcheck'].get(negated, negated)
    else:
        value = unidata.unicode_alias['nfkcquickcheck'].get(value, value)

    return obj[value]
1131674
def get_nfd_quick_check_property(value, is_bytes=False):
    """"""

    obj = unidata.ascii_nfd_quick_check if is_bytes else unidata.unicode_nfd_quick_check

    if value.startswith('^'):
        negated = value[1:]
        value = '^' + unidata.unicode_alias['nfdquickcheck'].get(negated, negated)
    else:
        value = unidata.unicode_alias['nfdquickcheck'].get(value, value)

    return obj[value]
1305139
def check_keypoint(kp, rows, cols):
    """"""
    for name, value, size in zip(['x', 'y'], kp[:2], [cols, rows]):
        if not 0 <= value < size:
            raise ValueError(
                'Expected {name} for keypoint {kp} '
                'to be in the range [0.0, {size}], got {value}.'.format(
                    kp=kp,
                    name=name,
                    value=value,
                    size=size
                )
            )
383425
def get_checks(self, position=None):
        """"""
        if position is None:
            position = self.position
        return self.checkdefs[position][0]
493244
def get_constant
      res = ""
      skip_tkspace(false)
      tk = get_tk

      while tk.kind_of?(TkCOLON2) ||
          tk.kind_of?(TkCOLON3)   ||
          tk.kind_of?(TkCONSTANT)          
        
        res += tk.text
        tk = get_tk
      end

#      if res.empty?
#        warn("Unexpected token #{tk} in constant")
#      end 
      unget_tk(tk)
      res
    end
1225133
def get(self, key, defaultValue=None):
        """"""
        if defaultValue is None:   # Py4J doesn't call the right get() if we pass None
            if self._jconf is not None:
                if not self._jconf.contains(key):
                    return None
                return self._jconf.get(key)
            else:
                if key not in self._conf:
                    return None
                return self._conf[key]
        else:
            if self._jconf is not None:
                return self._jconf.get(key, defaultValue)
            else:
                return self._conf.get(key, defaultValue)
244533
def check_simple(self, checks, radl):
        """"""

        for f in self.features:
            if not isinstance(f, Feature) or f.prop not in checks:
                continue
            f._check(checks[f.prop], radl)
158425
def check(self, options=None):
        """"""
        self.check_values(options)
        self.check_attributes(options)
        self.check_values(options)
        return self
657467
def _get_v23_frame(self, **kwargs):
        

        new_kwargs = {}
        for checker in self._framespec:
            name = checker.name
            value = getattr(self, name)
            new_kwargs[name] = checker._validate23(self, value, **kwargs)

        for checker in self._optionalspec:
            name = checker.name
            if hasattr(self, name):
                value = getattr(self, name)
                new_kwargs[name] = checker._validate23(self, value, **kwargs)

        return type(self)(**new_kwargs)
1035595
def get_reporter_state():
    """"""
    # Stack
    # 1. get_reporter_state (i.e. this function)
    # 2. putty_ignore_code
    # 3. QueueReport.error or pep8.StandardReport.error for flake8 -j 1
    # 4. pep8.Checker.check_ast or check_physical or check_logical
    #    locals contains `tree` (ast) for check_ast
    frame = sys._getframe(3)
    reporter = frame.f_locals['self']
    line_number = frame.f_locals['line_number']
    offset = frame.f_locals['offset']
    text = frame.f_locals['text']
    check = frame.f_locals['check']
    return reporter, line_number, offset, text, check
870632
def watch_prefix(self, key_prefix, **kwargs):
        """"""
        kwargs['range_end'] = \
            utils.increment_last_byte(utils.to_bytes(key_prefix))
        return self.watch(key_prefix, **kwargs)
1122933
def keybinding(attr):
    """"""
    ks = getattr(QKeySequence, attr)
    return from_qvariant(QKeySequence.keyBindings(ks)[0], str)
1120430
def quick_confirm(prompt, default_value):
        
        valid = False
        value = default_value.lower()
        while not valid:
            input_val = compat_input(prompt + "[{0}]: ".format(default_value))

            if input_val == "":
                value = default_value.lower()
                valid = True
            else:
                try:
                    if input_val.lower() in ['y', 'n']:
                        value = input_val.lower()
                        valid = True
                    else:
                        print("ERROR: enter 'Y' or 'N'.")
                        valid = False

                except ValueError:
                    print("ERROR: enter 'Y' or 'N'.")
                    valid = False

        return value
269039
def _check_member_parameters(self, **kwargs):
        """"""
        if 'fqdn' in kwargs:
            kwargs['fqdn'].pop('autopopulate', '')
            kwargs['fqdn'].pop('addressFamily', '')
        if 'fqdn' in self.__dict__:
            self.__dict__['fqdn'].pop('autopopulate', '')
            self.__dict__['fqdn'].pop('addressFamily', '')
        if 'state' in kwargs:
            if kwargs['state'] != 'user-up' and kwargs['state'] != \
                    'user-down':
                kwargs.pop('state')
        if 'state' in self.__dict__:
            if self.__dict__['state'] != 'user-up' and self.__dict__['state'] \
                    != 'user-down':
                self.__dict__.pop('state')
        if 'session' in kwargs:
            if kwargs['session'] != 'user-enabled' and kwargs['session'] != \
                    'user-disabled':
                kwargs.pop('session')
        if 'session' in self.__dict__:
            if self.__dict__['session'] != 'user-enabled' and \
                    self.__dict__['session'] != 'user-disabled':
                self.__dict__.pop('session')
        # Until we implement sanity checks for __dict__ this needs to stay here
        self.__dict__.pop('ephemeral', '')
        self.__dict__.pop('address', '')
        return kwargs
797066
def _init_kwelems(self):
        """"""
        ret = set()
        if 'rcntobj' in self.kws:
            ret.add('dcnt')
            ret.add('D1')
        if 'tcntobj' in self.kws:
            ret.add('tcnt')
            ret.add('tfreq')
            ret.add('tinfo')
        return ret
518476
def _get_shortcut_string(shortcut):
    """"""
    if shortcut is None:
        return ''
    if isinstance(shortcut, (tuple, list)):
        return ', '.join([_get_shortcut_string(s) for s in shortcut])
    if isinstance(shortcut, string_types):
        if hasattr(QKeySequence, shortcut):
            shortcut = QKeySequence(getattr(QKeySequence, shortcut))
        else:
            return shortcut.lower()
    assert isinstance(shortcut, QKeySequence)
    s = shortcut.toString() or ''
    return str(s).lower()
1108066
def CheckForeignKeysWrapper(conn):
    
    yield
    cur = conn.cursor()
    cur.execute('PRAGMA foreign_key_check')
    errors = cur.fetchall()
    if errors:
        raise ForeignKeyError(errors)