Reads a vector (a list) of Telegram objects.
514952
def tgread_vector(self):
        """"""
        if 0x1cb5c415 != self.read_int(signed=False):
            raise RuntimeError('Invalid constructor code, vector was expected')

        count = self.read_int()
        return [self.tgread_object() for _ in range(count)]
1094112
def read(self, handle):
        '''
        '''
        self.bytes_per_element, = struct.unpack('b', handle.read(1))
        dims, = struct.unpack('B', handle.read(1))
        self.dimensions = [struct.unpack('B', handle.read(1))[0] for _ in range(dims)]
        self.bytes = b''
        if self.total_bytes:
            self.bytes = handle.read(self.total_bytes)
        size, = struct.unpack('B', handle.read(1))
        self.desc = size and handle.read(size).decode('utf-8') or ''
1366868
private Object readValue(Type t) throws IOException {
		switch (t) {
		case START_OBJECT:
			return parseObjectInternal();
		
		case START_ARRAY:
			return parseArrayInternal();
		
		case STRING:
			return lexer.readString();
		
		case NUMBER:
			return lexer.readNumber();
		
		case TRUE:
			return true;
		
		case FALSE:
			return false;
		
		case NULL:
			return null;
			
		default:
			throw new IOException("Unexpected token: " + t);
		}
	}
746527
def read(self, vals):
        
        i = 0
        if len(vals[i]) == 0:
            self.comments_2 = None
        else:
            self.comments_2 = vals[i]
        i += 1
341864
def to_python(self) -> typing.List:
        
        self.clean()
        result = []
        for obj in self.media:
            if isinstance(obj, base.TelegramObject):
                obj = obj.to_python()
            result.append(obj)
        return result
703728
function readGetItems(message, tokens) {
	message.userName = protocol.decodeString(tokens[1]);
	message.groupName = protocol.decodeString(tokens[3]);
	message.sessionId = protocol.decodeString(tokens[5]);
}
746574
def read(self, line, f, data):
        """"""
        f.readline()
        f.readline()
        N = len(data["symbols"])
        # if the data are already read before, just overwrite them
        numbers = data.get("numbers")
        if numbers is None:
            numbers = np.zeros(N, int)
            data["numbers"] = numbers
        coordinates = data.get("coordinates")
        if coordinates is None:
            coordinates = np.zeros((N,3), float)
            data["coordinates"] = coordinates
        for i in range(N):
            words = f.readline().split()
            numbers[i] = int(float(words[1]))
            coordinates[i,0] = float(words[2])*angstrom
            coordinates[i,1] = float(words[3])*angstrom
            coordinates[i,2] = float(words[4])*angstrom
264624
def read(self, vals):
        
        i = 0
        {%- for field in fields %}
        {%- if field.is_list %}
        count = int(vals[i])
        i += 1
        for _ in range(count):
            obj = {{field.object_name}}()
            obj.read(vals[i:i + obj.field_count])
            self.add_{{field.field_name}}(obj)
            i += obj.field_count
        {%- else %}
        if len(vals[i]) == 0:
            self.{{field.field_name}} = None
        else:
            self.{{field.field_name}} = vals[i]
        i += 1
        {%- endif %}
        {%- endfor %}
532405
def read(self):
        
        __result = []

        __ll = self.readline()
        while __ll:
            __result.append(__ll)
            __ll = self.readline()

        return list(__result)
369900
def read(self, obj):
        
        path, frag = [], obj
        for part in self.parts:
            path.append(part)
            if isinstance(frag, dict):
                try:
                    frag = frag[part]
                except KeyError as error:
                    raise NotFound(':'.join(path)) from error
            elif isinstance(frag, (list, tuple)):
                try:
                    frag = frag[int(part)]
                except IndexError as error:
                    raise NotFound(':'.join(path)) from error
                except ValueError as error:
                    raise WrongType(':'.join(path)) from error
            elif isinstance(frag, (str, int)):
                raise WrongType(':'.join(path))
            else:
                raise NotFound(':'.join(path))
        return frag
826871
def read_plain(file_obj, type_, count):
    """"""
    if count == 0:
        return []
    conv = DECODE_PLAIN[type_]
    return conv(file_obj, count)
708624
def _read_txt(self, stream):
        '''
        

        '''
        self._data = _np.empty(self.count, dtype=self.dtype())

        k = 0
        for line in _islice(iter(stream.readline, b''), self.count):
            fields = iter(line.strip().split())
            for prop in self.properties:
                try:
                    self._data[prop.name][k] = prop._from_fields(fields)
                except StopIteration:
                    raise PlyElementParseError("early end-of-line",
                                               self, k, prop)
                except ValueError:
                    raise PlyElementParseError("malformed input",
                                               self, k, prop)
            try:
                next(fields)
            except StopIteration:
                pass
            else:
                raise PlyElementParseError("expected end-of-line",
                                           self, k)
            k += 1

        if k < self.count:
            del self._data
            raise PlyElementParseError("early end-of-file", self, k)
582249
def tokenize(self, vector_list):
        '''
        
        '''
        vector_arr = np.array(vector_list)
        if vector_arr.ndim == 1:
            key_arr = vector_arr.argmax()
        else:
            key_arr = vector_arr.argmax(axis=-1)
        return self.__token_arr[key_arr]
1271561
def filter_vectors(self, input_list):
        
        try:
            # Return filtered (vector, data, distance )tuple list. Will fail
            # if input is list of (vector, data) tuples.
            return [x for x in input_list if x[2] < self.distance_threshold]
        except:
            # Otherwise just return input list
            return input_list
1211570
def deserialize_email_messages(messages: List[str]):
    """"""
    return [
        pickle.loads(zlib.decompress(base64.b64decode(m)))
        for m in messages
    ]
953119
@SuppressWarnings("unchecked")
    @Override
    public Vector<Object> readVectorObject() {
        log.debug("readVectorObject");
        int type = readInteger();
        log.debug("Type: {}", type);
        if ((type & 1) == 0) {
            return (Vector<Object>) getReference(type >> 1);
        }
        int len = type >> 1;
        log.debug("Length: {}", len);
        Vector<Object> array = new Vector<Object>(len);
        storeReference(array);
        int ref2 = readInteger();
        log.debug("Ref2: {}", ref2);
        buf.skip(1);
        Object object = null;
        for (int j = 0; j < len; ++j) {
            byte objectType = buf.get();
            log.debug("Object type: {}", objectType);
            switch (objectType) {
                case AMF3.TYPE_UNDEFINED:
                case AMF3.TYPE_NULL:
                    object = null;
                    break;
                case AMF3.TYPE_STRING:
                    object = readString();
                    break;
                case AMF3.TYPE_NUMBER:
                    object = readNumber();
                    break;
                case AMF3.TYPE_INTEGER:
                    object = readInteger();
                    break;
                case AMF3.TYPE_BYTEARRAY:
                    object = readByteArray();
                    break;
                case AMF3.TYPE_VECTOR_INT:
                    object = readVectorInt();
                    break;
                case AMF3.TYPE_VECTOR_UINT:
                    object = readVectorUInt();
                    break;
                case AMF3.TYPE_VECTOR_NUMBER:
                    object = readVectorNumber();
                    break;
                case AMF3.TYPE_VECTOR_OBJECT:
                    object = readVectorObject();
                    break;
                default:
                    object = readObject();
            }
            array.add(object);
        }
        log.debug("Vector: {}", array);
        return array;
    }
294341
private <T> T read_(Class<T> clazz, Object id) {
		Map<String, Object> objects = objects(clazz);
		return (T) objects.get(id.toString());
	}