Skip to content

Instantly share code, notes, and snippets.

View cweitkamp's full-sized avatar

Christoph Weitkamp cweitkamp

View GitHub Profile
@cweitkamp
cweitkamp / bayesian.items
Last active December 4, 2021 23:14
Bayesian Sensor Aggregation
Switch proxySwitch "I am ... [MAP(sleeping.map):%s]"
Number proxyNumber "Probability [%.5f %%]"
Group gBAYESIAN "Bayesian Sleep Sensor" {
bayesian="proxySwitch" [ prior=0.5, threshold=0.85, state_given_true="ON", state_given_false="OFF" ]
}
Switch testSwitch1 "I am at home ... [MAP(yes-no.map):%s]" <presence> (gBAYESIAN) {
bayesian="ON" [ prob_given_true=0.99, prob_given_false=0.5 ]
}
#!/bin/sh
# TODO specify your binding id (e.g. bindingId="openweathermap")
bindingId="openweathermap"
i18nPath="src/main/resources/OH-INF/i18n"
rm -f $i18nPath/tmp_$bindingId.properties
# generate translation properties
mvn xml:transform