This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Nagging Alerting Notification Automation | |
description: > | |
Trigger an alert based on the state of a given sensor. | |
The Alert is send to a mobile app device and repeats as long as the sensor is in the given state. | |
An additonal action can be specified. This might be useful to tts the message. | |
domain: automation | |
source_url: https://gist.github.com/nilsreiter/3c54a5dfb84e2216a6599456ccbfa27d | |
input: | |
sensor_entity: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Light / Hue Scene | |
description: >- | |
This script tries to replicate the Hue scenes. Colors are distributed randomly | |
on participating lights. Each scene currently has five different colors | |
represented by XY values. The script is only applied to lights that support XY | |
color mode. | |
fields: | |
target: | |
name: Target | |
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{tikzpicture}[node distance=70,every node/.style={draw,align=center,font=\small}, | |
process/.style={rectangle, rounded corners}] | |
\node (tei) at (0,0) [cylinder, shape border rotate=90,shape aspect=.4] {TEI/XML\\in git\\repository\\}; | |
\node (annotation) [process, right=1cm of tei] {Manual annotation}; | |
\node (nlp) [process,below=1cm of tei] {DramaNLP (\texttt{Java})}; | |
\node (csv) [below of=nlp,cylinder, shape border rotate=90,shape aspect=.4] {CSV\\in git\\repositories\\\texttt{data\_*}}; | |
\node (r) [below of=csv,process] {DramaAnalysis (\texttt{R})}; | |
\draw [->] (tei) -- (nlp); | |
\draw [->] (nlp) -- (csv); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This snippet can be used on the command line (tested on a Mac) to get a quick list of word frequencies in the file FILENAME. | |
# Counting will be done case-insensivitely, i.e., differently cased words will be counted together. | |
# The result will be written in the file stats.csv (or any other that you give at the end) in the form of a space-separated table | |
cat FILENAME | tr '[[:punct:][:space:]]' '\n' | sort | uniq -ci | sort -nr | tail -n +2 > stats.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# convert encoding to UTF-8 | |
for i in $(ls *.xml); do iconv -f ISO-8859-1 -t UTF8 $i | sponge $i; done | |
sed -i .bak 's/ISO-8859-1/UTF-8/g' *.xml | |
# fix double amp s in the files | |
sed -i .bak 's/&/\&/g' *.xml | |
# convert regular & to their xml entities |