Get a CSHMember object.

        Arguments:
        val -- the iButton ID of the member

        Returns:
        None if the iButton supplied does not correspond to a CSH Member
166925
def get_member_ibutton(self, val):
        
        members = self.__con__.search_s(
            CSHMember.__ldap_user_ou__,
            ldap.SCOPE_SUBTREE,
            "(ibutton=%s)" % val,
            ['ipaUniqueID'])
        if members:
            return CSHMember(
                    self,
                    members[0][1]['ipaUniqueID'][0].decode('utf-8'),
                    False)
        return None
380378
public static String fromISODateTimeUTCtoRfc822(final String val) throws BadDateException {
    try {
      synchronized (isoDateTimeUTCFormat) {
        return rfc822Date(isoDateTimeUTCFormat.parse(val));
      }
    } catch (Throwable t) {
      throw new BadDateException();
    }
  }
81397
public static Scriptable toObject(Context cx, Scriptable scope, Object val)
    {
        if (val == null) {
            throw typeError0("msg.null.to.object");
        }
        if (Undefined.isUndefined(val)) {
            throw typeError0("msg.undef.to.object");
        }

        if (isSymbol(val)) {
            NativeSymbol result = new NativeSymbol((NativeSymbol)val);
            setBuiltinProtoAndParent(result, scope, TopLevel.Builtins.Symbol);
            return result;
        }
        if (val instanceof Scriptable) {
            return (Scriptable) val;
        }
        if (val instanceof CharSequence) {
            // FIXME we want to avoid toString() here, especially for concat()
            NativeString result = new NativeString((CharSequence)val);
            setBuiltinProtoAndParent(result, scope, TopLevel.Builtins.String);
            return result;
        }
        if (val instanceof Number) {
            NativeNumber result = new NativeNumber(((Number)val).doubleValue());
            setBuiltinProtoAndParent(result, scope, TopLevel.Builtins.Number);
            return result;
        }
        if (val instanceof Boolean) {
            NativeBoolean result = new NativeBoolean(((Boolean)val).booleanValue());
            setBuiltinProtoAndParent(result, scope, TopLevel.Builtins.Boolean);
            return result;
        }

        // Extension: Wrap as a LiveConnect object.
        Object wrapped = cx.getWrapFactory().wrap(cx, scope, val, null);
        if (wrapped instanceof Scriptable)
            return (Scriptable) wrapped;
        throw errorWithClassName("msg.invalid.type", val);
    }
676213
def user(val, **kwargs):  # pylint: disable=unused-argument
    '''
    
    '''
    if not isinstance(val, six.integer_types):
        # Try to convert to integer. This will fail if the value is a
        # username. This is OK, as we check below to make sure that the
        # value is either a string or integer. Trying to convert to an
        # integer first though will allow us to catch the edge case in
        # which a quoted uid is passed (e.g. '1000').
        try:
            val = int(val)
        except (TypeError, ValueError):
            pass
    if not isinstance(val, (six.integer_types, six.string_types)):
        raise SaltInvocationError('Value must be a username or uid')
    elif isinstance(val, six.integer_types) and val < 0:
        raise SaltInvocationError('\'{0}\' is an invalid uid'.format(val))
    return val
725919
static TypedConstant getConstant(Object value) {
        if (value == null) {
            return CstKnownNull.THE_ONE;
        } else if (value instanceof Boolean) {
            return CstBoolean.make((Boolean) value);
        } else if (value instanceof Byte) {
            return CstByte.make((Byte) value);
        } else if (value instanceof Character) {
            return CstChar.make((Character) value);
        } else if (value instanceof Double) {
            return CstDouble.make(Double.doubleToLongBits((Double) value));
        } else if (value instanceof Float) {
            return CstFloat.make(Float.floatToIntBits((Float) value));
        } else if (value instanceof Integer) {
            return CstInteger.make((Integer) value);
        } else if (value instanceof Long) {
            return CstLong.make((Long) value);
        } else if (value instanceof Short) {
            return CstShort.make((Short) value);
        } else if (value instanceof String) {
            return new CstString((String) value);
        } else if (value instanceof Class) {
            return new CstType(TypeId.get((Class<?>) value).ropType);
        } else if (value instanceof TypeId) {
            return new CstType(((TypeId) value).ropType);
        } else {
            throw new UnsupportedOperationException("Not a constant: " + value);
        }
    }
694170
function fromEpoch(val, def) {
    if (!is_1.isValue(val) || !is_1.isNumber(val))
        return to_1.toDefault(null, def);
    return new Date(val);
}
496710
def val_factory(val, datatypes):
    
    exceptions = []
    for dt in datatypes:
        try:
            if isinstance(val, dt):
                return val
            return type_handler_object(val, dt)
        except Exception as e:
            exceptions.append(str(e))
    # if we get here, we never found a valid value. raise an error
    raise ValueError('val_factory: Unable to instantiate {val} from types {types}. Exceptions: {excs}'.
                     format(val=val, types=datatypes, excs=exceptions))
487496
def peek_step(self, val: ArrayValue,
                  sn: "DataNode") -> Tuple[Optional[Value], "DataNode"]:
        
        try:
            return val[self.index], sn
        except (IndexError, KeyError, TypeError):
            return None, sn
1190286
def peek_step(self, val: ObjectValue,
                  sn: "DataNode") -> Tuple[None, "DataNode"]:
        """"""
        cn = sn.get_child(self.name, self.namespace)
        return (None, cn)
524842
@JRubyMethod(name = "value=")
    public static IRubyObject value_set(IRubyObject self, IRubyObject val) {
        org.yecht.Node node = (org.yecht.Node)self.dataGetStructChecked();
        Ruby runtime = self.getRuntime();
        Data.Str ds = (Data.Str)node.data;
            
        val = val.convertToString();
        ByteList bl = ((RubyString)val).getByteList();
        byte[] bss = new byte[bl.realSize];
        System.arraycopy(bl.bytes, bl.begin, bss, 0, bss.length);
        ds.ptr = Pointer.create(bss, 0);
        ds.len = bss.length;
        ds.style = ScalarStyle.None;
        ((RubyObject)self).fastSetInstanceVariable("@value", val);
        return val;
    }
320810
def peek_step(self, val: ObjectValue,
                  sn: "DataNode") -> Tuple[Value, "DataNode"]:
        
        cn = sn.get_data_child(self.name, self.namespace)
        try:
            return (val[cn.iname()], cn)
        except (IndexError, KeyError, TypeError):
            return (None, cn)
974950
def _ensure_value_is_in_objects(self,val):
        
        if not (val in self.objects):
           self.objects.append(val)
143419
def get_dynamodb_type(self, val):
        
        dynamodb_type = None
        if is_num(val):
            dynamodb_type = 'N'
        elif is_str(val):
            dynamodb_type = 'S'
        elif isinstance(val, (set, frozenset)):
            if False not in map(is_num, val):
                dynamodb_type = 'NS'
            elif False not in map(is_str, val):
                dynamodb_type = 'SS'
        if dynamodb_type is None:
            raise TypeError('Unsupported type "%s" for value "%s"' % (type(val), val))
        return dynamodb_type
64775
def cudnnGetStream(handle):
    

    id = ctypes.c_void_p()
    status = _libcudnn.cudnnGetStream(handle, ctypes.byref(id))
    cudnnCheckStatus(status)
    return id.value
528722
function toEpoch(val, def) {
    return toDefault((is_1.isDate(val) && val.getTime()), def);
}
197016
def sismember(self, name, value):
        
        with self.pipe as pipe:
            return pipe.sismember(self.redis_key(name),
                                  self.valueparse.encode(value))
1186988
def orphan_instance(self, rval: RawValue) -> "ObjectMember":
        
        val = self.from_raw(rval)
        return ObjectMember(self.iname(), {}, val, None, self, datetime.now())