Render raw atom data.
557777
def render(name, data):
        """"""
        # this raises OverflowError if Py_ssize_t can't handle the atom data
        size = len(data) + 8
        if size <= 0xFFFFFFFF:
            return struct.pack(">I4s", size, name) + data
        else:
            return struct.pack(">I4sQ", 1, name, size + 8) + data
17424
def render(self, name, context):
        """"""
        if Generator.strict:
            self.env.undefined = TestableUndefined
        else:
            self.env.undefined = Undefined
        template = self.get_template(name)
        return template.render(context)
990619
def render_template(self):
        """"""
        self._parse_paths()
        context = dict(napp=self._napp.__dict__, paths=self._paths)
        self._save(context)
1325501
def _render_rows(self):
        
        _datas = getattr(self, '_datas', ())
        headers = getattr(self, 'headers', ())
        for index, row in enumerate(_datas):
            row_number = index + 2
            for col_num, value in enumerate(row):
                cell = self.worksheet.cell(row=row_number, column=col_num + 1)
                if value is not None:
                    cell.value = value
                else:
                    cell.value = ""
                if len(headers) > col_num:
                    header = headers[col_num]
                    format = get_cell_format(header)
                    if format is not None:
                        cell.number_format = format
311276
def render(self, *args, **kwargs):
        """"""
        # args kwargs API provided for last minute content injection
        # self._reverse_mro_func('pre_render')
        pretty = kwargs.pop("pretty", False)
        if pretty and self._stable != "pretty":
            self._stable = False

        for arg in args:
            self._stable = False
            if isinstance(arg, dict):
                self.inject(arg)
        if kwargs:
            self._stable = False
            self.inject(kwargs)

        # If the tag or his contents are not changed and we already have rendered it
        # with the same attrs we skip all the work
        if self._stable and self._render:
            return self._render

        pretty_pre = pretty_inner = ""
        if pretty:
            pretty_pre = "\n" + ("\t" * self._depth) if pretty else ""
            pretty_inner = "\n" + ("\t" * self._depth) if len(self.childs) > 1 else ""
        inner = self.render_childs(pretty) if not self._void else ""

        # We declare the tag is stable and have an official render:
        tag_data = (
            pretty_pre,
            self._get__tag(),
            self.render_attrs(),
            inner,
            pretty_inner,
            self._get__tag()
        )[: 6 - [0, 3][self._void]]
        self._render = self._template % tag_data
        self._stable = "pretty" if pretty else True
        return self._render
543639
def render(self):
        '''
        
        '''
        data = self.prepare_data()
        if self.field.readable:
            return self.env.template.render(self.template, **data)
        return ''
394611
private void renderData() {
		QrCodeMaskPattern mask = qr.mask;
		int count = 0;

		int length = bitLocations.size() - bitLocations.size()%8;
		while( count < length ) {
			int bits = qr.rawbits[count/8]&0xFF;

			int N = Math.min(8,bitLocations.size()-count);

			for (int i = 0; i < N; i++) {
				Point2D_I32 coor = bitLocations.get(count+i);
				int value = mask.apply(coor.y,coor.x, ((bits >> i ) & 0x01));
//				int value = ((bits >> i ) & 0x01);
				if( value > 0 ) {
					square(coor.y,coor.x);
				}
			}
			count += 8;
		}

	}
1091105
def render(self, mark_lib=True):
        """"""
        return FRAME_HTML % {
            "id": self.id,
            "filename": escape(self.filename),
            "lineno": self.lineno,
            "function_name": escape(self.function_name),
            "lines": self.render_line_context(),
            "library": "library" if mark_lib and self.is_library else "",
        }
271405
def render_attrs(self):
        """"""
        ret = []
        for k, v in self.attrs.items():
            if v:
                if v is bool:
                    ret.append(" %s" % self._SPECIAL_ATTRS.get(k, k))
                else:
                    fnc = self._FORMAT_ATTRS.get(k, None)
                    val = fnc(v) if fnc else v
                    ret.append(' %s="%s"' % (self._SPECIAL_ATTRS.get(k, k), val))
        return "".join(ret)
601720
def render(self, **context):
		
		# Make the complete context we'll use.
		localns = self.envs.copy()
		localns.update(context)

		try:
			exec(str(self.code), None, localns)
			return localns[Liquid.COMPLIED_RENDERED_STR]
		except Exception:
			stacks = list(reversed(traceback.format_exc().splitlines()))
			for stack in stacks:
				stack = stack.strip()
				if stack.startswith('File "<string>"'):
					lineno = int(stack.split(', ')[1].split()[-1])
					source = []
					if 'NameError:' in stacks[0]:
						source.append('Do you forget to provide the data?')

					import math
					source.append('\nCompiled source (use debug mode to see full source):')
					source.append('---------------------------------------------------')
					nlines = len(self.code.codes)
					nbit   = int(math.log(nlines, 10)) + 3
					for i, line in enumerate(self.code.codes):
						if i - 7 > lineno or i + 9 < lineno: continue
						if i + 1 != lineno:
							source.append('  ' + (str(i+1) + '.').ljust(nbit) + str(line).rstrip())
						else:
							source.append('* ' + (str(i+1) + '.').ljust(nbit) + str(line).rstrip())

					raise LiquidRenderError(
						stacks[0], 
						repr(self.code.codes[lineno - 1]) + 
						'\n' + '\n'.join(source) + 
						'\n\nPREVIOUS EXCEPTION:\n------------------\n' + 
						'\n'.join(stacks) + '\n' +
						'\nCONTEXT:\n------------------\n' +
						'\n'.join(
							'  ' + key + ': ' + str(val) 
							for key, val in localns.items() if not key.startswith('_liquid_') and not key.startswith('__')
						) + '\n'
					)
			raise
407550
def render(self, rect, data):
        """"""

        # Make sure we're aligned correctly
        if self.horizontal_align not in HorizontalLM._VALID_ALIGN_HORIZONTAL:
            raise ValueError('Horizontal align is not valid.')
        if self.vertical_align not in HorizontalLM._VALID_ALIGN_VERTICAL:
            raise ValueError('Vertical align is not valid.')

        # Work out the extra width we have to distribute
        extra_width = rect.w - self.get_minimum_size(data).x
        num_elements = len(self.elements)
        if num_elements == 0:
            return
        elif num_elements > 1:
            per_margin = 1.0 / float(num_elements-1)
        else:
            per_margin = 0.0
        per_element = 1.0 / float(num_elements)

        # Work out the starting x coordinate
        x = rect.x
        if self.horizontal_align == HorizontalLM.ALIGN_CENTER:
            x = rect.x + extra_width*0.5
        elif self.horizontal_align == HorizontalLM.ALIGN_RIGHT:
            x = rect.x + extra_width

        # Render each child element
        for element in self.elements:
            size = element.get_minimum_size(data)

            # Work out the y-coordinates
            if self.vertical_align == HorizontalLM.ALIGN_TOP:
                y = rect.top - size.y
                h = size.y
            elif self.vertical_align == HorizontalLM.ALIGN_MIDDLE:
                y = rect.middle - size.y*0.5
                h = size.y
            elif self.vertical_align == HorizontalLM.ALIGN_BOTTOM:
                y = rect.y
                h = size.y
            else:
                assert self.vertical_align == HorizontalLM.ALIGN_GROW
                y = rect.y
                h = rect.h

            # Work out the x-coordinates
            if self.horizontal_align in HorizontalLM._ALIGN_SIMPLE_SET:
                w = size.x
                next_x = x + size.x + self.margin
            elif self.horizontal_align == HorizontalLM.ALIGN_EQUAL_SPACING:
                w = size.x
                next_x = x + size.x + self.margin + extra_width*per_margin
            else:
                assert self.horizontal_align == HorizontalLM.ALIGN_EQUAL_GROWTH
                w = size.x + extra_width*per_element
                next_x = x + w + self.margin

            # Render and move on.
            element.render(datatypes.Rectangle(x, y, w, h), data)
            x = next_x
1356575
def render(self, rectangle, data):
        """"""

        size = (1.0 - 2.0*self.margin) * rectangle.h
        offset = self.margin * rectangle.h
        per_mark = 1.0 / float(self.total)
        bottom = offset + size * float(self.index) * per_mark
        top = bottom + per_mark * size

        c = data['output']
        with c:
            c.translate(rectangle.x, rectangle.y)
            c.draw_polygon(
                0, top, -self.width, bottom, self.width, bottom,
                fill=self.color
                )
389618
def render(self, name, value, attrs=None, renderer=None):
        """"""
        if django.VERSION >= (1, 11):
            return super(BetterFileInput, self).render(name, value, attrs)

        t = render_to_string(
            template_name=self.template_name,
            context=self.get_context(name, value, attrs),
        )
        return mark_safe(t)
124123
function render(renderProperties, encodings, options) {
	encodings = linearizeEncodings(encodings);

	for (var i = 0; i < encodings.length; i++) {
		encodings[i].options = merge(options, encodings[i].options);
		fixOptions(encodings[i].options);
	}

	fixOptions(options);

	var Renderer = renderProperties.renderer;
	var renderer = new Renderer(renderProperties.element, encodings, options);
	renderer.render();

	if (renderProperties.afterRender) {
		renderProperties.afterRender();
	}
}
1195865
def parse_full_atom(data):
    

    if len(data) < 4:
        raise ValueError("not enough data")

    version = ord(data[0:1])
    flags = cdata.uint_be(b"\x00" + data[1:4])
    return version, flags, data[4:]
682236
def get_data(self, ptr, unbuffered=False):
        """"""
        result = _decode(self.get_raw_data(ptr, unbuffered),
                         self._reading_format[self.ws_type])
        return result
1116240
def render_field(self, field, data):
        """"""
        from trionyx.renderer import renderer

        if 'value' in field:
            value = field['value']
        elif isinstance(data, object) and hasattr(data, field['field']):
            value = getattr(data, field['field'])
            if 'renderer' not in field:
                value = renderer.render_field(data, field['field'], **field)
        elif isinstance(data, dict) and field['field'] in data:
            value = data.get(field['field'])
        elif isinstance(data, list) and field['__index__'] < len(data):
            value = data[field['__index__']]
        else:
            return ''

        options = {key: value for key, value in field.items() if key not in ['value', 'data_object']}
        if 'renderer' in field:
            value = field['renderer'](value, data_object=data, **options)
        else:
            value = renderer.render_value(value, data_object=data, **options)

        return field['format'].format(value)