There are two types of markup in Liquid: Output and Tag.
- Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
- Tag markup (which cannot resolve to text) is surrounded by
There are two types of markup in Liquid: Output and Tag.
{{ matched pairs of curly brackets (ie, braces) }}
#! /bin/bash | |
# Wrapper for "stata -b" which issues an informative error msg and appropriate | |
# (i.e., non-zero) return code | |
# The basic idea for this script (including grepping the log file to determine | |
# whether there was an error) was taken from a similar script posted by Brendan | |
# Halpin on his blog at http://teaching.sociology.ul.ie/bhalpin/wordpress/?p=122 | |
args=$# # number of args |
from pprint import pprint | |
import jinja2 | |
import markdown | |
HTML_TEMPLATE = """{% macro get_html() %} | |
{{ content | markdown }} | |
{% endmacro %} | |
{% set html_content = get_html() %} | |
Title from Markdown meta-data: {{ get_title() }} |
#Set up data partition | |
sudo mkdir /data | |
sudo chmod 777 /data | |
sudo "echo /dev/xvdb /data ext4 rw,user,exec,comment=cloudconfig 0 2 >> /etc/fstab" | |
sudo mount /data | |
#Install build environment | |
sudo sed -i "s/enabled=0/enabled=1" /etc/yum.repos.d/epel.epo | |
sudo yum -y update | |
sudo yum -y upgrade |
from collections import Counter | |
from bitarray import bitarray | |
HISTOGRAM_RANGE = 16 | |
CHAR_RANGE = 3 | |
def string_to_charc_codes(s): | |
return map(ord, list(s)) | |
def char_codes_to_modulo(chars_codes): |
// width and height for the main svg | |
var w = 960, | |
h = 400, | |
margin = 50; | |
// main svg creation | |
var svg = d3.select("#chart") | |
.append("svg") | |
.attr("width", w - margin) | |
.attr("height", h); |
import ctypes | |
PyFrame_LocalsToFast = ctypes.pythonapi.PyFrame_LocalsToFast | |
PyFrame_LocalsToFast.argtypes = [ctypes.py_object] | |
# Doing this with cython instead of ctypes would be much easier (and more | |
# robust). I just do it this way to keep the example self-contained. | |
frameobject_fields = [ | |
# PyObject_VAR_HEAD | |
("ob_refcnt", ctypes.c_int64), |