Put zfs.py
into a directory (e.g. /opt/collectd-plugins
). Load with, e.g.:
LoadPlugin python
<Plugin "python">
ModulePath "/opt/collectd-plugins"
Import "zfs"
</Plugin>
Put zfs.py
into a directory (e.g. /opt/collectd-plugins
). Load with, e.g.:
LoadPlugin python
<Plugin "python">
ModulePath "/opt/collectd-plugins"
Import "zfs"
</Plugin>
;;; semi-realistic example: buy and sell a couple of lots of LTC on exchange, | |
;;; tracking basis and gains explicitly. | |
;; You don't have to declare your commodity symbols, but you can if you | |
;; want to. | |
1792-04-02 commodity USD | |
name: "United States Dollar" | |
2011-10-07 commodity LTC | |
name: "Litecoin" |
#!/usr/bin/env python3 | |
import itertools | |
import colorcet as cc | |
import matplotlib.colors as mcolors | |
import matplotlib.pyplot as plt | |
import matplotlib.ticker as mtick | |
import numpy as np |
#!/bin/bash | |
DEPTH=2 | |
LG="ledger -f main.ledger --force-color --depth=$DEPTH" | |
BALANCE_FORMAT="%(justify(scrub(display_total), 10, -1, true, color)) %(depth_spacer)%-(ansify_if(partial_account(options.flat), blue if color))\n%/%\$1\\n%/----------\\n" | |
$LG source </dev/null || exit 1 | |
paste -d '|' \ | |
<($LG --balance-format="$BALANCE_FORMAT" bal "$@" ^Assets) \ |
"1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,1,6,19,1,19,5,23,2,13,23,27,1,10,27,31,2,6,31,35,1,9,35,39,2,10,39,43,1,43,9,47,1,47,9,51,2,10,51,55,1,55,9,59,1,59,5,63,1,63,6,67,2,6,67,71,2,10,71,75,1,75,5,79,1,9,79,83,2,83,10,87,1,87,6,91,1,13,91,95,2,10,95,99,1,99,6,103,2,13,103,107,1,107,2,111,1,111,9,0,99,2,14,0,0" |
I hereby claim:
To claim this, I am signing this object:
#### Normal use: start at 6:00 am | |
[rest] | |
host = "openhab.example.com" | |
port = 8080 | |
[monitor] | |
item = "morning_alarm_running" | |
initialize = "ON" | |
stop_on = "OFF" |
;;;; Needs the iterate package. | |
(defmacro maybep (&body body) | |
"Give this a series of forms. It will return the result of the first one that | |
yields T or NIL. Any other result will cause the next form to be evaluated. | |
Short-circuits like IF or COND." | |
(labels ((maybep-expand (forms) | |
(if (endp forms) | |
`(error "All evaluated forms yielded MAYBE.") | |
`(let ((result ,(car forms))) |