<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on Sastibe&#39;s Data Science Blog</title>
    <link>https://www.sastibe.de/post/</link>
    <description>Recent content in Posts on Sastibe&#39;s Data Science Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 02 Jan 2026 21:33:28 +0100</lastBuildDate>
    
        <atom:link href="https://www.sastibe.de/post/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Everyman Proportion Test</title>
      <link>https://www.sastibe.de/2026/01/everyman-proportion-test/</link>
      <pubDate>Fri, 02 Jan 2026 21:33:28 +0100</pubDate>
      
      <guid>https://www.sastibe.de/2026/01/everyman-proportion-test/</guid>
      <description>&lt;h2 id=&#34;tldr&#34;&gt;TL;DR&lt;/h2&gt;
&lt;p&gt;Click a bookmark → paste four numbers → instantly know whether two conversion rates are meaningfully different.&lt;/p&gt;
&lt;p&gt;No tools. No spreadsheets. No dashboards. Just your browser.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;why&#34;&gt;Why?&lt;/h2&gt;
&lt;p&gt;Have you ever been in a meeting, a Slack thread, or staring at an A/B test dashboard and thought:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“2.3% vs. 2.7% — is that actually meaningful, or just noise?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well then this bookmarklet is for you! Other recipients include but are not limited to&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Product managers sanity-checking A/B tests&lt;/li&gt;
&lt;li&gt;Marketers comparing conversion rates&lt;/li&gt;
&lt;li&gt;Analysts who want a &lt;strong&gt;quick&lt;/strong&gt; second opinion&lt;/li&gt;
&lt;li&gt;Anyone who does &lt;strong&gt;not&lt;/strong&gt; want to open R, Python, Excel, or a stats website&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You click a bookmark, paste four numbers, and immediately get:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the absolute difference in conversion rates&lt;/li&gt;
&lt;li&gt;a p-value&lt;/li&gt;
&lt;li&gt;a plain-English interpretation of significance&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;how&#34;&gt;How?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Copy the code below → add it to your browser as a bookmark (as URL/Location) → click the bookmark whenever you need it.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No installation&lt;/li&gt;
&lt;li&gt;No external website&lt;/li&gt;
&lt;li&gt;Everything runs locally in your browser&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;javascript&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt;(){&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;){&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;?-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;abs&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;a&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;.&lt;span style=&#34;color:#ae81ff&#34;&gt;254829592&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;n&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=-&lt;/span&gt;.&lt;span style=&#34;color:#ae81ff&#34;&gt;284496736&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;r&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1.421413741&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;o&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1.453152027&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1.061405429&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;.&lt;span style=&#34;color:#ae81ff&#34;&gt;3275911&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;),&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;((((&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;o&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;r&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;n&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;exp&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;}&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;){&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt;.&lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;SQRT2&lt;/span&gt;))}&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;a&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;){&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;toFixed&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;%&amp;#34;&lt;/span&gt;}&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;n&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;){&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt;(Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;abs&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1e3&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;toLocaleString&lt;/span&gt;()&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;toFixed&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;))}&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;r&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;){&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;string&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;typeof&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt;parseFloat(&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;trim&lt;/span&gt;().&lt;span style=&#34;color:#a6e22e&#34;&gt;replace&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt;))&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;NaN&lt;/span&gt;}&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;pValueLabel&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;p&lt;/span&gt;){&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;p&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;.&lt;span style=&#34;color:#ae81ff&#34;&gt;01&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Very significant&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;p&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;.&lt;span style=&#34;color:#ae81ff&#34;&gt;05&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Significant&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;p&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;.&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Barely significant&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;p&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;.&lt;span style=&#34;color:#ae81ff&#34;&gt;15&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Probably different&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;No clear difference&amp;#34;&lt;/span&gt;}&lt;span style=&#34;color:#66d9ef&#34;&gt;try&lt;/span&gt;{&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;o&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;prompt&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Please enter values in the format: Size A ; Rate A (in %) ; Size B ; Rate B (in %)\nExample: 10000 ; 2.5 ; 9500 ; 3.1&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;10000 ; 2 ; 10000 ; 3&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;o&lt;/span&gt;)&lt;span style=&#34;color:#66d9ef&#34;&gt;throw&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; Error(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;No input&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;o&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;split&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;/;/&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;!=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;length&lt;/span&gt;)&lt;span style=&#34;color:#66d9ef&#34;&gt;throw&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; Error(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Format error&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;r&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;[&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;]),&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;r&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;[&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;r&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;[&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;]),&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;r&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;[&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;isFinite(&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;||!&lt;/span&gt;isFinite(&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;||!&lt;/span&gt;isFinite(&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;||!&lt;/span&gt;isFinite(&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;)&lt;span style=&#34;color:#66d9ef&#34;&gt;throw&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; Error(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Invalid input&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;round&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;),&lt;span style=&#34;color:#a6e22e&#34;&gt;d&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;round&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;),&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;d&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;v&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;d&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;),&lt;span style=&#34;color:#a6e22e&#34;&gt;w&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;sqrt&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;v&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;v&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;));&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;w&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;))&lt;span style=&#34;color:#66d9ef&#34;&gt;throw&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; Error(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Standard error is zero&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;y&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;w&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;A&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;(Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;abs&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;y&lt;/span&gt;))),&lt;span style=&#34;color:#a6e22e&#34;&gt;x&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;sqrt&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;),&lt;span style=&#34;color:#a6e22e&#34;&gt;E&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1.96&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;x&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;M&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1.96&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;x&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;N&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;S&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;NaN&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;📊 Two-sample proportion z-test (two-sided)&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;--- Result ---&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Difference (B − A): &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;N&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;  (relative: &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;(isFinite(&lt;span style=&#34;color:#a6e22e&#34;&gt;S&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;S&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;toFixed&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;n/a&amp;#34;&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;)&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;z = &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;n&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;y&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;),&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;p-value = &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;n&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;A&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39; → &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;pValueLabel&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;A&lt;/span&gt;),&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;95% CI (B − A): [&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;E&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;, &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;M&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;]&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;--- Input ---&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Group A: n = &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;round&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;, rate = &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39; (x = &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;)&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Group B: n = &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;Math.&lt;span style=&#34;color:#a6e22e&#34;&gt;round&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;u&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;, rate = &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39; (x = &amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;d&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;)&amp;#39;&lt;/span&gt;].&lt;span style=&#34;color:#a6e22e&#34;&gt;join&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\n&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#66d9ef&#34;&gt;try&lt;/span&gt;{&lt;span style=&#34;color:#a6e22e&#34;&gt;navigator&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;clipboard&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;writeText&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;)}&lt;span style=&#34;color:#66d9ef&#34;&gt;catch&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;B&lt;/span&gt;){}&lt;span style=&#34;color:#a6e22e&#34;&gt;alert&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\n\n(Result copied to clipboard)&amp;#34;&lt;/span&gt;)}&lt;span style=&#34;color:#66d9ef&#34;&gt;catch&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;B&lt;/span&gt;){&lt;span style=&#34;color:#a6e22e&#34;&gt;alert&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Error: &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;B&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;message&lt;/span&gt;)}})();
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id=&#34;how-a-bit-more-detailed&#34;&gt;How? (a bit more detailed)&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new browser bookmark&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Name it something like &lt;strong&gt;Proportion Test&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Paste the JavaScript code above into the &lt;strong&gt;URL / Location&lt;/strong&gt; field&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open any webpage (content does not matter)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click the bookmarklet&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter values in the format:&lt;/p&gt;
&lt;p&gt;Size A ; Rate A (in %) ; Size B ; Rate B (in %)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Press &lt;strong&gt;Enter&lt;/strong&gt; to see the result.&lt;br&gt;
The output is also copied to your clipboard.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;what-is-actually-happening-here&#34;&gt;What is actually happening here?&lt;/h2&gt;
&lt;p&gt;This bookmarklet performs a &lt;strong&gt;two-sample z-test for proportions (two-sided)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It answers the question:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If the true conversion rates were equal, how likely would we be to observe a difference at least this large?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That likelihood is the &lt;strong&gt;p-value&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;interpreting-the-p-value&#34;&gt;Interpreting the p-value&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&#34;text-align:right&#34;&gt;p-value&lt;/th&gt;
&lt;th&gt;Interpretation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:right&#34;&gt;&amp;lt; 0.01&lt;/td&gt;
&lt;td&gt;Very significant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:right&#34;&gt;0.01–0.05&lt;/td&gt;
&lt;td&gt;Significant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:right&#34;&gt;0.05–0.10&lt;/td&gt;
&lt;td&gt;Barely significant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:right&#34;&gt;0.10–0.15&lt;/td&gt;
&lt;td&gt;Probably different&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:right&#34;&gt;≥ 0.15&lt;/td&gt;
&lt;td&gt;No clear difference&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id=&#34;further-reading&#34;&gt;Further reading&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Two-proportion_z-test&#34;&gt;https://en.wikipedia.org/wiki/Two-proportion_z-test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Statistical_significance&#34;&gt;https://en.wikipedia.org/wiki/Statistical_significance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Evan Miller: &lt;em&gt;How Not to Run an A/B Test&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;&lt;img src=&#34;http://vg09.met.vgwort.de/na/eb4a050676e04fd1991b7b7e413a8af2&#34; width=&#34;1&#34; height=&#34;1&#34;/&gt;
&lt;/figure&gt;

</description>
    </item>
    
    <item>
      <title>Take Screenshots Straight into Org Files in Emacs on Win10</title>
      <link>https://www.sastibe.de/2023/04/take-screenshots-straight-into-org-files-in-emacs-on-win10/</link>
      <pubDate>Tue, 04 Apr 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2023/04/take-screenshots-straight-into-org-files-in-emacs-on-win10/</guid>
      <description>
&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-1&#34;&gt;
Update, 2023-04-05:
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
By popular demand, I updated the below solution to include a second function which stores the screenshots in a subfolder.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-2&#34;&gt;
The Final Result
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Let me start this article by showing you my usage of the functionality described. I work as a Data Scientist and use org-mode in Emacs for a large number of every day tasks. One of them is the documentation of new findings within datasets or other software&amp;#39;s documentation or websites etc. In order to easily collect all these informations into a single reference, I like to use screenshots: &lt;/p&gt;
&lt;p&gt;
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1542976152/capturing_medusa_rfxxnm.gif&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1542976152/capturing_medusa_rfxxnm.gif&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1542976152/capturing_medusa_rfxxnm.gif&#34; /&gt;&amp;#34; width=&amp;#34;600&amp;#34; height=&amp;#34;338&amp;#34; alt=&amp;#34;The story of this painting is really fascinating, please do check out the book &amp;#39;A History of the World in 10 1/2 Chapters&amp;#39; by Julian Barnes (Ch. 5)&amp;#34;/&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt; An example usage of the code presented here. &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;
The only thing &amp;#34;hidden&amp;#34; from this clip is the fact that I hit the combination &lt;code class=&#34;verbatim&#34;&gt;C-c s&lt;/code&gt; right after finishing my sentence. Everything else ran automatically.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-3&#34;&gt;
The Step-by-Step Guide (there is only one step)
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Assuming you run Emacs on Windows 10, the result is extremely simple to achieve. For Windows 7 and 8, I &lt;em&gt;assume&lt;/em&gt; that this approach works perfectly fine, I couldn&amp;#39;t put this assumption to the test, though. Here is the singe step needed: edit your &lt;code&gt;.emacs&lt;/code&gt; or &lt;code&gt;init.el&lt;/code&gt; to include the following block:&lt;/p&gt;
&lt;p&gt;
&amp;lt;script src=&amp;#34;&lt;a href=&#34;https://gitlab.com/sastibe/emacs_sslhf/-/snippets/2524316.js&#34;&gt;https://gitlab.com/sastibe/emacs_sslhf/-/snippets/2524316.js&lt;/a&gt;&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;
Copy it in, evaluate it, and you&amp;#39;re ready to go: just hit &lt;code class=&#34;verbatim&#34;&gt;C-c s&lt;/code&gt; whenever you are inside an org-mode-buffer and take screenshots at any whim. They will be saved inside your org-mode folder and displayed inline.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-4&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-4&#34;&gt;
Alternative solution with subfolders
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-4&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
If you want to store your screenshots in a subfolder &amp;#34;images&amp;#34;, relative to the location of the org-file, you simply need to replace the function with the second one in the code snippet above.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-5&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-5&#34;&gt;
The (a little more) detailed description
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-5&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;So, what does the magic function do and how does it do it? There are three major parts:&lt;/p&gt;
&lt;div id=&#34;outline-container-headline-6&#34; class=&#34;outline-4&#34;&gt;
&lt;h4 id=&#34;headline-6&#34;&gt;
Creating a Unique Name for the Image
&lt;/h4&gt;
&lt;div id=&#34;outline-text-headline-6&#34; class=&#34;outline-text-4&#34;&gt;
&lt;p&gt;This is the first 4 lines, in which the filename of the buffer, the current time stamp and a random combination of letters (via &lt;code&gt;make-temp_name&lt;/code&gt;) is created. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-7&#34; class=&#34;outline-4&#34;&gt;
&lt;h4 id=&#34;headline-7&#34;&gt;
Getting the Screenshot into the Clipboard
&lt;/h4&gt;
&lt;div id=&#34;outline-text-headline-7&#34; class=&#34;outline-text-4&#34;&gt;
&lt;p&gt;This is the function of the line&lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(shell-command &amp;#34;snippingtool /clip&amp;#34;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;which calls the wonderful &amp;#34;SnippingTool&amp;#34; inside Windows and skips all preliminary steps with the command line argument &lt;code&gt;/clip&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-8&#34; class=&#34;outline-4&#34;&gt;
&lt;h4 id=&#34;headline-8&#34;&gt;
Saving the Contents of the Clipboard to Disk 
&lt;/h4&gt;
&lt;div id=&#34;outline-text-headline-8&#34; class=&#34;outline-text-4&#34;&gt;
&lt;p&gt;
This part took me the longest to figure out. The core idea is that &lt;code class=&#34;verbatim&#34;&gt;powershell.exe&lt;/code&gt;, when called from CMD, has the functionality to save Clipboard contents to file. Hence, the command given here &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adds appropriate types for Powershell to understand&lt;/li&gt;
&lt;li&gt;Checks if the Clipboard contains an image, and if so&lt;/li&gt;
&lt;li&gt;Saves it to &lt;code&gt;filename&lt;/code&gt;, given in step 3.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;img src=&amp;#34;&lt;a href=&#34;https://vg09.met.vgwort.de/na/92b5819bddba45d4ae4b5827bb66cf95&#34;&gt;https://vg09.met.vgwort.de/na/92b5819bddba45d4ae4b5827bb66cf95&lt;/a&gt;&amp;#34; width=&amp;#34;1&amp;#34; height=&amp;#34;1&amp;#34; alt=&amp;#34;&amp;#34;&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>A toy example for Reinforcement Learning, CLI via fire, CI/CD on gitlab in Python</title>
      <link>https://www.sastibe.de/2022/07/a-toy-example-for-reinforcement-learning-cli-via-fire-ci/cd-on-gitlab-in-python/</link>
      <pubDate>Mon, 25 Jul 2022 00:00:00 +0200</pubDate>
      
      <guid>https://www.sastibe.de/2022/07/a-toy-example-for-reinforcement-learning-cli-via-fire-ci/cd-on-gitlab-in-python/</guid>
      <description>&lt;h2 id=&#34;eager-to-play-tictactoe&#34;&gt;Eager to Play TicTacToe?&lt;/h2&gt;
&lt;p&gt;The package &lt;code&gt;neckar&lt;/code&gt; contains a fully functional reinformcement learning model to train yourself and play against in the game TicTacToe. Here&amp;rsquo;s how you can simply download and install the result if you have a gitlab account (and can set up a personal access token&amp;hellip;):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;pip install neckar --extra-index-url https://__token__:personalaccesstoken@gitlab.com/api/v4/projects/37714906/packages/pypi/simple
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&amp;hellip; and if you don&amp;rsquo;t: Download the wheel from &lt;a href=&#34;https://gitlab.com/sastibe/neckar/-/package_files/47214320/download&#34;&gt;this link&lt;/a&gt;, cd to the wheel and run&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;pip install neckar-0.1.1-py3-none-any.whl
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In both cases, you then start plaxing against the trained model by runnning&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;reilingen tictactoe play
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The standard model was trained in 20000 rounds before shipping. If the computer is too good for you, you can dumb it down like so:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;reilingen tictactoe train --rounds=500
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and you should be able to win a game, even though the computer always starts.&lt;/p&gt;
&lt;h2 id=&#34;how-it-s-done-reinforcement-learning&#34;&gt;How it&amp;rsquo;s done: Reinforcement Learning&lt;/h2&gt;
&lt;p&gt;This main part of the code, residing in &lt;code&gt;scr/neckar/tictactoe.py&lt;/code&gt; is essentially copied directly from &lt;a href=&#34;https://towardsdatascience.com/reinforcement-learning-implement-tictactoe-189582bea542&#34;&gt;here&lt;/a&gt;.
The only two major changes I did was in the data structure used: data frames instead of numpy arrays. This is to support the second change: the winning condition is evaluated with  regexes rather than with sums. I plan on extending the package to include connect four, and wanted to streamline the detection of winning patterns.&lt;/p&gt;
&lt;p&gt;The mathematical background to the reinforcement learning part is temporal difference learning as described &lt;a href=&#34;https://en.m.wikipedia.org/wiki/Temporal_difference_learning&#34;&gt;on the wiki&lt;/a&gt;. The main formula consists in updating the state probabilities after each run using the regression
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1658869513/Screenshot_Equation_njcpty.png&#34; alt=&#34;&#34;&gt;
In the code, this line reads&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;self&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;states_value[st] &lt;span style=&#34;color:#f92672&#34;&gt;+=&lt;/span&gt; self&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;lr &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; (self&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;decay_gamma &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; reward &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; self&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;states_value[st])
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and its corresponding method takes up just five lines of code of the ~300 lines.&lt;/p&gt;
&lt;h2 id=&#34;how-it-s-done-package-set-up&#34;&gt;How it&amp;rsquo;s done: Package set up&lt;/h2&gt;
&lt;p&gt;As can be seen from the README, the package was set up with &lt;a href=&#34;https://pypi.org/project/PyScaffold/&#34;&gt;PyScaffold&lt;/a&gt;. In order to start with a fresh scaffold, I simply ran&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;pip install pyscaffold
putup neckar
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and receieved a working a skeleton of a Python package, with the right structure and some dummy files. From there, I simple replaced the reinforcement learning code at the right places and added sensible unit tests in &lt;code&gt;./tests&lt;/code&gt; for my new winning detection.&lt;/p&gt;
&lt;h2 id=&#34;how-it-s-done-cli-with-fire&#34;&gt;How it&amp;rsquo;s done: CLI with fire&lt;/h2&gt;
&lt;p&gt;The skeleton provided by PyScaffold already comes with an entry point, see &lt;code&gt;setup.cfg&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;[options.entry_points]
console_scripts =
     reilingen = neckar.main:run
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I use &lt;code&gt;fire&lt;/code&gt; to expose the functions &lt;code&gt;play&lt;/code&gt; and &lt;code&gt;train&lt;/code&gt; to the CLI. This allows the user to interact with the application and even train it, and is implemented in &lt;code&gt;main.py&lt;/code&gt; and allows for the usage as described in &lt;a href=&#34;#eager-to-play-tictactoe&#34;&gt;Eager to Play TicTacToe?&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;how-it-s-done-ci-cd-in-gitlab&#34;&gt;How it&amp;rsquo;s done: CI/CD in gitlab&lt;/h2&gt;
&lt;p&gt;The step from a PyScaffold setup to a CI/CD pipeline in gitlab is simple but has many, many positive consequences. The pipeline is defined in &lt;code&gt;.gitlab-ci.yml&lt;/code&gt;, and it is run any time there is a new commit or a new tag in the package in gitlab. The step &lt;code&gt;run&lt;/code&gt; contains the line&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;python -m build
python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and therefore an entire whl is built any time a new commit is created. The final packages lie in the package repository and are publicly available as shown in Section &lt;a href=&#34;#eager-to-play-tictactoe&#34;&gt;Eager to Play TicTacToe?&lt;/a&gt;&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
</description>
    </item>
    
    <item>
      <title>Don&#39;t forget to sharpen your axe</title>
      <link>https://www.sastibe.de/2022/07/dont-forget-to-sharpen-your-axe/</link>
      <pubDate>Sun, 24 Jul 2022 00:00:00 +0200</pubDate>
      
      <guid>https://www.sastibe.de/2022/07/dont-forget-to-sharpen-your-axe/</guid>
      <description>&lt;h2 id=&#34;a-wise-man-once-said-dot-dot-dot&#34;&gt;A wise man once said&amp;hellip;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Give me six hours to chop down a tree and I will spend the first four sharpening the axe.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Abraham Lincoln&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;In this statement there is a lot of truth. For instance, it is closely mimicked by on of &lt;a href=&#34;https://genius.com/Stephen-r-covey-habit-7-sharpen-the-saw-annotated&#34;&gt;one of the 7 habits of highly effective people by Stephen Covey&lt;/a&gt;. Obviously, it applies to writing software as well, as a sharpened &amp;ldquo;developer&amp;rsquo;s axe&amp;rdquo; means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a suitable editor for writing and manipulating code, preferably with a good git integration,&lt;/li&gt;
&lt;li&gt;good access to data if needed for analysis,&lt;/li&gt;
&lt;li&gt;easy processes for deployment or publishing of the results with maximal automisation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;the-rule-of-three&#34;&gt;The rule of three&lt;/h2&gt;
&lt;p&gt;All of these aspects of the developer&amp;rsquo;s axe need to be sharpened regularly. There looms a problem of overdoing it, however: how much time should be spent on sharpening vs. actual hacking? If Lincoln had said that he&amp;rsquo;d spend 5 hours on sharpening, that would be a bit too much, no?&lt;/p&gt;
&lt;p&gt;Similarly, when optimizing one&amp;rsquo;s own processes, one sometimes tends to overdo optimization and ends up getting nothing done. But at what point comes the sweet spot?&lt;/p&gt;
&lt;p&gt;Though I cannot find the source for this any more, I recall reading a quote by &lt;a href=&#34;https://en.wikipedia.org/wiki/Hadley_Wickham&#34;&gt;Hadley Wickham&lt;/a&gt; somewhere that
&amp;ldquo;Before I do something manually the fourth time, I write a function for it&amp;rdquo;. I&amp;rsquo;ve kept this rule in mind ever since, and I find it very well applicable in almost all situations: Three times are fine, but then you should consider functions/automization/&amp;hellip;.&lt;/p&gt;
&lt;h2 id=&#34;my-own-ungrinded-axe&#34;&gt;My own ungrinded axe&lt;/h2&gt;
&lt;p&gt;Why am I writing all this? Because I was, until recently, working with a blunt axe myself and only now came to sharpening it:&lt;/p&gt;
&lt;p&gt;I use &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; to present my blog, but I write it in emacs using org mode. Hugo is able to ingest emacs org files directly, but there is also the possibility of exporting from org to Hugo via &lt;a href=&#34;https://ox-hugo.scripter.co/&#34;&gt;ox-hugo&lt;/a&gt;. Up until the penultimate post, I used the former solution, due to the following reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;it worked somehow, even though I needed to  write an org file with some yaml at the beginning for the more fidgety parts of the header, I.e. thumbnail pic etc, and some html ALL IN THE SAME FILE&amp;hellip;&lt;/li&gt;
&lt;li&gt;there was no need for an export step from org to markdown.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In between these posts, I decided to sharpen my blog axe, and switch to a single, seperate org file that creates all of my future blog posts via ox-hugo. This lead to the following improvements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;much simpler writing of posts so far, because I only have to remember one set of Markdown Syntaxes and ox-hugo is incredibly well documented,&lt;/li&gt;
&lt;li&gt;easy tracking of open tasks &lt;code&gt;org-agenda&lt;/code&gt;, since the whole blog can be declared an &lt;code&gt;org-agenda-files&lt;/code&gt;, and all open (i.e. &amp;ldquo;draft&amp;rdquo;) articles show up as TODOs,&lt;/li&gt;
&lt;li&gt;I can write this post on my smartphone, as the central org file for the blog is now separate, and lives in my Dropbox, synced to orgzly on my phone (only the export files reside in my git repo, syncing to the productive environment).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What has sharpening the axe done for me? Previously, I could only reasonably work on my laptop, unless I opted for copy pasting text from email into org files or something. At the moment of writing this post I&amp;rsquo;m enjoying the sun at the public pool, so &amp;hellip; an obvious plus.&lt;/p&gt;
&lt;p&gt;The single org file used to built the last post and this one can be found &lt;a href=&#34;https://gitlab.com/sastibe/blog_org/-/blob/main/sastibe.org&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
</description>
    </item>
    
    <item>
      <title>Writing DIN-Norm (German) Letters in Emacs</title>
      <link>https://www.sastibe.de/2022/07/writing-din-norm-german-letters-in-emacs/</link>
      <pubDate>Sat, 16 Jul 2022 00:00:00 +0200</pubDate>
      
      <guid>https://www.sastibe.de/2022/07/writing-din-norm-german-letters-in-emacs/</guid>
      <description>&lt;h2 id=&#34;tl-dr&#34;&gt;TL;DR&lt;/h2&gt;
&lt;p&gt;This post explains how to set up &lt;strong&gt;emacs&lt;/strong&gt; so that the writing and sending of letters is always just a whim away. The resulting letters will adhere to the German &lt;a href=&#34;https://de.wikipedia.org/wiki/DIN_5008&#34;&gt;DIN 5008&lt;/a&gt; standard, and fit neatly into envelopes designed on that standard, as shown in the cover image on the top.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;All you for the implementation shown in this tutorial is&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Emacs with &lt;code&gt;org-mode&lt;/code&gt; and&lt;/li&gt;
&lt;li&gt;a LaTeX installation with the &lt;a href=&#34;https://www.ctan.org/tex-archive/macros/latex/contrib/dinbrief&#34;&gt;dinbrief.cls&lt;/a&gt; installed. On Ubuntu and Debian all you need are the packages &lt;code&gt;texlive-latex-base&lt;/code&gt; and &lt;code&gt;texlive-latex-extra&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;setting-up-the-capture-template&#34;&gt;Setting up the capture template&lt;/h2&gt;
&lt;p&gt;I use the following set-up for capturing templates. It writes each new captured letter to a single &amp;ldquo;letter&amp;rdquo;-File in LETTERFILE.org. The process of starting a letter via capture, i.e. &lt;code&gt;C-c c l&lt;/code&gt; then prompts you for filename/heading of the letter in the LETTERFILE, address (each line separately), topic and greeting formula. After that, you can simply write your plain text letter within the capture and finish with &lt;code&gt;C-c C-c&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; org-capture-templates &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;((&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;l&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Letter&amp;#34;&lt;/span&gt; entry
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			     (file+headline &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;LETTERFILE.org&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Letters&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			     &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;* %&amp;lt;%F&amp;gt; %^{Filename}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;:PROPERTIES:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;:EXPORT_FILE_NAME: %&amp;lt;%F&amp;gt;_%\\1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;:END:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+OPTIONS: toc:nil
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX_CLASS: dinbrief
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX: \\begin{letter}{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX: %^{Adresszeile 1 [Name]} \\\\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTex: %^{Adresszeile 2 [Street, Number]} \\\\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTex: %^{Adresszeile 3 [Place, ZIP]} }
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX: \\subject{%^{Topic}}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX: \\opening{%^{Greeting}}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;%?
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX: \\closing{Kind regards,}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX: \\underline{\\hspace{12cm}}\\\\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX: Sebastian  Schweer\\\\[2cm]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#+LaTeX: \\end{letter}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;:jump-to-captured&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt;)))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;hints-for-further-customization&#34;&gt;Hints for further customization&lt;/h2&gt;
&lt;p&gt;Within the variable `org-latex-classes`, you can set up your backadress and favourite pacakges to use while writing, so you don&amp;rsquo;t have to include these manually each time you write a letter. Obviously though, these settings should only be used for stationary information. Everything that might change from letter to letter should be handled within the capture template.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(custom-set-variables
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;(org-latex-classes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;((&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;dinbrief&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\documentclass{dinbrief}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;\\address{Paul McCartney \\\\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;Abbey Road 24 \\\\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;6058 London}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;\\backaddress{Paul McCartney, London}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;\\place{London}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\section{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\section*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsection{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsection*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsubsection{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsubsection*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\paragraph{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\paragraph*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subparagraph{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subparagraph*{%s}&amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;article&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\documentclass[11pt]{article}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\section{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\section*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsection{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsection*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsubsection{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsubsection*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\paragraph{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\paragraph*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subparagraph{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subparagraph*{%s}&amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;report&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\documentclass[11pt]{report}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\part{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\part*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\chapter{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\chapter*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\section{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\section*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsection{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsection*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsubsection{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsubsection*{%s}&amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;book&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\documentclass[11pt]{book}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\part{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\part*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\chapter{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\chapter*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\section{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\section*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsection{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsection*{%s}&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsubsection{%s}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\\subsubsection*{%s}&amp;#34;&lt;/span&gt;))))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;(org-latex-default-packages-alist
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;((&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;AUTO&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;inputenc&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;pdflatex&amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;T1&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;fontenc&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;pdflatex&amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;graphicx&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;grffile&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;longtable&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;wrapfig&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;rotating&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;normalem&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ulem&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;amsmath&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;textcomp&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;amssymb&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;capt-of&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;hyperref&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;official&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;eurosym&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ngerman&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;(org-latex-title-command &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
&lt;p&gt;The final step is simple &amp;hellip; just use it :) Capture your letter, answer all the prompts, and write your text. Once your capture is finished, navigate to the corresponding subtree in LETTERFILE, use and the &lt;code&gt;org-export&lt;/code&gt; to latex to create your pdf: &lt;code&gt;C-c C-e C-s l o&lt;/code&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/c_scale,w_876/v1658055763/emacs_letter_open_pcdrkp.jpg&#34;/&gt;
&lt;/figure&gt;

&lt;!-- raw HTML omitted --&gt;
</description>
    </item>
    
    <item>
      <title>Umfragewerte oder Medienpräsenz: Was kommt zuerst?</title>
      <link>https://www.sastibe.de/2021/10/umfragewerte-oder-medienpr%C3%A4senz-was-kommt-zuerst/</link>
      <pubDate>Tue, 12 Oct 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2021/10/umfragewerte-oder-medienpr%C3%A4senz-was-kommt-zuerst/</guid>
      <description>
&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-1&#34;&gt;
Einleitung und Fragestellung
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
In den letzten Jahren&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-2&#34; href=&#34;#footnote-2&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; konnten in diversen Ländern der Aufstieg populistischer Phänomene beobachtet werden:  der Aufstieg der &lt;em&gt;AfD&lt;/em&gt; in Deutschland, die seit ihrer Gründung binnen 5 Jahren in sämtlichen deutschen Landtagen, dem Bundestag und dem europäischen Parlament vertreten ist; der Wahlsieg Donald J. Trumps in den USA; der Aufstieg der &lt;em&gt;Lega&lt;/em&gt; in Italien und viele weitere Beispiele. Ein Verlaufsmuster, das bei jedem einzelnen dieser Aufstiege in der Öffentlichkeit auftritt ist das folgende Ping-Pong-Spiel zwischen Medien und Umfragewerten: Je größer die gesellschaftliche Bekanntheit, desto größer das Medienecho, desto größer die Bekanntheit, etc. In diesem Artikel werde ich diesen Zusammenhang empirisch untersuchen, und dabei folgenden Fragestellungen nachgehen: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Gibt es einen messbaren, zeitlichen Zusammenhang zwischen medialer Aufmerksamkeit für die AfD und den Umfragewerten der Partei?&lt;/li&gt;
&lt;li&gt;Wenn ja, welche zeitliche Abfolge gilt: Erst Medienecho, dann Umfrageergebnis, oder umgekehrt?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
In der Folge erkläre ich detailliert meine Vorgehensweise, nehme hier aber bereits die Antworten vorweg:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Ja, in der Phase zwischen &amp;#34;erster Spaltung&amp;#34; der AfD (Juli 2015) bis zur Bundestagswahl 2017 ist dieser Zusammenhang deutlich messbar&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Laut Zahlenwerk am plausibelsten: Die Steigerung der Berichterstattung erfolgt knapp vorher oder genau zeitlich synchron; es lassen sich aber keine eindeutigen Aussagen treffen.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-2&#34;&gt;
Datenquellen und erste Einblicke &lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-1&#34; href=&#34;#footnote-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Als Datenquelle für die Analyse verwende ich zwei verschiedene Datenquellen:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;für Umfrageergebnisse stütze ich mich auf die Ergebnisse der Umfrageinstitute Allensbach, Emnid, Forsa, FGW, GMS, Infratest und INSA, allesamt aufbereitet und bereitgestellt von &lt;a href=&#34;https://www.wahlrecht.de&#34;&gt;www.wahlrecht.de&lt;/a&gt;&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-3&#34; href=&#34;#footnote-3&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/li&gt;
&lt;li&gt;für Medienpräsenz habe ich auf die &lt;a href=&#34;http://developer.zeit.de/explorer/&#34;&gt;DeveloperAPI&lt;/a&gt; der Wochenzeitung &lt;a href=&#34;https://www.zeit.de/index&#34;&gt;Zeit&lt;/a&gt; zugegriffen, die sämtliche Artikel der gedruckten Zeit seit 1946 durchsuchbar macht&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-4&#34; href=&#34;#footnote-4&#34;&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Für einen ersten Überblick der verwendeten Daten hier zunächst der Blick auf die Anzahl der veröffentlichten Artikel in der Zeit, die den String &amp;#34;AfD&amp;#34;:&lt;/p&gt;
&lt;p&gt;
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/afd_article_zdginm.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/afd_article_zdginm.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/afd_article_zdginm.png&#34; /&gt;&amp;#34; width=&amp;#34;600&amp;#34; height=&amp;#34;338&amp;#34; alt=&amp;#34;Hmmm, ggplot2.&amp;#34;/&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt; Anzahl monatlicher Artikel auf &lt;a href=&#34;www.zeit.de&#34;&gt;zeit.de&lt;/a&gt; mit dem Stichwort &amp;#34;AfD&amp;#34; &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;
Interessante Beobachtungen hierbei sind zum Einen die Spitzen, deren erste im Jahre 2017 sich einfach mit der &lt;a href=&#34;https://de.wikipedia.org/wiki/Bundestagswahl_2017&#34;&gt;Bundestagswahl in diesem Jahr&lt;/a&gt; erklären lässt. Der hohe Ausschlag im Jahr 2020 fällt auf den Februar, als die &lt;a href=&#34;https://de.wikipedia.org/wiki/B%25C3%25BCrgerschaftswahl_in_Hamburg_2020&#34;&gt;Bürgerschaftswahl in Hamburg&lt;/a&gt; anstand. Zum Anderen durchaus spannend ist das &amp;#34;Tal&amp;#34; zwischen 2018 und Mitte 2019, in welchem die Aufmerksamkeit für die Partei, zumindest in der Berichterstattung von zeit.de erstmal zu erlahmen schien. Erst die Bürgerschaftswahl und dann der beginnende Wahlkampf zur Bundestagswahl 2021 scheint das Interesse wieder geweckt zu haben.&lt;/p&gt;
&lt;p&gt;
Der zweite Datentopf besteht aus den aggregierten Wahlumfragen von &lt;a href=&#34;www.wahlrecht.de&#34;&gt;wahlrecht.de&lt;/a&gt; (&amp;#34;Wenn nächsten Sonntag Bundestagswahl wäre…&amp;#34;), und ergibt folgendes Bild:&lt;/p&gt;
&lt;p&gt;
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/afd_verlauf_yvgrjd.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/afd_verlauf_yvgrjd.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/afd_verlauf_yvgrjd.png&#34; /&gt;&amp;#34; width=&amp;#34;600&amp;#34; height=&amp;#34;338&amp;#34; alt=&amp;#34;Hmmm2, ggplot2.&amp;#34;/&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt; Monatlich aggregierte Umfragewerte der AfD und Zeitpunkte der Bundestagswahlen  &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;
Je Monat wurden für die obige Darstellung für alle vorhandenen Umfrageergebnisse der Durchschnitt ermittelt. Der zeitliche Anker ist hierbei die Veröffentlichung der Umfrage, im Mittel liegt dieses Datum ca. 9 Tage nach Beginn der Umfrage.&lt;/p&gt;
&lt;p&gt;
Auf den langen Zeitraum betrachtet zeigt sich ein bewegter, insgesamt leicht steigender Verlauf mit bisherigem Höchststand Anfang 2018. Der Einfluss der Corona-Pandemie mit Begin um die Jahreswende 2019/20 scheint ein deutlich negativer zu sein, trotz (oder vielleicht gerade wegen) der Nähe der AfD zur pandemieskeptischen Kreisen.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-3&#34;&gt;
Die Analysemethode
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Zur Ermittelung eines Zusammenhangs zwischen den beiden Datentöpfen wird hier die &lt;a href=&#34;https://de.wikipedia.org/wiki/Korrelation&#34;&gt;Korrelation&lt;/a&gt; berechnet, je höher dieser Wert ausfällt, desto deutlicher ausgeprägt ist auch der Zusammenhang zwischen beiden Größen. Hierbei ist festzuhalten, dass Korrelation keine Kausation bedeutet, d.h. der festgestellte Zusammenhang muss nicht derart ausgeprägt sein, dass das Auftreten des einen Ereignisses direkt das andere Ereignis herbeiführt. &lt;/p&gt;
&lt;p&gt;
Um die zeitliche Komponenten der Untersuchung wiederzuspiegeln, wird die Korrelation in einem laufenden Fenster aus paarweise zueinander geordneten Beobachtungen berechnet. Hierbei werden verschiedene zeitliche Abstände probiert, um bspw. die Bewertung &amp;#34;tritt ein erhöhter Umfragewert zwei Monate nach Steigerung der Berichterstattung an?&amp;#34; beantworten zu können. Die Wahl der Länge des zeitlichen Fensters, das jeweils über den Zeithorizont geschoben wird, hat hierbei Auswirkungen in zwei Richtungen: Ein kurzes Fenster ermöglicht den Blick in sehr kurzfristige Veränderungen des Geschehens, hat aber eine statistisch viel größere Streuung als dies ein längeres Fenster hat. In den unten gezeigten Plots habe ich eine Fensterlänge von einem halben Jahr, d.h. 18 Messpunkten gewählt.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-4&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-4&#34;&gt;
Das Ergebnis
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-4&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
In der folgenden Grafik sind die Verläufe von zwei verschiedenen Varianten der laufenden Korrelationsfenster angegeben:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;in &lt;strong&gt;Rot&lt;/strong&gt;:  der Korrelationkoeffizient zu &amp;#34;synchronem&amp;#34; Verlauf,&lt;/li&gt;
&lt;li&gt;in &lt;strong&gt;Hellblau&lt;/strong&gt;: der Korrelationkoeffizient zu Berichterstattung läuft einen Monat voraus.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/korrelationskoeffizient_wazusa.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/korrelationskoeffizient_wazusa.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1634075980/korrelationskoeffizient_wazusa.png&#34; /&gt;&amp;#34; width=&amp;#34;600&amp;#34; height=&amp;#34;338&amp;#34; alt=&amp;#34;Hmmm3, ggplot2.&amp;#34;/&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt; Zeitlicher Verlauf der &amp;#34;laufenden Korrelationen&amp;#34; zu Zeitversatz 0 und 1 &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;
Weiterhin wurde der Schwellwert 0.708 eingezeichnet, als der Schwellwert zur Signifikanz des Tests auf Unkorreliertheit zum Niveau 0,1% für n=18 &lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-5&#34; href=&#34;#footnote-5&#34;&gt;5&lt;/a&gt;&lt;/sup&gt;. Die Tatsache, dass beide Kurven über einen Zeitraum von fast einem Jahr über diesem Schwellwert rangieren, deutet auf die Deutlichkeit des Zusammenhangs hin. Der Zeitraum bezieht sich hierbei auf die vorhergehenden 18 Monate je Messpunkt, die Grafik zeigt somit, dass die Aussage &amp;#34;Umfragewerte und Berichterstattung steigen gleichzeitig&amp;#34; für den Zeitraum zwischen September 2014 bis Februar 2017 statistisch sehr plausibel bewertet wird. Das gleiche gilt aber auch für die Aussage  &amp;#34;Umfragewerte steigen einen Monat nach erhöhter Berichterstattung&amp;#34;, und deutet damit auf die Unschärfen hin, die dieser Untersuchung zugrunde liegen. In der Tat steigen auch die Kurven zu anderen zeitlichen Abständen (+2 bis -2) in diesem Zeitraum auf statistisch signifikante Werte, jedoch nicht über einen derart langen Zeitraum.&lt;/p&gt;
&lt;p&gt;
Zusammengefasst: Die Fragestellung 1) kann eindeutig beantwortet werden, alle weiteren Fragestellungen entziehen sich einer eindeutigen Klärung. Dennoch halte ich das dargestellte Vorgehensweise für einen interessanten Weg, politische und mediale Phänomene messbar und bewertbar zu machen.&lt;/p&gt;
&lt;p&gt;
&amp;lt;img src=&amp;#34;&lt;a href=&#34;https://vg09.met.vgwort.de/na/23c6b25217e84a59aee885b828467ae5&#34;&gt;https://vg09.met.vgwort.de/na/23c6b25217e84a59aee885b828467ae5&lt;/a&gt;&amp;#34; width=&amp;#34;1&amp;#34; height=&amp;#34;1&amp;#34; alt=&amp;#34;&amp;#34;&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr class=&#34;footnotes-separatator&#34;&gt;
&lt;div class=&#34;footnote-definitions&#34;&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-1&#34;&gt;&lt;a href=&#34;#footnote-reference-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;Den verwendeten Code gibt es &amp;lt;a href=&amp;#34;/afd_zeit_korrelationsanalyse.R&amp;#34;&amp;gt; hier &amp;lt;/a&amp;gt; zum Download.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-2&#34;&gt;&lt;a href=&#34;#footnote-reference-2&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;Diesen Artikel schreibe ich, entgegen meiner üblichen Vorgehensweise, auf Deutsch, da das Thema sich dediziert mit deutscher Politik beschäftigt.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-3&#34;&gt;&lt;a href=&#34;#footnote-reference-3&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;Mit freundlichen Grüßen und herzlichem Dank auch an die Entwickler des R packages &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://cran.r-project.org/web/packages/coalitions/index.html&#34;&gt;https://cran.r-project.org/web/packages/coalitions/index.html&lt;/a&gt;&amp;#34;&amp;gt; coalitions&amp;lt;/a&amp;gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-4&#34;&gt;&lt;a href=&#34;#footnote-reference-4&#34;&gt;4&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;An dieser Stelle noch einmal meinen persönlichen Dank ans Entwicklerteam für die Genehmigung des Antrags an Silvester!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-5&#34;&gt;&lt;a href=&#34;#footnote-reference-5&#34;&gt;5&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;Siehe Lothar Sachs, Angewandte Statistik, 8. Ausgabe, Tabelle 193.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Setting up Emacs as Mail Client</title>
      <link>https://www.sastibe.de/2021/01/setting-up-emacs-as-mail-client/</link>
      <pubDate>Tue, 19 Jan 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2021/01/setting-up-emacs-as-mail-client/</guid>
      <description>
&lt;p&gt;&amp;lt;img src=&amp;#34;&lt;a href=&#34;https://vg09.met.vgwort.de/na/b66f5b9419e744cb911470ba098ba870&#34;&gt;https://vg09.met.vgwort.de/na/b66f5b9419e744cb911470ba098ba870&lt;/a&gt;&amp;#34; width=&amp;#34;1&amp;#34; height=&amp;#34;1&amp;#34; alt=&amp;#34;&amp;#34;&amp;gt;&lt;/p&gt;
&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-1&#34;&gt;
The Final Result
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Let me start this article by showing you the final result of this article. Below you see a screengrab of me &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;checking the new mails I received today, from across 3 separate mail accounts (including a gmail account)&lt;/li&gt;
&lt;li&gt;deleting two mails on the fly, while skimming the remaining two&lt;/li&gt;
&lt;li&gt;searching through all my mails for the keywords &amp;#34;thalia AND FIFA&amp;#34; and finding the result immediately&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;video width= &amp;#34;960&amp;#34; height=&amp;#34;720&amp;#34; controls&amp;gt;
  &amp;lt;source src=&amp;#34;&lt;video src=&#34;https://res.cloudinary.com/dlprdrxib/video/upload/ac_none,c_scale,vc_auto,w_919/v1611093924/mu4e_testride_agna7h.webm&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/video/upload/ac_none,c_scale,vc_auto,w_919/v1611093924/mu4e_testride_agna7h.webm&#34;&gt;https://res.cloudinary.com/dlprdrxib/video/upload/ac_none,c_scale,vc_auto,w_919/v1611093924/mu4e_testride_agna7h.webm&lt;/video&gt;&amp;#34; type=&amp;#34;video/webm&amp;#34;&amp;gt;
    &amp;lt;/video&amp;gt;&lt;/p&gt;
&lt;p&gt;
Everything is done within Emacs, no context switching or anything else needed. In this post, I&amp;#39;ll describe my set-up as minimalistically as possible.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-2&#34;&gt;
Setting up the framework
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-2&#34;&gt;
&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-3&#34;&gt;
Mu
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;First, you need to install &lt;code class=&#34;verbatim&#34;&gt;Mu&lt;/code&gt; from &lt;a href=&#34;https://www.djcbsoftware.nl/code/mu/&#34;&gt;the sources&lt;/a&gt;, which works as a indexing and search engine on your offline email cache. On Ubuntu 20.04, this consists in extracting the sources, and running&lt;/p&gt;
&lt;div class=&#34;src src-bash&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./configure&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
within the extracted folder. For my setup, I additionally needed to install three dependencies for the configuration to cleanly run through:&lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install libgtk2.0-dev libgmime-3.0-dev libxapian-dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
After this, a simple &lt;/p&gt;
&lt;div class=&#34;src src-bash&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;make
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;make install&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
installed mu.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-4&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-4&#34;&gt;
Encrypting passwords etc.
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-4&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
In what follows, this file will require numerous sensitive data entries, such as passwords, tokens etc. In order to avoid storing these entries in plain text, I follow &lt;a href=&#34;https://unix.stackexchange.com/questions/44214/encrypt-offlineimap-password/48355#48355&#34;&gt;this stackexchange answer&lt;/a&gt; but add a few tweaks. First, if not already existing, create a gpg key via &lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg --full-generate-key&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Next, download and install &lt;a href=&#34;https://www.passwordstore.org/#organization&#34;&gt;pass&lt;/a&gt; and set it up by &lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pass init &amp;#34;Name of your GPG key&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
With this setup, encrypting any type of information is as simple as&lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pass insert foo/bar&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;and the prompt will ask you for it, and store it in the given file destination.&lt;/p&gt;
&lt;p&gt;
Next, save the following python script as something like &lt;code class=&#34;verbatim&#34;&gt;~/.offlineimap.py&lt;/code&gt; :&lt;/p&gt;
&lt;div class=&#34;src src-python&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; os
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; subprocess
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;mailpasswd&lt;/span&gt;(acct):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  acct &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; os&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;path&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;basename(acct)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  path &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/home/&amp;lt;username&amp;gt;/.passwd/&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;%s&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;.gpg&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;%&lt;/span&gt; acct
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  args &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;gpg&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--use-agent&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--quiet&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--batch&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;-d&amp;#34;&lt;/span&gt;, path]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;try&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; subprocess&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;check_output(args)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;strip()
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;except&lt;/span&gt; subprocess&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CalledProcessError:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;prime_gpg_agent&lt;/span&gt;():
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ret &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  i &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;while&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;not&lt;/span&gt; ret:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ret &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; (mailpasswd(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;prime&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;prime&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; i &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; offlineimap.ui &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; getglobalui
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      sys&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;stderr&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;write(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Error reading in passwords. Terminating.&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      getglobalui()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;terminate()
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    i &lt;span style=&#34;color:#f92672&#34;&gt;+=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; ret
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;prime_gpg_agent()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;change &lt;code class=&#34;verbatim&#34;&gt;&amp;lt;username&amp;gt;&lt;/code&gt; accordingly.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-5&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-5&#34;&gt;
Setting up offlineimap
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-5&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Offlineimap is already pre-installed in Ubuntu, so the only &amp;#34;setting up&amp;#34; to do is the configuration of the aptly named file &lt;code class=&#34;verbatim&#34;&gt;~/.offlineimaprc&lt;/code&gt;. &lt;/p&gt;
&lt;div id=&#34;outline-container-headline-6&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-6&#34;&gt;
GMail
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-6&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
For GMail, the necessary encryption standards have improved in recent times,  and Gmail no longer likes the encryption provided by sending the user/password combination directly (via &lt;code class=&#34;verbatim&#34;&gt;remoteuser&lt;/code&gt; and &lt;code class=&#34;verbatim&#34;&gt;remotepasseval&lt;/code&gt;). Rather, it expects communication via XOAUTH2. Hence, following &lt;a href=&#34;https://github.com/OfflineIMAP/offlineimap/blob/master/offlineimap.conf#L899&#34;&gt;the official documentation&lt;/a&gt;, I created and received my &lt;code class=&#34;verbatim&#34;&gt;oauth2_client_id&lt;/code&gt; and &lt;code class=&#34;verbatim&#34;&gt;oauth2_client_secret&lt;/code&gt; from Google. After that, further following the official documentation, I cloned the &lt;code&gt;gmail-oauth2-tools&lt;/code&gt; repo and created the oauth2_token as described, using&lt;/p&gt;
&lt;div class=&#34;src src-bash&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python python/oauth2.py --generate_oauth2_token &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;&lt;/span&gt;            --client_id&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;YOUR_CLIENT_ID --client_secret&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;YOUR_CLIENT_SECRET&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
This generated both an access token and a refresh token, both of which I put into encrypted files, as described above. I finalized the &lt;code class=&#34;verbatim&#34;&gt;offlineimaprc&lt;/code&gt; setup, it now looks like this, including one other account that uses basic password security:&lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[general]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;accounts = gmail, sastibe
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;maxsyncaccounts = 2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pythonfile = ~/.offlineimap.py
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Account gmail]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;localrepository = LocalGmail
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;remoterepository = RemoteGmail
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;quick = 10
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;postsynchook = mu index --maildir ~/Mails
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Repository LocalGmail]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;type = Maildir
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;localfolders = ~/Mails/gmail
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Repository RemoteGmail]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;type = Gmail
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;maxconnections = 2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;remoteuser = sebastian.a.schweer@gmail.com
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;oauth2_request_url = https://accounts.google.com/o/oauth2/token
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;oauth2_client_id_eval = mailpasswd(&amp;#34;gmail_oauth2_client_id&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;oauth2_client_secret_eval = mailpasswd(&amp;#34;gmail_oauth2_client_secret&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;oauth2_refresh_token_eval = mailpasswd(&amp;#34;gmail_oauth2_refresh_token&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;folderfilter = lambda foldername: foldername not in [&amp;#39;[Gmail]/All Mail&amp;#39;, &amp;#39;[Gmail]/Important&amp;#39;]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sslcacertfile = /etc/ssl/certs/ca-certificates.crt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Account sastibe]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;localrepository = Localsastibe
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;remoterepository = Remotesastibe
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;quick = 10
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;postsynchook = mu index --maildir ~/Mails
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Repository Localsastibe]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;type = Maildir
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;localfolders = ~/Mails/sastibe
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Repository Remotesastibe]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;type = IMAP
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;remotehost = imap.1und1.de
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssl = yes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;remoteuser = sastibear@sastibe.de
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;remotepasseval = mailpasswd(&amp;#34;sastibe_password&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sslcacertfile = /etc/ssl/certs/ca-certificates.crt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-7&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-7&#34;&gt;
Config for .emacs
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-7&#34; class=&#34;outline-text-2&#34;&gt;
&lt;div id=&#34;outline-container-headline-8&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-8&#34;&gt;
Including mu4e
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-8&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
This is fortunately quite simple after the previous installation of &lt;code class=&#34;verbatim&#34;&gt;mu&lt;/code&gt;, just add&lt;/p&gt;
&lt;div class=&#34;src src-lisp&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(add-to-list &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;load-path&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/usr/local/share/emacs/site-lisp/mu4e/&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;require&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;mu4e&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;to your &lt;code&gt;.emacs&lt;/code&gt; and you are good to go.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-9&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-9&#34;&gt;
Basic setup
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-9&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
These are the necessary settings for using &lt;code class=&#34;verbatim&#34;&gt;mu4e&lt;/code&gt; with &lt;code class=&#34;verbatim&#34;&gt;offlineimap&lt;/code&gt; and XOAUTH2 encryption:&lt;/p&gt;
&lt;div class=&#34;src src-lisp&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;require&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;smtpmail&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;require&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;auth-source-xoauth2&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; mail-user-agent &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;mu4e-user-agent&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; mu4e-sent-messages-behavior &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;delete&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; mu4e-maildir &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/home/sastibe/Mails&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; mu4e-update-interval &lt;span style=&#34;color:#ae81ff&#34;&gt;300&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; message-send-mail-function &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;smtpmail-send-it&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; mu4e-get-mail-command &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;offlineimap&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; mu4e-headers-date-format &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;%d-%m-%Y %H:%M&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; mu4e-headers-fields &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;((&lt;span style=&#34;color:#e6db74&#34;&gt;:human-date&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;20&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			    (&lt;span style=&#34;color:#e6db74&#34;&gt;:flags&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			    (&lt;span style=&#34;color:#e6db74&#34;&gt;:from&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;22&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			    (&lt;span style=&#34;color:#e6db74&#34;&gt;:maildir&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;8&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			    (&lt;span style=&#34;color:#e6db74&#34;&gt;:subject&lt;/span&gt;)))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-10&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-10&#34;&gt;
Encryption for XOAUTH2
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-10&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
For XOAUTH2 communication, GMail expects a specific set of parameters to be transmitted. &lt;/p&gt;
&lt;div class=&#34;src src-lisp&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(defun my-xoauth2-get-secrets (host user port)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (when (and (&lt;span style=&#34;color:#a6e22e&#34;&gt;string=&lt;/span&gt; host &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;smtp.gmail.com&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             (&lt;span style=&#34;color:#a6e22e&#34;&gt;string=&lt;/span&gt; user &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sebastian.a.schweer@gmail.com&amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;color:#a6e22e&#34;&gt;list&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:token-url&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://accounts.google.com/o/oauth2/token&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:client-id&lt;/span&gt;     (auth-source-pass-get &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;secret&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Email/gmail_oauth2_client_id&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:client-secret&lt;/span&gt; (auth-source-pass-get &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;secret&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Email/gmail_oauth2_client_secret&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:refresh-token&lt;/span&gt; (auth-source-pass-get &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;secret&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Email/gmail_oauth2_refresh_token&amp;#34;&lt;/span&gt;))))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; auth-source-xoauth2-creds &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;my-xoauth2-get-secrets&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(add-to-list &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;smtpmail-auth-supported&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;xoauth2&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(auth-source-xoauth2-enable)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; auth-sources (&lt;span style=&#34;color:#66d9ef&#34;&gt;quote&lt;/span&gt; (xoauth2 password-store)))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-11&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-11&#34;&gt;
Mu4e Contexts
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-11&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
In order to separate the accounts and keep the commands adjustable, I use &lt;code class=&#34;verbatim&#34;&gt;mu4e-contexts&lt;/code&gt; like so:&lt;/p&gt;
&lt;div class=&#34;src src-lisp&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; mu4e-contexts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;`&lt;/span&gt;( &lt;span style=&#34;color:#f92672&#34;&gt;,&lt;/span&gt;(make-mu4e-context
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:name&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;gmail&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:match-func&lt;/span&gt; (lambda (msg) (when msg
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       (string-prefix-p &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/gmail&amp;#34;&lt;/span&gt; (mu4e-message-field msg &lt;span style=&#34;color:#e6db74&#34;&gt;:maildir&lt;/span&gt;))))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:vars&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;(
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (mu4e-refile-folder &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/Gmail/[Gmail].Archive&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (mu4e-drafts-folder &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/gmail/[Gmail].Drafts&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (mu4e-sent-folder   &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/gmail/[Gmail].Sent Mail&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (mu4e-trash-folder  &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/gmail/[Gmail].Trash&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-stream-type &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; ssl)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-default-smtp-server &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;smtp.gmail.com&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-smtp-server  &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;smtp.gmail.com&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-smtp-service &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;465&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-smtp-user    &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sebastian.a.schweer@gmail.com&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (auth-source-xoauth2-creds &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;my-xoauth2-get-secrets&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       ))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#f92672&#34;&gt;,&lt;/span&gt;(make-mu4e-context
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:name&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sastibe&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:match-func&lt;/span&gt; (lambda (msg) (when msg
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       (string-prefix-p &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/sastibe&amp;#34;&lt;/span&gt; (mu4e-message-field msg &lt;span style=&#34;color:#e6db74&#34;&gt;:maildir&lt;/span&gt;))))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;:vars&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;(
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (mu4e-sent-folder   &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/sastibe/Gesendete Objekte&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (mu4e-trash-folder  &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/sastibe/Gesendete Objekte&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (mu4e-refile-folder &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/sastibe/Spam&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (mu4e-drafts-folder &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/sastibe/Entw&amp;amp;APw-rfe&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (user-mail-address  &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sastibear@sastibe.de&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-default-smtp-server &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;smtp.1und1.de&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-smtp-user &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sastibear@sastibe.de&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-smtp-server &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;smtp.1und1.de&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-stream-type &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; starttls)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	     (smtpmail-smtp-service &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;587&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     ))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-12&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-12&#34;&gt;
Debugging
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-12&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
If things don&amp;#39;t run as expected, the following settings allow for deeper troubleshooting:&lt;/p&gt;
&lt;div class=&#34;src src-lisp&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; auth-source-debug &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;setq&lt;/span&gt; smtpmail-debug-info &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-13&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-13&#34;&gt;
Sources &amp;amp; Acknowledgements
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-13&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;&lt;strong&gt;Update March 7, 2021&lt;/strong&gt;: I modified the article to reflect in the code a much better way of keeping mu4e up to date. The previous version ran into conflicts with different processes trying to keep mu and mu4e up to date at the same time.&lt;/p&gt;
&lt;p&gt;
Essentially I follow &lt;a href=&#34;http://cachestocaches.com/2017/3/complete-guide-email-emacs-using-mu-and-/&#34;&gt;this post&lt;/a&gt; from 2017, and adjust it according to my setup (Ubuntu 20.04) as well as new security policies as ordained by Google Mail. I am much indebted to &lt;a href=&#34;https://github.com/DamienCassou/auth-source-pass/issues&#34;&gt;two of the three discussions&lt;/a&gt; in the repo for &lt;code class=&#34;verbatim&#34;&gt;auth-source-pass&lt;/code&gt; to figure out the proper way to apply this package.  &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>De-Googling the Blog (and my life)</title>
      <link>https://www.sastibe.de/2020/11/de-googling-the-blog-and-my-life/</link>
      <pubDate>Mon, 23 Nov 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2020/11/de-googling-the-blog-and-my-life/</guid>
      <description>&lt;p&gt;
Today, just a short notification concerning the use of analytics on this blog: I have decided to get rid of the Google Analytic Tag on these pages. It was very joyful to know how many people surfed to my little blog from all over the world, yet it doesn&amp;#39;t outweigh my reservation against Google obtaining entry into almost each and every single piece of software surrounding us.&lt;/p&gt;
&lt;p&gt;
Asides from on-site analytic tags I have recently decided to circumvent Google and its services as well as possible in my personal digital footprint as well. I search the web using &lt;a href=&#34;https://duckduckgo.com/&#34;&gt;DuckDuckGo&lt;/a&gt; and try to find my way around the world using &lt;a href=&#34;https://www.openstreetmap.org&#34;&gt;OpenStreetMa&lt;/a&gt;p Further suggestions can be found in other, well-researched articles such as &lt;a href=&#34;https://geekgonecrazy.com/2020/04/28/de-googling-my-progress/&#34;&gt;this one&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update, 2020-12-12:&lt;/strong&gt; 
I have now found a suitable alternative to Google Analytics, &lt;a href=&#34;https://clicky.com/&#34;&gt;Clicky&lt;/a&gt;. I already changed the Privacy Notice accordingly, and will keep you updated…&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Supplement to &#39;Nonparametric estimation of the service time distribution in discrete-time queueing networks&#39;</title>
      <link>https://www.sastibe.de/2020/01/supplement-to-nonparametric-estimation-of-the-service-time-distribution-in-discrete-time-queueing-networks/</link>
      <pubDate>Thu, 30 Jan 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2020/01/supplement-to-nonparametric-estimation-of-the-service-time-distribution-in-discrete-time-queueing-networks/</guid>
      <description>&lt;p&gt;
Great news: a scientific article I have co-authored has been accepted for publication and can now be found online &lt;a href=&#34;https://www.sciencedirect.com/science/article/abs/pii/S0304414920300351?via%253Dihub&#34;&gt;here&lt;/a&gt; or via the DOI &lt;strong&gt;10.1016/j.spa.2020.01.011&lt;/strong&gt;. Yes, my &lt;a href=&#34;https://www.sastibe.de/publications/&#34;&gt;list of publications&lt;/a&gt; has been amended &lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-1&#34; href=&#34;#footnote-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;. This article has been through quite a lengthy review process, and was the main motivation for another &lt;a href=&#34;https://www.sastibe.de/2018/09/running-r-on-aws-email-notification/&#34;&gt;one of my blog posts&lt;/a&gt;. This post dates to September 2018, yet I only started working on these simulations in the framework of the second round of peer review…&lt;/p&gt;
&lt;p&gt;
 Anyways, the results presented in the paper are based on simulations I calculated using a specifically desigend &lt;strong&gt;R&lt;/strong&gt; package, aptly named &lt;em&gt;queueingnetworkR&lt;/em&gt;. This package was only ever designed for this singular purpose, for anyone who might be interested in repeating the experiments or using the code in any other fashion, the latest tar-ball can be &lt;a href=&#34;https://www.sastibe.de/queueingnetworkr/&#34;&gt;found here&lt;/a&gt;, the GitLab page is &lt;a href=&#34;https://gitlab.com/sastibe/spa_queueingnetwork&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr class=&#34;footnotes-separatator&#34;&gt;
&lt;div class=&#34;footnote-definitions&#34;&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-1&#34;&gt;&lt;a href=&#34;#footnote-reference-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;I am glad you asked.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Calculating the Required Sample Size for a Binomial Test in R</title>
      <link>https://www.sastibe.de/2020/01/sample_size_r/</link>
      <pubDate>Tue, 21 Jan 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2020/01/sample_size_r/</guid>
      <description>
&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-1&#34;&gt;
A Standard Problem: Determining Sample Size
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Recently, I was tasked with a straightforward question: &amp;#34;In an A/B test setting, how many samples do I have to collect in order to obtain significant results?&amp;#34; As ususal in statistics, the answer is not quite as straightforward as the question, and it depends quite a bit on the framework. In this case, the A/B test was supposed to test whether the effect of a treatment on the success rate p had the assumed size e. The value of the success rate had to be estimated in both test and control group, i.e. p&amp;lt;sub&amp;gt;test&amp;lt;/sub&amp;gt; and p&amp;lt;sub&amp;gt;control&amp;lt;/sub&amp;gt;. In short, the test hypotheses were thus &lt;/p&gt;
&lt;p&gt;
H&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; : p&amp;lt;sub&amp;gt;test&amp;lt;/sub&amp;gt; = p&amp;lt;sub&amp;gt;control&amp;lt;/sub&amp;gt; vs.&lt;/p&gt;
&lt;p&gt;
H&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; : p&amp;lt;sub&amp;gt;test&amp;lt;/sub&amp;gt; = p&amp;lt;sub&amp;gt;control&amp;lt;/sub&amp;gt; + e&lt;/p&gt;
&lt;p&gt;
Now, for each statistical test, we aim at minimizing (or at least controlling for) the following types of error:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Type I: Even though H&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; is true, the test decides for H&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/li&gt;
&lt;li&gt;Type II: Even though H&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; is true, the test decides for H&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since I can never remember stuff like this, I immediately started looking for a simple mnemonic, and I found &lt;a href=&#34;https://churchofrationality.blogspot.com/2011/03/type-i-and-type-ii-errors-trick-to.html&#34;&gt;this one:&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The null hypothesis is often represented as H&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;. Although mathematicians may disagree, where I live 0 is an even number, as evidenced by the fact that it is both preceded and followed by an odd number. Even numbers go together well. An even number and an odd number do not go together well. Hence the null hypothesis (even) is rejected by the type I error (odd), but accepted by the type II error (even).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-2&#34;&gt;
The test statistic
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
In the given setup, the test now runs as follows: Calculate the contingency matrix of successes in both groups, and apply &lt;a href=&#34;https://en.wikipedia.org/wiki/Fisher&amp;#39;s_exact_test&#34;&gt;Fisher&amp;#39;s exact test&lt;/a&gt;. If the test is negative, i.e. does not reject the null hypothesis, we have to repeat the experiment. However, we are quite sure that the null hypothesis is wrong and would like to prove that with as little effort as possible. &lt;/p&gt;
&lt;p&gt;
The basic question in this situation is &amp;#34;how many observations do I need to collect, in order to avoid both errors of Type I and II to an appropriate degree of certainty?&amp;#34;. The &amp;#34;appropriate degree of certainty&amp;#34; is parametrized in the probability of errors of Type I (significance level) and Type II (power). The default choices for these values are 0.05 for the significance level, and 0.8 for power: In 5% of cases, we reject a &amp;#34;true&amp;#34; H&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;, and in 20% of cases we reject a &amp;#34;true&amp;#34; H&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;. Quite clearly, only the power of the test (and not the significance level) depends on the difference of the parameters p&amp;lt;sub&amp;gt;test&amp;lt;/sub&amp;gt; and p&amp;lt;sub&amp;gt;control&amp;lt;/sub&amp;gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-3&#34;&gt;
Existing functions in R
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Are there already pre-defined functions to calculate minimal required sample sizes? A bit of digging around yields a &lt;a href=&#34;https://rdrr.io/cran/Hmisc/src/R/bpower.s&#34;&gt;match in the package Hmisc&lt;/a&gt;. There, the authors implement a method developed Fleiss, Tytun and Ury&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-1&#34; href=&#34;#footnote-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;. However, according to the documentation, the function is written only for the two-sided test case and does not include the continuity correction. I disagree with both decisions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the continuity correction term can grow quite large, and is always positive (see (5) in the cited paper). Thus, neglecting this term will always end in an underestimation of the necessary number of observations and may therefore lead to unsuccessful experiments.&lt;/li&gt;
&lt;li&gt;the two-sided case is not the norm, but rather the exception. When testing p&amp;lt;sub&amp;gt;control&amp;lt;/sub&amp;gt; vs. p&amp;lt;sub&amp;gt;test&amp;lt;/sub&amp;gt;, the counterhypothesis will almost always read &amp;#34;p&amp;lt;sub&amp;gt;test&amp;lt;/sub&amp;gt; &amp;gt; p&amp;lt;sub&amp;gt;control&amp;lt;/sub&amp;gt;&amp;#34;, since the measures taken assume to have, if any, a positive effect.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-4&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-4&#34;&gt;
A new R function: calculate_binomial_samplesize
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-4&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
After these considerations, I decided to write my own function. Below is the code, the function allows for &amp;#34;switching the continuity correction off&amp;#34;, and for differentiating between the one-sided and the two-sided case. In the two-sided case without continuity correction, it coincides with &amp;#34;Hmisc:bsamsize&amp;#34;, as can be seen from the example provided. &lt;/p&gt;
&lt;div class=&#34;src src-r&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; Calculate the Required Sample Size for Testing Binomial Differences&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @description&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; Based on the method of Fleiss, Tytun and Ury, this function tests the null&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; hypothesis p0 against p1 &amp;gt; p_0 in a one-sided or two-sided test with significance level&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; alpha and power beta.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @usage&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; calculate_binomial_samplesize(ratio0, p0, p1)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @param ratio0 Numeric, proportion of sample of observations in group 0, the control&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; group&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @param p1 Numeric, postulated binomial parameter in the treatment group.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @param p0 Numeric, postulated binomial parameter in the control group.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @param alpha Desired significance level for the test, defaults to 0.05&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @param beta Desired power for the test, defaults to 0.8&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @param one_sided Bool, whether the test is supposed to be one-sided or two-sided.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @param continuity_correction Bool, whether the sample size should be&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; Defaults to TRUE.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @return&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; A named numeric vector, containing the required sample size for the treatment group,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; the control group, and the required total (the sum of both numbers).&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @seealso [Hmisc::bsamsize()]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @author Sebastian Schweer \email{sastibe_r@@sastibe.de}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @references&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; Fleiss JL, Tytun A, Ury HK (1980): A simple approximation for calculating sample sizes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; for comparing independent proportions. Biometrics 36:343-346.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @examples&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;# Same result&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; alpha = 0.02; power = 0.9; fraction = 0.4; p_lower = 0.23; p_higher = 0.34&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; Hmisc::bsamsize(p1= p_lower, p2 = p_higher, fraction = fraction,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;                 alpha = alpha, power = power)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; calculate_binomial_samplesize(ratio0 = fraction, p1= p_higher, p0 = p_lower,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;          alpha = alpha, beta = power, one_sided = FALSE, continuity_correction = FALSE)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&amp;#39; @export&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;calculate_binomial_samplesize &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt;(ratio0,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                          p1,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                          p0,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                          alpha &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.05&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                          beta &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.8&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                          one_sided &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;TRUE&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                          continuity_correction &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;TRUE&lt;/span&gt;){
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;is.numeric&lt;/span&gt;(ratio0) &lt;span style=&#34;color:#f92672&#34;&gt;|&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;is.numeric&lt;/span&gt;(p1) &lt;span style=&#34;color:#f92672&#34;&gt;|&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;is.numeric&lt;/span&gt;(p0))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;stop&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Input parameters ratio0, p0 and p1 need to be numeric.&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;is.numeric&lt;/span&gt;(alpha) &lt;span style=&#34;color:#f92672&#34;&gt;|&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;is.numeric&lt;/span&gt;(beta))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;stop&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Input parameters alpha and beta need to be numeric.&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;max&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt;(alpha, beta, ratio0, p0, p1)) &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;|&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;min&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt;(alpha, beta, ratio0, p0, p1)) &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;stop&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Input parameters ratio0, p0, p1, alpha, beta need to be in the interval (0,1)&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  delta &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; p1 &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; p0             &lt;span style=&#34;color:#75715e&#34;&gt;# Nomenclature as in the paper&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  r &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt; ratio0 &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;          &lt;span style=&#34;color:#75715e&#34;&gt;# Uniting the definitions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(one_sided &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FALSE&lt;/span&gt;) {    &lt;span style=&#34;color:#75715e&#34;&gt;# Last statement of the paper&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    alpha &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; alpha &lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    delta &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;abs&lt;/span&gt;(p1 &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; p0)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  p_bar &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; (p0 &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; r&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;p1)&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;(r&lt;span style=&#34;color:#ae81ff&#34;&gt;+1&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  m_dash_1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;qnorm&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; alpha, mean &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, sd &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;sqrt&lt;/span&gt;((r&lt;span style=&#34;color:#ae81ff&#34;&gt;+1&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;p_bar&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; p_bar))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  m_dash_2 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;qnorm&lt;/span&gt;(beta, mean &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, sd &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;sqrt&lt;/span&gt;(p1&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;p1) &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; r&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;p0&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;p0))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  m_dash &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; ( m_dash_1 &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; m_dash_2 )^2 &lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt; (r &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; delta^2)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(continuity_correction &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;TRUE&lt;/span&gt;){
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    m_dash &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; m_dash &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; (r &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt; (r&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;delta)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt;(size_0 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; m_dash,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           size_1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; r&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;m_dash,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           size_overall &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; m_dash &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; r&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;m_dash))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;lt;img src=&amp;#34;&lt;a href=&#34;https://vg09.met.vgwort.de/na/dcc991e9cf814086bbfb2668d331085f&#34;&gt;https://vg09.met.vgwort.de/na/dcc991e9cf814086bbfb2668d331085f&lt;/a&gt;&amp;#34; width=&amp;#34;1&amp;#34; height=&amp;#34;1&amp;#34; alt=&amp;#34;&amp;#34;&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr class=&#34;footnotes-separatator&#34;&gt;
&lt;div class=&#34;footnote-definitions&#34;&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-1&#34;&gt;&lt;a href=&#34;#footnote-reference-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;Fleiss JL, Tytun A, Ury HK (1980): A simple approximation for calculating sample sizes for comparing independent proportions. Biometrics 36:343-6.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>New Feature on the Blog: Publication List</title>
      <link>https://www.sastibe.de/2019/09/new-feature-on-the-blog-publication-list/</link>
      <pubDate>Sun, 08 Sep 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2019/09/new-feature-on-the-blog-publication-list/</guid>
      <description>&lt;p&gt;
On &lt;a href=&#34;https://www.sastibe.de/publications/&#34;&gt;this page&lt;/a&gt; I have collected the bibliographic details of all the articles I have written, mainly of scientific (i.e. statistical) nature. I have written almost all of the scientific papers while under contract at a public university, either in Darmstadt or in Heidelberg. I have submitted all papers to journals which are edited and refereed by other scientists in presumably public institutions. Yet, for some reason, the results of the publically funded, publically relevant&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-1&#34; href=&#34;#footnote-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; research is NOT officially publically available. This doesn&amp;#39;t make sense. &lt;/p&gt;
&lt;p&gt;
Therefore I have included the DOIs in the bibliography, which make the search on Sci-Hub possible&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-2&#34; href=&#34;#footnote-2&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;. I am a big fan of Sci-Hub, and I do hope that at some point in the future it will become obsolete, because all scientific research is just publically availabe legally. Until such time, Sci-Hub is an acceptable approximation; as of this writing, all my articles were available&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-3&#34; href=&#34;#footnote-3&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr class=&#34;footnotes-separatator&#34;&gt;
&lt;div class=&#34;footnote-definitions&#34;&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-1&#34;&gt;&lt;a href=&#34;#footnote-reference-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;I&amp;#39;m comfortable with the assessment that my own research isn&amp;#39;t &lt;em&gt;that&lt;/em&gt; publicaly relevant. My point is still valid.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-2&#34;&gt;&lt;a href=&#34;#footnote-reference-2&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;But, you know, … don&amp;#39;t.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-3&#34;&gt;&lt;a href=&#34;#footnote-reference-3&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;… or so I have heard.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Chester (sorry, Liverpool) is the Most Popular City in the World (relative to use as password per inhabitant)</title>
      <link>https://www.sastibe.de/2019/02/chester-sorry-liverpool-is-the-most-popular-city-in-the-world-relative-to-use-as-password-per-inhabitant/</link>
      <pubDate>Fri, 08 Feb 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2019/02/chester-sorry-liverpool-is-the-most-popular-city-in-the-world-relative-to-use-as-password-per-inhabitant/</guid>
      <description>
&lt;p&gt;&amp;lt;b&amp;gt;Update 2018-02-17&amp;lt;/b&amp;gt;: The title of this article has changed reflecting new information I have received since publishing. For mor information, I refer to the last paragraph.&lt;/p&gt;
&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-1&#34;&gt;
A treasure trove of leaked passwords
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
The &lt;a href=&#34;https://api.pwnedpasswords.com/range/&#34;&gt;API of pwnedpasswords.com&lt;/a&gt; is quite remarkable. It not only allows you to fetch the results generally obtained by typing in your e-mail into the browser interface and finding out whether or not you&amp;#39;ve been &lt;em&gt;pwned&lt;/em&gt; from the comfort of your shell. It further allows you to very simply check whether a certain password has ever been used in any of the dumps they have, and if so, how often. Since haveibeenpwned.com has collected over 550 &lt;strong&gt;millions&lt;/strong&gt; of these in a multitude of data breaches, odds are your password might be amongst these. &lt;/p&gt;
&lt;p&gt;
Using the API is straightforward, but the way it is secured so that even pwnedpasswords.com &lt;em&gt;itself&lt;/em&gt; doesn&amp;#39;t know precisely which password or even password hash you are checking is ingenious, I highly recommend reading their &lt;a href=&#34;https://haveibeenpwned.com/API/v2#PwnedPasswords&#34;&gt;tutorial&lt;/a&gt;. The following R snippet allows for obtaining the number of hits for a vector of passwords:&lt;/p&gt;
&lt;div class=&#34;src src-r&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;library&lt;/span&gt;(httr)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;library&lt;/span&gt;(digest)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;library&lt;/span&gt;(plyr)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;library&lt;/span&gt;(dplyr)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;library&lt;/span&gt;(stringr)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;popularity &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt;(password){
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  passw_hash &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;digest&lt;/span&gt;(password, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sha1&amp;#34;&lt;/span&gt;, serialize &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FALSE&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  passw_front &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;toupper&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;substr&lt;/span&gt;(passw_hash, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  passw_back &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;toupper&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;substr&lt;/span&gt;(passw_hash, &lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;200&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  hashes &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;read.table&lt;/span&gt;(text &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;content&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;GET&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;paste0&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://api.pwnedpasswords.com/range/&amp;#34;&lt;/span&gt;, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                         passw_front)),
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                              encoding &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;UTF-8&amp;#34;&lt;/span&gt;),
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;               sep &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;:&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;%&amp;gt;%&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;rename&lt;/span&gt;(hashes &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; V1, count &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; V2) &lt;span style=&#34;color:#f92672&#34;&gt;%&amp;gt;%&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;filter&lt;/span&gt;(hashes &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; passw_back) &lt;span style=&#34;color:#f92672&#34;&gt;%&amp;gt;%&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;mutate&lt;/span&gt;(password &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; password) &lt;span style=&#34;color:#f92672&#34;&gt;%&amp;gt;%&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;select&lt;/span&gt;(password, count)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;nrow&lt;/span&gt;(hashes) &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;){
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    hashes &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;tibble&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;password&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; password, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;count&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt;(hashes)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-2&#34;&gt;
City names as passwords
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Using this function allows us to search through various ranges of passwords. For instance, let&amp;#39;s see how many people have chosen the names of cites in Baden-Württemberg as their passwords&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-1&#34; href=&#34;#footnote-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;City Name&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Number of Usages as Password&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Freiburg&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;3077&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stuttgart&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;9496&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Karlsruhe&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;1426&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heidelberg&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;4081&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mannheim&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;5040&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Konstanz&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;924&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
It seems like the city name &amp;#34;stuttgart&amp;#34; appears most often in the password list, yet that is not incredibly surprising, as it is also the largest city. A plot of the number of password hits in relation to the number of inhabitants&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-2&#34; href=&#34;#footnote-2&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; looks like this:&lt;/p&gt;
&lt;p&gt;
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1549667554/plot_passwords_bw_lqcu8b.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1549667554/plot_passwords_bw_lqcu8b.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1549667554/plot_passwords_bw_lqcu8b.png&#34; /&gt;&amp;#34; width=&amp;#34;438&amp;#34; height=&amp;#34;481&amp;#34; alt=&amp;#34;&amp;#34;/&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt; The red circle describes the number of inhabitants, the black circle the number of usages as password. The plot was created with &lt;a href=&#34;https://github.com/dkahle/ggmap&#34;&gt;ggmap&lt;/a&gt;. &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;
Quite obviously, the ratio of &amp;#34;number of uses of city name as password&amp;#34; and &amp;#34;number of inhabitants&amp;#34;, i.e. &amp;#34;Use of City Name as Password per Inhabitant&amp;#34; differs from city to city. It seems like this ratio is higher for the cities Heidelberg and Freiburg, each of which is known for a high quality of living and a very picturesque old town. So, let&amp;#39;s look at some international (and especially British) competition:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;City Name&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Inhabitants&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Number of Usages as Password&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;City Names as Password per 1000 Inhabitants&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Liverpool&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;473073&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;280723&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;593.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manchester&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;520215&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;98831&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;190.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oxford&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;161291&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;23069&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;143.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cambridge&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;151832&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;12648&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;83.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heidelberg&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;160601&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;4081&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;25.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;London&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;8787892&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;196220&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;22.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mannheim&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;307997&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;5040&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;16.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paris&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;2190327&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;28699&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;13.1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Berlin&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;3613495&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;40952&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;11.3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
In this longer list, the effect of having a famous football team (&lt;em&gt;Liverpool&lt;/em&gt;, &lt;em&gt;Manchester&lt;/em&gt;) as well as having a famous university in a small city (&lt;em&gt;Oxford&lt;/em&gt;, &lt;em&gt;Cambridge&lt;/em&gt; and &lt;em&gt;Heidelberg&lt;/em&gt;) becomes obvious. In other words, it&amp;#39;s not so much about how many people &lt;strong&gt;live&lt;/strong&gt; in a certain city, but how many people &lt;strong&gt;feel a positive connection&lt;/strong&gt; to that particular city, by loyality of a sports team or by time spent at the university. &lt;/p&gt;
&lt;p&gt;
Let me conclude this article by pointing out the obvious question: &amp;#34;Can any city beat Liverpool&amp;#34; in this contest? All my manual samples have so far yielded good results, but nothing close to Liverpools numbers, for instance:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;City Name&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Inhabitants&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Number of Usages as Password&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;City Names as Password per 1000 Inhabitants&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Liverpool&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;473073&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;280723&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;593.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Green Bay&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;105139&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;23069&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;143.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Barcelona&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;1620805&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;152196&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;129.9&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Thus, until futher notice, I proclaim hereby that &lt;strong&gt;Liverpool is the most popular city in the world (relative to password use per inhabitant)&lt;/strong&gt;. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-3&#34;&gt;
Update 2018-02-17: Chester has overtaken Liverpool
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;I published this post on Feburary 8th and have since received feedback concerning the core result of this post (i.e. which city is the most popular), in particular, the following tweet:
&amp;lt;blockquote class=&amp;#34;twitter-tweet&amp;#34; data-lang=&amp;#34;de&amp;#34;&amp;gt;&amp;lt;p lang=&amp;#34;en&amp;#34; dir=&amp;#34;ltr&amp;#34;&amp;gt;Actually, the use of Chester as a password beats Liverpool on the same metric. 117,128 occurrences for a population of 118.200, i.e. 990.9 per 1000 population. cc &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://twitter.com/CheshireLive?ref_src=twsrc&#34;&gt;https://twitter.com/CheshireLive?ref_src=twsrc&lt;/a&gt;%5Etfw&amp;#34;&amp;gt;@CheshireLive&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;amp;mdash; John Murray (@MurrayData) &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://twitter.com/MurrayData/status/1094957209400893440?ref_src=twsrc&#34;&gt;https://twitter.com/MurrayData/status/1094957209400893440?ref_src=twsrc&lt;/a&gt;%5Etfw&amp;#34;&amp;gt;11. Februar 2019&amp;lt;/a&amp;gt;&amp;lt;/blockquote&amp;gt;
&amp;lt;script async src=&amp;#34;&lt;a href=&#34;https://platform.twitter.com/widgets.js&#34;&gt;https://platform.twitter.com/widgets.js&lt;/a&gt;&amp;#34; charset=&amp;#34;utf-8&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;
@MurrayData is correct of course, &amp;#34;chester&amp;#34; has 117128 occurrences in the data base. &amp;#34;Chester&amp;#34; is not only a city name, however, but also a Christian name, and in particular that of the late lead singer of Linkin Park, &lt;a href=&#34;https://en.wikipedia.org/wiki/Chester_Bennington&#34;&gt;Chester Bennington&lt;/a&gt;. It is plausible that many of these passwords are disconnected from the city itself. Yet the same argument hoilds for soccer teams as I had already pointed out in my original post, thus I opted to ignore these distortions,  and I hereby present the new, updated table:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;City Name&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Inhabitants&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Number of Usages as Password&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;City Names as Password per 1000 Inhabitants&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chester&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;118200&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;117128&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;990.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Liverpool&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;473073&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;280723&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;593.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manchester&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;520215&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;98831&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;190.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oxford&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;161291&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;23069&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;143.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cambridge&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;151832&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;12648&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;83.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heidelberg&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;160601&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;4081&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;25.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;London&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;8787892&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;196220&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;22.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mannheim&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;307997&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;5040&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;16.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paris&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;2190327&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;28699&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;13.1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Berlin&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;3613495&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;40952&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;11.3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr class=&#34;footnotes-separatator&#34;&gt;
&lt;div class=&#34;footnote-definitions&#34;&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-1&#34;&gt;&lt;a href=&#34;#footnote-reference-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;Rules are &amp;#34;only lowercase letters, spaces are eliminated&amp;#34;. So for &amp;#34;New York&amp;#34; I looked for usage of &amp;#34;newyork&amp;#34;, for instance. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-2&#34;&gt;&lt;a href=&#34;#footnote-reference-2&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;Numbers of inhabitants as taken from wikipedia.org.&lt;/p&gt;
&lt;p&gt;
&amp;lt;img src=&amp;#34;&lt;a href=&#34;https://vg09.met.vgwort.de/na/467d35fecb3247b086d3f85fff2a7813&#34;&gt;https://vg09.met.vgwort.de/na/467d35fecb3247b086d3f85fff2a7813&lt;/a&gt;&amp;#34; width=&amp;#34;1&amp;#34; height=&amp;#34;1&amp;#34; alt=&amp;#34;&amp;#34;&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Tired of Waiting for your R Scripts to Finish? Let AWS do the Work, Get Notified by E-Mail</title>
      <link>https://www.sastibe.de/2018/09/running-r-on-aws-email-notification/</link>
      <pubDate>Thu, 27 Sep 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2018/09/running-r-on-aws-email-notification/</guid>
      <description>
&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-1&#34;&gt;
The Setting: Avoiding 4 Weeks of Runtime
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
Recently, I was faced with a problem: I had written a rather complex simulation of a discrete time queueing network, and I needed to let this simulation run&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;with some repetitions of the entire simulation,&lt;/li&gt;
&lt;li&gt;for some varying different parameter values,&lt;/li&gt;
&lt;li&gt;with many observations (i.e. ~ 2.000.000 observation).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The goal was to verify that a new estimating procedure for such queueing networks provides sensible results. For more details on the matter, I refer interested readers to my previous articles on this topic, available &lt;a href=&#34;https://www.tandfonline.com/doi/abs/10.1080/15326349.2015.1060862&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://www.sciencedirect.com/science/article/pii/S0304414914002087&#34;&gt;here&lt;/a&gt;, or under the DOIs &lt;strong&gt;10.1080/15326349.2015.1060862&lt;/strong&gt; and &lt;strong&gt;10.1016/j.spa.2014.09.003&lt;/strong&gt; for all you fans of SciHub&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-1&#34; href=&#34;#footnote-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; out there .&lt;/p&gt;
&lt;p&gt;
Anyways, the situation described above wouldn&amp;#39;t be problematic as such, but the runtime for a single one of these simulations increased exponentially: for 1500 observations it ran ~ 0.3 secs, for 15000 ~ 9 secs, and for 30000 ~ 38 secs. My goal was to reach 1.500.000 observations for at least 3 times, so that I was facing (by very rough calculations, of course), 2430000 seconds, or a 4 week marathon, in which my laptop would be doing nothing else but crunching numbers. &lt;/p&gt;
&lt;p&gt;
Naturally, I wanted to avoid that and considered using Amazon AWS service for this task. I have described this in &lt;a href=&#34;https://www.sastibe.de/2018/03/benchmarking-aws-instances/&#34;&gt;a recent blog post&lt;/a&gt; (and to make it clear: I don&amp;#39;t get any money from AWS, I just like their usability). However, my requirements were a bit stricter than last time, I needed a workflow that&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Starts up a decent sized AWS instance for my calculation,&lt;/li&gt;
&lt;li&gt;Puts my entire simulation code on this instance,&lt;/li&gt;
&lt;li&gt;Starts the simulation with a freely chosen parameter setting,&lt;/li&gt;
&lt;li&gt;Notifies me by mail as soon as the simulation was done.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The last point was important since I was planning on using larger instance types, and AWS bills by the hour. Obviously, I didn&amp;#39;t want to let precious money go to waste, so I needed a trigger to terminate the instance as soon as the simulation was over. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-2&#34;&gt;
The Step-by-Step Guide:
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-2&#34;&gt;
&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-3&#34;&gt;
Setting up the AWS instance
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
&lt;a href=&#34;https://www.sastibe.de/2018/01/setting-up-a-scalable-rstudio-instance-in-aws/&#34;&gt;I have previouly posted a detailed description&lt;/a&gt; for how to set up an AWS instance, and that walkthrough guide is still viable. In a nutshell, the core ingredients are&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;an AWS account, &lt;/li&gt;
&lt;li&gt;the RStudio AMI of &lt;a href=&#34;http://www.louisaslett.com/RStudio_AMI/&#34;&gt;Louis Aslett&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;a security group that allows ssh and html access,&lt;/li&gt;
&lt;li&gt;the correct specification of the instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the latter, &lt;em&gt;correct specification&lt;/em&gt; is obviously a non-trivial requirement. &lt;a href=&#34;https://www.sastibe.de/2018/03/benchmarking-aws-instances/&#34;&gt;In my benchmark test&lt;/a&gt; for AWS instances I was aiming at a RAM intense task and ended up with a recommendation for the &amp;#34;r4&amp;#34; instance class. In my use case, however, the CPU performance was decisive. For this reason, I opted for a c5.large instance, but your experiences may vary.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-4&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-4&#34;&gt;
Setting up E-Mail transmission from the instance
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-4&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
Once the AWS instance is up an running, I needed to enable it to send mails, for this I followed this post &lt;a href=&#34;http://edoceo.com/howto/ssmtp#ses&#34;&gt;here&lt;/a&gt;. One first needs to install the necessary software by connecting to the instance via ssh and installing&lt;/p&gt;
&lt;div class=&#34;src src-bash&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt-get install ssmptp mpack&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;ssmtp&lt;/strong&gt; allows for the configuration of the SMTP sending, &lt;strong&gt;mpack&lt;/strong&gt; makes for an easy CLI for sending e-mails with attachments. Now, we need to tell the instance which E-Mail client to use for outgoing mail. In my case, I used my Google mail address for this purpose. Unfortunately, this path necessitates that the password to the gmail account needs to be saved unencrypted in the file &lt;strong&gt;/etc/ssmtp/ssmtp.conf&lt;/strong&gt;, like so:&lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Config file for sSMTP sendmail
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# The person who gets all mail for userids &amp;lt; 1000
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Make this empty to disable rewriting.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root=sastibe.aws@gmail.com
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# The place where the mail goes. The actual machine name is required no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# MX records are consulted. Commonly mailhosts are named mail.domain.com
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mailhub=smtp.gmail.com:587
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Where will the mail seem to come from?
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#rewriteDomain=
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# The full hostname
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hostname=*****
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Are users allowed to set their own From: address?
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# YES - Allow the user to specify their own From: address
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# NO - Use the system generated From: address
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;FromLineOverride=YES
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AuthUser=sastibe.aws@gmail.com
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AuthPass=**************
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;UseSTARTTLS=YES
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;UseTLS=YES&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
In order for gmail to accept this unencrypted password, you need to checkmark the option for allowing &amp;#39;less secure apps&amp;#39; to access your mail, in Google settings under &amp;#39;Sign in and security&amp;#39;:
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1537995042/screenshot_google_less_secure_fzmd3o.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1537995042/screenshot_google_less_secure_fzmd3o.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1537995042/screenshot_google_less_secure_fzmd3o.png&#34; /&gt;&amp;#34; alt=&amp;#34;&amp;#34;/&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt; Doesn&amp;#39;t feel right to click it, does it? &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
As you can probably gather from the e-mail adress in the code snippet, &lt;em&gt;sastibe.aws@gmail.com&lt;/em&gt; is just a throw-away address for precisely this reason: I did not want to leave my real gmail account open to vulnerabilities. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-5&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-5&#34;&gt;
Getting R Code on the Instance
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-5&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
This step is ostensibly simple, since you can just copy and paste the code to the RStudio window in your browser. &lt;strong&gt;But&lt;/strong&gt; I did it differently: I wrote my simulation as an R package (a very nice and straightforward how-to can be found &lt;a href=&#34;https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/&#34;&gt;here&lt;/a&gt;). Writing a package comes with many advantages by forcing you to be clean on &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;documentation&lt;/li&gt;
&lt;li&gt;testing&lt;/li&gt;
&lt;li&gt;putting functionality in functions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Furthermore, since used Git with a remote repository on GitLab for version control, I am able to call my entire code with a simple &lt;/p&gt;
&lt;div class=&#34;src src-r&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;install.packages&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;devtools&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;devtools&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;install_git&lt;/span&gt;(url &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://gitlab.com/sastibe/spa_queueingnetwork&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                       branch &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;dev&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;library&lt;/span&gt;(queueingnetworkR)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-6&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-6&#34;&gt;
Start the Simulation and the E-Mail notification
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-6&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
After all these preliminary steps this is the simplest of them all. I log on the RStudio instance by navigating to the public DNS, using the credentials &amp;#34;rstudio&amp;#34; and the (AWS) instance_id as password. Then, I simply choose an appropriate set of parameter values steering the simulation and call just one tailor-made function. Admittedly, this function was written with exactly this use case in mind, so your script lengths might vary. In my case, this was the entire run script I pasted into the RStudio on the AWS instance:&lt;/p&gt;
&lt;div class=&#34;src src-r&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;install.packages&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;devtools&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;devtools&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;install_git&lt;/span&gt;(url &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://gitlab.com/sastibe/spa_queueingnetwork&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                       branch &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;master&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;library&lt;/span&gt;(queueingnetworkR)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;p_12 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;p_21 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;n_obs &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;burn_in &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;5000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;lambda_1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.8&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;lambda_2 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;G_1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.6&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;G_2 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;firstrun &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;present_estimates&lt;/span&gt;(n_reps &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, max_lag &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;, p_12 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; p_12, p_21 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; p_21, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                              n_obs &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; n_obs, burn_in &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; burn_in, lambda_1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; lambda_1,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                              lambda_2 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; lambda_2, G_1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; G_1, G_2 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; G_2, progress &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;TRUE&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;save&lt;/span&gt;(firstrun, file &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;resultate.zip&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;ggsave&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;result_G2_plot.png&amp;#34;&lt;/span&gt;, plot &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; firstrun&lt;span style=&#34;color:#f92672&#34;&gt;$&lt;/span&gt;plot_result_G2, device &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;png&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;system&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;paste0&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;mpack -s &amp;#39;Skript durchgelaufen mit &amp;#34;&lt;/span&gt;, n_obs, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34; Beobachtungen: Plot G2&amp;#39; result_G2_plot.png sastibear@gmx.de&amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;system&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;paste0&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;mpack -s &amp;#39;Skript durchgelaufen mit &amp;#34;&lt;/span&gt;, n_obs, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34; Beobachtungen: Daten&amp;#39; resultate.zip sastibear@gmx.de&amp;#34;&lt;/span&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
The last two lines are a simple system call of the function &lt;strong&gt;mpack&lt;/strong&gt;, which uses the credentials provided in Step X to send a mail from my GMail account to &amp;#34;sastibear@gmx.de&amp;#34;, and attaching the plotted file &lt;em&gt;G2_result_plot.png&lt;/em&gt; as an attachment. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-7&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-7&#34;&gt;
Receive the Glorious Results
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-7&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
I started the script above on a Friday afternoon, and received the following e-mail on Monday:
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1537994680/screenshot_aws_mail_fjiqmx.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1537994680/screenshot_aws_mail_fjiqmx.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1537994680/screenshot_aws_mail_fjiqmx.png&#34; /&gt;&amp;#34; alt=&amp;#34;&amp;#34; /&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt;Boom, Publishable!&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-8&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-8&#34;&gt;
Is it Worth the Effort?
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-8&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
In short: yes. Longer version: The answer to this question obviously depends on the metric. In terms of time elapsed, the calculation is simple: 4 weeks on my personal laptop vs. 3 days on AWS is a very one-sided competition. But let&amp;#39;s try to look at the monetary aspect:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Calculation on…&lt;/th&gt;
&lt;th&gt;Duration&lt;/th&gt;
&lt;th&gt;Cost / hour&lt;/th&gt;
&lt;th&gt;Type of Cost&lt;/th&gt;
&lt;th&gt;Cost total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Laptop&lt;/td&gt;
&lt;td&gt;4 weeks&lt;/td&gt;
&lt;td&gt;0,87 Cents&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-2&#34; href=&#34;#footnote-2&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;td&gt;Electricity&lt;/td&gt;
&lt;td&gt;5,84 €&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AWS&lt;/td&gt;
&lt;td&gt;3 days&lt;/td&gt;
&lt;td&gt;9,7 US Cents&lt;/td&gt;
&lt;td&gt;AWS fee&lt;/td&gt;
&lt;td&gt;5,82 €&lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-3&#34; href=&#34;#footnote-3&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Well, that&amp;#39;s … surprising? To be quite honest, I started calculating this comparison under the strong preconception that AWS must surely be more expensive. Yet the accumulation of runtime over 4 weeks is enough to give the Amazon server farm the edge over my old-school laptop solution, thus cloud computing takes the cake once more. Hooray for technological progress!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr class=&#34;footnotes-separatator&#34;&gt;
&lt;div class=&#34;footnote-definitions&#34;&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-1&#34;&gt;&lt;a href=&#34;#footnote-reference-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;I am one of them.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-2&#34;&gt;&lt;a href=&#34;#footnote-reference-2&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;Calculated with an average consumption of 30 Watts an hour an an average electricity price of 0.29 € per kWh.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-3&#34;&gt;&lt;a href=&#34;#footnote-reference-3&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;With an exchange rate of 0,85 $ to 1 €.&lt;/p&gt;
&lt;p&gt;
&amp;lt;img src=&amp;#34;&lt;a href=&#34;https://vg09.met.vgwort.de/na/93d30875179a47ba91740fa1fc735c5e&#34;&gt;https://vg09.met.vgwort.de/na/93d30875179a47ba91740fa1fc735c5e&lt;/a&gt;&amp;#34; width=&amp;#34;1&amp;#34; height=&amp;#34;1&amp;#34; alt=&amp;#34;&amp;#34;&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Registering my Blog at the VG Wort</title>
      <link>https://www.sastibe.de/2018/07/registering-my-blog-at-the-vg-wort/</link>
      <pubDate>Tue, 17 Jul 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2018/07/registering-my-blog-at-the-vg-wort/</guid>
      <description>
&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-1&#34;&gt;
Suddenly, Attention
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
So, it seems like my blog is getting some attention. Recently, I was even featured on the front page of &lt;a href=&#34;https://news.ycombinator.com/&#34;&gt;Hacker News&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/c_crop,w_2745/v1528541746/Number17onHackerNews_qw8gsp.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/c_crop,w_2745/v1528541746/Number17onHackerNews_qw8gsp.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/c_crop,w_2745/v1528541746/Number17onHackerNews_qw8gsp.png&#34; /&gt;&amp;#34; alt=&amp;#34;Of course I made a screenshot&amp;#34; /&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt;Number 17… only 16 more to go!&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;
Obviously, I am delighted and flattered by the number of people reading and discussing my blog. But since &lt;a href=&#34;https://www.youtube.com/watch?v%3D6p-lDYPR2P8&#34;&gt;we&amp;#39;re living in a material world, and I am a material guy&lt;/a&gt;, I kept on wondering &amp;#34;is there any way to monetize this in an ethical way?&amp;#34;. Obviously, advertisements are out of the question, but are there other ways?&lt;/p&gt;
&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-2&#34;&gt;
VG Wort
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;The VG Wort, or &lt;a href=&#34;https://de.wikipedia.org/wiki/Verwertungsgesellschaft_Wort&#34;&gt;Verwertungsgesellschaft Wort&lt;/a&gt; is a German association tasked with collecting and distributing profits made secondary exploitation rights of original textual contents. Essentially, it tries to reimburse authors and journalists for the money they &amp;#34;lose&amp;#34; by texts that are copied or digitally reproduced and thus &amp;#34;free of charge&amp;#34;. The money received by the VG Wort stems mostly from so ca
lled &lt;em&gt;Kopierabgabegeräten&lt;/em&gt; &lt;sup class=&#34;footnote-reference&#34;&gt;&lt;a id=&#34;footnote-reference-1&#34; href=&#34;#footnote-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-3&#34;&gt;
A Step-by-Step Guide for registering your Blog at VG Wort
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;In what follows, I recount the steps I needed to take to register my first blog post in VG Wort. Note that all of these steps are exclusively available to &lt;strong&gt;German citizens&lt;/strong&gt;, which is unfortunate: An internanationally available solution like the one provided by VG Wort for &amp;#34;making money on the internet without resorting to ads&amp;#34; could have beneficial consequences for everyone. But I digress…&lt;/p&gt;
&lt;div id=&#34;outline-container-headline-4&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-4&#34;&gt;
Registering an account
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-4&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;New authors nedd to first register an account, this can be done &lt;a href=&#34;https://tom.vgwort.de/portal/login&#34;&gt;here.&lt;/a&gt; I already had my account set up for my &lt;a href=&#34;https://scholar.google.de/citations?user%3DtOqnGjgAAAAJ&amp;amp;hl%3Dde&#34;&gt;scientific papers&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-5&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-5&#34;&gt;
Registering a blog post
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-5&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;The first informational page on how to register a blog post is given &lt;a href=&#34;https://www.vgwort.de/verguetungen/auszahlungen/texte-im-internet.html&#34;&gt;here&lt;/a&gt;. It states the following preliminaries have to be met:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The blog post has to contain at least 1800 characters (including whitespaces)&lt;/li&gt;
&lt;li&gt;There my be no copy-restriction on the resulting file (DRM)&lt;/li&gt;
&lt;li&gt;The text was read by a certain number of people, counted by a VG Wort tracking pixel, or &amp;#34;Zählmarke&amp;#34;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Obtaining the &lt;em&gt;Zählmarken&lt;/em&gt; is straightforward: In my VG Wort Account for the &amp;#34;registration of texts online&amp;#34;, or &lt;em&gt;Texte online melden&lt;/em&gt;, i.e. T.O.M. in German, I was able to order 100 &lt;em&gt;Zählmarken&lt;/em&gt; as a somewhat weirdly formatted csv:&lt;/p&gt;
&lt;p&gt;
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1531865363/zaehlmarken_dummy_xdfm87.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1531865363/zaehlmarken_dummy_xdfm87.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1531865363/zaehlmarken_dummy_xdfm87.png&#34; /&gt;&amp;#34; alt=&amp;#34;Ahh, LibreOfficeCalc in all its … beauty&amp;#34;/&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt;Nevermind the encoding problems… but repeating the header for each line? C&amp;#39;mon!&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-6&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-6&#34;&gt;
Keeping Track of the &lt;em&gt;Zählmarken&lt;/em&gt;
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-6&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;Seeing the poorly formatted csv made me realize I needed to keep track of my &lt;em&gt;Marken&lt;/em&gt; in a more sensible way. So I came up with the following (dummy) org-table:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Filename Zaehlmarke&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;No.&lt;/th&gt;
&lt;th&gt;Public Key&lt;/th&gt;
&lt;th&gt;Private Key&lt;/th&gt;
&lt;th&gt;Post URL&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;No. Characters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;vgwort_1.csv&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;1&lt;/td&gt;
&lt;td&gt;&amp;#34;https://vg09.met.vgwort.de/na/foo&amp;#34;&lt;/td&gt;
&lt;td&gt;bar&lt;/td&gt;
&lt;td&gt;2018-01-27-setting-up-a-scalable-rstudio-instance-in-aws.html&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;12200&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-7&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-7&#34;&gt;
Counting the number of characters in all the blog posts using hugo
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-7&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;My blog is written in &lt;a href=&#34;https://gohugo.io/&#34;&gt;hugo&lt;/a&gt;, I&amp;#39;m using the &lt;a href=&#34;https://themes.gohugo.io/hugo-tranquilpeak-theme/&#34;&gt;Tranquilpeak&lt;/a&gt; theme to be precise. Even though I write &lt;a href=&#34;http://www.sastibe.de/2018/05/2018-05-11-emacs-org-mode-rest-apis-stocks/&#34;&gt;most of my articles in org-mode&lt;/a&gt; nowadays, there&amp;#39;s still quite a lot of HTML clutter in my source files. How to count the characters excluding such &amp;#34;meta-characters&amp;#34;? &lt;/p&gt;
&lt;p&gt;
My solution is a bit indirect, but it works quite well. For my RSS feed, I customized the template &lt;a href=&#34;https://gohugo.io/templates/rss/#the-embedded-rss-xml&#34;&gt;rss.xml&lt;/a&gt; in order to read&lt;/p&gt;
&lt;div class=&#34;src src-go&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {{ &lt;span style=&#34;color:#a6e22e&#34;&gt;with&lt;/span&gt; .&lt;span style=&#34;color:#a6e22e&#34;&gt;Site&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Author&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;email&lt;/span&gt; }}&amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;author&lt;/span&gt;&amp;gt;{{.}}{{ &lt;span style=&#34;color:#a6e22e&#34;&gt;with&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;$&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Site&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Author&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;name&lt;/span&gt; }} ({{.}}){{&lt;span style=&#34;color:#a6e22e&#34;&gt;end&lt;/span&gt;}}&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;author&lt;/span&gt;&amp;gt;{{&lt;span style=&#34;color:#a6e22e&#34;&gt;end&lt;/span&gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;guid&lt;/span&gt;&amp;gt;{{ .&lt;span style=&#34;color:#a6e22e&#34;&gt;Permalink&lt;/span&gt; }}&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;guid&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;description&lt;/span&gt;&amp;gt;{{ .&lt;span style=&#34;color:#a6e22e&#34;&gt;Content&lt;/span&gt; | &lt;span style=&#34;color:#a6e22e&#34;&gt;html&lt;/span&gt; }}&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;description&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The small alteration of using &lt;strong&gt;.Content&lt;/strong&gt; instead of the default &lt;strong&gt;.Summary&lt;/strong&gt; is, that my feed contains &amp;#34;full content&amp;#34;, i.e. the entire post. In order to count the characters in all of my posts, however, I alter the respective line to read&lt;/p&gt;
&lt;div class=&#34;src src-go&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {{ &lt;span style=&#34;color:#a6e22e&#34;&gt;with&lt;/span&gt; .&lt;span style=&#34;color:#a6e22e&#34;&gt;Site&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Author&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;email&lt;/span&gt; }}&amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;author&lt;/span&gt;&amp;gt;{{.}}{{ &lt;span style=&#34;color:#a6e22e&#34;&gt;with&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;$&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Site&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Author&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;name&lt;/span&gt; }} ({{.}}){{&lt;span style=&#34;color:#a6e22e&#34;&gt;end&lt;/span&gt;}}&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;author&lt;/span&gt;&amp;gt;{{&lt;span style=&#34;color:#a6e22e&#34;&gt;end&lt;/span&gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;guid&lt;/span&gt;&amp;gt;{{ .&lt;span style=&#34;color:#a6e22e&#34;&gt;Permalink&lt;/span&gt; }}&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;guid&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;description&lt;/span&gt;&amp;gt;{{ .&lt;span style=&#34;color:#a6e22e&#34;&gt;Plain&lt;/span&gt; | &lt;span style=&#34;color:#a6e22e&#34;&gt;html&lt;/span&gt; }}&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;description&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;hugo&lt;/strong&gt; uses &lt;strong&gt;.Plain&lt;/strong&gt; to wipe away all HTML parts of the content. Hence, I can build my blog locally, open the resulting &lt;strong&gt;index.xml&lt;/strong&gt; in emacs (obviously) and run &lt;code&gt;M-=&lt;/code&gt; on the post. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-8&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-8&#34;&gt;
How much money is in it, though?
&lt;/h2&gt;
&lt;div id=&#34;outline-text-headline-8&#34; class=&#34;outline-text-2&#34;&gt;
&lt;p&gt;
As for this question, I have no answer yet. As of the publishing of this post, I have implemented the &lt;em&gt;Zählmarken&lt;/em&gt; in all of the posts, corrected the &lt;em&gt;Datenschutzerklärung&lt;/em&gt; (again, obviously) and am now waiting for results. If I understand the process correctly, I will have news by July next year. So, let&amp;#39;s see, eh?&lt;/p&gt;
&lt;p&gt;
&amp;lt;img src=&amp;#34;&lt;a href=&#34;https://vg09.met.vgwort.de/na/827bcdab5ada45d89bae2421cad93345&#34;&gt;https://vg09.met.vgwort.de/na/827bcdab5ada45d89bae2421cad93345&lt;/a&gt;&amp;#34; width=&amp;#34;1&amp;#34; height=&amp;#34;1&amp;#34; alt=&amp;#34;&amp;#34;&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-9&#34; class=&#34;outline-2&#34;&gt;
&lt;h2 id=&#34;headline-9&#34;&gt;
Footnotes
&lt;/h2&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr class=&#34;footnotes-separatator&#34;&gt;
&lt;div class=&#34;footnote-definitions&#34;&gt;
&lt;div class=&#34;footnote-definition&#34;&gt;
&lt;sup id=&#34;footnote-1&#34;&gt;&lt;a href=&#34;#footnote-reference-1&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;div class=&#34;footnote-body&#34;&gt;
&lt;p&gt;I love the German language. It seems like no word can be considered official enough for law texts unless it has at least 5 syllables.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>It&#39;s here: Org Agenda for the World Cup 2018</title>
      <link>https://www.sastibe.de/2018/06/its-here-org-agenda-for-the-world-cup-2018/</link>
      <pubDate>Tue, 05 Jun 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2018/06/its-here-org-agenda-for-the-world-cup-2018/</guid>
      <description>&lt;p&gt;
As &amp;lt;a href=&amp;#34;&lt;em&gt;2018/05/2018-05-11-emacs-org-mode-rest-apis-stocks&lt;/em&gt;&amp;#34;&amp;gt;I recently pointed out&amp;lt;/a&amp;gt;, I have grown rather fond of Emacs and org-mode especially in recent months. On an entirely unrelated note, the FIFA world cup is right around the corner. Wouldn&amp;#39;t it be nice to combine my passion for the greatest sport in the world (even including all the inevitable diving, arguing with the referees etc…) with my new-found passion for clear and concise org-agendas?&lt;/p&gt;
&lt;p&gt;
&amp;lt;div class=&amp;#34;figure&amp;#34;&amp;gt;
&amp;lt;img src=&amp;#34;&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1528226008/Org-Mode-WorldCup_fh4zkm.png&#34; alt=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1528226008/Org-Mode-WorldCup_fh4zkm.png&#34; title=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1528226008/Org-Mode-WorldCup_fh4zkm.png&#34; /&gt;&amp;#34; alt=&amp;#34;Only 90 kids will remember&amp;#34; /&amp;gt;
&amp;lt;p class=&amp;#34;caption&amp;#34;&amp;gt;Just so…&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;
A short Google research lead to these two GitHub repositories for the &lt;a href=&#34;https://github.com/djcb/org-euro2012/&#34;&gt;Euro 2012&lt;/a&gt; and the &lt;a href=&#34;https://github.com/ruediger/org-world-cup2014&#34;&gt;World Cup 2014&lt;/a&gt;. As I couldn&amp;#39;t find anything similar for the World Cup 2018, I decided to create it myself.&lt;/p&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/sebastianschweer/org-world-cup-2018&#34;&gt;Here is the result&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
The content of the schedule is as accurate as I could manage: I read the contents of the &lt;a href=&#34;https://fixturedownload.com/download/fifa-world-cup-2018-RussianStandardTime.csv&#34;&gt;raw data&lt;/a&gt; into the desired org format via regex (in Emacs, obviously) and manually checked the results against the entries on the &lt;a href=&#34;https://en.wikipedia.org/wiki/2018_FIFA_World_Cup&#34;&gt;wiki page&lt;/a&gt;. Writing the regex  was actually … rather fun? A bit weird since it wasn&amp;#39;t pretty, let me show you the first few symbols:&lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;replace-regexp &amp;lt;RET&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;|\s-+\([0-9]\{1,2\}\) |\([^|]+....&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Anyways, it worked, and the result is anyone&amp;#39;s to enjoy. For the record, let me state clearly that &lt;strong&gt;I Do Not Intend To Update The Scores In The Repository&lt;/strong&gt; in any timely fashion. If I get to it, I will, but let&amp;#39;s see. &lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Use Emacs Org Mode and REST APIs for an up-to-date Stock Portfolio</title>
      <link>https://www.sastibe.de/2018/05/2018-05-11-emacs-org-mode-rest-apis-stocks/</link>
      <pubDate>Fri, 11 May 2018 23:13:13 +0200</pubDate>
      
      <guid>https://www.sastibe.de/2018/05/2018-05-11-emacs-org-mode-rest-apis-stocks/</guid>
      <description>
&lt;p&gt;A couple of weeks ago, I started to work with &lt;a href=&#34;https://www.gnu.org/software/emacs/&#34;&gt;Emacs&lt;/a&gt;, and I grow fonder of it every day. During a very short time period, it has become my go-to editor for nearly everything I do on my computer, including (but not limited to)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;planning my Todos (in &lt;a href=&#34;https://orgmode.org/&#34;&gt;org-mode&lt;/a&gt;, to be precise),&lt;/li&gt;
&lt;li&gt;setting up my agenda (org-mode again),&lt;/li&gt;
&lt;li&gt;taking memos during meetings&lt;/li&gt;
&lt;li&gt;writing my (longer) e-mails&lt;/li&gt;
&lt;li&gt;play around with new stuff&lt;/li&gt;
&lt;li&gt;write blog posts (this is the first of these…)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is difficult to pin down exactly why Emacs is taking over so much. My main influences for starting with EMACS were blogposts, &lt;a href=&#34;https://blog.fugue.co/2015-11-11-guide-to-emacs.html&#34;&gt;the first&lt;/a&gt; describing a general EMACS setup, &lt;a href=&#34;https://emacs.cafe/emacs/orgmode/gtd/2017/06/30/orgmode-gtd.html&#34;&gt;the second&lt;/a&gt; detailing how to implement GTD, i.e. &lt;a href=&#34;https://en.wikipedia.org/wiki/Getting_Things_Done&#34;&gt;Getting Things Done&lt;/a&gt; in Emacs org-mode.&lt;/p&gt;
&lt;p&gt;
In this post, I will demonsrate the strengths of using Emacs in a very specific use case: Getting up-to-date financial data to use in a spread-sheet including all your financial data. Applications like these are usually provided by online banks themselves, so that I don&amp;#39;t show you anything particularly &lt;strong&gt;new&lt;/strong&gt; or &lt;strong&gt;shiny&lt;/strong&gt;. However, the ability to customize every step of the way brings with a number of advantages.&lt;/p&gt;
&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-1&#34;&gt;
Finding a REST API for Stock Quotes
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
First, we need to get up-to-date financial data from a REST API. I decided to use Alpha Vantage, a site I first stumbled upon after reading &lt;a href=&#34;http://www.financial-hacker.com/bye-yahoo-and-thank-you-for-the-fish/&#34;&gt;this blog post.&lt;/a&gt; The other APIs listed on that page had various issues, either being deprecated in the near future (google, yahoo, stooq) or not having a number of symbols (IEX). The API of Alphavantage is rather easy to understand, even though the naming convention is terrible. Try for instance &lt;a href=&#34;https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&amp;amp;symbol=MSFT&amp;amp;interval=1min&amp;amp;apikey=demo&#34;&gt;this link&lt;/a&gt; using the demo API key, yielding the following result for the Microsoft stock:&lt;/p&gt;
&lt;div class=&#34;src src-json&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;Meta Data&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;1. Information&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Intraday (1min) prices and volumes&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;2. Symbol&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;MSFT&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;3. Last Refreshed&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;2018-05-11 16:00:00&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;4. Interval&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;1min&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;5. Output Size&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Compact&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;6. Time Zone&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;US/Eastern&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;Time Series (1min)&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;2018-05-11 16:00:00&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;1. open&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;97.5900&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;2. high&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;97.7300&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;3. low&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;97.5750&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;4. close&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;97.7000&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;5. volume&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;3776187&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;2018-05-11 15:59:00&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;1. open&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;97.4800&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;2. high&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;97.5900&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;3. low&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;97.4700&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;4. close&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;97.5900&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;5. volume&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;257615&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        },&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-2&#34;&gt;
Reading API Requests into Emacs Variables
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
Having located the data out in the internet was a good first step, but now we need to figure out a way how to use this information. Luckily, most of the work needed for this can be found in various places on the net, for instance in &lt;a href=&#34;https://vxlabs.com/2017/06/03/querying-restful-webservices-into-emacs-orgmode-tables/&#34;&gt;this blog post&lt;/a&gt;. I decided to follow their general setup, using the following packages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;org&lt;/li&gt;
&lt;li&gt;org-babel&lt;/li&gt;
&lt;li&gt;request&lt;/li&gt;
&lt;li&gt;json

The API used in their scenario gave different results with a much cleaner nomenclature. For the Alphavantage API, I had to become a little creative with the eLisp code.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(require &amp;#39;request)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(require &amp;#39;json)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(require &amp;#39;cl)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(request
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;https://www.alphavantage.co/query&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :params `((&amp;#34;function&amp;#34; . &amp;#34;TIME_SERIES_INTRADAY&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;symbol&amp;#34; . &amp;#34;SC0J&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;interval&amp;#34; . &amp;#34;1min&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;apikey&amp;#34; . &amp;#34;...&amp;#34;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :parser &amp;#39;json-read
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :success (function*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (lambda (&amp;amp;key data &amp;amp;allow-other-keys)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             (setq open_sc0j (string-to-number (cdr (elt (elt (elt data 1) 1) 1)))))))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
The variable &lt;code class=&#34;verbatim&#34;&gt;open_sc0j&lt;/code&gt; is evaluated as follows: From the received json, take the second entry of the second element of the second element. Not very nice, but it works…&lt;/p&gt;
&lt;p&gt;
I encountered a second difficulty in my portfolio: I have both European stocks (in EUR) and American stocks (traded in USD). In order to keep my balances comparable, I added yet another variable &lt;code class=&#34;verbatim&#34;&gt;rate_usd_eur&lt;/code&gt;, which receives up-to-date exchange rates from USD to EUR from the appropriate query. All in all, my requests to Alphavantage look like this:&lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(request
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;https://www.alphavantage.co/query&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :params `((&amp;#34;function&amp;#34; . &amp;#34;TIME_SERIES_INTRADAY&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;symbol&amp;#34; . &amp;#34;SC0J&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;interval&amp;#34; . &amp;#34;1min&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;apikey&amp;#34; . &amp;#34;...&amp;#34;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :parser &amp;#39;json-read
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :success (function*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (lambda (&amp;amp;key data &amp;amp;allow-other-keys)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             (setq open_sc0j (string-to-number (cdr (elt (elt (elt data 1) 1) 1)))))))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(request
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;https://www.alphavantage.co/query&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :params `((&amp;#34;function&amp;#34; . &amp;#34;CURRENCY_EXCHANGE_RATE&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;from_currency&amp;#34; . &amp;#34;USD&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;to_currency&amp;#34; . &amp;#34;EUR&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;apikey&amp;#34; . &amp;#34;...&amp;#34;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :parser &amp;#39;json-read
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :success (function*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (lambda (&amp;amp;key data &amp;amp;allow-other-keys)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             (setq rate_usd_eur (string-to-number (cdr (elt (elt data 0) 5)))))))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(request
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;https://www.alphavantage.co/query&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :params `((&amp;#34;function&amp;#34; . &amp;#34;TIME_SERIES_INTRADAY&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;symbol&amp;#34; . &amp;#34;PG&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;interval&amp;#34; . &amp;#34;1min&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (&amp;#34;apikey&amp;#34; . &amp;#34;...&amp;#34;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :parser &amp;#39;json-read
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; :success (function*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (lambda (&amp;amp;key data &amp;amp;allow-other-keys)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             (org-table-iterate-buffer-tables)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             (setq open_prg (* rate_usd_eur (string-to-number (cdr (elt (elt (elt data 1) 1) 1))))))))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Putting this code inside an org-mode file, bracketing it by code blocks &lt;code class=&#34;verbatim&#34;&gt;#+BEGIN_SRC emacs-lisp :results none&lt;/code&gt; and &lt;code class=&#34;verbatim&#34;&gt;#+END_SRC&lt;/code&gt;, and hitting &amp;#34;C-c C-c&amp;#34; inside it leads to the evaluation of the code block and thus the filling of the variables &lt;code class=&#34;verbatim&#34;&gt;open_sc0j&lt;/code&gt;, &lt;code class=&#34;verbatim&#34;&gt;rate_usd_eur&lt;/code&gt; and &lt;code class=&#34;verbatim&#34;&gt;open_prg&lt;/code&gt;. Since we included the wonderful little function &lt;code class=&#34;verbatim&#34;&gt;org-table-iterate-buffer-tables&lt;/code&gt;, the evaluation also repeats until all the columns in the table below are calculated correctly. This neat little trick I also copied from &lt;a href=&#34;https://vxlabs.com/2017/06/03/querying-restful-webservices-into-emacs-orgmode-tables/&#34;&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-3&#34;&gt;
&lt;h3 id=&#34;headline-3&#34;&gt;
Setting up a Custom Stock Portfolio Org Table
&lt;/h3&gt;
&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-3&#34;&gt;
&lt;p&gt;
After these steps, we now set up an org-table to give us a customizable overview of how our stocks are doing. That means setting up an org-table with columns for historic data, such as the date of the buy. Additionally, we use the &lt;code class=&#34;verbatim&#34;&gt;#+TBLFM&lt;/code&gt; function to calculate appropriate performance indicators. An example for such functions:&lt;/p&gt;
&lt;div class=&#34;src src-text&#34;&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;| Stock         | Symbol | Amt. |    Buy | Date Bought     |  Fees | Dividends | Close |   Gain | Gain Perc | Gain per Day |
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;|---------------+--------+------+--------+-----------------+-------+-----------+-------+--------+-----------+--------------|
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;| MSCI ETF      | SC0J   |   10 |  47.11 | [2018-04-16 Mo] | 12.35 |         0 |       |        |           |              |
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;| ProcterGamble | PG     |    5 | 65.014 | [2015-10-01 Do] | 10.61 |     72.03 |       |        |           |              |
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+TBLFM: $9=(-$4 + $8)*$3 - $6 + $7;%0.3f::$10=100*$9/($4*$3)::$11=$9/(now() - $5)::@2$8=&amp;#39;(format &amp;#34;%f&amp;#34; open_sc0j)::@3$7=17.78 + 17.70 + 17.94 + 18.61::@3$8=&amp;#39;(format &amp;#34;%f&amp;#34; open_prg)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
This code leads to the following result:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stock&lt;/th&gt;
&lt;th&gt;Symbol&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Amt.&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Buy&lt;/th&gt;
&lt;th&gt;Date Bought&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Fees&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Dividends&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Close&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Gain&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Gain Perc&lt;/th&gt;
&lt;th class=&#34;align-right&#34;&gt;Gain per Day&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MSCI ETF&lt;/td&gt;
&lt;td&gt;SC0J&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;10&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;47.11&lt;/td&gt;
&lt;td&gt;[2018-04-16 Mo]&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;12.35&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;0&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;49.290000&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;9.450&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;2.0059435&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;0.35552367&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ProcterGamble&lt;/td&gt;
&lt;td&gt;PG&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;5&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;65.014&lt;/td&gt;
&lt;td&gt;[2015-10-01 Do]&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;10.61&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;72.03&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;61.342605&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;43.063&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;13.247301&lt;/td&gt;
&lt;td class=&#34;align-right&#34;&gt;0.045111962&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
In this example, &lt;code class=&#34;verbatim&#34;&gt;Gain&lt;/code&gt; is first calculated by multiplying &lt;code class=&#34;verbatim&#34;&gt;-$4 + $8&lt;/code&gt;, i.e. the difference between Buy and (today&amp;#39;s) Close by the amount of stocks bought. Additionally, any dividends are added and any fees are subtracted, yielding a &amp;#34;net gain&amp;#34; for the stock. In column &lt;code class=&#34;verbatim&#34;&gt;Gain per Day&lt;/code&gt;, this number is broken down per day since I bought the stock, highlighting my most efficient assets.&lt;/p&gt;
&lt;p&gt;
There is no limit to what types of functions one can use, and no limit on the sophistication of analysis. And all of this within a very light-weight, easy-to-use interface, without any unnecessary over-head. It is not only convenient, but also educational: while writing this article, I learned a lot about REST APIs and financial data. &lt;/p&gt;
&lt;p&gt;
Let me conclude this article by picking up a picture from &lt;a href=&#34;https://blog.fugue.co/2015-11-11-guide-to-emacs.html&#34;&gt;one of the blog posts that got me into Emacs in the first place&lt;/a&gt;: Emacs is like a classical steel frame road bike, reliant, robust, nothing fancy but easy to repair. It is the ideal tool to explore the wilderness of the internet. And I can only invite everybody else to come along for the ride.&lt;/p&gt;
&lt;p&gt;
&amp;lt;img src=&amp;#34;&lt;a href=&#34;https://vg09.met.vgwort.de/na/d161742c2abc4c1da54c58f5b3c2e753&#34;&gt;https://vg09.met.vgwort.de/na/d161742c2abc4c1da54c58f5b3c2e753&lt;/a&gt;&amp;#34; width=&amp;#34;1&amp;#34; height=&amp;#34;1&amp;#34; alt=&amp;#34;&amp;#34;&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Don&#39;t Worry: Google Only Checks Your Location Every 10 Minutes</title>
      <link>https://www.sastibe.de/2018/04/don-t-worry-google-location/</link>
      <pubDate>Sun, 15 Apr 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2018/04/don-t-worry-google-location/</guid>
      <description>


&lt;p&gt;I have a personal Google account, complete with gmail, gdrive and everything else. I first opened it up as a sort of spam email for all kinds of logins, but started to it use more and more due to its convenience. I was always slightly worried about the magnitude of data collected by Google on me, yet I never found a way to pinpoint exactly the extent of my slight worrying.&lt;/p&gt;
&lt;p&gt;Recently, I discovered &lt;a href=&#34;https://en.wikipedia.org/wiki/Google_Takeout&#34;&gt;Google Takeout&lt;/a&gt;. Everybody with a Google Account can simply click &lt;a href=&#34;https://takeout.google.com/settings/takeout&#34;&gt;here&lt;/a&gt;, follow the instructions and Google Takeout will send all the data it (supposedly) has in a nice little zip folder. Within this zip-folder is a file called “locationhistory.json” (or “standortverlauf.json” for all you German users out there), with entries such as this:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;{
    &amp;quot;timestampMs&amp;quot; : &amp;quot;1523378268382&amp;quot;,
    &amp;quot;latitudeE7&amp;quot; : 494290669,
    &amp;quot;longitudeE7&amp;quot; : 86872541,
    &amp;quot;accuracy&amp;quot; : 34
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each of these entries encodes a location measurement taken by Google, with GPS coordinates (latitude/longitude) and a timestamp, which can be converted to a “normal date” by dividing the number by 1000 and using, e.g., &lt;a href=&#34;https://currentmillis.com/&#34;&gt;this handy site&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The “location history” file is rather large and unwieldy (about 18 MB in my case). There is a very simple and free tool that &lt;a href=&#34;https://locationhistoryvisualizer.com/heatmap/&#34;&gt;visualizes your location history data in an interactive heatmap&lt;/a&gt;. That is the tool I used to create the intro picture to this entry. The heatmap allows you to gauge the precision with which Google matches your movements. For instance, my skiing trip in March last year to &lt;a href=&#34;https://www.serfaus-fiss-ladis.at/de&#34;&gt;Serfaus-Fiss-Ladis&lt;/a&gt; shows up like this:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1523785896/google_heatmap_fiss_hcnim9.png&#34; alt=&#34;Don’t worry, I also down some slopes during the vacation…&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Don’t worry, I also down some slopes during the vacation…&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;There are some mistakes in this map, i.e., places that I have surely never visited. I was never in “Gasthaus zum weißen Lamm”, I know that for a fact. However, the detail is quite astonishing, leading me to the next question: How often does Google measure and store my location data? My “locationhistory.json” contains 59293 observation over the course of 465 days, so that, on average, there are more than 5 measurements &lt;em&gt;per hour&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I decided to look a little closer at the distributions of the timestamps, using some wonderful ggplot magic (the R code can be found &lt;a href=&#34;https://github.com/sebastianschweer/blog_dev/blob/master/content/UTILS/google_location.R&#34;&gt;here&lt;/a&gt;):&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1523785917/Hourly_overview_google_location_data_th9l6z.png&#34; alt=&#34;Such a colorful mountain range.&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Such a colorful mountain range.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The lines in the plot show the average number of location measurements taken by Google each hour, separated by weekdays. The dashed line indicates the aveerage over all weekdays. The plot highlights several information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Between noon and 8 pm, Google takes on average more than one location measurement every 10 minutes&lt;/li&gt;
&lt;li&gt;In the nighttime, the average number of measurements is only once every 20 minutes&lt;/li&gt;
&lt;li&gt;Monday and Tuesday mornings are closely watched with many measurements, especially Tuesday mornings&lt;/li&gt;
&lt;li&gt;Afternoons and evenings are always of interest, but especially on Fridday and Saturday.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The fact that Monday and Tuesday morning are such exceptions could be explained by my specific calendar in 2017: I worked as a consultant and usually left home on Tuesday morning to travel troughout Germany. I am not entirely sure why this should lead to more measurements, as this activity was rarely accompanied by Google services (I travel by Deutsche Bahn). However, my travel time back home, usually late on Thursday evening, can also be seen quite nicely in the plot.&lt;/p&gt;
&lt;p&gt;In total, I am a bit shocked by the sheer magnitude of measurements Google has on me, even (and especially) at times at which I am positively certain that I have never used Google Location Services, (see, e.g., 4 am). I am glad that services like Google Maps exist and that they are so extremely convenient, but the drawback should also be made abundantly clear to anyone who uses these services: many machine-readable aspects of your life are available to a for-profit company.&lt;/p&gt;
&lt;img src=&#34;https://vg09.met.vgwort.de/na/9b3830e306e0496cb15239c66bfde5c3&#34; width=&#34;1&#34; height=&#34;1&#34; alt=&#34;&#34;&gt;
</description>
    </item>
    
    <item>
      <title>Benchmarking AWS Instances with MNIST classification</title>
      <link>https://www.sastibe.de/2018/03/benchmarking-aws-instances/</link>
      <pubDate>Sat, 10 Mar 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2018/03/benchmarking-aws-instances/</guid>
      <description>


&lt;p&gt;In &lt;a href=&#34;https://www.sastibe.de/2018/01/setting-up-a-scalable-rstudio-instance-in-aws/&#34;&gt;a previous post&lt;/a&gt; I have shown you how to setup an AWS instance running the newest RStudio, R, Python, Julia and so forth, where the configuration of the instance can be freely chosen. However, there is quite a lot of possibilities of instance configurations out there: There are different instance classes (General Purpose, Compute Optimized, RAM Optimized, … ) and different instance sizes within these classes. For General Purpose, or t2, there are, e.g. t2.nano, t2.micro, t2.small, t2.medium, t2.large, t2.xlarge and t2.2xlarge&lt;a href=&#34;#fn1&#34; class=&#34;footnoteRef&#34; id=&#34;fnref1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These instances differ in two dimensions: price and performance. Obviously, these dimensions are highly correlated, since higher price means (or should mean, at least) higher performance. Now, price is easily measured, yet performance is a bit trickier: For example, it is not entirely straightforward to assess the impact of higher RAM, CPU or even GPU directly across many different configurations. But we’re doing data science, right? So why not create a programmatic test in order to gauge the performance empirically? Well, let‘s do it!&lt;/p&gt;
&lt;div id=&#34;the-test&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;The Test&lt;/h1&gt;
&lt;p&gt;For this benchmark test I chose a classical machine learning task: the classification of the &lt;a href=&#34;https://en.wikipedia.org/wiki/MNIST_database&#34;&gt;MNIST&lt;/a&gt; dataset of handwritten digits, to be categorized as 0-9. This data set is very commonly used as an example set for machine learning algorithms.&lt;/p&gt;
&lt;p&gt;For this benchmark test, I borrowed a nice skript by Kory Becker written &lt;a href=&#34;https://gist.github.com/primaryobjects/b0c8333834debbc15be4&#34;&gt;here&lt;/a&gt;, which trains a Support Vector Machine (SVM) on the problem, using only the first 1000 observations of the dataset, each with 768 attributes. I altered the code ever so slightly to that each run of the script returns the following measurements:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;Elapsed Time: The time elapsed since starting the script (excluding the time to install the libraries and download of the data),&lt;/li&gt;
&lt;li&gt;Accuracy of model, i.e. the percentage of predictions that classified the digits correctly.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Additionally, I included the following information:&lt;/p&gt;
&lt;ol start=&#34;3&#34; style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;RAM in Gigabytes,&lt;/li&gt;
&lt;li&gt;Number of CPUs in use, and finally&lt;/li&gt;
&lt;li&gt;Price in Dollars per Hour.&lt;/li&gt;
&lt;/ol&gt;
&lt;div id=&#34;the-candidates&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;The Candidates&lt;/h2&gt;
&lt;p&gt;AWS provides a large number of different configurations, and I will not discuss all of these in this post. Rather, let me focus on four different specifications of computing resource demands and chose a distinctive representative:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;General Purpose: t2, m4&lt;/li&gt;
&lt;li&gt;Compute Optimized: c4&lt;/li&gt;
&lt;li&gt;Memory Optimized: r4&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For each of these classes, I had planned to test the sizes small, medium, large, xlarge and 2xlarge. The sizes micro, small and medium are actually only available for t2 (oh, no!), so that I ended up only testing 14 configurations.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;the-results&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;The Results&lt;/h2&gt;
&lt;p&gt;I started with the candidate &lt;code&gt;t2.micro&lt;/code&gt;, which is free of charge. Unfortunately, the script never succesfully ran the training of the model, presumably because the dimension of merely 1 GB of RAM is not sufficient. Still, a “not possible” result is still a useful result for choosing the right infrastructure.&lt;/p&gt;
&lt;p&gt;Let’s have a first look at the results, first in plain numbers:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr class=&#34;header&#34;&gt;
&lt;th align=&#34;left&#34;&gt;instance_class&lt;/th&gt;
&lt;th align=&#34;left&#34;&gt;instance_size&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;ram&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;vcpus&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;ecu&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;price_per_hour&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;elapsed_time&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;accuracy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;t2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;micro&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;1.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;1.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;NA&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.0134&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;NA&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;NA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;left&#34;&gt;t2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;small&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;2.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;1.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;NA&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.0268&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;68.624&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.917&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;t2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;large&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;8.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;2.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;NA&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.1072&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;65.335&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.918&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;left&#34;&gt;t2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;xlarge&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;16.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;4.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;NA&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.2144&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;55.611&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.918&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;t2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;2xlarge&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;32.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;8.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;NA&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.4288&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;56.284&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.919&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;left&#34;&gt;t2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;medium&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;4.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;2.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;NA&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.0536&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;63.961&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.919&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;m4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;large&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;8.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;2.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;6.5&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.1200&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;82.823&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.933&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;left&#34;&gt;m4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;xlarge&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;15.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;4.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;13.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.2400&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;80.749&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.928&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;m4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;2xlarge&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;32.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;8.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;26.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.4800&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;65.728&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.912&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;left&#34;&gt;m4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;4xlarge&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;64.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;16.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;53.5&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.9600&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;64.573&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.927&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;m4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;16xlarge&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;256.00&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;64.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;188.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;3.8400&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;93.310&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.915&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;left&#34;&gt;r4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;large&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;15.25&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;2.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;7.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.1600&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;80.749&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.928&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;r4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;xlarge&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;30.50&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;13.5&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;4.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.3200&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;68.372&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.920&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;left&#34;&gt;c4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;large&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;3.75&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;2.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;8.0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.1140&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;121.004&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.915&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;At a quick glance, the accuracy of the models looks quite uniform. This is hardly surprising, as the algorithm itselg is unchanged by hardware limitation, and the apparent fluctuations can be explained by the stochastic nature of the train-test-data set sampling in the script.&lt;/p&gt;
&lt;p&gt;A core assumption is that &lt;strong&gt;more computing power yields faster results&lt;/strong&gt;. A second core assumption is that &lt;strong&gt;the higher the computing power, the higher the cost&lt;/strong&gt;. Combining these assumptions leads us to assume that &lt;strong&gt;higher cost leads to a lower time elapsed&lt;/strong&gt;. A quick visualization of the data demonstrates that the results support this notion: &lt;img src=&#34;https://www.sastibe.de/post/2018-03-10-benchmarking-aws-instances_files/figure-html/unnamed-chunk-3-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;The measurement of the instance “m4.16xlarge” doesn’t quite fit into the pattern, and I am frankly unsure of the reasons. The measurement was taken twice, so that circumstantial errors leading to this measurement can be rejected.&lt;/p&gt;
&lt;p&gt;Let us look a little more precisely at the data, in order to establish the most influential factors determining the speed of the analysis. We use the wonderful &lt;code&gt;ggpairs&lt;/code&gt; visualization of the &lt;code&gt;GGally&lt;/code&gt; package and omit the observation of the instance “m4.16xlarge” in the analysis:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.sastibe.de/post/2018-03-10-benchmarking-aws-instances_files/figure-html/unnamed-chunk-5-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;This plot contains a number of results at once. First off, and unsurprisingly, the price per hour correlates vey strongly with the number of virtual CPUs and the size of the RAM, indicating that “the higher the computing power, the higher the cost” was a correct core assumption.&lt;/p&gt;
&lt;p&gt;Second, the correlation between &lt;em&gt;Elapsed Eime&lt;/em&gt; and the numeric indicators of performance &lt;em&gt;RAM&lt;/em&gt;, &lt;em&gt;vCPUs&lt;/em&gt; and &lt;em&gt;Price per Hour&lt;/em&gt; is clearly negative across the board, but the highest correlation is clearly attained by the dimension RAM. This provides yet another indication that the notion &lt;strong&gt;Performance of R hinges on RAM&lt;/strong&gt; is true.&lt;/p&gt;
&lt;p&gt;One last question to consider: which instance type is optimal for &lt;code&gt;R&lt;/code&gt; purposes? Optimality will be defined by &lt;strong&gt;provide the quickest results for the least money&lt;/strong&gt;. Compare the fits of a standard linear model:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr class=&#34;header&#34;&gt;
&lt;th align=&#34;left&#34;&gt;instance_class&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;(Intercept)&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;price_per_hour&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;m4&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;83.66913&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;-22.66862&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;left&#34;&gt;r4&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;93.12600&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;-77.35625&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;left&#34;&gt;t2&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;66.86029&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;-29.47335&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This shows that the entry price is cheapest for instances of the class “t2”, as the y-intercept is the lowest in this case. However, in cases of higher Price per Hour, i.e. higher necessary computing power, “r4” is the better choice: The time decreases quickest with the increase in power. Both lines meet at a price per hour of roughly 55 Cents per hour, corresponding to an instance r4.2xlarge with 61 GB RAM.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;takeaway-messages&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Takeaway Messages&lt;/h1&gt;
&lt;p&gt;To conclude this article, let me summarize the key findings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The most important hardware feature for the increasing computing speed of “R” analysis is RAM&lt;/li&gt;
&lt;li&gt;For analysis with a small to medium scope of performance (RAM less than 60 GB), the instance class “t2” is the best choice in AWS.&lt;/li&gt;
&lt;li&gt;For larger scale projects, the instance class “r4”, optimzed for RAM usage, is the optimal choice.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- t2.medium: --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  90   0   0   0   0   0   0   1   0   1 --&gt;
&lt;!--          1   0 114   3   3   0   0   0   0   2   0 --&gt;
&lt;!--          2   0   0  91   1   2   1   0   0   0   0 --&gt;
&lt;!--          3   0   1   3  77   0   6   0   0   1   2 --&gt;
&lt;!--          4   0   0   1   0 104   0   1   7   1   4 --&gt;
&lt;!--          5   1   0   2   7   0  78   2   0   1   3 --&gt;
&lt;!--          6   2   0   1   0   1   0 104   0   0   0 --&gt;
&lt;!--          7   0   0   3   1   0   0   0  93   0   5 --&gt;
&lt;!--          8   1   1   1   1   0   0   0   0  77   0 --&gt;
&lt;!--          9   0   0   0   2   2   1   0   1   1  91 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.919 --&gt;
&lt;!--                  95% CI : (0.9003, 0.9352) --&gt;
&lt;!--     No Information Rate : 0.116 --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16 --&gt;
&lt;!--                   Kappa : 0.9099 --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 --&gt;
&lt;!-- Sensitivity            0.9574   0.9828   0.8667   0.8370   0.9541   0.9070 --&gt;
&lt;!-- Specificity            0.9978   0.9910   0.9955   0.9857   0.9843   0.9825 --&gt;
&lt;!-- Pos Pred Value         0.9783   0.9344   0.9579   0.8556   0.8814   0.8298 --&gt;
&lt;!-- Neg Pred Value         0.9956   0.9977   0.9845   0.9835   0.9943   0.9912 --&gt;
&lt;!-- Prevalence             0.0940   0.1160   0.1050   0.0920   0.1090   0.0860 --&gt;
&lt;!-- Detection Rate         0.0900   0.1140   0.0910   0.0770   0.1040   0.0780 --&gt;
&lt;!-- Detection Prevalence   0.0920   0.1220   0.0950   0.0900   0.1180   0.0940 --&gt;
&lt;!-- Balanced Accuracy      0.9776   0.9869   0.9311   0.9113   0.9692   0.9447 --&gt;
&lt;!--                      Class: 6 Class: 7 Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.9720   0.9118   0.9277   0.8585 --&gt;
&lt;!-- Specificity            0.9955   0.9900   0.9956   0.9922 --&gt;
&lt;!-- Pos Pred Value         0.9630   0.9118   0.9506   0.9286 --&gt;
&lt;!-- Neg Pred Value         0.9966   0.9900   0.9935   0.9834 --&gt;
&lt;!-- Prevalence             0.1070   0.1020   0.0830   0.1060 --&gt;
&lt;!-- Detection Rate         0.1040   0.0930   0.0770   0.0910 --&gt;
&lt;!-- Detection Prevalence   0.1080   0.1020   0.0810   0.0980 --&gt;
&lt;!-- Balanced Accuracy      0.9837   0.9509   0.9617   0.9253 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.066024 mins --&gt;
&lt;!-- m4.16xlarge --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  93   0   0   1   1   0   0   0   0   1 --&gt;
&lt;!--          1   0 100   4   0   1   0   2   5   4   0 --&gt;
&lt;!--          2   1   0  78   3   2   1   4   1   2   0 --&gt;
&lt;!--          3   0   1   0 100   0   3   0   0   0   1 --&gt;
&lt;!--          4   0   0   0   0 100   1   1   6   0   3 --&gt;
&lt;!--          5   0   1   1   2   0  79   1   0   1   0 --&gt;
&lt;!--          6   0   0   0   0   1   2  98   0   2   0 --&gt;
&lt;!--          7   0   0   2   1   0   0   0  96   0   4 --&gt;
&lt;!--          8   0   3   2   1   0   0   0   0  80   0 --&gt;
&lt;!--          9   0   0   1   1   4   1   0   3   2  91 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.915 --&gt;
&lt;!--                  95% CI : (0.896, 0.9315) --&gt;
&lt;!--     No Information Rate : 0.111 --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16 --&gt;
&lt;!--                   Kappa : 0.9055 --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9894   0.9524   0.8864   0.9174   0.9174   0.9080   0.9245   0.8649 --&gt;
&lt;!-- Specificity            0.9967   0.9821   0.9846   0.9944   0.9877   0.9934   0.9944   0.9921 --&gt;
&lt;!-- Pos Pred Value         0.9687   0.8621   0.8478   0.9524   0.9009   0.9294   0.9515   0.9320 --&gt;
&lt;!-- Neg Pred Value         0.9989   0.9943   0.9890   0.9899   0.9899   0.9913   0.9911   0.9833 --&gt;
&lt;!-- Prevalence             0.0940   0.1050   0.0880   0.1090   0.1090   0.0870   0.1060   0.1110 --&gt;
&lt;!-- Detection Rate         0.0930   0.1000   0.0780   0.1000   0.1000   0.0790   0.0980   0.0960 --&gt;
&lt;!-- Detection Prevalence   0.0960   0.1160   0.0920   0.1050   0.1110   0.0850   0.1030   0.1030 --&gt;
&lt;!-- Balanced Accuracy      0.9930   0.9673   0.9355   0.9559   0.9525   0.9507   0.9595   0.9285 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8791   0.9100 --&gt;
&lt;!-- Specificity            0.9934   0.9867 --&gt;
&lt;!-- Pos Pred Value         0.9302   0.8835 --&gt;
&lt;!-- Neg Pred Value         0.9880   0.9900 --&gt;
&lt;!-- Prevalence             0.0910   0.1000 --&gt;
&lt;!-- Detection Rate         0.0800   0.0910 --&gt;
&lt;!-- Detection Prevalence   0.0860   0.1030 --&gt;
&lt;!-- Balanced Accuracy      0.9363   0.9483 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.555173 mins --&gt;
&lt;!-- t2.2xlarge --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0 103   0   0   1   0   0   0   0   0   2 --&gt;
&lt;!--          1   0 101   0   2   0   1   3   1   2   0 --&gt;
&lt;!--          2   1   1 100   2   2   0   1   1   1   1 --&gt;
&lt;!--          3   0   0   1  77   0   2   0   0   3   2 --&gt;
&lt;!--          4   0   0   0   0 101   1   1   2   1   8 --&gt;
&lt;!--          5   0   0   2   8   0  78   2   0   1   0 --&gt;
&lt;!--          6   1   0   1   1   1   3 100   0   1   0 --&gt;
&lt;!--          7   1   1   5   0   0   1   0  95   0   3 --&gt;
&lt;!--          8   0   0   1   0   0   0   0   0  81   0 --&gt;
&lt;!--          9   0   0   0   0   3   1   0   1   0  83 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.919            --&gt;
&lt;!--                  95% CI : (0.9003, 0.9352) --&gt;
&lt;!--     No Information Rate : 0.11             --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9099           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9717   0.9806   0.9091   0.8462   0.9439   0.8966   0.9346   0.9500 --&gt;
&lt;!-- Specificity            0.9966   0.9900   0.9888   0.9912   0.9854   0.9858   0.9910   0.9878 --&gt;
&lt;!-- Pos Pred Value         0.9717   0.9182   0.9091   0.9059   0.8860   0.8571   0.9259   0.8962 --&gt;
&lt;!-- Neg Pred Value         0.9966   0.9978   0.9888   0.9847   0.9932   0.9901   0.9922   0.9944 --&gt;
&lt;!-- Prevalence             0.1060   0.1030   0.1100   0.0910   0.1070   0.0870   0.1070   0.1000 --&gt;
&lt;!-- Detection Rate         0.1030   0.1010   0.1000   0.0770   0.1010   0.0780   0.1000   0.0950 --&gt;
&lt;!-- Detection Prevalence   0.1060   0.1100   0.1100   0.0850   0.1140   0.0910   0.1080   0.1060 --&gt;
&lt;!-- Balanced Accuracy      0.9842   0.9853   0.9489   0.9187   0.9647   0.9412   0.9628   0.9689 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.9000   0.8384 --&gt;
&lt;!-- Specificity            0.9989   0.9945 --&gt;
&lt;!-- Pos Pred Value         0.9878   0.9432 --&gt;
&lt;!-- Neg Pred Value         0.9902   0.9825 --&gt;
&lt;!-- Prevalence             0.0900   0.0990 --&gt;
&lt;!-- Detection Rate         0.0810   0.0830 --&gt;
&lt;!-- Detection Prevalence   0.0820   0.0880 --&gt;
&lt;!-- Balanced Accuracy      0.9495   0.9164 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 56.28423 secs --&gt;
&lt;!-- t2.small --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  88   0   1   0   0   0   0   1   0   1 --&gt;
&lt;!--          1   0 110   4   1   1   0   4   3   2   0 --&gt;
&lt;!--          2   0   2  89   1   2   2   1   0   0   0 --&gt;
&lt;!--          3   1   1   0  85   0   2   0   0   2   0 --&gt;
&lt;!--          4   0   0   7   0 110   2   1   2   0   2 --&gt;
&lt;!--          5   1   1   1   0   0  72   3   0   7   0 --&gt;
&lt;!--          6   0   0   1   0   1   2  89   0   2   0 --&gt;
&lt;!--          7   0   0   0   2   0   0   0 111   0   3 --&gt;
&lt;!--          8   0   0   1   0   0   0   0   0  74   0 --&gt;
&lt;!--          9   0   0   0   3   3   1   0   0   5  89 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.917            --&gt;
&lt;!--                  95% CI : (0.8981, 0.9334) --&gt;
&lt;!--     No Information Rate : 0.117            --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9076           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 --&gt;
&lt;!-- Sensitivity            0.9778   0.9649   0.8558   0.9239   0.9402   0.8889 --&gt;
&lt;!-- Specificity            0.9967   0.9831   0.9911   0.9934   0.9841   0.9859 --&gt;
&lt;!-- Pos Pred Value         0.9670   0.8800   0.9175   0.9341   0.8871   0.8471 --&gt;
&lt;!-- Neg Pred Value         0.9978   0.9954   0.9834   0.9923   0.9920   0.9902 --&gt;
&lt;!-- Prevalence             0.0900   0.1140   0.1040   0.0920   0.1170   0.0810 --&gt;
&lt;!-- Detection Rate         0.0880   0.1100   0.0890   0.0850   0.1100   0.0720 --&gt;
&lt;!-- Detection Prevalence   0.0910   0.1250   0.0970   0.0910   0.1240   0.0850 --&gt;
&lt;!-- Balanced Accuracy      0.9872   0.9740   0.9234   0.9587   0.9622   0.9374 --&gt;
&lt;!--                      Class: 6 Class: 7 Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.9082   0.9487   0.8043   0.9368 --&gt;
&lt;!-- Specificity            0.9933   0.9943   0.9989   0.9867 --&gt;
&lt;!-- Pos Pred Value         0.9368   0.9569   0.9867   0.8812 --&gt;
&lt;!-- Neg Pred Value         0.9901   0.9932   0.9805   0.9933 --&gt;
&lt;!-- Prevalence             0.0980   0.1170   0.0920   0.0950 --&gt;
&lt;!-- Detection Rate         0.0890   0.1110   0.0740   0.0890 --&gt;
&lt;!-- Detection Prevalence   0.0950   0.1160   0.0750   0.1010 --&gt;
&lt;!-- Balanced Accuracy      0.9508   0.9715   0.9016   0.9618 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.143735 mins --&gt;
&lt;!-- t2.large --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  83   0   0   1   0   1   0   1   0   1 --&gt;
&lt;!--          1   0 115   0   0   0   1   1   5   3   0 --&gt;
&lt;!--          2   0   0  87   3   0   1   1   2   3   0 --&gt;
&lt;!--          3   0   1   0  87   0   3   0   0   1   2 --&gt;
&lt;!--          4   0   0   3   0  91   0   1   2   0   2 --&gt;
&lt;!--          5   1   1   0   6   0  86   2   0   2   0 --&gt;
&lt;!--          6   0   0   1   0   4   2  96   0   1   0 --&gt;
&lt;!--          7   0   0   0   1   0   0   0 110   0   3 --&gt;
&lt;!--          8   0   0   1   0   0   1   0   0  74   0 --&gt;
&lt;!--          9   0   0   0   1   6   2   0   5   3  89 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.918            --&gt;
&lt;!--                  95% CI : (0.8992, 0.9343) --&gt;
&lt;!--     No Information Rate : 0.125            --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9088           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9881   0.9829   0.9457   0.8788   0.9010   0.8866   0.9505   0.8800 --&gt;
&lt;!-- Specificity            0.9956   0.9887   0.9890   0.9922   0.9911   0.9867   0.9911   0.9954 --&gt;
&lt;!-- Pos Pred Value         0.9540   0.9200   0.8969   0.9255   0.9192   0.8776   0.9231   0.9649 --&gt;
&lt;!-- Neg Pred Value         0.9989   0.9977   0.9945   0.9868   0.9889   0.9878   0.9944   0.9831 --&gt;
&lt;!-- Prevalence             0.0840   0.1170   0.0920   0.0990   0.1010   0.0970   0.1010   0.1250 --&gt;
&lt;!-- Detection Rate         0.0830   0.1150   0.0870   0.0870   0.0910   0.0860   0.0960   0.1100 --&gt;
&lt;!-- Detection Prevalence   0.0870   0.1250   0.0970   0.0940   0.0990   0.0980   0.1040   0.1140 --&gt;
&lt;!-- Balanced Accuracy      0.9919   0.9858   0.9673   0.9355   0.9460   0.9367   0.9708   0.9377 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8506   0.9175 --&gt;
&lt;!-- Specificity            0.9978   0.9812 --&gt;
&lt;!-- Pos Pred Value         0.9737   0.8396 --&gt;
&lt;!-- Neg Pred Value         0.9859   0.9911 --&gt;
&lt;!-- Prevalence             0.0870   0.0970 --&gt;
&lt;!-- Detection Rate         0.0740   0.0890 --&gt;
&lt;!-- Detection Prevalence   0.0760   0.1060 --&gt;
&lt;!-- Balanced Accuracy      0.9242   0.9493 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.088912 mins --&gt;
&lt;!-- t2.xlarge --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  98   0   0   0   0   0   0   1   0   1 --&gt;
&lt;!--          1   0  99   3   2   0   0   3   4   2   0 --&gt;
&lt;!--          2   1   0  91   3   3   1   1   0   0   0 --&gt;
&lt;!--          3   0   0   0  86   0   4   0   0   1   1 --&gt;
&lt;!--          4   0   0   2   0 103   1   1   4   0   6 --&gt;
&lt;!--          5   3   0   0   4   0  84   2   0   1   1 --&gt;
&lt;!--          6   2   0   0   0   1   1  80   0   3   0 --&gt;
&lt;!--          7   0   1   0   0   0   0   0  98   0   1 --&gt;
&lt;!--          8   0   0   2   0   0   0   0   0  74   0 --&gt;
&lt;!--          9   0   0   1   1   1   4   0   4   4 105 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.918            --&gt;
&lt;!--                  95% CI : (0.8992, 0.9343) --&gt;
&lt;!--     No Information Rate : 0.115            --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9088           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9423   0.9900   0.9192   0.8958   0.9537   0.8842   0.9195   0.8829 --&gt;
&lt;!-- Specificity            0.9978   0.9844   0.9900   0.9934   0.9843   0.9878   0.9923   0.9978 --&gt;
&lt;!-- Pos Pred Value         0.9800   0.8761   0.9100   0.9348   0.8803   0.8842   0.9195   0.9800 --&gt;
&lt;!-- Neg Pred Value         0.9933   0.9989   0.9911   0.9890   0.9943   0.9878   0.9923   0.9856 --&gt;
&lt;!-- Prevalence             0.1040   0.1000   0.0990   0.0960   0.1080   0.0950   0.0870   0.1110 --&gt;
&lt;!-- Detection Rate         0.0980   0.0990   0.0910   0.0860   0.1030   0.0840   0.0800   0.0980 --&gt;
&lt;!-- Detection Prevalence   0.1000   0.1130   0.1000   0.0920   0.1170   0.0950   0.0870   0.1000 --&gt;
&lt;!-- Balanced Accuracy      0.9700   0.9872   0.9546   0.9446   0.9690   0.9360   0.9559   0.9403 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8706   0.9130 --&gt;
&lt;!-- Specificity            0.9978   0.9831 --&gt;
&lt;!-- Pos Pred Value         0.9737   0.8750 --&gt;
&lt;!-- Neg Pred Value         0.9881   0.9886 --&gt;
&lt;!-- Prevalence             0.0850   0.1150 --&gt;
&lt;!-- Detection Rate         0.0740   0.1050 --&gt;
&lt;!-- Detection Prevalence   0.0760   0.1200 --&gt;
&lt;!-- Balanced Accuracy      0.9342   0.9480 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 55.61071 secs --&gt;
&lt;!-- m4.large --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0 102   0   0   1   0   0   1   1   0   0 --&gt;
&lt;!--          1   0 119   1   0   2   0   1   2   2   0 --&gt;
&lt;!--          2   1   1  86   1   2   2   0   0   2   0 --&gt;
&lt;!--          3   1   0   1  70   0   1   0   0   2   0 --&gt;
&lt;!--          4   0   0   3   0  97   1   0   6   1   2 --&gt;
&lt;!--          5   0   1   2   3   0  81   3   0   3   0 --&gt;
&lt;!--          6   2   0   3   1   0   2  95   0   1   0 --&gt;
&lt;!--          7   0   1   4   2   1   0   0 101   0   1 --&gt;
&lt;!--          8   0   2   2   2   0   0   1   0  67   0 --&gt;
&lt;!--          9   0   0   0   1   4   0   0   1   1 100 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.918            --&gt;
&lt;!--                  95% CI : (0.8992, 0.9343) --&gt;
&lt;!--     No Information Rate : 0.124            --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9087           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9623   0.9597   0.8431   0.8642   0.9151   0.9310   0.9406   0.9099 --&gt;
&lt;!-- Specificity            0.9966   0.9909   0.9900   0.9946   0.9855   0.9869   0.9900   0.9899 --&gt;
&lt;!-- Pos Pred Value         0.9714   0.9370   0.9053   0.9333   0.8818   0.8710   0.9135   0.9182 --&gt;
&lt;!-- Neg Pred Value         0.9955   0.9943   0.9823   0.9881   0.9899   0.9934   0.9933   0.9888 --&gt;
&lt;!-- Prevalence             0.1060   0.1240   0.1020   0.0810   0.1060   0.0870   0.1010   0.1110 --&gt;
&lt;!-- Detection Rate         0.1020   0.1190   0.0860   0.0700   0.0970   0.0810   0.0950   0.1010 --&gt;
&lt;!-- Detection Prevalence   0.1050   0.1270   0.0950   0.0750   0.1100   0.0930   0.1040   0.1100 --&gt;
&lt;!-- Balanced Accuracy      0.9795   0.9753   0.9166   0.9294   0.9503   0.9589   0.9653   0.9499 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8481   0.9709 --&gt;
&lt;!-- Specificity            0.9924   0.9922 --&gt;
&lt;!-- Pos Pred Value         0.9054   0.9346 --&gt;
&lt;!-- Neg Pred Value         0.9870   0.9966 --&gt;
&lt;!-- Prevalence             0.0790   0.1030 --&gt;
&lt;!-- Detection Rate         0.0670   0.1000 --&gt;
&lt;!-- Detection Prevalence   0.0740   0.1070 --&gt;
&lt;!-- Balanced Accuracy      0.9203   0.9815 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.38039 mins --&gt;
&lt;!-- m4.xlarge --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  89   0   1   1   0   0   0   1   0   2 --&gt;
&lt;!--          1   0 111   1   0   1   0   1   0   1   0 --&gt;
&lt;!--          2   1   1  97   0   3   0   1   1   2   1 --&gt;
&lt;!--          3   1   1   0  87   0   3   0   0   4   1 --&gt;
&lt;!--          4   0   0   1   0 112   0   0   1   0   2 --&gt;
&lt;!--          5   0   3   0   3   0  81   1   0   0   1 --&gt;
&lt;!--          6   0   0   2   0   3   3  84   0   0   0 --&gt;
&lt;!--          7   0   0   2   0   2   0   0 107   0   5 --&gt;
&lt;!--          8   0   1   1   0   0   0   0   0  87   0 --&gt;
&lt;!--          9   0   0   0   1   3   1   0   0   2  78 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.933            --&gt;
&lt;!--                  95% CI : (0.9157, 0.9477) --&gt;
&lt;!--     No Information Rate : 0.124            --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9254           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9780   0.9487   0.9238   0.9457   0.9032   0.9205   0.9655   0.9727 --&gt;
&lt;!-- Specificity            0.9945   0.9955   0.9888   0.9890   0.9954   0.9912   0.9912   0.9899 --&gt;
&lt;!-- Pos Pred Value         0.9468   0.9652   0.9065   0.8969   0.9655   0.9101   0.9130   0.9224 --&gt;
&lt;!-- Neg Pred Value         0.9978   0.9932   0.9910   0.9945   0.9864   0.9923   0.9967   0.9966 --&gt;
&lt;!-- Prevalence             0.0910   0.1170   0.1050   0.0920   0.1240   0.0880   0.0870   0.1100 --&gt;
&lt;!-- Detection Rate         0.0890   0.1110   0.0970   0.0870   0.1120   0.0810   0.0840   0.1070 --&gt;
&lt;!-- Detection Prevalence   0.0940   0.1150   0.1070   0.0970   0.1160   0.0890   0.0920   0.1160 --&gt;
&lt;!-- Balanced Accuracy      0.9863   0.9721   0.9563   0.9673   0.9493   0.9558   0.9784   0.9813 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.9062   0.8667 --&gt;
&lt;!-- Specificity            0.9978   0.9923 --&gt;
&lt;!-- Pos Pred Value         0.9775   0.9176 --&gt;
&lt;!-- Neg Pred Value         0.9901   0.9869 --&gt;
&lt;!-- Prevalence             0.0960   0.0900 --&gt;
&lt;!-- Detection Rate         0.0870   0.0780 --&gt;
&lt;!-- Detection Prevalence   0.0890   0.0850 --&gt;
&lt;!-- Balanced Accuracy      0.9520   0.9295 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.142918 mins --&gt;
&lt;!-- r4.large --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  90   0   0   1   1   0   0   0   0   1 --&gt;
&lt;!--          1   0 112   1   4   1   0   1   3   1   0 --&gt;
&lt;!--          2   1   0  83   1   1   1   1   0   3   1 --&gt;
&lt;!--          3   1   0   1  85   0   0   0   0   0   2 --&gt;
&lt;!--          4   0   0   2   0  99   0   1   4   0   3 --&gt;
&lt;!--          5   0   1   1   8   0  91   2   0   2   0 --&gt;
&lt;!--          6   0   0   0   1   0   2 104   0   2   0 --&gt;
&lt;!--          7   0   0   0   1   0   0   0  95   0   6 --&gt;
&lt;!--          8   0   0   1   0   0   0   0   0  75   0 --&gt;
&lt;!--          9   0   0   0   1   3   1   0   2   1  94 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.928            --&gt;
&lt;!--                  95% CI : (0.9102, 0.9432) --&gt;
&lt;!--     No Information Rate : 0.113            --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9199           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9783   0.9912   0.9326   0.8333   0.9429   0.9579   0.9541   0.9135 --&gt;
&lt;!-- Specificity            0.9967   0.9876   0.9901   0.9955   0.9888   0.9845   0.9944   0.9922 --&gt;
&lt;!-- Pos Pred Value         0.9677   0.9106   0.9022   0.9551   0.9083   0.8667   0.9541   0.9314 --&gt;
&lt;!-- Neg Pred Value         0.9978   0.9989   0.9934   0.9813   0.9933   0.9955   0.9944   0.9900 --&gt;
&lt;!-- Prevalence             0.0920   0.1130   0.0890   0.1020   0.1050   0.0950   0.1090   0.1040 --&gt;
&lt;!-- Detection Rate         0.0900   0.1120   0.0830   0.0850   0.0990   0.0910   0.1040   0.0950 --&gt;
&lt;!-- Detection Prevalence   0.0930   0.1230   0.0920   0.0890   0.1090   0.1050   0.1090   0.1020 --&gt;
&lt;!-- Balanced Accuracy      0.9875   0.9894   0.9614   0.9144   0.9658   0.9712   0.9743   0.9528 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8929   0.8785 --&gt;
&lt;!-- Specificity            0.9989   0.9910 --&gt;
&lt;!-- Pos Pred Value         0.9868   0.9216 --&gt;
&lt;!-- Neg Pred Value         0.9903   0.9855 --&gt;
&lt;!-- Prevalence             0.0840   0.1070 --&gt;
&lt;!-- Detection Rate         0.0750   0.0940 --&gt;
&lt;!-- Detection Prevalence   0.0760   0.1020 --&gt;
&lt;!-- Balanced Accuracy      0.9459   0.9348 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.345818 mins --&gt;
&lt;!-- r4.xlarge --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  93   0   0   1   0   0   0   1   0   1 --&gt;
&lt;!--          1   0 106   1   1   0   0   1   2   1   0 --&gt;
&lt;!--          2   0   1  89   2   0   1   0   1   2   0 --&gt;
&lt;!--          3   0   0   2  84   0   2   0   0   1   3 --&gt;
&lt;!--          4   0   0   0   0 102   2   2   4   0   1 --&gt;
&lt;!--          5   0   1   1   2   0  96   1   0   2   0 --&gt;
&lt;!--          6   1   0   1   0   0   2  88   0   4   0 --&gt;
&lt;!--          7   0   0   2   1   0   0   0  98   1   5 --&gt;
&lt;!--          8   0   2   6   1   0   0   0   0  75   0 --&gt;
&lt;!--          9   0   0   0   2   7   1   0   3   1  89 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.92             --&gt;
&lt;!--                  95% CI : (0.9014, 0.9361) --&gt;
&lt;!--     No Information Rate : 0.11             --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9111           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9894   0.9636   0.8725   0.8936   0.9358   0.9231   0.9565   0.8991 --&gt;
&lt;!-- Specificity            0.9967   0.9933   0.9922   0.9912   0.9899   0.9922   0.9912   0.9899 --&gt;
&lt;!-- Pos Pred Value         0.9687   0.9464   0.9271   0.9130   0.9189   0.9320   0.9167   0.9159 --&gt;
&lt;!-- Neg Pred Value         0.9989   0.9955   0.9856   0.9890   0.9921   0.9911   0.9956   0.9877 --&gt;
&lt;!-- Prevalence             0.0940   0.1100   0.1020   0.0940   0.1090   0.1040   0.0920   0.1090 --&gt;
&lt;!-- Detection Rate         0.0930   0.1060   0.0890   0.0840   0.1020   0.0960   0.0880   0.0980 --&gt;
&lt;!-- Detection Prevalence   0.0960   0.1120   0.0960   0.0920   0.1110   0.1030   0.0960   0.1070 --&gt;
&lt;!-- Balanced Accuracy      0.9930   0.9784   0.9324   0.9424   0.9628   0.9576   0.9739   0.9445 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8621   0.8990 --&gt;
&lt;!-- Specificity            0.9901   0.9845 --&gt;
&lt;!-- Pos Pred Value         0.8929   0.8641 --&gt;
&lt;!-- Neg Pred Value         0.9869   0.9889 --&gt;
&lt;!-- Prevalence             0.0870   0.0990 --&gt;
&lt;!-- Detection Rate         0.0750   0.0890 --&gt;
&lt;!-- Detection Prevalence   0.0840   0.1030 --&gt;
&lt;!-- Balanced Accuracy      0.9261   0.9417 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.139538 mins --&gt;
&lt;!-- code from kory becker: https://gist.github.com/primaryobjects/b0c8333834debbc15be4 --&gt;
&lt;!-- c4.large --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  96   0   0   0   1   0   0   3   0   1 --&gt;
&lt;!--          1   1 102   2   1   2   0   1   1   2   0 --&gt;
&lt;!--          2   1   0  94   1   2   2   0   2   0   0 --&gt;
&lt;!--          3   0   0   2  85   0   2   0   0   1   0 --&gt;
&lt;!--          4   0   0   3   0 103   3   0   2   0   5 --&gt;
&lt;!--          5   2   1   0   5   0  83   0   0   4   3 --&gt;
&lt;!--          6   1   0   1   1   2   2 102   0   1   0 --&gt;
&lt;!--          7   0   0   4   1   0   0   0  94   0   1 --&gt;
&lt;!--          8   0   0   2   0   0   0   0   0  68   1 --&gt;
&lt;!--          9   0   0   0   4   3   2   0   1   2  88 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.915           --&gt;
&lt;!--                  95% CI : (0.896, 0.9315) --&gt;
&lt;!--     No Information Rate : 0.113           --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16       --&gt;
&lt;!--                   Kappa : 0.9055          --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA              --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9505   0.9903   0.8704   0.8673   0.9115   0.8830   0.9903   0.9126 --&gt;
&lt;!-- Specificity            0.9944   0.9889   0.9910   0.9945   0.9853   0.9834   0.9911   0.9933 --&gt;
&lt;!-- Pos Pred Value         0.9505   0.9107   0.9216   0.9444   0.8879   0.8469   0.9273   0.9400 --&gt;
&lt;!-- Neg Pred Value         0.9944   0.9989   0.9844   0.9857   0.9887   0.9878   0.9989   0.9900 --&gt;
&lt;!-- Prevalence             0.1010   0.1030   0.1080   0.0980   0.1130   0.0940   0.1030   0.1030 --&gt;
&lt;!-- Detection Rate         0.0960   0.1020   0.0940   0.0850   0.1030   0.0830   0.1020   0.0940 --&gt;
&lt;!-- Detection Prevalence   0.1010   0.1120   0.1020   0.0900   0.1160   0.0980   0.1100   0.1000 --&gt;
&lt;!-- Balanced Accuracy      0.9725   0.9896   0.9307   0.9309   0.9484   0.9332   0.9907   0.9530 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8718   0.8889 --&gt;
&lt;!-- Specificity            0.9967   0.9867 --&gt;
&lt;!-- Pos Pred Value         0.9577   0.8800 --&gt;
&lt;!-- Neg Pred Value         0.9892   0.9878 --&gt;
&lt;!-- Prevalence             0.0780   0.0990 --&gt;
&lt;!-- Detection Rate         0.0680   0.0880 --&gt;
&lt;!-- Detection Prevalence   0.0710   0.1000 --&gt;
&lt;!-- Balanced Accuracy      0.9343   0.9378 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 2.016729 mins --&gt;
&lt;!-- m4.2xlarge --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0 102   0   1   0   0   0   1   0   0   2 --&gt;
&lt;!--          1   0 104   5   3   1   1   2   1   3   0 --&gt;
&lt;!--          2   0   0  92   6   2   1   2   2   2   0 --&gt;
&lt;!--          3   0   0   0  87   0   0   0   0   1   2 --&gt;
&lt;!--          4   0   0   0   0 105   1   3   2   0   3 --&gt;
&lt;!--          5   2   0   1   8   0  75   1   0   1   1 --&gt;
&lt;!--          6   0   0   0   1   2   1  96   0   1   0 --&gt;
&lt;!--          7   0   0   0   0   1   0   0  93   0   4 --&gt;
&lt;!--          8   0   0   1   2   0   0   0   0  81   0 --&gt;
&lt;!--          9   0   0   0   0   5   3   0   3   3  77 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.912            --&gt;
&lt;!--                  95% CI : (0.8927, 0.9288) --&gt;
&lt;!--     No Information Rate : 0.116            --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9021           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9808   1.0000   0.9200   0.8131   0.9052   0.9146   0.9143   0.9208 --&gt;
&lt;!-- Specificity            0.9955   0.9821   0.9833   0.9966   0.9898   0.9847   0.9944   0.9944 --&gt;
&lt;!-- Pos Pred Value         0.9623   0.8667   0.8598   0.9667   0.9211   0.8427   0.9505   0.9490 --&gt;
&lt;!-- Neg Pred Value         0.9978   1.0000   0.9910   0.9780   0.9876   0.9923   0.9900   0.9911 --&gt;
&lt;!-- Prevalence             0.1040   0.1040   0.1000   0.1070   0.1160   0.0820   0.1050   0.1010 --&gt;
&lt;!-- Detection Rate         0.1020   0.1040   0.0920   0.0870   0.1050   0.0750   0.0960   0.0930 --&gt;
&lt;!-- Detection Prevalence   0.1060   0.1200   0.1070   0.0900   0.1140   0.0890   0.1010   0.0980 --&gt;
&lt;!-- Balanced Accuracy      0.9882   0.9911   0.9517   0.9049   0.9475   0.9497   0.9543   0.9576 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8804   0.8652 --&gt;
&lt;!-- Specificity            0.9967   0.9846 --&gt;
&lt;!-- Pos Pred Value         0.9643   0.8462 --&gt;
&lt;!-- Neg Pred Value         0.9880   0.9868 --&gt;
&lt;!-- Prevalence             0.0920   0.0890 --&gt;
&lt;!-- Detection Rate         0.0810   0.0770 --&gt;
&lt;!-- Detection Prevalence   0.0840   0.0910 --&gt;
&lt;!-- Balanced Accuracy      0.9386   0.9249 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.095459 mins --&gt;
&lt;!-- m4.4xlarge --&gt;
&lt;!-- Confusion Matrix and Statistics --&gt;
&lt;!--           Reference --&gt;
&lt;!-- Prediction   0   1   2   3   4   5   6   7   8   9 --&gt;
&lt;!--          0  87   0   0   0   0   0   1   0   0   1 --&gt;
&lt;!--          1   0 106   3   0   1   0   2   1   1   0 --&gt;
&lt;!--          2   2   0  92   4   1   0   1   1   1   0 --&gt;
&lt;!--          3   1   0   0  93   0   2   0   0   0   0 --&gt;
&lt;!--          4   0   0   0   0 104   1   0   4   0   3 --&gt;
&lt;!--          5   0   1   1   6   0  97   1   0   3   1 --&gt;
&lt;!--          6   0   0   0   0   3   4  94   0   2   0 --&gt;
&lt;!--          7   0   1   1   0   0   0   0  99   0   3 --&gt;
&lt;!--          8   1   0   1   2   0   0   0   0  73   0 --&gt;
&lt;!--          9   0   0   0   2   2   1   0   2   4  82 --&gt;
&lt;!-- Overall Statistics --&gt;
&lt;!--                Accuracy : 0.927            --&gt;
&lt;!--                  95% CI : (0.9091, 0.9423) --&gt;
&lt;!--     No Information Rate : 0.111            --&gt;
&lt;!--     P-Value [Acc &gt; NIR] : &lt; 2.2e-16        --&gt;
&lt;!--                   Kappa : 0.9188           --&gt;
&lt;!--  Mcnemar&#39;s Test P-Value : NA               --&gt;
&lt;!-- Statistics by Class: --&gt;
&lt;!--                      Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5 Class: 6 Class: 7 --&gt;
&lt;!-- Sensitivity            0.9560   0.9815   0.9388   0.8692   0.9369   0.9238   0.9495   0.9252 --&gt;
&lt;!-- Specificity            0.9978   0.9910   0.9889   0.9966   0.9910   0.9855   0.9900   0.9944 --&gt;
&lt;!-- Pos Pred Value         0.9775   0.9298   0.9020   0.9687   0.9286   0.8818   0.9126   0.9519 --&gt;
&lt;!-- Neg Pred Value         0.9956   0.9977   0.9933   0.9845   0.9921   0.9910   0.9944   0.9911 --&gt;
&lt;!-- Prevalence             0.0910   0.1080   0.0980   0.1070   0.1110   0.1050   0.0990   0.1070 --&gt;
&lt;!-- Detection Rate         0.0870   0.1060   0.0920   0.0930   0.1040   0.0970   0.0940   0.0990 --&gt;
&lt;!-- Detection Prevalence   0.0890   0.1140   0.1020   0.0960   0.1120   0.1100   0.1030   0.1040 --&gt;
&lt;!-- Balanced Accuracy      0.9769   0.9863   0.9638   0.9329   0.9640   0.9546   0.9698   0.9598 --&gt;
&lt;!--                      Class: 8 Class: 9 --&gt;
&lt;!-- Sensitivity            0.8690   0.9111 --&gt;
&lt;!-- Specificity            0.9956   0.9879 --&gt;
&lt;!-- Pos Pred Value         0.9481   0.8817 --&gt;
&lt;!-- Neg Pred Value         0.9881   0.9912 --&gt;
&lt;!-- Prevalence             0.0840   0.0900 --&gt;
&lt;!-- Detection Rate         0.0730   0.0820 --&gt;
&lt;!-- Detection Prevalence   0.0770   0.0930 --&gt;
&lt;!-- Balanced Accuracy      0.9323   0.9495 --&gt;
&lt;!-- &gt; duration &lt;- Sys.time() - start --&gt;
&lt;!-- &gt; duration --&gt;
&lt;!-- Time difference of 1.076214 mins --&gt;
&lt;!-- m4.16xlarge --&gt;
&lt;/div&gt;
&lt;img src=&#34;https://vg09.met.vgwort.de/na/e1d3f508db4d4a46a5f6bfad2b788805&#34; width=&#34;1&#34; height=&#34;1&#34; alt=&#34;&#34;&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id=&#34;fn1&#34;&gt;&lt;p&gt;…why is it ‚nano‘, ‚micro‘ but then ‚large‘ ‚extra large‘? Be consistent, dangit!&lt;a href=&#34;#fnref1&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>My Motivations for Starting a Blog</title>
      <link>https://www.sastibe.de/2018/01/my-motivations-for-starting-a-blog/</link>
      <pubDate>Sun, 28 Jan 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2018/01/my-motivations-for-starting-a-blog/</guid>
      <description>


&lt;p&gt;Hello world!&lt;/p&gt;
&lt;p&gt;My name is Sebastian Schweer, and I am a Data Scientist. This job description is increasingly popular, but it is notoriously difficult to describe precisely, what that entails. Let me show you one of my favourite definitions:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://twitter.com/hadleywickham/status/914140589565841410&#34; alt=&#34;Source.&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Source.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;My job requires me to spend a lot of time each day writing code in varying languages, mostly &lt;code&gt;R&lt;/code&gt; but also Python and SAS. This inevitably leads me to spend a lot of time thinking about both code as well as the process of programming itself. The major question is, as always, “How do you ensure, that your product is of the best quality?”. Recently, I stumbled upon&lt;a href=&#34;#fn1&#34; class=&#34;footnoteRef&#34; id=&#34;fnref1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; a incredibly concise diagram:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/a_270/v1517091390/skizzeblog_nsrt9u.jpg&#34; alt=&#34;The importance of collaboration&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;The importance of collaboration&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I believe this is an astute observations, and I find its reflections in many daily situations including (but not limited to) producing code or data analyses. More precisely, I identified these 3 consequences of writing code with the intent of publicizing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tested&lt;/strong&gt;: Nobody wants to publish content that only works once or only works on a certain local machine. Thus, any project up for publication automatically gets tested and tried much more meticuously.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modular&lt;/strong&gt;: It is much easier to explain and distribute several single clear ideas than one larger, vague idea. Hence, publication leads to more modular code, creating a more flexible and adaptive code base.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Documented&lt;/strong&gt;: It doesn’t suffice if you as the author understand what the function with non-descriptive names such as &lt;code&gt;fn_011_v3&lt;/code&gt; does, that should be apparent from the name or at least from the documentation. &lt;em&gt;The onus of understanding the code is transferred from the mind of the author to the body of the code.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of these characteristics increase the maturity and quality of the code. Since I am obviously interested in producing high quality work, I started this blog in order to have a public outlet for all my private little programming projects.&lt;/p&gt;
&lt;p&gt;The scope of these projects will vary wildly, I am sure, since the inspiration are heterogeneous. For instance, the first three posts have three different “sponsors”:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I wrote &lt;a href=&#34;https://www.sastibe.de/2018/01/setting-up-a-scalable-rstudio-instance-in-aws/&#34;&gt;Setting up an RStudio instance on AWS&lt;/a&gt; with the audience of my father in mind, since he showed such an interest in my explanations of the topic over the Christmas break,&lt;/li&gt;
&lt;li&gt;I wrote (or rather ‘will write’) the post &lt;a href=&#34;&#34;&gt;A benchmark for dplyr vs. dbplyr&lt;/a&gt; for my sister-in-law, since she asked me about the topic and I didn’t know anything about it at the time,&lt;/li&gt;
&lt;li&gt;and for the present article, or rather statement, I had &lt;a href=&#34;https://twitter.com/christofhorn&#34;&gt;my former employer&lt;/a&gt; in mind, a great fan of simple but concise diagrams depicting deep thoughts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I appreciate any remarks or comments on anything that I write, and I wish you lots of entertainment perusing my site.&lt;/p&gt;
&lt;img src=&#34;https://vg09.met.vgwort.de/na/b6dce22ca610455cb972d96daf13fb32&#34; width=&#34;1&#34; height=&#34;1&#34; alt=&#34;&#34;&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id=&#34;fn1&#34;&gt;&lt;p&gt;I can’t find the original source anymore, I have spent a long time going through my Twitter feed. If anyone recognizes the slide and especially the author, I would be incredibly thankful for the information and would gladly update the source information here.&lt;a href=&#34;#fnref1&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Setting up a Scalable RStudio Instance in AWS</title>
      <link>https://www.sastibe.de/2018/01/setting-up-a-scalable-rstudio-instance-in-aws/</link>
      <pubDate>Sat, 27 Jan 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.sastibe.de/2018/01/setting-up-a-scalable-rstudio-instance-in-aws/</guid>
      <description>


&lt;p&gt;Assume you want to start to write &lt;code&gt;R&lt;/code&gt; code (a very good decision, in my opinion) and you want to be able to write and test code whereever you are. Wouldn’t it be awesome if one could set up an environment that can be used for &lt;code&gt;R&lt;/code&gt; coding independent of any device? Where all you need is a decent browser, a working internet connection and you’re good to go?&lt;/p&gt;
&lt;p&gt;Obviously, that is the case. In this post, I will show you the steps for setting up such an environment on Amazon Web Services (AWS). The main advantages of using such a set-up:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Runs on any infrastructure: All you need is a working internet connection, a decent browser and an AWS account, which is usually&lt;a href=&#34;#fn1&#34; class=&#34;footnoteRef&#34; id=&#34;fnref1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; free.&lt;/li&gt;
&lt;li&gt;Runs everywhere: The AWS machine will be set up to automatically clone your GitHub repository (don’t worry if this doesn’t mean anything to you, this point is optional), so that you don’t even have to have your codes on the device.&lt;/li&gt;
&lt;li&gt;Scalable: The AWS machine running your code can be chosen to suit any of your needs, in any session. Just playing around with a new package? Use the smallest size, doesn’t cost a dime. Trying to re-create state-of-the-art machine learning performance with a fancy DNN-classifier? Go all in with 500 GB of RAM; it’ll cost ya, but it’s fun.&lt;/li&gt;
&lt;li&gt;Up-to-Date: Since the envirionment is freshly installed each time, your &lt;code&gt;R&lt;/code&gt; version as well as the package versions in use are automatically up-to-date. In the latter case, that would also be easy to maintain on a local machine, the former, however, is a nice benefit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Convinced? Awesome, let’s get started!&lt;/p&gt;
&lt;div id=&#34;overview-of-main-steps&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Overview of main steps&lt;/h1&gt;
&lt;p&gt;First a short overview of the main steps covered in this blog post:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;Get an AWS account (duh!),&lt;/li&gt;
&lt;li&gt;Configure your RStudio AMI,
&lt;ol style=&#34;list-style-type: lower-roman&#34;&gt;
&lt;li&gt;Find the right RStudio AMI,&lt;/li&gt;
&lt;li&gt;Configure Security Groups,&lt;/li&gt;
&lt;li&gt;Automatically Change your RStudio Password,&lt;/li&gt;
&lt;li&gt;Incorporate a clone of your GitHub repo,&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Start your First RStudio instance (and bask in its glory),&lt;/li&gt;
&lt;li&gt;Create a personal AMI for future convenience,&lt;/li&gt;
&lt;li&gt;Shut down the Instance and all Resources.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Preconditions for this tutorial should be basically none, at least in terms of coding and/or understanding &lt;code&gt;R&lt;/code&gt; itself. The main task will lie in clicking the right buttons.&lt;/p&gt;
&lt;div id=&#34;step-1-get-an-aws-account.&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Step 1: Get an AWS account.&lt;/h2&gt;
&lt;p&gt;Well, it isn’t really my place to tell you how to get an AWS account if Amazon itself did &lt;a href=&#34;https://aws.amazon.com/resources/create-account/&#34;&gt;such a great job explaining it&lt;/a&gt;. Just use the link to set up your account, and I further suggest to follow &lt;a href=&#34;https://aws.amazon.com/getting-started/tutorials/launch-a-virtual-machine/&#34;&gt;this set of instructions&lt;/a&gt;, building your very first instance. Take your time going through these instructions, I’ll wait…&lt;/p&gt;
&lt;p&gt;Ready? Alright, sweet. Then we continue with&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;step-2-configure-your-rstudio-ami.&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Step 2: Configure your RStudio AMI.&lt;/h2&gt;
&lt;p&gt;In this step, I collected several steps, not all of which are necessary. Steps 2a and 2b are crucial, Step 2c is recommended. Step 2d can be skipped on the first set-up. The implementation of this step can always be re-assessed whenever it becomes necessary.&lt;/p&gt;
&lt;p&gt;Let’s begin by starting an instance in the AWS Dashboard. Just open “Instances” on the side menu of your EC2 Dashboard and click on “Launch Instance”:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1517086196/screenshot_launch_instance_ltpbba.png&#34; alt=&#34;Here we go!&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Here we go!&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;step-2a-find-the-current-rstudio-ami.&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Step 2a: Find the current RStudio AMI.&lt;/h3&gt;
&lt;p&gt;The first task is to choose an Amazon Machine Image, or AMI, which is essentially an operating system container. More to the point, in an AMI a Linux distribution can be bundled with addtional software packages tailored to any type of need: web development, accounting (I’m guessing here, but … sure) and, most importantly, using RStudio. &lt;a href=&#34;https://www.louisaslett.com/RStudio_AMI/&#34;&gt;On Louis Anslett’s homepage&lt;/a&gt; you can find a wonderful storage of RStudio AMIs. We use the newest version for the correct geographical zone, in my case Frankfurt:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1516304602/screenshot_louisaslett_eyug44.png&#34; alt=&#34;One AMI for each region. Neat&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;One AMI for each region. Neat&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;As you can see, thanks to Louis Anslett’s work, the AMI includes not only the newest version of RStudio but also of &lt;code&gt;R&lt;/code&gt; itself as well as a handful of helpful additional software packages. For instance, Git comes pre-installed, which we will use later on; also &lt;code&gt;Julia&lt;/code&gt;is installed for those looking to try out the possible future of data science languages. But I’m deviating… Let’s note the AMI-ID (in our case “ami-a80db3c7”), put this in the start-up options and let’s continue.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;step-2b-configure-the-security-groups-for-your-rstudio-instance&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Step 2b: Configure the security groups for your RStudio instance&lt;/h3&gt;
&lt;p&gt;In AWS, &lt;a href=&#34;https://docs.aws.amazon.com/en_en/AWSEC2/latest/UserGuide/using-network-security.html&#34;&gt;security groups&lt;/a&gt; control the access to the machine over the internet (if you don‘t care about how exactly this works and only want to follow the instructions, just skip the next sentences). More precisely, they define which kind of protocols may use which ports on your machine from a given IP range. For example, you can set the access rights for a ssh protocol to be able to connect to your machine on port 22 only from your personal IP address at home.&lt;/p&gt;
&lt;p&gt;In our case, we actually only need access via http protocol, since the RStudio instance will allow log-in via browser interface. Therefore, our security group can be kept quite simple:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1515794260/screenshot_security_group_xy0wkr.png&#34; alt=&#34;The bottom option allows the whole world to see the instance. Golly.&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;The bottom option allows the whole world to see the instance. Golly.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The IP range can be limited to your own personal IP to ensure the safety of your instance. This precaution could be necessary since only the login page of RStudio stands between the internet and your instance (spooky, huh?). However, since the personal IP usually changes each day (roughly speaking), this becomes a personal question of “privacy vs. convenience”. In my case, as you can see, convenience won.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;step2c&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;2c. Automatically Change your RStudio Password&lt;/h3&gt;
&lt;p&gt;In the documentation of the RStudio AMI we can find the following passage: “It is highly recommended you change the password immediately and an easy means of doing this is explained upon login in the script that is loaded there”. Alright, fine, but I’d rather to that programmatically, i.e. automatically. The weirdly named “User data” option provides just the framework: All commands placed here get executed at the beginning of the start-up. You can find this setting in the menu “Configure Instance Details” under “Advanced Details”.&lt;/p&gt;
&lt;p&gt;In order to change the password of the user “RStudio” on start-up, we paste the following code:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;#!/bin/bash
echo &amp;quot;rstudio:guest&amp;quot; | chpasswd&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where you should replace the password “guest” with whatever you deem appropriate. We are almost done with the set-up now, there only remains&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;step-2d-optional-automatically-clone-a-github-repo&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Step 2d (optional): Automatically Clone a GitHub repo&lt;/h3&gt;
&lt;p&gt;I write all my private code projects on my GitHub account (here: &lt;a href=&#34;https://github.com/sebastianschweer&#34; class=&#34;uri&#34;&gt;https://github.com/sebastianschweer&lt;/a&gt;. What a shameless self-plug!) and I also would like my code to be available for me each time I start up my RStudio instance. Fortunately, this is easily configured with “User data” again, by just adding the command&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;git clone https://github.com/sebastianschweer/sastibe.git /home/rstudio/sastibe
chmod -R 777 /home/rstudio/sastibe&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to the “User data” of &lt;a href=&#34;#setp2c&#34;&gt;Step 2c&lt;/a&gt;. Now, when I start up the new RStudio instance, the repository &lt;code&gt;sastibe&lt;/code&gt; gets cloned into the folder &lt;code&gt;/home/rstudio/sastibe&lt;/code&gt;, which is automatically loaded in RStudio. The line with &lt;code&gt;chmod&lt;/code&gt; ensures that any user (not just root, who is executing this command at startup) has the rights to alter content in that folder. This permission allows me to change code and pushing my changes to the repository and all that, which is just super convenient.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;step-3-start-your-first-rstudio-instance-and-bask-in-its-glory&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Step 3: Start your First RStudio instance (and bask in its glory),&lt;/h2&gt;
&lt;p&gt;The last and most exciting click is this one:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1516310280/screenshot_finish_launch_jdqvec.png&#34; alt=&#34;Hooray, all the hard work pays off!&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Hooray, all the hard work pays off!&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;We have now started the instance. This means that a virtual machine, configured according to our specifitcations is being run on one of Amazon’s bajillion&lt;a href=&#34;#fn2&#34; class=&#34;footnoteRef&#34; id=&#34;fnref2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt; cloud computing servers. In the menu “Instances” we now see an active instance running. After we are done, we will use this menu to shut it down again (so that it doesn#t cost us), but not now: we are eager to test it out! Accessing the instance is quite easy in our case: Just copy the “IPv4 Public IP” adress and paste it in your browser:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1517085751/screenshot_publicip_sjmc6c.png&#34; alt=&#34;Green lights indicate the instance runs harmoniously.&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Green lights indicate the instance runs harmoniously.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Hopefully, you haven’t forgotten your password (check &lt;a href=&#34;#step2c&#34;&gt;Step 2c&lt;/a&gt; if you did), your username is “rstudio”. After succesful login, you’ll be greeted by this screen:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1517085281/screenshot_rstudio_running_ss7eqo.png&#34; alt=&#34;The login to a world of wonder.&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;The login to a world of wonder.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Et voilà: Your very own scalable RStudio instance, accessible world-wide and ready to use at all times. In other words: Congratulations, you now have a state-of-the-art Data Science Machine at your command. Use it wisely. If you want to see what kind of wonders you can do with this setup, check out the &lt;a href=&#34;2018-03-10-benchmarking-aws-instances.html&#34; &gt;upcoming blog post&lt;/a&gt;. Otherwise, let me just point you towards another &lt;a href=&#34;https://www.kaggle.com/rtatman/getting-started-in-r-first-steps&#34;&gt;wonderful introduction&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;step-4-create-a-personal-ami-for-future-convenience&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Step 4: Create a personal AMI for future convenience&lt;/h2&gt;
&lt;p&gt;Now, Step 3 consisted of 4 different steps, and it would be ratehr inconvenient to have to repeat these steps each time you need a new RStudio instance, right? Luckily, AWS has got you covered: You can create an “image” of any AWS instance: simply put, this saves your current configuration for later use. The creation of such an image is straightforward: Just go to “Instances” in your AWS Dashboard, right-click on the machine you want to base the image on and select “Create Image”:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1517086580/screenshot_createAMI_vx0esq.png&#34; alt=&#34;Locate Create Image in the menu of Instance Settings&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Locate “Create Image” in the menu of “Instance Settings”&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;After this step, you will find the created image in the menu AMIs, ready to reuse. Before you go do crazy and wonderful Data Science in your wonderful new Environment, though, it is essential that you let me tell you about&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;the-last-step-after-each-aws-usage-shutting-down&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;The Last Step (After Each AWS Usage): Shutting Down&lt;/h2&gt;
&lt;p&gt;An AWS instance doesn’t shut down by itself, or go into hibernation or anything like that. It just keeps running unless otherwise specified, eventually costing lots of money (even the free tier services have their prices after some limit). So, let me show you how to shut down your brand new machine. It’s quite simple, just right-click on the running instance and set the “Instance State” to “Terminate”.&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1516310583/screenshot_terminateinstance_el4vj8.png&#34; alt=&#34;Show no mercy, terminate!&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Show no mercy, terminate!&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Since our instance also automatically loaded an EBS volume (like a hard disk to save data), we need to shut that down too. Choose the entry EBS volumes in the sidepane and &lt;em&gt;Detach&lt;/em&gt; all volumes that are active. If your overview in the pane “Dashboard” looks similar to this :&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://res.cloudinary.com/dlprdrxib/image/upload/v1516310279/screenshot_clean_dashboard_cqhspn.png&#34; alt=&#34;5 volumes: make sure that they are not in-use, since storage may also cost after some initial period&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;“5 volumes”: make sure that they are not in-use, since storage may also cost after some initial period&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;There are no hidden services running racking up costs.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;summary&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Summary&lt;/h1&gt;
&lt;p&gt;After configuring your AWS environment as decried above, your new ‚Data Science Workflow‘ can look like this:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;Log in to AWS,&lt;/li&gt;
&lt;li&gt;Choose your personal RStudio AMI,&lt;/li&gt;
&lt;li&gt;Choose the Necessary Specifications of the Machine,&lt;/li&gt;
&lt;li&gt;Log in to the Machine in the Browser,&lt;/li&gt;
&lt;li&gt;Do Awesome Data Science,&lt;/li&gt;
&lt;li&gt;Shut Down Machine and all Resources.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Have fun, and remember: Primere non nocere!&lt;/p&gt;
&lt;/div&gt;
&lt;img src=&#34;https://vg09.met.vgwort.de/na/633e38e3c0c64d7ba80ca16d5975252b&#34; width=&#34;1&#34; height=&#34;1&#34; alt=&#34;&#34;&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id=&#34;fn1&#34;&gt;&lt;p&gt;For a given value of usually. I personally try to test out lots of resources just because I can, yet even so, my total expenses for AWS result in 0.37€ (January 2018).&lt;a href=&#34;#fnref1&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li id=&#34;fn2&#34;&gt;&lt;p&gt;A rough estimate. Maybe only bajillions.&lt;a href=&#34;#fnref2&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
  </channel>
</rss>
