Processes the plantuml text into the raw PNG image data.
        
        :param str plantuml_text: The plantuml markup to render
        :returns: the raw image data
968940
def processes(self, plantuml_text):
        
        url = self.get_url(plantuml_text)
        try:
            response, content = self.http.request(url, **self.request_opts)
        except self.HttpLib2Error as e:
            raise PlantUMLConnectionError(e)
        if response.status != 200:
            raise PlantUMLHTTPError(response, content)
        return content
978363
def render(sls_data, saltenv='base', sls='', **kws):
    '''
    
    '''
    with warnings.catch_warnings(record=True) as warn_list:
        data = deserialize(sls_data) or {}

        for item in warn_list:
            log.warning(
                '%s found in %s saltenv=%s',
                item.message, salt.utils.url.create(sls), saltenv
            )

        log.debug('Results of SLS rendering: \n%s', data)

    return data
995629
def render_html(input_text, **context):
    
    global g_parser
    if g_parser is None:
        g_parser = Parser()
    return g_parser.format(input_text, **context)
228884
def pretty_render(data, format='text', indent=0):
    
    if format == 'json':
        return render_json(data)
    elif format == 'html':
        return render_html(data)
    elif format == 'xml':
        return render_xml(data)
    else:
        return dict_to_plaintext(data, indent=indent)
341998
def text_to_data(self, text, elt, ps):
        '''
        '''
        return String.text_to_data(self, urldecode(text), elt, ps)
931972
def text(self):
        
        if isinstance(self._value, CommentedMap):
            raise TypeError("{0} is a mapping, has no text value.".format(repr(self)))
        if isinstance(self._value, CommentedSeq):
            raise TypeError("{0} is a sequence, has no text value.".format(repr(self)))
        return self._text
952345
def text(self, cls = 'current', retaintokenisation=False, previousdelimiter="",strict=False, correctionhandling=CorrectionHandling.CURRENT, normalize_spaces=False):
        """"""
        if cls == 'original': correctionhandling = CorrectionHandling.ORIGINAL #backward compatibility
        if correctionhandling in (CorrectionHandling.CURRENT, CorrectionHandling.EITHER):
            for e in self:
                if isinstance(e, New) or isinstance(e, Current):
                    s = previousdelimiter + e.text(cls, retaintokenisation,"", strict, correctionhandling)
                    if normalize_spaces:
                        return norm_spaces(s)
                    else:
                        return s
        if correctionhandling in (CorrectionHandling.ORIGINAL, CorrectionHandling.EITHER):
            for e in self:
                if isinstance(e, Original):
                    s =  previousdelimiter + e.text(cls, retaintokenisation,"", strict, correctionhandling)
                    if normalize_spaces:
                        return norm_spaces(s)
                    else:
                        return s
        raise NoSuchText
1214649
def format_raw_data(self, tpe, raw_data):
        
        
        if tpe == 'text':
            formatted_raw_data = self.parse_text_to_dict(raw_data)
        elif tpe == 'file':
            formatted_raw_data = self.parse_file_to_dict(raw_data)
        else:
            formatted_raw_data = {'ERROR':'unknown data type', 'data':[raw_data]}
        return formatted_raw_data
173915
def set_raw(self,text):
        
        node_raw = self.root.find('raw')
        if node_raw is None:
            node_raw = etree.Element('raw')
            self.root.insert(0,node_raw)
        node_raw.text = etree.CDATA(text)
558865
def process_message(message_text):
    
    message_text = normalize_message(message_text)
    for (regex, data_lambda) in TEMPLATES:
        match = regex.search(message_text)
        if match:
            result = Request(**data_lambda(match))
            return result
164205
def process_text_field(image_path, options = {})
      RestClient.post("#{url}/processTextField", options.merge(:upload => { :file => File.new(image_path, 'r') }))
    end
843473
def display(self, format="png"):
        
        from sebastian.core.transforms import lilypond
        seq = HSeq(self) | lilypond()

        lily_output = write_lilypond.lily_format(seq)
        if not lily_output.strip():
            #In the case of empty lily outputs, return self to get a textual display
            return self

        if format == "png":
            suffix = ".preview.png"
            args = ["lilypond", "--png", "-dno-print-pages", "-dpreview"]
        elif format == "svg":
            suffix = ".preview.svg"
            args = ["lilypond", "-dbackend=svg", "-dno-print-pages", "-dpreview"]

        f = tempfile.NamedTemporaryFile(suffix=suffix)
        basename = f.name[:-len(suffix)]
        args.extend(["-o" + basename, "-"])

        #Pass shell=True so that if your $PATH contains ~ it will
        #get expanded. This also changes the way the arguments get
        #passed in. To work correctly, pass them as a string
        p = sp.Popen(" ".join(args), stdin=sp.PIPE, shell=True)
        stdout, stderr = p.communicate("{ %s }" % lily_output)
        if p.returncode != 0:
            # there was an error
            #raise IOError("Lilypond execution failed: %s%s" % (stdout, stderr))
            return None

        if not ipython:
            return f.read()
        if format == "png":
            return Image(data=f.read(), filename=f.name, format="png")
        else:
            return SVG(data=f.read(), filename=f.name)
807126
def text(self,text):
        
        if text:
            text = utfstr(text)
            text = text.strip()
            text = re.sub('\s+',' ',text)
            if text:
                self.dirty = True
                self.escpos.text(text)
1121530
def render(self, data, accepted_media_type=None, renderer_context=None):
        
        if data is None:
            return ''

        stream = StringIO()

        xml = SimplerXMLGenerator(stream, self.charset)
        xml.startDocument()
        xml.startElement(self.root_tag_name, {})

        self._to_xml(xml, data)

        xml.endElement(self.root_tag_name)
        xml.endDocument()
        return stream.getvalue()
1145047
def text(self, tag, textdata, step=None):
    
    if step is None:
      step = self._step
    else:
      self._step = step
    smd = SummaryMetadata(
        plugin_data=SummaryMetadata.PluginData(plugin_name='text'))
    if isinstance(textdata, (str, bytes)):
      tensor = tf.make_tensor_proto(
          values=[textdata.encode(encoding='utf_8')], shape=(1,))
    else:
      textdata = onp.array(textdata)  # convert lists, jax arrays, etc.
      datashape = onp.shape(textdata)
      if len(datashape) == 1:
        tensor = tf.make_tensor_proto(
            values=[td.encode(encoding='utf_8') for td in textdata],
            shape=(datashape[0],))
      elif len(datashape) == 2:
        tensor = tf.make_tensor_proto(
            values=[
                td.encode(encoding='utf_8') for td in onp.reshape(textdata, -1)
            ],
            shape=(datashape[0], datashape[1]))
    summary = Summary(
        value=[Summary.Value(tag=tag, metadata=smd, tensor=tensor)])
    self.add_summary(summary, step)
1105114
def process_text(self, text):
        
        # escape base char
        text = text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
        # make xml request body
        soap_body = self.__create_xml_request(text)
        # make total request
        length = len(soap_body.encode('UTF-8')) if PY3 else len(soap_body)
        soap_request = self.SOAP_REQUEST.format(
            length=length, host=self.HOST, content=soap_body)

        if PY3:  # convert to bytes
            soap_request = soap_request.encode(self._encoding)

        # send request use soket
        connector = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        connector.settimeout(self._timeout)
        connector.connect((self.HOST, 80))
        connector.sendall(soap_request)
        # call for response
        response = b''
        buf = '0'
        while len(buf):
            buf = connector.recv(8192)
            response += buf
        connector.close()

        if PY3:  # convert to str
            response = response.decode()

        # parse response
        text_result = self.__parse_xml_response(response)
        # back replace and return
        return text_result.replace('&amp;', '&').replace('&lt;', '<').replace('&gt;', '>')
387796
def to_text(self):
        
        if self.text is None:
            return

        level = '*' * self.level
        return '%s%s\n' % (level, self.text)