Change the NDEF type.
351345
def type(self, url = False, text = False, other = None):
        
        if (url, text, other) == (True, False, None):
            self.ndef_type = _NDEF_URI_TYPE
        elif (url, text, other) == (False, True, None):
            self.ndef_type = _NDEF_TEXT_TYPE
        elif (url, text, type(other)) == (False, False, int):
            self.ndef_type = other
        else:
            raise YubiKeyNEO_USBHIDError("Bad or conflicting NDEF type specified")
        return self
244743
def update_deps( self ):
        """"""
        klass = self.__class__

        for name in klass._fields:
            self.update_deps_on_field( name )
        return
169874
def to_naf(self):
        
        if self.type == 'KAF':
            self.type = 'NAF'
            for node in self.__get_node_terms():
                node.set('id',node.get('tid'))
                del node.attrib['tid']
28092
def _setdef(argdict, name, defaultvalue):
    
    if not name in argdict or argdict[name] is None:
        argdict[name] = defaultvalue
    return argdict[name]
123282
def normalize_conf(conf):
    '''
    '''
    conf = conf.copy()
    # check for type error
    check_config(conf)
    # convert some fileds into python suitable format
    from_json_format(conf)
    if 'dmode' not in conf:
        conf['dmode'] = calc_dir_mode(conf['fmode'])
    return conf
223532
def set_type(self, value):
        """"""
        if value not in self.types_available:
            log = "Sources field 'type' should be in one of %s" % (
                self.types_available
            )
            raise MalFormattedSource(log)
        self._type = value
1131733
public void setTypeIfNotDefault(final Type defType, final Type toChange){
		this.type = defType != Type.FILE  ? defType : toChange;
	}
310250
def to_dnf(self):
        """"""
        node = self.node.to_dnf()
        if node is self.node:
            return self
        else:
            return _expr(node)
1354376
private void adaptButtonTypeface() {
        if (buttonTypeface != null) {
            if (positiveButton != null) {
                positiveButton.setTypeface(buttonTypeface);
            }

            if (neutralButton != null) {
                neutralButton.setTypeface(buttonTypeface);
            }

            if (negativeButton != null) {
                negativeButton.setTypeface(buttonTypeface);
            }
        }
    }
1014099
def dtype(self):
        """"""
        pixels_group = self.label['IsisCube']['Core']['Pixels']
        byte_order = self.BYTE_ORDERS[pixels_group['ByteOrder']]
        pixel_type = self.PIXEL_TYPES[pixels_group['Type']]
        return pixel_type.newbyteorder(byte_order)
222062
def update(self, name, modifiers, dtype, kind):
        """"""
        self.update_name(name)
        self.modifiers = modifiers
        self.dtype = dtype
        self.kind = kind
        self.update_dtype()
1104509
public void setKnotType(int n, int type) {
		knotTypes[n] = (byte)((knotTypes[n] & ~COLOR_MASK) | type);
		rebuildGradient();
	}
1229385
def init(self):
        """"""

        evclass_shape = [16, 40, 10]
        evtype_shape = [16, 16, 40, 10]
        evclass_psf_shape = [16, 40, 10, 100]
        evtype_psf_shape = [16, 16, 40, 10, 100]

        self._hists_eff = dict()
        self._hists = dict(evclass_on=np.zeros(evclass_shape),
                           evclass_off=np.zeros(evclass_shape),
                           evclass_alpha=np.zeros([16, 40, 1]),
                           evtype_on=np.zeros(evtype_shape),
                           evtype_off=np.zeros(evtype_shape),
                           evtype_alpha=np.zeros([16, 1, 40, 1]),
                           evclass_psf_on=np.zeros(evclass_psf_shape),
                           evclass_psf_off=np.zeros(evclass_psf_shape),
                           evtype_psf_on=np.zeros(evtype_psf_shape),
                           evtype_psf_off=np.zeros(evtype_psf_shape),
                           )
182974
def _set_types(self):
        """"""
        # If we given something that is not an int or a float we raise
        # a RuntimeError as we do not want to have to guess if the given
        # input should be interpreted as an int or a float, for example the
        # interpretation of the string "1" vs the interpretation of the string
        # "1.0".
        for c in (self.x, self.y):
            if not ( isinstance(c, int) or isinstance(c, float) ):
                raise(RuntimeError('x, y coords should be int or float'))

        if isinstance(self.x, int) and isinstance(self.y, int):
            self._dtype = "int"
        else:
            # At least one value is a float so promote both to float.
            self.x = float(self.x)
            self.y = float(self.y)
            self._dtype = "float"
359333
def normalize(expr):
    """"""
    args = [normalize(arg) for arg in expr.args]

    return type(expr)(expr.func, *args, start=expr.start, end=expr.end)
357930
def _ndefs(f):
    '''
        
    '''
    if isinstance(f, Function):
        return f.ndefs
    spec = inspect.getfullargspec(f)
    if spec.defaults is None:
        return 0
    return len(spec.defaults)
1351256
public void setKnotBlend(int n, int type) {
		knotTypes[n] = (byte)((knotTypes[n] & ~BLEND_MASK) | type);
		rebuildGradient();
	}