A function to run length decode an int array.

    :param in_array: the input array of integers
    :return the decoded array
762239
def run_length_decode(in_array):
    """"""
    switch=False
    out_array=[]
    in_array = in_array.tolist()
    for item in in_array:
        if switch==False:
            this_item = item
            switch=True
        else:
            switch=False
            out_array.extend([this_item]*int(item))
    return numpy.asarray(out_array, dtype=numpy.int32)
79625
def decode_arr(data):
    """"""
    data = data.encode('utf-8')
    return frombuffer(base64.b64decode(data), float64)
212109
def decode_bytes(array):
    
    if (sys.version_info.major == 2 or not len(array) or
        (isinstance(array, np.ndarray) and array.dtype.kind != 'O')):
        return array
    decoded = [v.decode('utf-8') if isinstance(v, bytes) else v for v in array]
    if isinstance(array, np.ndarray):
        return np.asarray(decoded)
    elif isinstance(array, tuple):
        return tuple(decoded)
    return decoded
781454
def _in(ins):
    
    output = _16bit_oper(ins.quad[1])
    output.append('ld b, h')
    output.append('ld c, l')
    output.append('in a, (c)')
    output.append('push af')

    return output
1038581
public static int decode(CharIterator in) {
    int result = 0;
    boolean continuation;
    int shift = 0;
    do {
      char c = in.next();
      int digit = Base64.fromBase64(c);
      continuation = (digit & VLQ_CONTINUATION_BIT) != 0;
      digit &= VLQ_BASE_MASK;
      result = result + (digit << shift);
      shift = shift + VLQ_BASE_SHIFT;
    } while (continuation);

    return fromVLQSigned(result);
  }
1097879
def decode_data_with_length(reader) -> bytes:
    
    length_bytes = yield from read_or_raise(reader, 2)
    bytes_length = unpack("!H", length_bytes)
    data = yield from read_or_raise(reader, bytes_length[0])
    return data
638821
public static byte[] decode(byte[] in) {
		if (ArrayUtil.isEmpty(in)) {
			return in;
		}
		return decode(in, 0, in.length);
	}
143598
def c_int_array(data):
    """"""
    if is_1d_list(data):
        data = np.array(data, copy=False)
    if is_numpy_1d_array(data):
        data = convert_from_sliced_object(data)
        assert data.flags.c_contiguous
        if data.dtype == np.int32:
            ptr_data = data.ctypes.data_as(ctypes.POINTER(ctypes.c_int32))
            type_data = C_API_DTYPE_INT32
        elif data.dtype == np.int64:
            ptr_data = data.ctypes.data_as(ctypes.POINTER(ctypes.c_int64))
            type_data = C_API_DTYPE_INT64
        else:
            raise TypeError("Expected np.int32 or np.int64, met type({})"
                            .format(data.dtype))
    else:
        raise TypeError("Unknown type({})".format(type(data).__name__))
    return (ptr_data, type_data, data)
873670
def codes_get_long_array(handle, key, size):
    # type: (cffi.FFI.CData, str, int) -> T.List[int]
    
    values = ffi.new('long[]', size)
    size_p = ffi.new('size_t *', size)
    _codes_get_long_array(handle, key.encode(ENC), values, size_p)
    return list(values)
232350
def _decode(self, infile, encoding):
        
        if isinstance(infile, string_types):
            # can't be unicode
            # NOTE: Could raise a ``UnicodeDecodeError``
            return infile.decode(encoding).splitlines(True)
        for i, line in enumerate(infile):
            # NOTE: The isinstance test here handles mixed lists of unicode/string
            # NOTE: But the decode will break on any non-string values
            # NOTE: Or could raise a ``UnicodeDecodeError``
            if PY3K:
                if not isinstance(line, str):
                    infile[i] = line.decode(encoding)
            else:
                if not isinstance(line, unicode):
                    infile[i] = line.decode(encoding)
        return infile
665766
def array_dim(arr):
    
    dim = []
    while True:
        try:
            dim.append(len(arr))
            arr = arr[0]
        except TypeError:
            return dim
549872
def decode_int(v):
    """"""
    if len(v) > 0 and (v[0] == b'\x00' or v[0] == 0):
        raise Exception("No leading zero bytes allowed for integers")
    return big_endian_to_int(v)
850672
def array_char_length(input_array)
      length = 0
      input_array.each do |a|
        length += a.to_s.length
      end
      length
    end
1309982
def get_max(array):
    
    largest = -np.inf
    for i in array:
        try:
            if i > largest:
                largest = i
        except:
            pass
    if np.isinf(largest):
        raise ValueError("there's no numeric value in array!")
    else:
        return largest
1202270
def decode_array(input_array):
    """"""
    codec, length, param, input_array = parse_header(input_array)
    return codec_dict[codec].decode(input_array, param)
737561
public static byte[] decode(String in) {

		in = in.replaceAll("\\r|\\n","");
		if(in.length() % 4 != 0) {
			throw new IllegalArgumentException("The length of the input string must be a multiple of four.");
		}

		if(!in.matches("^[A-Za-z0-9+/]*[=]{0,3}$")) {
			throw new IllegalArgumentException("The argument contains illegal characters.");
		}

		byte[] out = new byte[(in.length()*3)/4];

		char[] input = in.toCharArray();

		int outi = 0;
		int b1, b2, b3, b4;
		for(int i = 0; i < input.length; i+=4) {
			b1 = map.get(input[i]) - 1;
			b2 = map.get(input[i+1]) - 1;
			b3 = map.get(input[i+2]) - 1;
			b4 = map.get(input[i+3]) - 1;
			out[outi++] = (byte)(b1 << 2 | b2 >>> 4);
			out[outi++] = (byte)((b2 & 0x0F) << 4 | b3 >>> 2);
			out[outi++] = (byte)((b3 & 0x03) << 6 | (b4 & 0x3F));
		}

		if(in.endsWith("=")) {
			byte[] trimmed = new byte[out.length - (in.length() - in.indexOf("="))];
			System.arraycopy(out, 0, trimmed, 0, trimmed.length);
			return trimmed;
		}

		return out;

	}
1263638
def check_lengths(*arrays):
    
    lengths = [len(array) for array in arrays]
    if len(np.unique(lengths)) > 1:
        raise ValueError('Inconsistent data lengths: {}'.format(lengths))