writes user defined metadata for the given symbol

        Parameters
        ----------
        symbol: str
            symbol for the given item in the DB
        metadata: ?
            metadata to write
976888
def write_metadata(self, symbol, metadata):
        '''
        
        '''
        sym = self._get_symbol_info(symbol)
        if not sym:
            raise NoDataFoundException("Symbol does not exist.")

        sym[USERMETA] = metadata
        self._symbols.replace_one({SYMBOL: symbol}, sym)
813204
def write_metadata(self, fp):
        
        fp.attrs['model'] = self.name
        fp.attrs['variable_params'] = list(self.variable_params)
        fp.attrs['sampling_params'] = list(self.sampling_params)
        fp.write_kwargs_to_attrs(fp.attrs, static_params=self.static_params)
703812
def _save_metadata(self):
        
        with open(self.paths.metadata(), 'w') as metadata_fd:
            utils.json_dump(self.metadata, metadata_fd)
1002949
def set_metadata(self, e):
        
        metadata = Metadata(source=self.actor_urn).__dict__
        metadata['source_connector'] = 'irc'
        metadata['source_channel'] = e.target
        metadata['source_user'] = e.source
        metadata['source_username'] = e.source.split('!')[0]
        metadata['user_id'] = metadata['source_user']
        metadata['display_name'] = metadata['source_username']
        return metadata
117158
private void writeMetaData(ByteArrayOutputStream baos)
            throws UnsupportedEncodingException, IOException {
        if (settings.getMetadata() == null) {
            return;
        }

        for (Iterator<String> i = settings.getMetadata().iterator();
                i.hasNext();) {
            Object obj = i.next();
            if (obj instanceof String) {
                baos.write(((String)obj).getBytes(DEFAULT_ENCODING));
            } else if (obj instanceof File) {
                InputStream is = null;
                try {
                    is = new BufferedInputStream(
                        new FileInputStream((File)obj));
                    byte [] buffer = new byte[4096];
                    for (int read = -1; (read = is.read(buffer)) != -1;) {
                        baos.write(buffer, 0, read);
                    }
                } finally {
                    if (is != null) {
                        is.close();
                    }
                }
            } else if (obj != null) {
                logger.severe("Unsupported metadata type: " + obj);
            }
        }
        return;
    }
851299
def purge(self, symbol):
        
        logger.warning("Deleting entire metadata history for %r from %r" % (symbol, self._arctic_lib.get_name()))
        self.delete_many({'symbol': symbol})
321490
private void writeMetaData(Definition def, Writer out, int indent) throws IOException
   {
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent,
            " * Gets the information on the underlying EIS instance represented through an active connection.\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent,
            " * @return ConnectionMetaData instance representing information about the EIS instance\n");
      writeWithIndent(out, indent,
            " * @throws ResourceException Failed to get information about the connected EIS instance. \n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public ConnectionMetaData getMetaData() throws ResourceException");
      writeLeftCurlyBracket(out, indent);

      writeWithIndent(out, indent + 1, "return new " + def.getMcfDefs().get(getNumOfMcf()).getConnMetaClass() + "();");
      writeRightCurlyBracket(out, indent);
      writeEol(out);
   }
218814
def write_named_socket(self, socket_name, socket_info):
    """"""
    self.write_metadata_by_name(self._name, 'socket_{}'.format(socket_name), str(socket_info))
1102992
def write(self):
        
        # write the next file for all fields
        for field_name in self.field_names:
            filename = self.generate_tensor_filename(field_name, self._num_tensors-1)
            self._tensors[field_name].save(filename, compressed=True)

        # write the current metadata to file
        json.dump(self._metadata, open(self.metadata_filename, 'w'),
                  indent=JSON_INDENT,
                  sort_keys=True)

        # update
        self._has_unsaved_data = False
1094028
def describe(self):
        
        lines = []
        lines.append("Symbol = {}".format(self.name))
        if len(self.tags):
            tgs = ", ".join(x.tag for x in self.tags)
            lines.append("  tagged = {}".format(tgs))
        if len(self.aliases):
            als = ", ".join(x.alias for x in self.aliases)
            lines.append("  aliased = {}".format(als))
        if len(self.feeds):
            lines.append("  feeds:")

            for fed in self.feeds:
                lines.append("    {}. {}".format(fed.fnum,
                                                       fed.ftype))
        return "\n".join(lines)
717935
def metadata(self):
        

        sheet = self.result.add_sheet("metadata")
        self.header(sheet, "metadata")

        n_row = 1  # row number

        for k in self.po.metadata:
            row = sheet.row(n_row)
            row.write(0, k)
            row.write(1, self.po.metadata[k])
            n_row += 1
            sheet.flush_row_data()
500715
def write_meta_info(self, byte1, byte2, data):
        ""
        write_varlen(self.data, 0)  # tick
        write_byte(self.data, byte1)
        write_byte(self.data, byte2)
        write_varlen(self.data, len(data))
        write_chars(self.data, data)
622421
def save_html_with_metadata(fig, filename, fig_kwds, kwds):
    
    if isinstance(fig, str):
        text = fig
    else:
        from mpld3 import fig_to_html
        text = fig_to_html(fig, **fig_kwds)

    f = open(filename, 'w')
    for key, value in kwds.items():
        value = escape(value, escape_table)
        line = "<div class=pycbc-meta key=\"%s\" value=\"%s\"></div>" % (str(key), value)
        f.write(line)

    f.write(text)
131953
def set_description(self, value: Union[Literal, Identifier, str], lang: str= None):
        
        return self.metadata.add(key=DC.description, value=value, lang=lang)
998952
def write_metadata
      unless disabled?
        Jekyll.logger.debug "Writing Metadata:", ".jekyll-metadata"
        File.binwrite(metadata_file, Marshal.dump(metadata))
      end
    end
951605
def _set_metadata(self, value):
        '''
        
        '''
        if value is None:
            setattr(self, '_PMMail__metadata', {})
        elif isinstance(value, dict):
            for k, v in value.items():
                if (not isinstance(k, str) and not isinstance(k, int)) \
                    or (not isinstance(v, str) and not isinstance(v, int)):
                    raise TypeError('Metadata keys and values can only be strings or integers')
            setattr(self, '_PMMail__metadata', value)
        else:
            raise TypeError('Metadata must be a dictionary of key-value pairs')
1153767
def metadata
            metadata_stm = self.Catalog.Metadata

            if metadata_stm.is_a?(Stream)
                doc = REXML::Document.new(metadata_stm.data)
                info = {}

                doc.elements.each('*/*/rdf:Description') do |description|

                    description.attributes.each_attribute do |attr|
                        case attr.prefix
                        when 'pdf','xap'
                            info[attr.name] = attr.value
                        end
                    end

                    description.elements.each('*') do |element|
                        value = (element.elements['.//rdf:li'] || element).text
                        info[element.name] = value.to_s
                    end
                end

                info
            end
        end