summaryrefslogtreecommitdiff
path: root/snippets/python-mode
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2013-11-20 17:20:17 -0500
committerKyle Meyer <kyle@kyleam.com>2013-11-20 17:20:17 -0500
commitc235eb6a0c12cc4868567f814af515572b59019d (patch)
tree4ff29c93a09bcbdb72e294dc011efc02539cda81 /snippets/python-mode
parentc6e9d09e05344ce88f0c68e8e57fb658d691a712 (diff)
downloademacs.d-c235eb6a0c12cc4868567f814af515572b59019d.tar.gz
Add pymc snippet
Diffstat (limited to 'snippets/python-mode')
-rw-r--r--snippets/python-mode/pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/snippets/python-mode/pm b/snippets/python-mode/pm
new file mode 100644
index 0000000..c5fb977
--- /dev/null
+++ b/snippets/python-mode/pm
@@ -0,0 +1,16 @@
+# name: pymc
+# key: pm
+# expand-env: ((yas/indent-line 'fixed))
+# --
+import theano.tensor as tn
+import pymc as pm
+
+with pm.Model() as model:
+ $0
+
+if __name__ == '__main__':
+ with model:
+ start = {}
+ trace = pm.sample(1000,
+ step=pm.NUTS(model.vars),
+ start=start)