<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Notes on The Edge Cases</title>
    <link>https://www.kylestratis.com/notes/</link>
    <description>Recent content in Notes on The Edge Cases</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>© 2025</copyright>
    <atom:link href="https://www.kylestratis.com/notes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Building Docker Images on M1 Mac for Other Platforms</title>
      <link>https://www.kylestratis.com/notes/building-docker-images-on-m1-mac-for-other-platforms/</link>
      <pubDate>Sat, 19 Sep 2026 02:10:03 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/building-docker-images-on-m1-mac-for-other-platforms/</guid>
      <description>&lt;p&gt;In order to build Docker images for Lambda functions with CDK on ARM or other non-Intel platforms, but want the Lambda to be on an x86_64 platform, use the &lt;code&gt;platform&lt;/code&gt; parameter with the &lt;code&gt;from_image_asset()&lt;/code&gt; function.&lt;/p&gt;&#xA;&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;_lambda&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;DockerImage_function(&#xA;&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;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    code&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;_lambda&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;DockerImageCode&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;from_image_asset(  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        directory&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;./lambda&amp;#34;&lt;/span&gt;,  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        file&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;./myservice/Dockerfile&amp;#34;&lt;/span&gt;,  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        platform&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;ecr_assets&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Platform&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;LINUX_AMD64,  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ),&#xA;&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;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;ecr_assets&lt;/code&gt; is a CDK package that also needs to be imported from the main &lt;code&gt;aws_cdk&lt;/code&gt; package.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Strategies for Mocking AWS Services for Testing</title>
      <link>https://www.kylestratis.com/notes/strategies-for-mocking-aws-services-for-testing/</link>
      <pubDate>Sat, 19 Sep 2026 02:10:03 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/strategies-for-mocking-aws-services-for-testing/</guid>
      <description>&lt;h2 id=&#34;stubber&#34;&gt;Stubber&lt;/h2&gt;&#xA;&lt;p&gt;Boto3 comes with the &lt;code&gt;Stubber&lt;/code&gt; class, but it doesn&amp;rsquo;t work well for all calls. In those cases&lt;/p&gt;&#xA;&lt;h2 id=&#34;moto&#34;&gt;Moto&lt;/h2&gt;&#xA;&lt;p&gt;Moto is a Python package that allows for easy mocking of AWS services. The canonical way to do this is to use the &lt;code&gt;@mock_&amp;lt;service&amp;gt;&lt;/code&gt; decorator outside of your test function and call &lt;code&gt;boto3&lt;/code&gt; functions there. Moto will detect and intercept the &lt;code&gt;boto3&lt;/code&gt; calls. Code example from the Moto documentation:&lt;/p&gt;&#xA;&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; boto3&#xA;&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; moto &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; mock_s3&#xA;&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; mymodule &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; MyModel&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;@mock_s3&lt;/span&gt;&#xA;&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;test_my_model_save&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; conn &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; boto3&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;resource(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;s3&amp;#39;&lt;/span&gt;, region_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;us-east-1&amp;#39;&lt;/span&gt;)&#xA;&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;# We need to create the bucket since this is all in Moto&amp;#39;s &amp;#39;virtual&amp;#39; AWS account&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; conn&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;create_bucket(Bucket&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;mybucket&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; model_instance &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; MyModel(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;steve&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;is awesome&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; model_instance&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;save&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; body &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; conn&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Object(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;mybucket&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;steve&amp;#39;&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;get[&#xA;&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;#39;Body&amp;#39;&lt;/span&gt;]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;read&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;decode(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;utf-8&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;assert&lt;/span&gt; body &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;is awesome&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;patching-clients-and-resources&#34;&gt;Patching Clients and Resources&lt;/h3&gt;&#xA;&lt;p&gt;This is kind of useless for most testing, where there is an external module or package under test. The Moto documentation advises users to set up their &lt;code&gt;boto3&lt;/code&gt; clients and/or resources within the functions that use them, but this isn&amp;rsquo;t always workable. Instead, since you&amp;rsquo;re already importing the module or package under test, you can use Moto&amp;rsquo;s &lt;code&gt;patch_client&lt;/code&gt; or &lt;code&gt;patch_resource&lt;/code&gt; to patch the instantiated client or resource:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Organizing Python Packages and User-Facing API with __init__</title>
      <link>https://www.kylestratis.com/notes/organizing-python-packages-and-user-facing-api-with-init/</link>
      <pubDate>Sat, 30 May 2026 02:50:10 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/organizing-python-packages-and-user-facing-api-with-init/</guid>
      <description>&lt;p&gt;Python gives you a number of options for exporting the public portions of your package&amp;rsquo;s API depending on the needs of your users. These are exposed via &lt;code&gt;__init__.py&lt;/code&gt;. This allows the developer to have a module structure that is optimized for developers while exposing an API that is optimal for the end user.&lt;/p&gt;&#xA;&lt;p&gt;Given the following example package with 3 modules:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/src  &#xA;    /example_pkg  &#xA;        __init__.py  &#xA;        foo.py  &#xA;        bar.py  &#xA;        baz.py  &#xA;    setup.py  &#xA;    README.md  &#xA;    LICENSE&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And the functions from each module:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Notes for Backpropagation Through Space Time and the Brain</title>
      <link>https://www.kylestratis.com/notes/notes-for-backpropagation-through-space-time-and-the-brain/</link>
      <pubDate>Mon, 15 Dec 2025 18:11:24 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/notes-for-backpropagation-through-space-time-and-the-brain/</guid>
      <description>&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;What are the key ideas?&#xA;How can I apply this knowledge that I learned?&#xA;How do these ideas relate to what I already know?&lt;/p&gt;&#xA;&lt;h2 id=&#34;ideas&#34;&gt;💡Ideas&lt;/h2&gt;&#xA;&lt;p&gt;Note: These should become Project Idea fleeting notes with a link back to this source.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fleeting-notes&#34;&gt;Fleeting Notes&lt;/h2&gt;&#xA;&lt;p&gt;Note: Conceptual notes that aren&amp;rsquo;t as tied to the source material. These are fodder for processing into evergreen notes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;literature-notes&#34;&gt;Literature Notes&lt;/h2&gt;&#xA;&lt;p&gt;Note: Commentary on the book or things you don&amp;rsquo;t want to forget. Maybe for use in a public mind garden. Should have a visible source reference. These are &amp;ldquo;weakly evergreen&amp;rdquo; because they&amp;rsquo;re tied heavily to a single piece. Must be in your own words. These should be processed into Evergreen notes, or used as fodder for them.&#xA;&amp;ldquo;“Literature notes”, titled after a single work and meant primarily as linkages to other more durable notes, and as targets for backlinks. I write these roughly as “outline notes,” except for someone else’s ideas.&amp;rdquo;&#xA;These should be regularly refactored into individual notes in &lt;code&gt;Sources/! Literature Notes/&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Intro to Database Systems Notes</title>
      <link>https://www.kylestratis.com/notes/intro-to-database-systems-notes/</link>
      <pubDate>Tue, 18 Nov 2025 17:04:50 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/intro-to-database-systems-notes/</guid>
      <description>&lt;h2 id=&#34;intro-to-database-systems-cmu-15-445645&#34;&gt;Intro to Database Systems CMU 15-445/645&lt;/h2&gt;&#xA;&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;Things that go here can include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Question trying to answer&lt;/li&gt;&#xA;&lt;li&gt;Success criteria&lt;/li&gt;&#xA;&lt;li&gt;Current state (high level view of what&amp;rsquo;s next)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;lessons-learned&#34;&gt;Lessons Learned&lt;/h2&gt;&#xA;&lt;h2 id=&#34;resources&#34;&gt;Resources&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/playlist?list=PLSE8ODhjZXjbohkNBWQs_otTrBTrjyohi&#34;&gt;Video lectures&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.db-book.com/&#34;&gt;Textbook&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;course-slides&#34;&gt;Course Slides&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://15445.courses.cs.cmu.edu/fall2019/slides/01-introduction.pdf&#34;&gt;01 - Course Intro and Relational Model&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;project-plan&#34;&gt;Project Plan&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-todoist&#34; data-lang=&#34;todoist&#34;&gt;{&#xA;&amp;#34;name&amp;#34;: &amp;#34;Intro to Database Systems CMU 15-445/645&amp;#34;,&#xA;&amp;#34;filter&amp;#34;: &amp;#34;@15-445&amp;#34;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;designs&#34;&gt;Designs&lt;/h2&gt;&#xA;&lt;h2 id=&#34;questions&#34;&gt;Questions&lt;/h2&gt;&#xA;&lt;h2 id=&#34;lecture-notes&#34;&gt;Lecture Notes&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; From these, create project learnings -&amp;gt; evergreens&lt;/p&gt;&#xA;&lt;h3 id=&#34;01---course-introduction-and-relational-model&#34;&gt;01 - Course Introduction and Relational Model&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://15445.courses.cs.cmu.edu/fall2019/slides/01-introduction.pdf&#34;&gt;Slides&lt;/a&gt;&#xA;&lt;strong&gt;Database&lt;/strong&gt; - an organized collection of inter-related data that models some aspect of the real world&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Polyglot Method</title>
      <link>https://www.kylestratis.com/notes/the-polyglot-method/</link>
      <pubDate>Mon, 14 Apr 2025 21:19:29 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/the-polyglot-method/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;Polyglot - How I Learn_Languages is a book by Kato Lomb that discusses how she learned the extensive number of languages she did for her work as a translator. The book is anchored by her experience and thoughts on learning languages, coalescing into a kind of method for language learning.&lt;/p&gt;&#xA;&lt;h2 id=&#34;core-concepts&#34;&gt;Core Concepts&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Study language 10-12 hours a week&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Include reading in your learning from the beginning and read actively.&lt;/strong&gt; Make notes in the books, keep &amp;ldquo;loose glossaries,&amp;rdquo; and reread often. Books will teach you important vocabulary by repetition, you will encounter common constructions, and learn more naturally.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A loose glossary should be messy, as straight lines are a hindrance to memory&lt;/li&gt;&#xA;&lt;li&gt;Should have word, context(s) it was found in, deduced meaning(s), and dictionary meaning(s)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;The method should include and accelerate traditional teacher-guided learning, which should include a similarly leveled classmate&lt;/li&gt;&#xA;&lt;li&gt;View language learning as a leisure activity akin to solving a crossword puzzle.&lt;/li&gt;&#xA;&lt;li&gt;Develop the habit of discussing your experiences with yourself in a foreign language via monologues&lt;/li&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t go to a dictionary right away. You will remember words better if you work a bit to recall them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;the-method&#34;&gt;The Method&lt;/h2&gt;&#xA;&lt;p&gt;This method assumes one is starting from 0 in a language and there are no tutors available&lt;/p&gt;</description>
    </item>
    <item>
      <title>Model Context Protocol Clients Make Use of MCP Servers to Get External Tools, Prompts, Resources, and More</title>
      <link>https://www.kylestratis.com/notes/model-context-protocol-clients-make-use-of-mcp-servers-to-get-external-tools-pro/</link>
      <pubDate>Thu, 30 Jan 2025 21:12:48 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/model-context-protocol-clients-make-use-of-mcp-servers-to-get-external-tools-pro/</guid>
      <description>&lt;h2 id=&#34;purpose&#34;&gt;Purpose&lt;/h2&gt;&#xA;&lt;p&gt;Clients serve as the intermediary between MCP servers and hosts (LLMs).&lt;/p&gt;&#xA;&lt;h2 id=&#34;development-pattern&#34;&gt;Development Pattern&lt;/h2&gt;&#xA;&lt;h2 id=&#34;client-class&#34;&gt;Client Class&lt;/h2&gt;&#xA;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/model-context-protocol-servers-define-and-serve-functions-that-can-extend-client/&#34;&gt;Model Context Protocol Servers Define and Serve Functions That Can Extend Client Functionality Using an LLM For Coordination&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Model Context Protocol Servers Define and Serve Functions That Can Extend Client Functionality Using an LLM For Coordination</title>
      <link>https://www.kylestratis.com/notes/model-context-protocol-servers-define-and-serve-functions-that-can-extend-client/</link>
      <pubDate>Thu, 30 Jan 2025 20:42:30 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/model-context-protocol-servers-define-and-serve-functions-that-can-extend-client/</guid>
      <description>&lt;h2 id=&#34;development-pattern&#34;&gt;Development Pattern&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use &lt;code&gt;uv&lt;/code&gt; to initialize a new project&lt;/li&gt;&#xA;&lt;li&gt;Create venv with &lt;code&gt;uv venv&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Add &lt;code&gt;mcp&lt;/code&gt; and other dependencies&lt;/li&gt;&#xA;&lt;li&gt;In Pyproject, add build system and script entry point&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;__init__.py&lt;/code&gt; should have a &lt;code&gt;main()&lt;/code&gt; function that runs the server&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;tools&#34;&gt;Tools&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Implement a &lt;code&gt;list_tools()&lt;/code&gt; handler that lists available tools&lt;/li&gt;&#xA;&lt;li&gt;Implement any helper functions that do business logic&lt;/li&gt;&#xA;&lt;li&gt;Implement &lt;code&gt;call_tool()&lt;/code&gt; handler. Takes name str and arguments dict, name will correspond to name of tool in &lt;code&gt;list_tools()&lt;/code&gt; handler&lt;/li&gt;&#xA;&lt;li&gt;Implement a main function to run the server using packages from &lt;code&gt;mcp.server&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;prompts&#34;&gt;Prompts&lt;/h2&gt;&#xA;&lt;p&gt;Prompt architecture&lt;/p&gt;</description>
    </item>
    <item>
      <title>Anthropic Streaming Event Types</title>
      <link>https://www.kylestratis.com/notes/anthropic-streaming-event-types/</link>
      <pubDate>Tue, 28 Jan 2025 03:57:36 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/anthropic-streaming-event-types/</guid>
      <description>&lt;p&gt;Anthropic model streaming responses are delivered in event chunks. Below is a list of the event types with some notes on what they mean.&lt;/p&gt;&#xA;&lt;h2 id=&#34;event-types&#34;&gt;Event Types&lt;/h2&gt;&#xA;&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 style=&#34;color:#960050;background-color:#1e0010&#34;&gt;event:&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;message_start&lt;/span&gt;&#xA;&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;data:&lt;/span&gt; {&lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;message_start&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;: {&lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;msg_1nZdL29xx5MUA1yADyHTEsnR8uuvGzszyY&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;role&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;assistant&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;content&amp;#34;&lt;/span&gt;: [], &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;model&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;claude-3-5-sonnet-20241022&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;stop_reason&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;null&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;stop_sequence&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;null&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;usage&amp;#34;&lt;/span&gt;: {&lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;input_tokens&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;25&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;output_tokens&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;}}}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This indicates the beginning of a message. It is notable for giving the model-provided count of the input tokens, as well as the initial output token count.&lt;/p&gt;&#xA;&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 style=&#34;color:#960050;background-color:#1e0010&#34;&gt;event:&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;content_block_start&lt;/span&gt;&#xA;&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;data:&lt;/span&gt; {&lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;content_block_start&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;index&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;content_block&amp;#34;&lt;/span&gt;: {&lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;}}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The beginning of a block of response content, whether it&amp;rsquo;s text or something else.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Working with Anthropic&#39;s Model Context Protocol</title>
      <link>https://www.kylestratis.com/notes/working-with-anthropics-model-context-protocol/</link>
      <pubDate>Fri, 20 Dec 2024 16:41:49 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/working-with-anthropics-model-context-protocol/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;h2 id=&#34;architecture&#34;&gt;Architecture&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;input disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; Sketch of entities&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;servers&#34;&gt;Servers&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/model-context-protocol-servers-define-and-serve-functions-that-can-extend-client/&#34;&gt;Model Context Protocol Servers Define and Serve Functions That Can Extend Client Functionality Using an LLM For Coordination&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;clients&#34;&gt;Clients&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/model-context-protocol-clients-make-use-of-mcp-servers-to-get-external-tools-pro/&#34;&gt;Model Context Protocol Clients Make Use of MCP Servers to Get External Tools, Prompts, Resources, and More&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;hosts&#34;&gt;Hosts&lt;/h2&gt;&#xA;&lt;h2 id=&#34;what-they-do&#34;&gt;What They Do&lt;/h2&gt;</description>
    </item>
    <item>
      <title>Consulting - Getting Started Resources</title>
      <link>https://www.kylestratis.com/notes/consulting-getting-started-resources/</link>
      <pubDate>Wed, 20 Nov 2024 16:50:32 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/consulting-getting-started-resources/</guid>
      <description>&lt;h2 id=&#34;communities&#34;&gt;Communities&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://tribe.ai&#34;&gt;Tribe AI&lt;/a&gt; - Staffing, &lt;a href=&#34;https://stratisdatalabs.com/contact/&#34;&gt;contact me&lt;/a&gt; to discuss applying and referral&#xA;&lt;a href=&#34;https://the-technical-freelancer-academy.circle.so/home&#34;&gt;The Technical Freelancer Academy&lt;/a&gt;&#xA;&lt;a href=&#34;https://live.getoutofoffice.com/feed&#34;&gt;Out of Office&lt;/a&gt; - remote working community&lt;/p&gt;&#xA;&lt;h2 id=&#34;books&#34;&gt;Books&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://amzn.to/4fBdGMm&#34;&gt;The Consulting Bible&lt;/a&gt; - Alan Weiss&lt;/p&gt;&#xA;&lt;h2 id=&#34;courses&#34;&gt;Courses&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://financialindependence.tech/&#34;&gt;Beyond the Code by Mihai Curelea&lt;/a&gt; - I took this, good for seeing how to get financial independence via consulting or BigTech. Not too expensive, and Mihai is great to talk to afterwards.&lt;/p&gt;&#xA;&lt;h2 id=&#34;bloggersinfluencers&#34;&gt;Bloggers/Influencers&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.linkedin.com/in/benjaminrogojan/&#34;&gt;Seattle Data Guy - Benjamin Rogojan&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.linkedin.com/in/mihaivalentin/&#34;&gt;Mihai Curelea&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;meta&#34;&gt;Meta&lt;/h2&gt;&#xA;&lt;h2 id=&#34;accounting&#34;&gt;Accounting&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://bluevine.com&#34;&gt;Bluevine&lt;/a&gt; - free business banking&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://xero.com&#34;&gt;Xero&lt;/a&gt; - low-cost but powerful accounting software&lt;/li&gt;&#xA;&lt;li&gt;Glazer Financial - recommended by a colleague with lots of consulting experience, they&amp;rsquo;re based in Texas. I&amp;rsquo;ve engaged with them but it&amp;rsquo;s too early to have availed myself of their services. Happy to make an introduction.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;general-business&#34;&gt;General Business&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://the-technical-freelancer-academy.circle.so/c/resources/consulting-templates&#34;&gt;Technical Freelancer consulting templates&lt;/a&gt; - the 30 day checklist is great&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;insurance&#34;&gt;Insurance&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Aside from the marketplace, &lt;a href=&#34;https://hsainsurance.com&#34;&gt;HSA Insurance&lt;/a&gt; and &lt;a href=&#34;https://sbsb.com&#34;&gt;SBSB&lt;/a&gt; have good options for small businesses&lt;/li&gt;&#xA;&lt;li&gt;I use Hiscox for business liability insurance&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;llc&#34;&gt;LLC&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://northwestregisteredagent.com&#34;&gt;Northwest Registered Agent&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;website&#34;&gt;Website&lt;/h2&gt;&#xA;&lt;p&gt;I use &lt;a href=&#34;https://netlify.app&#34;&gt;Netlify&lt;/a&gt; for hosting and &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; for static site generation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PNG Image Modes</title>
      <link>https://www.kylestratis.com/notes/png-image-modes/</link>
      <pubDate>Wed, 17 Jul 2024 15:34:27 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/png-image-modes/</guid>
      <description>&lt;p&gt;There are several modes that a PNG opened in Pillow can take on. These can have significant consequences for processing channels, transparencies, etc. They are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;P mode - palletized images with one channel. They have an &lt;code&gt;image_info&lt;/code&gt; dictionary with a &lt;code&gt;transparency&lt;/code&gt; key that defines which pixels are transparent&lt;/li&gt;&#xA;&lt;li&gt;PA mode - same as P but with an alpha channel. Not fully supported by Pillow&lt;/li&gt;&#xA;&lt;li&gt;RGB - 3 channel 8bit, opens as a l * w * 3 matrix representing each pixel&lt;/li&gt;&#xA;&lt;li&gt;RGBA - same as above but 4 channels, last being alpha for transparency&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Using Step Functions for Fan-Out or Scatter-Gather</title>
      <link>https://www.kylestratis.com/notes/using-step-functions-for-fan-out-or-scatter-gather/</link>
      <pubDate>Mon, 01 Jul 2024 20:57:17 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/using-step-functions-for-fan-out-or-scatter-gather/</guid>
      <description>&lt;p&gt;You can use a Map State for this. You define it like so in CDK:&lt;/p&gt;&#xA;&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;from&lt;/span&gt; aws_cdk &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; aws_stepfunctions &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; sfn, aws_stepfunctions_tasks &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; sfn_tasks&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;map_lambda_task &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sfn_tasks&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;LambdaInvoke(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    self,&#xA;&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;task-name&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    lambda_function&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;function_lambda,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    payload&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;sfn&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;TaskInput&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;from_object(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        {&#xA;&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;item_key&amp;#34;&lt;/span&gt;: sfn&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;JsonPath&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;string_at(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;$.item_key&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    output_path&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;$.Payload&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;map_state &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sfn&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Map(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    self,&#xA;&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;state-name&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    items_path&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;$.item_key&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    input_path&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;$,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    parameters&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;{&#xA;&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;item_key.$&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;$$.Map.Item.Value&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;map_state&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;item_processor(processor&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;map_lambda_task)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This sets up a lambda task (using an existing Lambda function, not shown) to be invoked as a Step Function task, and the map state that calls it in the iterator. The iterator iterates through each item in the Map&amp;rsquo;s input, then calls the task for each item in the list passed to the state as input, using a single item (whether it&amp;rsquo;s a primitive or another container like a list or dict).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Switching AWS CLI Profiles</title>
      <link>https://www.kylestratis.com/notes/switching-aws-cli-profiles/</link>
      <pubDate>Thu, 27 Jun 2024 19:52:28 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/switching-aws-cli-profiles/</guid>
      <description>&lt;p&gt;To see all profiles: &lt;code&gt;aws configure list-profiles&lt;/code&gt;&#xA;To see currently set profile: &lt;code&gt;aws configure list&lt;/code&gt;&#xA;To change the profile, set the &lt;code&gt;AWS_PROFILE&lt;/code&gt; environment variable: &lt;code&gt;export AWS_PROFILE=&amp;lt;profile name&amp;gt;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Opening Text-Based pgdump Database Backups (postgres)</title>
      <link>https://www.kylestratis.com/notes/opening-text-based-pgdump-database-backups-postgres/</link>
      <pubDate>Wed, 19 Jun 2024 21:15:11 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/opening-text-based-pgdump-database-backups-postgres/</guid>
      <description>&lt;p&gt;]&lt;/p&gt;&#xA;&lt;p&gt;The file itself (unless it&amp;rsquo;s a binary file) can be opened in a text editor to inspect. To create a database to work with from the backup file, you have to create a database to restore into and then restore the database.&lt;/p&gt;&#xA;&lt;p&gt;To create:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ psql -U postgres&#xA;postgres=# createdb dbname&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To restore from the backup:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;psql -U postgres -d dbname -f path/to/your/file.sql&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>&#34;Double free or corruption&#34; Error Opening Images with Pillow</title>
      <link>https://www.kylestratis.com/notes/double-free-or-corruption-error-opening-images-with-pillow/</link>
      <pubDate>Thu, 22 Feb 2024 16:23:22 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/double-free-or-corruption-error-opening-images-with-pillow/</guid>
      <description>&lt;p&gt;If an image isn&amp;rsquo;t properly closed after opening with Pillow, it&amp;rsquo;s likely because you&amp;rsquo;re trying to pass the opened image itself without operating on it. Images are lazily loaded until they&amp;rsquo;re operated on, which can cause multiple being opened to overlap each other in physical memory. To solve this, load images and operate on them one at a time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://pillow.readthedocs.io/en/stable/reference/open_files.html#file-handling&#34;&gt;Pillow docs&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Docker Run Issues - Unable to Start Container</title>
      <link>https://www.kylestratis.com/notes/docker-run-issues-unable-to-start-container/</link>
      <pubDate>Thu, 22 Feb 2024 15:40:37 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/docker-run-issues-unable-to-start-container/</guid>
      <description>&lt;p&gt;Sometimes you won&amp;rsquo;t be able to run a Docker container because some &lt;code&gt;.so&lt;/code&gt; file can&amp;rsquo;t be found. This is how to fix it:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sudo rm -rf /var/lib/docker&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sudo rm -rf /var/lib/containerd&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sudo systemctl restart docker&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Rebuild and re-run image&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Error message&lt;/p&gt;</description>
    </item>
    <item>
      <title>Troubleshooting SSH Issues on EC2</title>
      <link>https://www.kylestratis.com/notes/troubleshooting-ssh-issues-on-ec2/</link>
      <pubDate>Thu, 22 Feb 2024 15:27:26 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/troubleshooting-ssh-issues-on-ec2/</guid>
      <description>&lt;p&gt;Sometimes on EC2 or another remote server, even with SSH agent forwarding set up, you won&amp;rsquo;t be able to use SSH on the remote machine (like pulling from a private git repo).&lt;/p&gt;&#xA;&lt;p&gt;What tends to work is this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Restart the agent on the local machine by first running &lt;code&gt;ssh-agent&lt;/code&gt; to get the PID, then killing the PID with &lt;code&gt;kill -9 PID&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Log out of the instance&lt;/li&gt;&#xA;&lt;li&gt;Log back in&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve found that using VS Code remote can cause this issue, and sometimes the above doesn&amp;rsquo;t untangle it. A workaround is just to use VS Code remote for development and then do any SSH-touching stuff with the integrated terminal.&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenAI&#39;s GPT API&#39;s max_token parameter is a limit for prompt and returned completion</title>
      <link>https://www.kylestratis.com/notes/openais-gpt-apis-max-token-parameter-is-a-limit-for-prompt-and-returned-completi/</link>
      <pubDate>Wed, 14 Feb 2024 02:34:10 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/openais-gpt-apis-max-token-parameter-is-a-limit-for-prompt-and-returned-completi/</guid>
      <description>&lt;p&gt;In the GPT API, there is an optional &lt;code&gt;max_tokens&lt;/code&gt; parameter. This represents the maximum tokens you want to spend between the prompt &lt;strong&gt;and&lt;/strong&gt; the resulting completion. Setting this too low could result in incomplete responses.&lt;/p&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://community.openai.com/t/clarification-for-max-tokens/19576/3&#34;&gt;OpenAI Forums&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>DynamoDB Can Take a Static Table Name</title>
      <link>https://www.kylestratis.com/notes/dynamodb-can-take-a-static-table-name/</link>
      <pubDate>Fri, 19 Jan 2024 19:09:51 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/dynamodb-can-take-a-static-table-name/</guid>
      <description>&lt;p&gt;CDK autogenerates resource names for every resource in your stack. However some, like DynamoDB, can take a &lt;code&gt;table_name&lt;/code&gt; argument, making it a statically named resource. There are a lot of use cases this can benefit, one I&amp;rsquo;ve used it for was for a table that needed to be accessed by both dev and prod environments, and so needed to be recreated (using &lt;code&gt;from_table_attributes&lt;/code&gt; instead of &lt;code&gt;from_table_name&lt;/code&gt; so that we have access to any streams) for non-prod environments for access.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pickled Object Versioning and Compatibility</title>
      <link>https://www.kylestratis.com/notes/pickled-object-versioning-and-compatibility/</link>
      <pubDate>Thu, 18 Jan 2024 16:31:37 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/pickled-object-versioning-and-compatibility/</guid>
      <description>&lt;p&gt;When you have a class that is used to hold data and is regularly pickled and later retrieved and unpickled, updates to the class in the environment that unpickle the object can cause issues (such as different attributes). For this reason, it is helpful to store the instance&amp;rsquo;s version and make automated changes to make old pickled instances compatible with the latest version of the object.&lt;/p&gt;&#xA;&lt;h2 id=&#34;storing-the-object-version&#34;&gt;Storing the Object Version&lt;/h2&gt;&#xA;&lt;p&gt;Python&amp;rsquo;s &lt;code&gt;importlib.metadata&lt;/code&gt; module allows you to get the &lt;strong&gt;distribution version&lt;/strong&gt; of a package, so this is useful when you are using a packaging system (such as setuptools or poetry) and your class is part of that package. What you will do is upon instantiation, set a version attribute to the version of the package using importlib like so:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Overriding Class Methods in Python</title>
      <link>https://www.kylestratis.com/notes/overriding-class-methods-in-python/</link>
      <pubDate>Thu, 04 Jan 2024 05:42:19 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/overriding-class-methods-in-python/</guid>
      <description>&lt;p&gt;In order to override a class method, the overriding method should also be decorated as a class method and take a required parameter &lt;code&gt;cls&lt;/code&gt;, from which you can get class attributes. This is important to keep in mind when overriding things like PynamoDB models.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&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:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;OverridingClass&lt;/span&gt;(Model):&#xA;&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;__init__&lt;/span&gt;(self, &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;args, &lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;kwargs):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        super()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;__init__&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;args, &lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;kwargs)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;@classmethod&lt;/span&gt;&#xA;&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;classmethod&lt;/span&gt;(cls, &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;args, &lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;kwargs):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        class_attribute_example &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; cls&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;class_attribute&#xA;&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; super()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;classmethod(&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;args, &lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;kwargs)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Heads in Machine Learning Are Prediction Components of a Deep Neural Network</title>
      <link>https://www.kylestratis.com/notes/heads-in-machine-learning-are-prediction-components-of-a-deep-neural-network/</link>
      <pubDate>Mon, 18 Dec 2023 02:34:00 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/heads-in-machine-learning-are-prediction-components-of-a-deep-neural-network/</guid>
      <description>&lt;p&gt;In deep learning networks, the &lt;strong&gt;head&lt;/strong&gt; or heads of such a network is the &amp;ldquo;top&amp;rdquo; of the network (as opposed to the &amp;ldquo;bottom&amp;rdquo; that ingests data) that does some predictive task (such as a &lt;em&gt;classification head&lt;/em&gt; or &lt;em&gt;regression head&lt;/em&gt;). This is a separate component from the &lt;strong&gt;backbone network&lt;/strong&gt; that does everything to produce the component on which the head or heads completes its tasks (in CNNs, this is the final convolutional feature map of the input image).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running a Jupyter Notebook From a Docker Container Running on EC2</title>
      <link>https://www.kylestratis.com/notes/running-a-jupyter-notebook-from-a-docker-container-running-on-ec2/</link>
      <pubDate>Wed, 22 Nov 2023 21:54:06 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/running-a-jupyter-notebook-from-a-docker-container-running-on-ec2/</guid>
      <description>&lt;p&gt;Given a Dockerfile on an EC2 instance that has, at the very least, these commands at the end:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPOSE 8888&#xA;ENTRYPOINT [&amp;#34;/bin/bash&amp;#34;]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ol&gt;&#xA;&lt;li&gt;Build the image&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker build -t &amp;lt;image name&amp;gt; .&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;Run the container&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker run -it -p 8888:8888 --ip=0.0.0.0 &amp;lt;image name&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you want to persist data from the host to the container, include &lt;a href=&#34;https://www.kylestratis.com/notes/using-bind-mounts-to-speed-up-docker-development/&#34;&gt;bind mounts&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker run -it -p 8888:8888 -v /abs/path/to/data:/app/data --ip=0.0.0.0 &amp;lt;image name&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;Within the container, run Jupyter Lab (note, specifying the port isn&amp;rsquo;t necessary if you&amp;rsquo;re using the default port 8888):&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;jupyter lab --port=8888 --ip=0.0.0.0 --allow-root&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h2&gt;&#xA;&lt;p&gt;If you try to open Jupyter Lab in your browser, and you get a &amp;ldquo;refused to connect&amp;rdquo; error, ensure that the SSH config you have for your connection to your EC2 instance (or for SSH in general if you don&amp;rsquo;t have a specific entry for EC2) looks like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Working Within a Running Docker Container</title>
      <link>https://www.kylestratis.com/notes/working-within-a-running-docker-container/</link>
      <pubDate>Wed, 22 Nov 2023 02:34:18 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/working-within-a-running-docker-container/</guid>
      <description>&lt;p&gt;First, build your image (assuming your Dockerfile is in the current directory):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker build -t myimg .&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then call &lt;code&gt;run&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker run -it myimg&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Forwarding SSH Keys Through a Docker Image with Docker Build</title>
      <link>https://www.kylestratis.com/notes/forwarding-ssh-keys-through-a-docker-image-with-docker-build/</link>
      <pubDate>Sat, 18 Nov 2023 19:00:54 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/forwarding-ssh-keys-through-a-docker-image-with-docker-build/</guid>
      <description>&lt;h2 id=&#34;purpose&#34;&gt;Purpose&lt;/h2&gt;&#xA;&lt;p&gt;One use of this technique is to allow Docker to use your keys to access private Github (or any VCS using SSH authentication) repos to install project dependencies during image build time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-technique&#34;&gt;The Technique&lt;/h2&gt;&#xA;&lt;p&gt;To do this you will forward your SSH agent or key to the builder with a combination of the &lt;code&gt;docker build&lt;/code&gt; command, which signals to the build system that this forwarding ability is available, and &lt;a href=&#34;https://docs.docker.com/get-started/06_bind_mounts/&#34;&gt;bind mounts&lt;/a&gt; in the dockerfile that reaches back to the host to get either an existing SSH agent session or keys.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Dependencies from Github Repos with Pip and Poetry</title>
      <link>https://www.kylestratis.com/notes/installing-dependencies-from-github-repos-with-pip-and-poetry/</link>
      <pubDate>Thu, 16 Nov 2023 20:24:35 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/installing-dependencies-from-github-repos-with-pip-and-poetry/</guid>
      <description>&lt;p&gt;There is a standardized way to install Python packages from VCS repos. The examples will show a complex case that include a branch and subdirectory&lt;/p&gt;&#xA;&lt;h2 id=&#34;pyprojecttoml&#34;&gt;pyproject.toml&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;package-name = {git = &amp;quot;git@github.com:&amp;lt;User&amp;gt;/repo-name.git}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;package-name = {git = &amp;quot;git@github.com:&amp;lt;User&amp;gt;/repo-name.git&amp;quot;, branch = &amp;quot;test-branch&amp;quot;, subdirectory = &amp;quot;repo_dir&amp;quot;}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;requirementstxt&#34;&gt;requirements.txt&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;package-name @ git+ssh://git@github.com/&amp;lt;User&amp;gt;/repo-name.git&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;package-name @ git+ssh://git@github.com/&amp;lt;User&amp;gt;/repo-name.git@ptest-branch#subdirectory=repo_dir&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;pip&#34;&gt;pip&lt;/h2&gt;&#xA;&lt;p&gt;This is basically the same format as requirements.txt.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;pip install &amp;quot;package-name @ git+ssh://git@github.com/&amp;lt;User&amp;gt;/repo-name.git&amp;quot;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pip install &amp;quot;package-name @ git+ssh://git@github.com/&amp;lt;User&amp;gt;/repo-name.git@ptest-branch#subdirectory=repo_dir&amp;quot;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;private-repos&#34;&gt;Private repos&lt;/h2&gt;&#xA;&lt;p&gt;To install from private repos, simply ensure your Github keys are set up on your machine and that they are linked to your Github account (and that you have access to the private accounts).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linguistically Diverse Prompting Evergreen</title>
      <link>https://www.kylestratis.com/notes/linguistically-diverse-prompting-evergreen/</link>
      <pubDate>Sat, 21 Oct 2023 15:15:58 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/linguistically-diverse-prompting-evergreen/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Linguistically Diverse Prompting&lt;/strong&gt; is a technique for doing unsupervised zero-shot generative translation and summarization tasks with low-resource languages. It makes three assumptions:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;LLMs have already learned most of the knowledge and task concepts implicitly during pre-training&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;&#xA;&lt;li&gt;LLMs intuitively learn to perform language encoding and understanding before learning to generate language. This would mean that it is just generative abilities that are improved later when more data is seen.&lt;/li&gt;&#xA;&lt;li&gt;LLMs can already exhibit near-human generative abilities in the dominant language $E$ where pre-training data is orders of magnitude larger than others. This means that translation tasks between $E$ and minority language $X$ are not symmetric, but are understood as the following tasks:&#xA;&lt;ol&gt;&#xA;&lt;li&gt;$X \rightarrow E$ translation is a natural language understanding task (NLU) in $X$&lt;/li&gt;&#xA;&lt;li&gt;$E \rightarrow X$ translation is a natural language generation task (NLG) in $X$, which is harder than NLU. While input in $E$ is easy to encode, generating intended results in $X$ will be challenging if the model has not seen enough texts in $X$.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;With this in mind, LDP works by presenting in-context exemplars to the model so that the model locates the task of &amp;ldquo;translate from &lt;em&gt;any language&lt;/em&gt; $X$ into $E$.&amp;rdquo;&#xA;The exemplars are &lt;code&gt;[input]\n[output]&lt;/code&gt; pairs, where inputs are a linguistically and geographically diverse set of high-resource languages with various scripts, while the target &lt;code&gt;[output]&lt;/code&gt; are their $E$ equivalents which can be translated using existing multilingual unsupervised machine translation models. Then a test input from a low-resource language is used to translate the target low-resource language $X$ into English.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Designing Machine Learning Systems</title>
      <link>https://www.kylestratis.com/notes/designing-machine-learning-systems/</link>
      <pubDate>Wed, 04 Oct 2023 00:41:17 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/designing-machine-learning-systems/</guid>
      <description>&lt;p&gt;[author: Chip Huyen]&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;What are the key ideas?&#xA;How can I apply this knowledge that I learned?&#xA;How do these ideas relate to what I already know?&lt;/p&gt;&#xA;&lt;h2 id=&#34;ideas&#34;&gt;💡Ideas&lt;/h2&gt;&#xA;&lt;p&gt;Note: These should become Project Idea fleeting notes with a link back to this source.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fleeting-notes&#34;&gt;Fleeting Notes&lt;/h2&gt;&#xA;&lt;p&gt;Note: Conceptual notes that aren&amp;rsquo;t as tied to the source material. These are fodder for processing into evergreen notes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;literature-notes&#34;&gt;Literature Notes&lt;/h2&gt;&#xA;&lt;p&gt;Note: Commentary on the book or things you don&amp;rsquo;t want to forget. Maybe for use in a public mind garden. Should have a visible source reference. These are &amp;ldquo;weakly evergreen&amp;rdquo; because they&amp;rsquo;re tied heavily to a single piece. Must be in your own words. These should be processed into Evergreen notes, or used as fodder for them.&#xA;&amp;ldquo;“Literature notes”, titled after a single work and meant primarily as linkages to other more durable notes, and as targets for backlinks. I write these roughly as “outline notes,” except for someone else’s ideas.&amp;rdquo;&#xA;These should be regularly refactored into individual notes in &lt;code&gt;Sources/! Literature Notes/&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pipx and Pre-Commit Bad Interpreter No Such File</title>
      <link>https://www.kylestratis.com/notes/pipx-and-pre-commit-bad-interpreter-no-such-file/</link>
      <pubDate>Tue, 03 Oct 2023 21:03:01 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/pipx-and-pre-commit-bad-interpreter-no-such-file/</guid>
      <description>&lt;p&gt;While this is generally an issue with pipx, it is likely to come up with pre-commit hooks (since the underlying binaries should be installed with pipx). The issue is the error &lt;code&gt;Bad Interpreter No Such File or Directory&lt;/code&gt; when running a pipx-installed application, like poetry or black. This happens on MacOS because of a broken symlink between the application-specific binary path and the Python binary actually being used (I&amp;rsquo;ve found this to be a &lt;code&gt;brew&lt;/code&gt; issue, specifically). This can be fixed with &lt;code&gt;pipx reinstall-all&lt;/code&gt;, which will uninstall and reinstall all pipx applications with working symlinks to the appropriate Python binaries.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting Up a Virtual Environment Kernel In Jupyter</title>
      <link>https://www.kylestratis.com/notes/setting-up-a-virtual-environment-kernel-in-jupyter/</link>
      <pubDate>Mon, 02 Oct 2023 23:26:49 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/setting-up-a-virtual-environment-kernel-in-jupyter/</guid>
      <description>&lt;ol&gt;&#xA;&lt;li&gt;Activate your project&amp;rsquo;s virtual environment&lt;/li&gt;&#xA;&lt;li&gt;Run &lt;code&gt;pip install ipykernel&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Run &lt;code&gt;python -m ipykernel install --user --name=myenv&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Open notebook and select the &lt;code&gt;myenv&lt;/code&gt; kernel&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://janakiev.com/blog/jupyter-virtual-envs/#add-virtual-environment-to-jupyter-notebook&#34;&gt;https://janakiev.com/blog/jupyter-virtual-envs/#add-virtual-environment-to-jupyter-notebook&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Democratizing LLMs for Low-Resource Languages by Leveraging Their English Dominant Abilities With Linguistically Diverse Prompts</title>
      <link>https://www.kylestratis.com/notes/democratizing-llms-for-low-resource-languages-by-leveraging-their-english-domina/</link>
      <pubDate>Tue, 04 Jul 2023 20:05:00 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/democratizing-llms-for-low-resource-languages-by-leveraging-their-english-domina/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;[author: Xuan-Phi Nguyen, Sharifah Magani Aljunied, Shafiq Joty, Lidong Bing]&#xA;[full title: Democratizing LLMs for Low-Resource Languages by Leveraging Their English Dominant Abilities With Linguistically Diverse Prompts]&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;literature-notes&#34;&gt;Literature Notes&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-dataview&#34; data-lang=&#34;dataview&#34;&gt;TABLE rows.file.link AS &amp;#34;Literature Note&amp;#34;, rows.file.cday AS &amp;#34;Date&amp;#34;&#xA;FROM #note/literature AND [Democratizing LLMs for Low-Resource Languages by Leveraging Their English Dominant Abilities With Linguistically Diverse Prompts](/notes/democratizing-llms-for-low-resource-languages-by-leveraging-their-english-domina/)&#xA;GROUP BY file.link&#xA;sort date ASCENDING&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;highlights&#34;&gt;Highlights&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;in low-resource languages, obtaining such hand-picked exemplars can still be challenging, where unsupervised techniques may be necessary (Page 1)&lt;/li&gt;&#xA;&lt;li&gt;competent generative capabilities of LLMs are observed only in high-resource languages, while their performances among under-represented languages fall behind due to pre-training data imbalance (Page 1)&lt;/li&gt;&#xA;&lt;li&gt;we propose to assemble synthetic exemplars from a diverse set of high-resource languages to prompt the LLMs to translate from any language into English. These prompts are then used to create intra-lingual exemplars to perform tasks in the target languages (Page 1)&lt;/li&gt;&#xA;&lt;li&gt;ﬁne-tuning a 7B model on data generated from our method helps it perform competitively with a 175B model (Page 1)&lt;/li&gt;&#xA;&lt;li&gt;In non-English translation tasks, our method even outperforms supervised prompting by up to 3 chrF++ in many low-resource languages (Page 1) ^558469488&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Note: Can possibly draw performance benchmarking ideas from here&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;While most LLMs were pre-trained with multilingual corpora in addition to the gigantic English corpus, and were shown to demonstrate impressive abilities in other languages (Brown et al., 2020; Chowdhery et al., 2022; Scao et al., 2022; Shi et al., 2022; Huang et al., 2023), they only excel in high-resource languages, such as French (Page 1)&lt;/li&gt;&#xA;&lt;li&gt;In this work, we focus on unsupervised, and zero-shot, generative translation and summarization tasks in low-resource languages, where no supervised few-shot prompts are used (Page 1)&lt;/li&gt;&#xA;&lt;li&gt;we propose LinguisticallyDiverse Prompting (LDP), a technique that prompts the models to locate the task of “translate any language X into English” by showing the model exemplar pairs between every language and English (En). Practically, we gather a small set of synthetic X -&amp;gt; En exemplars from a diverse set of high-resource languages using off-the-shelf unsupervised MT models (Page 2)&lt;/li&gt;&#xA;&lt;li&gt;The most multilingual LLM is BLOOM (Scao et al., 2022), which was trained on 46 languages in the ROOTS corpus (Laurençon et al., 2022). This corpus includes 34 Indic and African languages regarded as low-resource, with each language having a pre-training 5% in Tumbuka for the African group coverage of less than 1% in Hindi for the Indic group, to 2e^-5 % in Tumbuka for the African group (Page 3)&lt;/li&gt;&#xA;&lt;li&gt;Therefore, we use BLOOM as the main model to evaluate our methods and baselines in such 34 low-resource languages (Page 3)&lt;/li&gt;&#xA;&lt;li&gt;the noteworthy gap between existing UMT and LLMs is that their language coverages do not overlap much, preventing us from using UMT models to enhance LLMs. (Page 3)&lt;/li&gt;&#xA;&lt;li&gt;Hendy et al. (2023) show that GPT models can perform competitively alongside state-of-the-art MT models (Page 3)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Note: Get this paper&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;there is still limited research involving low-resource languages in completely zero-shot setups (Page 3)&lt;/li&gt;&#xA;&lt;li&gt;linguistically-diverse prompting (LDP) method is inspired from three intuitive assumptions (Page 3)&lt;/li&gt;&#xA;&lt;li&gt;LLMs have already learned most of the knowledge and task concepts implicitly during pre-training (Page 3) ^558469498&lt;/li&gt;&#xA;&lt;li&gt;The second assumption is that the models intuitively learn to perform language encoding and understanding at an earlier time, before learning to generate language. (Page 4)&lt;/li&gt;&#xA;&lt;li&gt;The third assumption is that LLMs can already exhibit near-human generative abilities in the dominant language E (mostly English) where pre-training data is often orders of magnitude larger than other (Page 4)&lt;/li&gt;&#xA;&lt;li&gt;we argue that with respect to a minority language X, translation tasks between X and E are no longer symmetric and can be interpreted more broadly as follows (Page 4)&lt;/li&gt;&#xA;&lt;li&gt;X -&amp;gt; E translation is a language understanding task (NLU) in X. This notion extends NLU beyond popular classiﬁcation tasks, such as sentiment analysis or entailment (Page 4)&lt;/li&gt;&#xA;&lt;li&gt;E -&amp;gt; X translation is a language generation task (NLG) in X, which is often harder to master than NLU (Page 4)&lt;/li&gt;&#xA;&lt;li&gt;Speciﬁcally, while the input in E can be easy to encode, generating the intended results in X will be challenging if the model has not seen enough texts in X (Page 4)&lt;/li&gt;&#xA;&lt;li&gt;we design in-context exemplars so that the model locates the task of “translate from any language X into E”, by demonstrating prompt pairs from “every language” to E. (Page 4)&lt;/li&gt;&#xA;&lt;li&gt;This is because the target-side prompt distribution is now realistic and consistently close to the true target distribution we expect the model to generate, which has been shown to be crucial for in-context learning to work (Xie et al., 2021). (Page 5)&lt;/li&gt;&#xA;&lt;li&gt;X -&amp;gt; E task. As mentioned above, we ﬁrst gather n Z(sub)i -&amp;gt; X exemplar pairs (s(sub)Z, t^i(sub)E) with Z(sub)i ∈ Z(fancy) where Z(fancy) is a diverse set of languages with various writing systems, lexical and regional characteristics, such as French (Fr) and Chinese (Zh), and Zi ≠ {X, E}. Such exemplars can be collected by randomly selecting a single sentence from unlabeled data of the respective language Z(sub)i (Page 5)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Note: Convert to latex&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;E -&amp;gt; X task. We leverage [LDP prompt] to build intra-lingual prompts with unlabeled data from the target X language. Specifically, given m unlabeled texts s^j (sub) X ∈ D(sub)X with D(sub)X as monolinguial corpus in X, we produce synthetic back-translation (BT) target s^j(sub)E - L^(mt)(sub)X-&amp;gt;E(s^j(sub)X). Then we use the BT synthetic pairs as in-context exemplars for E-&amp;gt; X translation tasks for input S(sub)E (insert formula -&amp;gt; L^(mtbt)) (Page 5)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Note: Convert to Latex&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;we can also use L^(mtbt) simply swapping the direction of the (s^1(sub)E, t^1(sub)X) to (s^1(sub)X, t^1(sub)E). Nonetheless, we found in the experiments that both L^(mt) and L^(mtbt) perform similarly and on par with supervised prompting for the X -&amp;gt; E task, suggesting that we do not need any supervised or unlabeled data to translate any language into English. &amp;hellip; we can even omit these back-translation exemplars entirely with non-BT L^(mt) LDP by using native language tags (Page 5)&lt;/li&gt;&#xA;&lt;li&gt;During training, we only compute loss on the [output] part to train the model to generate the right language (Page 5)&lt;/li&gt;&#xA;&lt;li&gt;we empirically found that the model fails to learn to generate the low-resource languages unless we increase the learnable parameter counts signiﬁcantly, which seems to defeat the purpose of using PEFT (Page 5)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Note: PEFT = parameter-efficient fine-tuning approach, e.g. LoRA&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;As the ROOTS corpus (Laurençon et al., 2022) that BLOOM (Scao et al., 2022) was pre-trained on offers the most diverse language coverage with open-sourced transparency, we tested our methods mainly with the BLOOM model (Page 6)&lt;/li&gt;&#xA;&lt;li&gt;Figure 5a reveals one reason the models struggle to translate En-&amp;gt;X when using LDP prompts L^mt (without intra-lingual BT data) is that the target-side distribution contains multiple languages, and the models struggle to recognize unfamiliar language tags, such as Marathi (Mr), and often generate wrong translations in the wrong languages (Page 9)&lt;/li&gt;&#xA;&lt;li&gt;supplying synthetic intra-lingual prompts where the target-side is consistently in the intended language, as shown in Figure 5b with L^mtbt, is more important in getting the models to recognize language rather than the language tag. In fact, we found that removing the language tag entirely can help improve the performance slightly. (Page 9)&lt;/li&gt;&#xA;&lt;li&gt;which high-resource languages should be selected as LDP exemplars. Table 6 examines which LDP language choice is optimal (Page 10)&lt;/li&gt;&#xA;&lt;li&gt;choosing a single related language (Hindi), which is often called cross-lingual prompting (Zhang et al., 2023; Zhu et al., 2023), can be disastrous as the model tends to translate the prompt language rather than the test language (Page 10)&lt;/li&gt;&#xA;&lt;li&gt;Choosing a single but distant language (Vi or Zh) yields better results, while choosing a wide variety of languages across different regions (e.g., Ar,Zh,Vi,Fr) may be the optimal choice. (Page 10)&lt;/li&gt;&#xA;&lt;li&gt;We introduce linguistically-diverse prompting (LDP), which is designed to use synthetic high-quality in-context exemplars from high-resource languages to prompt LLMs to perform generative tasks, such as translation and summarization, in low-resource languages (Page 11)&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Using Bind Mounts to Speed Up Docker Development</title>
      <link>https://www.kylestratis.com/notes/using-bind-mounts-to-speed-up-docker-development/</link>
      <pubDate>Tue, 06 Jun 2023 20:41:50 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/using-bind-mounts-to-speed-up-docker-development/</guid>
      <description>&lt;p&gt;When using &lt;code&gt;docker run&lt;/code&gt;, the &lt;code&gt;--mount&lt;/code&gt; parameter allows you to specify a directory to recreate within the Docker container so that you can edit your code locally and then run it within the Docker container without rebuilding the image.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Consider whether coding &lt;a href=&#34;https://www.kylestratis.com/notes/remote-development-with-vs-code/#developing-with-docker&#34;&gt;within a running container&lt;/a&gt; fits your use case better.&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;docker run -it --mount type=bind,source=&amp;quot;$(pwd)/tests&amp;quot;,target=/tests image_tag&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;This uses the &lt;code&gt;tests&lt;/code&gt; directory within the working directory as the source and puts the contents within a directory &lt;code&gt;/tests&lt;/code&gt; in the container whenever you call &lt;code&gt;docker run&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remote Development with VS Code</title>
      <link>https://www.kylestratis.com/notes/remote-development-with-vs-code/</link>
      <pubDate>Tue, 06 Jun 2023 20:27:18 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/remote-development-with-vs-code/</guid>
      <description>&lt;h2 id=&#34;developing-with-docker&#34;&gt;Developing with Docker&lt;/h2&gt;&#xA;&lt;p&gt;To use Docker for developing in VS Code, you can use the Docker, Dev Containers and Remote Explorer extensions. Here&amp;rsquo;s a rough step-by-step guide:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Build an image if it hasn&amp;rsquo;t been built already from VS Code&lt;/li&gt;&#xA;&lt;li&gt;Right click the image and select &amp;ldquo;Run interactive&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;Then in the running container, right-click and run &amp;ldquo;Attach VS Code&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;A new VS Code window will open and you can select a directory within the container to open&#xA;You can also click the green icon in the lower left corner of the window to access the same options.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;developing-on-a-remote-server-with-ssh&#34;&gt;Developing on a Remote Server with SSH&lt;/h2&gt;&#xA;&lt;p&gt;To connect to a remote server and run VS Code on it, use the same Remote Explorer extension along with Remote - SSH:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Invalid Cross-Device Link when Deploying with CDK</title>
      <link>https://www.kylestratis.com/notes/invalid-cross-device-link-when-deploying-with-cdk/</link>
      <pubDate>Tue, 06 Jun 2023 20:20:58 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/invalid-cross-device-link-when-deploying-with-cdk/</guid>
      <description>&lt;p&gt;When deploying with CDK, I started out of nowhere getting this error:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;OSError: [Errno 18] Invalid cross-device link: &amp;#39;/tmp/pip-target-e_4qns87/lib/python/numpy&amp;#39; -&amp;gt; &amp;#39;/asset-output/numpy&amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This seems to be caused by using &lt;a href=&#34;https://stackoverflow.com/questions/64048687/why-does-serverless-produce-an-invalid-cross-device-link-error-when-trying-to-pa&#34;&gt;gRPC FUSE for file sharing&lt;/a&gt; in Docker. To fix this, change the setting for file sharing implemnentations from gRPC FUSE to VirtioFS.&lt;/p&gt;&#xA;&lt;p&gt;If this doesn&amp;rsquo;t work, it could imply a corrupted virtual environment. Build a new one and try again with that. This was what did the trick for me - but only for one deployment. Updating the few Python 3.8 lambda runtimes to 3.9 fixed it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Yohimbine HCl</title>
      <link>https://www.kylestratis.com/notes/yohimbine-hcl/</link>
      <pubDate>Fri, 02 Jun 2023 15:55:11 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/yohimbine-hcl/</guid>
      <description>&lt;h2 id=&#34;dosing&#34;&gt;Dosing&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;5-10 mg 1-2x per day&lt;/li&gt;&#xA;&lt;li&gt;&amp;ldquo;Dosages of 0.2mg/kg bodyweight have been successfully used to increase fat burning without significant implications on cardiovascular parameters like heart rate and blood pressure.&amp;rdquo;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For a 200lb man, this comes out to 18 mg&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;schedule&#34;&gt;Schedule&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;1 dose (2.5-5 mg) AM&lt;/li&gt;&#xA;&lt;li&gt;1 dose (2.5-5 mg) PM, after digesting lunch&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;uses&#34;&gt;Uses&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cutting weight&lt;/li&gt;&#xA;&lt;li&gt;Increasing libido&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;side-effects&#34;&gt;Side Effects&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Anxiety&lt;/li&gt;&#xA;&lt;li&gt;Increased heart rate&lt;/li&gt;&#xA;&lt;li&gt;Increased blood pressure&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Must be taken without carbohydrates&lt;/li&gt;&#xA;&lt;li&gt;Do not stack with Clenbuterol. To use together, use Yohimbine HCl on Clen off-weeks&lt;/li&gt;&#xA;&lt;li&gt;Doesn&amp;rsquo;t feel as effective as Clenbuterol but I suspect not much is.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://examine.com/supplements/yohimbine/&#34;&gt;Examine writeup&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/Nutricost-Yohimbine-Capsules-Extra-Strength/dp/B01J4EVPMO&#34;&gt;Amazon&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Fixing Runtime Exited Without a Reason Errors in AWS Lambda</title>
      <link>https://www.kylestratis.com/notes/fixing-runtime-exited-without-a-reason-errors-in-aws-lambda/</link>
      <pubDate>Thu, 25 May 2023 18:47:46 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/fixing-runtime-exited-without-a-reason-errors-in-aws-lambda/</guid>
      <description>&lt;p&gt;This happens sometimes with Dockerized Lambdas. I have no idea why, but fixing it usually consists of rebuilding and re-pushing the docker image, redeploying it to the Lambda, and re-running it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dispatch Tables in Python</title>
      <link>https://www.kylestratis.com/notes/dispatch-tables-in-python/</link>
      <pubDate>Thu, 18 May 2023 02:09:39 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/dispatch-tables-in-python/</guid>
      <description>&lt;p&gt;Dispatch tables are a useful way to use a string to determine which function to call. Why would you do this? When designing an interface to be used in other people&amp;rsquo;s code, you can make a single routing function or method public to users, and then use a parameter to determine which &amp;ldquo;worker&amp;rdquo; function to pass in.&lt;/p&gt;&#xA;&lt;p&gt;A really basic no-guardrails example could look like this:&lt;/p&gt;&#xA;&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;DISPATCH_TABLE &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; {&#xA;&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;one&amp;#34;&lt;/span&gt;: _private_fxn_one,&#xA;&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;two&amp;#34;&lt;/span&gt;: _private_fxn_two&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;public_function&lt;/span&gt;(which_function: str):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    result &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; DISPATCH_TABLE[which_function]()&#xA;&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; result&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;_private_fxn_one&lt;/span&gt;():&#xA;&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;one&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;_private_fxn_two&lt;/span&gt;():&#xA;&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;two&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;caveats&#34;&gt;Caveats&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t put parentheses on the function in the dispatch table because the function will be called then. This applies generally when using a function as an object,&lt;/li&gt;&#xA;&lt;li&gt;If the private functions have different parameters, you can use kwargs to pass in a standard set of arguments and ignore the unused ones, or generate the parameters based on an argument to the public function.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/llm-knowledge-management-agent/&#34;&gt;LLM Knowledge Management Agent&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>LLM Knowledge Management Agent</title>
      <link>https://www.kylestratis.com/notes/llm-knowledge-management-agent/</link>
      <pubDate>Sat, 06 May 2023 16:47:59 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/llm-knowledge-management-agent/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: An agent to research a given topic by doing &lt;a href=&#34;https://fs.blog/how-to-read-a-book/#:~:text=4.-,Syntopical%20Reading,ideas%2C%20vocabulary%2C%20and%20arguments.&#34;&gt;analytical and syntopic reading&lt;/a&gt;, summarizing and extracting main points, connecting them together, and forming new knowledge outputs such as &lt;a href=&#34;https://zettelkasten.de/posts/overview/&#34;&gt;zettels&lt;/a&gt; or &lt;a href=&#34;https://codex.erisianrite.com/Bins/Evergreen&amp;#43;Notes/What&amp;#43;Is&amp;#43;An&amp;#43;Evergreen&amp;#43;Note&amp;#43;Anyways&#34;&gt;evergreen notes&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;lessons-learned&#34;&gt;Lessons Learned&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;~~Document embeddings with transformers don&amp;rsquo;t seem to be too practical. Instead, go with a sentence embedding for the knowledgebase using note titles and search with main idea embeddings.&lt;/li&gt;&#xA;&lt;li&gt;Dispatch table values need to the the function as an object, so without the parentheses. Otherwise they&amp;rsquo;ll be run when instantiated.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;project-notes&#34;&gt;Project Notes&lt;/h3&gt;&#xA;&lt;h3 id=&#34;future-improvements&#34;&gt;Future Improvements&lt;/h3&gt;&#xA;&lt;p&gt;Future improvements to the project should go here for easy reference. They should be a type of project note and link back to a Project page and any tickets that come from it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Data Parallelism</title>
      <link>https://www.kylestratis.com/notes/data-parallelism/</link>
      <pubDate>Mon, 17 Apr 2023 20:58:24 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/data-parallelism/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;[same: Model Parallelism]&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Data parallelism is when you split the data and train the full model in parallel on each segment of data. This is different from Model Parallelism in which the model itself is split across different GPUs.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Machine Learning System Design Interview</title>
      <link>https://www.kylestratis.com/notes/machine-learning-system-design-interview/</link>
      <pubDate>Sat, 15 Apr 2023 02:43:54 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/machine-learning-system-design-interview/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; See here for valid statuses&lt;/p&gt;&#xA;&lt;p&gt;[author: Ali Aminian Alex Xu]&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;What are the key ideas?&#xA;How can I apply this knowledge that I learned?&#xA;How do these ideas relate to what I already know?&lt;/p&gt;&#xA;&lt;h2 id=&#34;ideas&#34;&gt;💡Ideas&lt;/h2&gt;&#xA;&lt;p&gt;Note: These should become Project Idea fleeting notes with a link back to this source.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fleeting-notes&#34;&gt;Fleeting Notes&lt;/h2&gt;&#xA;&lt;p&gt;Note: Conceptual notes that aren&amp;rsquo;t as tied to the source material. These are fodder for processing into evergreen notes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>import os Causing Counterintuitive Errors in Sagemaker</title>
      <link>https://www.kylestratis.com/notes/import-os-causing-counterintuitive-errors-in-sagemaker/</link>
      <pubDate>Mon, 10 Apr 2023 00:52:17 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/import-os-causing-counterintuitive-errors-in-sagemaker/</guid>
      <description>&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;Traceback (most recent call last):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  File &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/usr/lib/python3.8/runpy.py&amp;#34;&lt;/span&gt;, line &lt;span style=&#34;color:#ae81ff&#34;&gt;194&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; _run_module_as_main&#xA;&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; _run_code(code, main_globals, &lt;span style=&#34;color:#66d9ef&#34;&gt;None&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  File &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/usr/lib/python3.8/runpy.py&amp;#34;&lt;/span&gt;, line &lt;span style=&#34;color:#ae81ff&#34;&gt;87&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; _run_code&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    exec(code, run_globals)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  File &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/function/awslambdaric/__main__.py&amp;#34;&lt;/span&gt;, line &lt;span style=&#34;color:#ae81ff&#34;&gt;25&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;module&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    main(sys&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;argv)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  File &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/function/awslambdaric/__main__.py&amp;#34;&lt;/span&gt;, line &lt;span style=&#34;color:#ae81ff&#34;&gt;19&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    lambda_runtime_api_addr &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; os&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;environ[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;AWS_LAMBDA_RUNTIME_API&amp;#34;&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  File &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/usr/lib/python3.8/os.py&amp;#34;&lt;/span&gt;, line &lt;span style=&#34;color:#ae81ff&#34;&gt;675&lt;/span&gt;, &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;__getitem__&lt;/span&gt;&#xA;&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;raise&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;KeyError&lt;/span&gt;(key) &lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; None&#xA;&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;KeyError&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;AWS_LAMBDA_RUNTIME_API&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;del&gt;My suspicion is that the our internal package requires &lt;code&gt;os&lt;/code&gt; as a dependency to open a file, and that causes some kind of clash with AWS.&lt;/del&gt;&lt;/p&gt;&#xA;&lt;p&gt;But it gets weirder!&#xA;The dependency&amp;rsquo;s &lt;code&gt;Constants&lt;/code&gt; module has an import os that works just fine!&#xA;BUT it uses this to get the assets path:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Passing Arguments from Main Commands to Subcommands in Click</title>
      <link>https://www.kylestratis.com/notes/passing-arguments-from-main-commands-to-subcommands-in-click/</link>
      <pubDate>Wed, 05 Apr 2023 18:17:37 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/passing-arguments-from-main-commands-to-subcommands-in-click/</guid>
      <description>&lt;p&gt;If you have command groups in your CLI application so that you have subcommands, you can pass arguments from the group down to the subcommands with the context object. Here&amp;rsquo;s the pattern:&lt;/p&gt;&#xA;&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:#a6e22e&#34;&gt;@click.group&lt;/span&gt;()  &#xA;&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;@click.argument&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;arg1&amp;#34;&lt;/span&gt;, type&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;click&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;File(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;r&amp;#34;&lt;/span&gt;))  &#xA;&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;@click.option&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--option1&amp;#34;&lt;/span&gt;, default&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;test&amp;#34;&lt;/span&gt;)  &#xA;&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;@click.pass_context&lt;/span&gt;  &#xA;&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;cli&lt;/span&gt;(ctx, arg1, option: str):  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ctx&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;ensure_object(dict)  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ctx&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;obj[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;arg1&amp;#34;&lt;/span&gt;] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; arg1  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ctx&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;obj[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;option1&amp;#34;&lt;/span&gt;] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; option1  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &#xA;&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;@click.command&lt;/span&gt;()  &#xA;&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;@click.argument&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;subcommand_arg&amp;#34;&lt;/span&gt;, type&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;str)&#xA;&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;@click.pass_context&lt;/span&gt;  &#xA;&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;trigger_training_job&lt;/span&gt;(ctx, subcommand_arg):  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    arg1_from_group &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; ctx&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;obj[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;arg1&amp;#34;&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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; __name__ &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;:  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    cli(obj&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;{})&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://click.palletsprojects.com/en/8.1.x/complex/#contexts&#34;&gt;Click documentation&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Addressing Mismatched CuDNN Versions</title>
      <link>https://www.kylestratis.com/notes/addressing-mismatched-cudnn-versions/</link>
      <pubDate>Mon, 03 Apr 2023 18:25:19 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/addressing-mismatched-cudnn-versions/</guid>
      <description>&lt;h2 id=&#34;exception&#34;&gt;Exception&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2023-04-03 16:05:09.410087: W tensorflow/core/framework/op_kernel.cc:1830] OP_REQUIRES failed at xla_ops.cc:362 : INTERNAL: RET_CHECK failure (tensorflow/compiler/xla/service/gpu/gpu_compiler.cc:618) dnn != nullptr &#xA;2023-04-03 16:05:09.428729: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:417] Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.6.0.  CuDNN library needs to have matching major version and equal or higher minor version. If using a binary install, upgrade your CuDNN library.  If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;how-to-fix&#34;&gt;How to Fix&lt;/h2&gt;&#xA;&lt;p&gt;A number of unclear bits of documentation exist for this, that seem to conflict. Install cudnn with &lt;code&gt;pip&lt;/code&gt; and then update paths:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Tensorflow on Apple Silicon Macs</title>
      <link>https://www.kylestratis.com/notes/installing-tensorflow-on-apple-silicon-macs/</link>
      <pubDate>Wed, 22 Mar 2023 16:08:31 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/installing-tensorflow-on-apple-silicon-macs/</guid>
      <description>&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ brew install hdf5&#xA;$ export HDF5_DIR=&amp;#34;$(brew --prefix hdf5)&amp;#34;&#xA;$ pip install &amp;#34;grpcio&amp;gt;=1.37.0,&amp;lt;2.0&amp;#34; &amp;#34;h5py&amp;gt;=3.6.0,&amp;lt;3.7&amp;#34; &amp;#34;numpy==1.24.2&amp;#34;&#xA;## Make new virtual env here&#xA;$ pip install tensorflow-macos&#xA;$ pip install tensorflow-metal&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;div class=&#34;admonition note&#34;&gt;&#xA;      &lt;div class=&#34;admonition-header&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 576 512&#34;&gt;&lt;path d=&#34;M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 125.7-86.8 86.8c-10.3 10.3-17.5 23.1-21 37.2l-18.7 74.9c-2.3 9.2-1.8 18.8 1.3 27.5L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z&#34;/&gt;&lt;/svg&gt;&#xA;        &lt;span&gt;Versions&lt;/span&gt;&#xA;      &lt;/div&gt;&#xA;      &lt;div class=&#34;admonition-content&#34;&gt;&#xA;        &lt;p&gt;The latest (as of 2023-03-22) versions of tensorflow-macos (2.11.0), numpy (1.24.2), and tensorflow-metal (0.7.1) all seem to work well together. Apple&amp;rsquo;s &lt;a href=&#34;https://developer.apple.com/metal/tensorflow-plugin/&#34;&gt;list of compatible versions&lt;/a&gt; is now out of date.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Tensorflow on Silicon Macs</title>
      <link>https://www.kylestratis.com/notes/installing-tensorflow-on-silicon-macs/</link>
      <pubDate>Tue, 28 Feb 2023 19:13:38 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/installing-tensorflow-on-silicon-macs/</guid>
      <description>&lt;p&gt;To install Tensorflow on a Silicon Mac, do the following in a virtual environment:&lt;/p&gt;&#xA;&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-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install tensorflow-macos&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install tensorflow-metal&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ensure the &lt;a href=&#34;https://developer.apple.com/metal/tensorflow-plugin/&#34;&gt;version of tensorflow-metal matches with the tensorflow-macos version&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploying a Flask App to AWS Elastic Beanstalk with CDK and With the AWS Console</title>
      <link>https://www.kylestratis.com/notes/deploying-a-flask-app-to-aws-elastic-beanstalk-with-cdk-and-with-the-aws-console/</link>
      <pubDate>Mon, 27 Feb 2023 14:40:39 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/deploying-a-flask-app-to-aws-elastic-beanstalk-with-cdk-and-with-the-aws-console/</guid>
      <description>&lt;h2 id=&#34;steps-in-cdk&#34;&gt;Steps in CDK&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Initialize construct&lt;/li&gt;&#xA;&lt;li&gt;Zip flask code&lt;/li&gt;&#xA;&lt;li&gt;Set up options for application, env vars, and app version&lt;/li&gt;&#xA;&lt;li&gt;Set environment&lt;/li&gt;&#xA;&lt;li&gt;Make sure environment is built &lt;em&gt;after&lt;/em&gt; CDK application&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&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:#75715e&#34;&gt;## Deploy to ElasticBeanstalkanstalk-application-packaging-through-cdk-in-typescript-e91b7ffe4928&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app_name &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;MyApp&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;elb_flask_app &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; elb&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CfnApplication(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    self, &lt;span style=&#34;color:#e6db74&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;flask-appserver&amp;#34;&lt;/span&gt;, application_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;app_name&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;## Move app code into S3 for ELB&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;elb_archive &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; s3_assets&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Asset(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    self,&#xA;&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;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;elb-flask-app-&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;{&lt;/span&gt;stage&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;,&#xA;&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;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;{&lt;/span&gt;str(Path(__file__)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;absolute()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;parents[&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;])&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;/app.zip&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;## Set OptionSettingProperties&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;option_setting_properties &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    elb&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CfnEnvironment&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;OptionSettingProperty(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        namespace&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;aws:autoscaling:launchconfiguration&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        option_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;InstanceType&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        value&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;t3.small&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    elb&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CfnEnvironment&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;OptionSettingProperty(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        namespace&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;aws:autoscaling:launchconfiguration&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        option_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;IamInstanceProfile&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        value&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;aws-elasticbeanstalk-ec2-role&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    elb&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CfnEnvironment&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;OptionSettingProperty(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        namespace&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;aws:autoscaling:launchconfiguration&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        option_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;IamInstanceProfile&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        value&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;aws-elasticbeanstalk-servicerole&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ),&#xA;&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;# This is an example of setting up an environment variable&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    elb&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CfnEnvironment&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;OptionSettingProperty(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        namespace&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;aws:elasticbeanstalk:application:environment&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        option_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ES_DOMAIN&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        value&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;es_domain&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;domain_endpoint,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;## Set app version properties&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app_version_props &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; elb&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CfnApplicationVersion(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    self,&#xA;&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;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;AppVersion-&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;{&lt;/span&gt;stage&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    application_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;app_name,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    source_bundle&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;elb&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CfnApplicationVersion&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;SourceBundleProperty(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        s3_bucket&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;elb_archive&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;s3_bucket_name,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        s3_key&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;elb_archive&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;s3_object_key,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;## Set environment&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;elb_env &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; elb&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;CfnEnvironment(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    self,&#xA;&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;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;elb-env&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    environment_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;elb-env&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    application_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;app_name,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    solution_stack_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;64bit Amazon Linux 2 v3.2.1 running Python 3.8&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    option_settings&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;option_setting_properties,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    version_label&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;app_version_props&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;ref,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;## Ensure the env isn&amp;#39;t built before the app by placing this at the end of your CDK stack file&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app_version_props&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;add_depends_on(elb_flask_app)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;elb_env&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;add_depends_on(elb_flask_app)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;steps-in-aws-console&#34;&gt;Steps in AWS Console&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Launch EC2 instance&lt;/li&gt;&#xA;&lt;li&gt;SSH into it,&lt;/li&gt;&#xA;&lt;li&gt;Set up Git keys&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent&#34;&gt;See here&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Add &lt;a href=&#34;https://docs.github.com/en/developers/overview/managing-deploy-keys#deploy-keys&#34;&gt;deploy key&lt;/a&gt; to repo&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Pull code from Github into instance&lt;/li&gt;&#xA;&lt;li&gt;Run Flask server&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Activate virutal environment&lt;/li&gt;&#xA;&lt;li&gt;Install dependencies with &lt;code&gt;pip install -r requirements.txt&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Set environment variables:&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;FLASK_ENV=development&lt;/code&gt; or &lt;code&gt;FLASK_ENV=prod&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Set up &lt;a href=&#34;https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uswgi-and-nginx-on-ubuntu-18-04&#34;&gt;uWSGI&lt;/a&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install &lt;code&gt;gcc&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Install uWSGI with &lt;code&gt;pip install uwsgi&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Install NGinx &lt;a href=&#34;https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04&#34;&gt;source&lt;/a&gt;&#xA;1. Only do steps 1 and 2 from article:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&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-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt update&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install nginx&#xA;&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;# Test firewall&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo ufw app list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo ufw allow &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Nginx HTTP&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo ufw status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start=&#34;4&#34;&gt;&#xA;&lt;li&gt;Set up uWSGI configuration with &lt;code&gt;app.ini&lt;/code&gt;:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[uwsgi]&#xA;module = wsgi:app&#xA;master = true&#xA;processes = 5&#xA;socket = myproject.sock&#xA;chmod-socket = 660&#xA;vacuum = true&#xA;die-on-term = true&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;5&#34;&gt;&#xA;&lt;li&gt;Set up system profile file &lt;code&gt;/etc/systemd/system/myproject.service&lt;/code&gt;, taken from linked article&#xA;&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 style=&#34;color:#960050;background-color:#1e0010&#34;&gt;Unit&lt;/span&gt;]&#xA;&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;Description=uWSGI&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;instance&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;serve&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;myproject&lt;/span&gt;&#xA;&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;After=network.target&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;Service&lt;/span&gt;]&#xA;&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;User=sammy&lt;/span&gt;&#xA;&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;Group=www-data&lt;/span&gt;&#xA;&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;WorkingDirectory=/home/sammy/myproject&lt;/span&gt;&#xA;&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;Environment=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;PATH=/home/sammy/myproject/myprojectenv/bin&amp;#34;&lt;/span&gt;&#xA;&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;ExecStart=/home/sammy/myproject/myprojectenv/bin/uwsgi&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;--ini&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;myproject.ini&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;Install&lt;/span&gt;]&#xA;&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;WantedBy=multi-user.target&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;li&gt;Start with &lt;code&gt;systemctl&lt;/code&gt;:&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;sudo systemctl start myproject&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sudo systemctl enable myproject&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Set up nginx&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Edit &lt;code&gt;/etc/nginx/sites-available/myapp&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&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 style=&#34;color:#960050;background-color:#1e0010&#34;&gt;server&lt;/span&gt; {&#xA;&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;listen&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;80;&lt;/span&gt;&#xA;&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;server_name&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;lt;EC2&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;domain&amp;gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;location&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;/&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;{&lt;/span&gt;&#xA;&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;include&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;uwsgi_params;&lt;/span&gt;&#xA;&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;uwsgi_pass&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;unix:/home/ubuntu/myapp/flask-app/myapp.sock;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&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;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;Then link: &lt;code&gt;sudo ln -s /etc/nginx/sites-available/myproject /etc/nginx/sites-enabled&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Restart nginx service:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Update firewall rules&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&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-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo ufw delete allow &lt;span style=&#34;color:#ae81ff&#34;&gt;5000&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo ufw allow &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Nginx Full&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html&#34;&gt;AWS - Deploying a Flask Application to Elastic Beanstalk&lt;/a&gt;&#xA;&lt;a href=&#34;https://medium.com/@joshmustill/complete-node-js-aws-elastic-beanstalk-application-packaging-through-cdk-in-typescript-e91b7ffe4928&#34;&gt;Packaging a NodeJS application with CDK on Elastic Beanstalk&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Simple Future and Aorist Irregular Verbs</title>
      <link>https://www.kylestratis.com/notes/simple-future-and-aorist-irregular-verbs/</link>
      <pubDate>Sun, 19 Feb 2023 17:07:14 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/simple-future-and-aorist-irregular-verbs/</guid>
      <description>&lt;h2 id=&#34;shortened-irregulars&#34;&gt;Shortened Irregulars&lt;/h2&gt;&#xA;&lt;p&gt;These verbs become very short in the simple future, in the aorist they are prefixed with ει-&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;verb&lt;/th&gt;&#xA;          &lt;th&gt;simple future&lt;/th&gt;&#xA;          &lt;th&gt;aorist&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;βλέπω&lt;/td&gt;&#xA;          &lt;td&gt;θα δω&lt;/td&gt;&#xA;          &lt;td&gt;είδα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;λέω&lt;/td&gt;&#xA;          &lt;td&gt;θα πω&lt;/td&gt;&#xA;          &lt;td&gt;είπα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;πίνω&lt;/td&gt;&#xA;          &lt;td&gt;θα πιω&lt;/td&gt;&#xA;          &lt;td&gt;είπα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;main--αίνω-verbs&#34;&gt;Main -αίνω verbs&lt;/h2&gt;&#xA;&lt;p&gt;These lose the -αίν- root in the simple future and it is replaced with -ηκ in the aorist.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;verb&lt;/th&gt;&#xA;          &lt;th&gt;simple future&lt;/th&gt;&#xA;          &lt;th&gt;aorist&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;βγαίνω&lt;/td&gt;&#xA;          &lt;td&gt;θα βγω&lt;/td&gt;&#xA;          &lt;td&gt;βγήκα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;μπαίνω&lt;/td&gt;&#xA;          &lt;td&gt;θα μπω&lt;/td&gt;&#xA;          &lt;td&gt;μπήκα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;βρίσκω&lt;/td&gt;&#xA;          &lt;td&gt;θα βρω&lt;/td&gt;&#xA;          &lt;td&gt;βρήκα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;ανεβαίνω&lt;/td&gt;&#xA;          &lt;td&gt;θα ανεβώ&lt;/td&gt;&#xA;          &lt;td&gt;ανέβηκα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;κατεβαίνω&lt;/td&gt;&#xA;          &lt;td&gt;θα κατεβώ&lt;/td&gt;&#xA;          &lt;td&gt;κατέβηκα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;non-pattern--αίνω-verbs&#34;&gt;Non-pattern -αίνω verbs&lt;/h2&gt;&#xA;&lt;p&gt;For these, the construction of the aorist follows the pattern of reguar verbs: take the simple future, change the ending, and add ε- if needed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Creating a Model Instance with from_raw_data() in PynamoDB</title>
      <link>https://www.kylestratis.com/notes/creating-a-model-instance-with-from-raw-data-in-pynamodb/</link>
      <pubDate>Thu, 26 Jan 2023 19:16:08 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/creating-a-model-instance-with-from-raw-data-in-pynamodb/</guid>
      <description>&lt;p&gt;When using &lt;code&gt;from_raw_data&lt;/code&gt; in PynamoDB, you have to pass in the DynamoDB dict structure (&lt;code&gt;{&amp;quot;attribute_name&amp;quot;: {&amp;quot;S&amp;quot;: &amp;quot;value&amp;quot;}&lt;/code&gt;), not a plain dictionary. When 6.0.0 comes out, there will be &lt;code&gt;to_dict&lt;/code&gt; and &lt;code&gt;from_dict&lt;/code&gt; methods.&lt;/p&gt;&#xA;&lt;p&gt;Until &lt;code&gt;to_dict&lt;/code&gt; and &lt;code&gt;from_dict&lt;/code&gt; are released, use this to convert a Pynamo object to a dictionary:&#xA;&lt;code&gt;found_record_dict = found_record.__dict__.get(&amp;quot;attribute_values&amp;quot;, found_record.__dict__)&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;proejct-source&#34;&gt;Proejct Source&lt;/h2&gt;</description>
    </item>
    <item>
      <title>Type hint for any subclass in Python</title>
      <link>https://www.kylestratis.com/notes/type-hint-for-any-subclass-in-python/</link>
      <pubDate>Thu, 26 Jan 2023 19:04:14 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/type-hint-for-any-subclass-in-python/</guid>
      <description>&lt;p&gt;To use a type hint to specify a parameter can be any subclass object of the hinted class, use &lt;code&gt;typing.Type&lt;/code&gt; and in the annotation do &lt;code&gt;Type[A]&lt;/code&gt;. This is useful if getting warnings for f-strings passed into functions that expect strings.&lt;/p&gt;&#xA;&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;from&lt;/span&gt; typing &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; Type&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;blah&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;process(fstring&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;s)&#xA;&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;process&lt;/span&gt;(fstring&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Type[str]):&#xA;&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; fstring&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This isn&amp;rsquo;t needed for instances that are subtypes, though.&lt;/p&gt;&#xA;&lt;h2 id=&#34;project-source&#34;&gt;Project Source&lt;/h2&gt;</description>
    </item>
    <item>
      <title>Logging from Custom Docker Code in Sagemaker</title>
      <link>https://www.kylestratis.com/notes/logging-from-custom-docker-code-in-sagemaker/</link>
      <pubDate>Tue, 10 Jan 2023 18:05:43 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/logging-from-custom-docker-code-in-sagemaker/</guid>
      <description>&lt;p&gt;Unlike in AWS Lambda code, in Sagemaker training jobs using custom Python code in Docker containers logging won&amp;rsquo;t work unless a stream handler is specifically added to the logger.&lt;/p&gt;&#xA;&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;logger &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; logging&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;getLogger(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stream_handler &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; logging&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;StreamHandler(sys&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;stdout)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;logger&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;addHandler(stream_handler)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>SAGEMAKER_PROGRAM in Custom Dockerfile</title>
      <link>https://www.kylestratis.com/notes/sagemaker-program-in-custom-dockerfile/</link>
      <pubDate>Tue, 10 Jan 2023 03:47:47 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/sagemaker-program-in-custom-dockerfile/</guid>
      <description>&lt;p&gt;At the end of a Dockerfile that defines a container for a Sagemaker training job, you have to define the &lt;code&gt;SAGEMAKER_PROGRAM&lt;/code&gt; environment variable. It needs to point directly to the script that acts as the entry point as it exists within &lt;code&gt;/opt/ml/code&lt;/code&gt;, rather than the full path.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;ENV SAGEMAKER_PROGRAM train.py&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Securing a New SSH Server</title>
      <link>https://www.kylestratis.com/notes/securing-a-new-ssh-server/</link>
      <pubDate>Tue, 10 Jan 2023 03:35:06 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/securing-a-new-ssh-server/</guid>
      <description>&lt;p&gt;Steps for securing a fresh SSH server:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Disable root login&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;sudo vim /etc/ssh/sshd_config&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Uncomment &amp;ldquo;PermitRootLogin no&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;Restart ssh: &lt;code&gt;sudo systemctl restart sshd&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Disable password login&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Using steps [here](&lt;a href=&#34;https://www.kylestratis.com/notes/securing-a-new-ssh-server/#1omk9t&#34;&gt;Securing a New SSH Server&lt;/a&gt;):&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Set &amp;ldquo;PasswordAuthentication no&amp;rdquo;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Keyfile login (generate key if necessary, use ssh-copy-id to copy public key to authorized hosts)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If necessary, generate a key&lt;/li&gt;&#xA;&lt;li&gt;ssh-copy-id -i &lt;a href=&#34;mailto:user@ssh.host&#34;&gt;user@ssh.host&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Change SSH port&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Edit sshd_config&lt;/li&gt;&#xA;&lt;li&gt;Update &amp;ldquo;Port 22&amp;rdquo; line (uncomment if necessary) to the port you want to use&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pimylifeup.com/raspberry-pi-fail2ban/&#34;&gt;Install fail2ban&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Deploying an Updated Image to Lambda Function</title>
      <link>https://www.kylestratis.com/notes/deploying-an-updated-image-to-lambda-function/</link>
      <pubDate>Wed, 04 Jan 2023 18:24:48 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/deploying-an-updated-image-to-lambda-function/</guid>
      <description>&lt;p&gt;Redeploying a CDK stack with a Lambda function that relies on a Docker image in ECR won&amp;rsquo;t necessarily update the function with a newly pushed image. Instead, use the Lambda console&amp;rsquo;s &amp;ldquo;Deploy new image&amp;rdquo; button to push the ECR image to the function.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Forming The Feminine of Certain Adjectives</title>
      <link>https://www.kylestratis.com/notes/forming-the-feminine-of-certain-adjectives/</link>
      <pubDate>Wed, 21 Dec 2022 03:01:50 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/forming-the-feminine-of-certain-adjectives/</guid>
      <description>&lt;p&gt;Some adjectives in Greek have different endings when in the feminine gender. Adjectives that end in -χος or -θος in the masculine become -χια or -θια for people and -χη or -θη for things or places. Adjectives that end in -υς in the masculine become -ια in the feminine.&lt;/p&gt;&#xA;&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;-χος/-θος -&amp;gt; -χια/-θια (people)&lt;/th&gt;&#xA;          &lt;th&gt;-χος/-θος -&amp;gt; -χη/-θη (things/places)&lt;/th&gt;&#xA;          &lt;th&gt;-υς -&amp;gt; -ια&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;ξανθός - Η Μαρία είναι ξανθιά&lt;/td&gt;&#xA;          &lt;td&gt;ξανθός - Μου αρέσει η ξανθή σταφίδα&lt;/td&gt;&#xA;          &lt;td&gt;μακρύς - μακριά&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;φτωχός - Αυτή η οικογένεια είναι φτωχιά&lt;/td&gt;&#xA;          &lt;td&gt;φτωχός - Αυτή η χώρα είναι φτωχή&lt;/td&gt;&#xA;          &lt;td&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;</description>
    </item>
    <item>
      <title>Task Machine Learning Engineers and Platform MLEs</title>
      <link>https://www.kylestratis.com/notes/task-machine-learning-engineers-and-platform-mles/</link>
      <pubDate>Sun, 18 Dec 2022 03:31:19 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/task-machine-learning-engineers-and-platform-mles/</guid>
      <description>&lt;h2 id=&#34;note&#34;&gt;Note&lt;/h2&gt;&#xA;&lt;p&gt;Task MLEs work with data scientists to &amp;ldquo;productionize&amp;rdquo; models, sustaining a specific pipeline or pipelines in production. They need to write, maintain, and monitor pipelines that are responsible for the entire lifecycle of a ML model.&lt;/p&gt;&#xA;&lt;p&gt;Platform MLEs help task MLEs automate their job. They build pipelines that support multiple tasks (task MLEs solf specific tasks).&lt;/p&gt;&#xA;&lt;p&gt;Platform MLEs build pipelines to create features, task MLEs create pipelines to use features. PMLEs trigger ML performance drop alerts, TMLEs act on alerts.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Gkatzoyiannis Etymology</title>
      <link>https://www.kylestratis.com/notes/gkatzoyiannis-etymology/</link>
      <pubDate>Wed, 30 Nov 2022 14:35:19 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/gkatzoyiannis-etymology/</guid>
      <description>&lt;p&gt;A listing of some theories for the name Γκατζογιάννης that I&amp;rsquo;ve heard and researched myself. Specifically, the decidedly non-Greek γκατζο part.&lt;/p&gt;&#xA;&lt;h2 id=&#34;yiayias-story&#34;&gt;Yiayia&amp;rsquo;s Story&lt;/h2&gt;&#xA;&lt;p&gt;One time I asked my Yiayia about what the name meant. According to her, it was the name of a famous chicken in a nearby village. To this day I never found out if she was joking with me or not.&lt;/p&gt;&#xA;&lt;h2 id=&#34;nick-gages-serbian-theory&#34;&gt;Nick Gage&amp;rsquo;s Serbian Theory&lt;/h2&gt;&#xA;&lt;p&gt;According to Nick Gage, Γκατζο comes from an old Serbian dialect, meaning &amp;ldquo;black,&amp;rdquo; with the name meaning &amp;ldquo;black John.&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Uses of μπορώ and μπορεί</title>
      <link>https://www.kylestratis.com/notes/uses-of-%CE%BC%CF%80%CE%BF%CF%81%CF%89-and-%CE%BC%CF%80%CE%BF%CF%81%CE%B5%CE%B9/</link>
      <pubDate>Fri, 11 Nov 2022 17:41:43 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/uses-of-%CE%BC%CF%80%CE%BF%CF%81%CF%89-and-%CE%BC%CF%80%CE%BF%CF%81%CE%B5%CE%B9/</guid>
      <description>&lt;h2 id=&#34;it-is-possiblemight&#34;&gt;It Is Possible/Might&lt;/h2&gt;&#xA;&lt;p&gt;Depending on context, μπορεί (and only μπορεί - impersonal form) can mean &amp;ldquo;might.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;See &lt;a href=&#34;https://en.wiktionary.org/wiki/%CE%BC%CF%80%CE%BF%CF%81%CE%B5%CE%AF&#34;&gt;Wiktionary entry&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;examples&#34;&gt;Examples&lt;/h3&gt;&#xA;&lt;p&gt;&lt;em&gt;Δεν &lt;strong&gt;μπορεί&lt;/strong&gt;!&lt;/em&gt; ― It &lt;strong&gt;is&lt;/strong&gt; not &lt;strong&gt;possible&lt;/strong&gt;!&#xA;&lt;em&gt;&lt;strong&gt;Μπορεί&lt;/strong&gt; να βρέξει αύριο.&lt;/em&gt; ― It &lt;strong&gt;may&lt;/strong&gt; rain tomorrow.&#xA;Tα παιδιά &lt;strong&gt;μπορεί&lt;/strong&gt; να πάνε σινεμά. ― Τhe children/guys &lt;strong&gt;might&lt;/strong&gt; go to the cinema.&#xA;&lt;strong&gt;Mπορεί&lt;/strong&gt; να είμαι καλύτερα αύριο ― I &lt;strong&gt;might&lt;/strong&gt; be better tomorrow.&lt;/p&gt;&#xA;&lt;h2 id=&#34;canmay&#34;&gt;Can/May&lt;/h2&gt;&#xA;&lt;p&gt;This meaning does not use the impersonal, and so will take the full personal conjugation of μπορώ.&lt;/p&gt;</description>
    </item>
    <item>
      <title>System Design Interview</title>
      <link>https://www.kylestratis.com/notes/system-design-interview/</link>
      <pubDate>Mon, 31 Oct 2022 03:03:50 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/system-design-interview/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; See here for valid statuses&lt;/p&gt;&#xA;&lt;p&gt;[author: ]&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-is-the-book-about&#34;&gt;What is the Book About?&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: See How To Read a Book&#xA;What kind of book is it?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Non-fiction, practical book. Examples of system design interview questions.&#xA;What is the book about in 1-2 sentences at most?&lt;/li&gt;&#xA;&lt;li&gt;System design interview questions and how to answer them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;summaries&#34;&gt;Summaries&lt;/h2&gt;&#xA;&lt;h2 id=&#34;chapter-1-scale-from-zero-to-millions-of-users&#34;&gt;Chapter 1: Scale from Zero to Millions of Users&lt;/h2&gt;&#xA;&lt;h3 id=&#34;single-server-setup&#34;&gt;Single Server Setup&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Request flow:&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Users access websites through domain names, which are resolved by DNS&lt;/li&gt;&#xA;&lt;li&gt;Internet protocol (IP) address is returned to the browser.&lt;/li&gt;&#xA;&lt;li&gt;Once IP address is obtained, HTTP requests are sent directly to server&lt;/li&gt;&#xA;&lt;li&gt;The web server returns HTML pages or JSON response.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;database&#34;&gt;Database&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Separating web/mobile traffic (web tier) from database (data tier) servers allows them to be scaled independently.&lt;/li&gt;&#xA;&lt;li&gt;Non-relational DBs might be right choice if:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Application requires super-low latency&lt;/li&gt;&#xA;&lt;li&gt;Data are instructured&lt;/li&gt;&#xA;&lt;li&gt;You only need to serialize and deserialize data&lt;/li&gt;&#xA;&lt;li&gt;You need to store massive amount of data.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;vertical-vs-horizontal-scaling&#34;&gt;Vertical vs. Horizontal Scaling&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Vertical scaling&lt;/strong&gt; - adding more power (CPU, memories, etc.) to servers. &amp;ldquo;Scale up&amp;rdquo;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Limitations:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Hard limit - can&amp;rsquo;t add unlimited CPU and memory&lt;/li&gt;&#xA;&lt;li&gt;No failover or redundancy&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Horizontal scaling&lt;/strong&gt; - adding more serviers to pool of resources&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;load-balancer&#34;&gt;Load Balancer&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A &lt;strong&gt;load balancer&lt;/strong&gt; evenly distributes traffic among web servers.&lt;/li&gt;&#xA;&lt;li&gt;The load balancer communicates with web serves via private IPs.&lt;/li&gt;&#xA;&lt;li&gt;Load balancers can redirect traffic away from offline servers&lt;/li&gt;&#xA;&lt;li&gt;They also can handle rapid gains in traffic, allowing you to simply add more servers behind the load balancer to accomodate the growing traffic.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;database-replication&#34;&gt;Database Replication&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Master/slave terminology: master only handles writes, slave databases only support reads and get copies of databases from the master.&lt;/li&gt;&#xA;&lt;li&gt;Advantages&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Better performance&lt;/li&gt;&#xA;&lt;li&gt;More reliable&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;If one slave DB is available then goes offline, read operations get directed to master database&lt;/li&gt;&#xA;&lt;li&gt;If master goes offline, after some time a slave will be promoted to the new master.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;cache&#34;&gt;Cache&lt;/h3&gt;&#xA;&lt;p&gt;A &lt;strong&gt;cache&lt;/strong&gt; is a temporary storage area that stores the result of expensive responses/frequently acccesed data in memory to serve them more quickly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Raising Exceptions from Lambda to API Gateway Caller</title>
      <link>https://www.kylestratis.com/notes/raising-exceptions-from-lambda-to-api-gateway-caller/</link>
      <pubDate>Wed, 05 Oct 2022 17:09:29 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/raising-exceptions-from-lambda-to-api-gateway-caller/</guid>
      <description>&lt;p&gt;You can send exception feedback from a Lambda to an API Gateway API either by raising a Python exception and handling it via a mapping template, or return a specific set of values from the main handler function.&lt;/p&gt;&#xA;&lt;h2 id=&#34;returning-from-the-handler-function&#34;&gt;Returning from the Handler Function&lt;/h2&gt;&#xA;&lt;p&gt;You can return a dictionary that includes at least:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the desired status code&lt;/li&gt;&#xA;&lt;li&gt;the message body (JSONified)&lt;/li&gt;&#xA;&lt;li&gt;and whether or not the body is base64 encoded&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&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:#66d9ef&#34;&gt;return&lt;/span&gt; {  &#xA;&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;statusCode&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;404&lt;/span&gt;,  &#xA;&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;body&amp;#34;&lt;/span&gt;: simplejson&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;dumps(  &#xA;&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;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;User &lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;{&lt;/span&gt;username&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt; not found&amp;#34;&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ),  &#xA;&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;isBase64Encoded&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;,  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;raising-an-exceptions&#34;&gt;Raising an Exceptions&lt;/h2&gt;&#xA;&lt;p&gt;Using a &lt;a href=&#34;https://aws.amazon.com/blogs/compute/error-handling-patterns-in-amazon-api-gateway-and-aws-lambda/&#34;&gt;mapping template&lt;/a&gt; allows you to simply use regex to associate an error message from a plain Python exception with a certain HTTP code. I don&amp;rsquo;t have any examples because I haven&amp;rsquo;t done it, preferring the &lt;a href=&#34;https://www.kylestratis.com/notes/raising-exceptions-from-lambda-to-api-gateway-caller/#returning-from-the-handler-function&#34;&gt;previous method&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Troubleshooting Slow Docker Image Builds</title>
      <link>https://www.kylestratis.com/notes/troubleshooting-slow-docker-image-builds/</link>
      <pubDate>Wed, 05 Oct 2022 14:31:11 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/troubleshooting-slow-docker-image-builds/</guid>
      <description>&lt;h2 id=&#34;slow-build-during-python-dependency-installation&#34;&gt;Slow Build During Python Dependency Installation&lt;/h2&gt;&#xA;&lt;p&gt;This could be due to Docker attempting to build the dependency from the code rather than using a prebuilt wheel binary. This happens with older versions of dependencies, and especially hard-to-build dependencies like scikit-learn.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Scipy with Docker</title>
      <link>https://www.kylestratis.com/notes/installing-scipy-with-docker/</link>
      <pubDate>Tue, 04 Oct 2022 19:19:35 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/installing-scipy-with-docker/</guid>
      <description>&lt;p&gt;Certain packages can be troublesome to install in a Docker container when they&amp;rsquo;re defined in a &lt;code&gt;requirements.txt&lt;/code&gt; file, such as &lt;code&gt;scipy&lt;/code&gt;. If you&amp;rsquo;re running into issues installing these, which are typically problems with installing or building dependencies, try running &lt;code&gt;pip install&lt;/code&gt; from the Dockerfile itself, then installing from &lt;code&gt;requirements.txt&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&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-dockerfile&#34; data-lang=&#34;dockerfile&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;RUN&lt;/span&gt; pip install --no-cache-dir --upgrade pip &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\ &lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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;    pip install numpy scipy cython &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\ &lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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;    pip install -r requirements.txt --target &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;FUNCTION_DIR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Including Assets from Parent Directories in Dockerized Lambda Functions with CDK</title>
      <link>https://www.kylestratis.com/notes/including-assets-from-parent-directories-in-dockerized-lambda-functions-with-cdk/</link>
      <pubDate>Tue, 04 Oct 2022 17:31:19 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/including-assets-from-parent-directories-in-dockerized-lambda-functions-with-cdk/</guid>
      <description>&lt;p&gt;If you have a Docker based Lambda that is defined in some directory and there are assets that the Lambda needs in the parent directory, &lt;code&gt;from_image_asset()&lt;/code&gt; takes &lt;code&gt;directory&lt;/code&gt; and &lt;code&gt;file&lt;/code&gt; parameters, so you can select the parent directory as well as the specific Dockerfile that describes the environment for the Lambda.&lt;/p&gt;&#xA;&lt;p&gt;Here is an example folder structure:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CDK_infrastructure/&#xA;    lambdas/&#xA;        lambda_one.py&#xA;        lambda_two.py&#xA;        lambda_pkg/&#xA;            ...&#xA;        docker_lambda/&#xA;            Dockerfile&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And here is how you would set this up in your stack definition:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hugo Project Architecture</title>
      <link>https://www.kylestratis.com/notes/hugo-project-architecture/</link>
      <pubDate>Tue, 13 Sep 2022 01:34:20 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/hugo-project-architecture/</guid>
      <description>&lt;h2 id=&#34;page-bundles&#34;&gt;Page Bundles&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/personal-site-redesign/#r3l76i&#34;&gt;Personal Site Redesign&lt;/a&gt;&#xA;&lt;a href=&#34;https://www.kylestratis.com/notes/personal-site-redesign/#505b0f&#34;&gt;Personal Site Redesign&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;content-sections&#34;&gt;Content Sections&lt;/h2&gt;&#xA;&lt;p&gt;Any directories within &lt;code&gt;content/&lt;/code&gt; define a different content section such as posts, tutorials, etc. These directories are also used to determine a page&amp;rsquo;s content type, which can affect how the page is displayed, which &lt;a href=&#34;https://www.kylestratis.com/notes/hugo-archetypes/&#34;&gt;archetype&lt;/a&gt; applies, and more&lt;/p&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/personal-site-redesign/#osbj77&#34;&gt;Content sections source note&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Hugo Archetypes</title>
      <link>https://www.kylestratis.com/notes/hugo-archetypes/</link>
      <pubDate>Mon, 12 Sep 2022 00:22:25 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/hugo-archetypes/</guid>
      <description>&lt;p&gt;Archetypes in Hugo are templates for different content types. Among other things, they allow you to configure frontmatter for whatever content type. They are found in either the top-level &lt;code&gt;archetypes&lt;/code&gt; directory of your project, or if you&amp;rsquo;re using a theme, in &lt;code&gt;themes/your-theme/archetypes&lt;/code&gt; and their the name is the content type + &lt;code&gt;.md&lt;/code&gt;, like &lt;code&gt;posts.md&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Then, when you run &lt;code&gt;hugo new posts/new-post/new.md&lt;/code&gt;, the appropriate folder and file will be made with initial content from the matching archetype file.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Flask-Tables Variable Names Must Match Fields</title>
      <link>https://www.kylestratis.com/notes/flask-tables-variable-names-must-match-fields/</link>
      <pubDate>Thu, 01 Sep 2022 20:00:21 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/flask-tables-variable-names-must-match-fields/</guid>
      <description>&lt;p&gt;When setting up a table with Flask-Tables, the variable names for the columns must match those in the database the table is pulling from. Alternative column names can be passed in as a parameter.&lt;/p&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://flask-table.readthedocs.io/en/stable/#quick-start&#34;&gt;Flask-Tables Documentation&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting Up Helix on MacOS</title>
      <link>https://www.kylestratis.com/notes/setting-up-helix-on-macos/</link>
      <pubDate>Thu, 01 Sep 2022 14:47:34 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/setting-up-helix-on-macos/</guid>
      <description>&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;brew install helix&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;hx --grammar fetch&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;hx --grammar build&lt;/code&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;This requires a C++ compiler to be installed&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;integrate-config-with-rcm&#34;&gt;Integrate config with RCM&lt;/h2&gt;&#xA;&lt;h2 id=&#34;python-setup&#34;&gt;Python Setup&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install LSP &lt;code&gt;pipx install &#39;python-lsp-server[all]&#39;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Add black plugin to LSP&amp;rsquo;s virtual environment &lt;code&gt;pipx inject python-lsp-server black python-lsp-black&lt;/code&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In progress - not sure how to config and use properly yet.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;elixir-setup&#34;&gt;Elixir Setup&lt;/h2&gt;&#xA;&lt;h2 id=&#34;rust-setup&#34;&gt;Rust Setup&lt;/h2&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.helix-editor.com/title-page.html&#34;&gt;Helix docs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/python-lsp/python-lsp-server&#34;&gt;Python LSP Server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>DynamoDB Batch Gotchas</title>
      <link>https://www.kylestratis.com/notes/dynamodb-batch-gotchas/</link>
      <pubDate>Wed, 31 Aug 2022 16:08:03 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/dynamodb-batch-gotchas/</guid>
      <description>&lt;p&gt;The main thing to remember is that a batch_get call on a table with a hash key and a range (or sort) key requires both keys for the request. If you have a list of hash keys and the range key is constant, you can use &lt;code&gt;map&lt;/code&gt; with a &lt;code&gt;lambda&lt;/code&gt; to combine them into a list of tuples:&lt;/p&gt;&#xA;&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;list_of_tuples &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; list(map(&lt;span style=&#34;color:#66d9ef&#34;&gt;lambda&lt;/span&gt; x: (x, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;constant-range-key&amp;#34;&lt;/span&gt;), hash_key_listlike&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;pynamodb-and-batch_get-without-a-range-key&#34;&gt;PynamoDB and batch_get without a Range Key&lt;/h2&gt;&#xA;&lt;p&gt;PynamoDB requires a list of dicts when calling &lt;code&gt;batch_get&lt;/code&gt; on a model with a hash and range key. If you try calling it with a set or list (which is allowed because not all models will include a range key), then the string hash keys will be interpreted as a tuple of strings, with the first character being interpreted as the hash key and the second one interpreted as a range key.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Aorist Tense</title>
      <link>https://www.kylestratis.com/notes/aorist-tense/</link>
      <pubDate>Wed, 31 Aug 2022 00:28:04 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/aorist-tense/</guid>
      <description>&lt;p&gt;same: &lt;a href=&#34;https://www.kylestratis.com/notes/the-past-imperfect-continuous-past-tense/&#34;&gt;The Past Imperfect (Continuous Past) Tense&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-aorist-tense-ο-αόριστος&#34;&gt;The Aorist Tense (ο αόριστος)&lt;/h2&gt;&#xA;&lt;h2 id=&#34;meaning&#34;&gt;Meaning&lt;/h2&gt;&#xA;&lt;p&gt;The aorist is one of the main tenses of Modern Greek. It is also known as the &lt;em&gt;simple past&lt;/em&gt;, as it is perfective, referring to a single completed past action. Not only will other tenses in the perfective aspect take the aorist root for their formation, but so will &lt;a href=&#34;https://www.kylestratis.com/notes/adjective-derivatives/&#34;&gt;some derivatives of adjectives&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conjugation-examples&#34;&gt;Conjugation Examples&lt;/h2&gt;&#xA;&lt;h3 id=&#34;group-a&#34;&gt;Group A&lt;/h3&gt;&#xA;&lt;h3 id=&#34;group-b1&#34;&gt;Group B1&lt;/h3&gt;&#xA;&lt;h3 id=&#34;group-b2&#34;&gt;Group B2&lt;/h3&gt;&#xA;&lt;h3 id=&#34;irregulars&#34;&gt;Irregulars&lt;/h3&gt;&#xA;&lt;h2 id=&#34;additional-notes&#34;&gt;Additional Notes&lt;/h2&gt;</description>
    </item>
    <item>
      <title>Adjective Derivatives</title>
      <link>https://www.kylestratis.com/notes/adjective-derivatives/</link>
      <pubDate>Wed, 31 Aug 2022 00:24:42 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/adjective-derivatives/</guid>
      <description>&lt;h2 id=&#34;verb-derivatives&#34;&gt;Verb Derivatives&lt;/h2&gt;&#xA;&lt;p&gt;These are generally formed with a verb&amp;rsquo;s &lt;a href=&#34;https://www.kylestratis.com/notes/aorist-tense/&#34;&gt;aorist stem&lt;/a&gt; and the requisite ending.&lt;/p&gt;&#xA;&lt;h3 id=&#34;-τός&#34;&gt;-τός&lt;/h3&gt;&#xA;&lt;p&gt;This means that the noun being modified can be affected by the action of the verb.&lt;/p&gt;&#xA;&lt;h4 id=&#34;examples&#34;&gt;Examples&lt;/h4&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;present tense&lt;/th&gt;&#xA;          &lt;th&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/aorist-tense/&#34;&gt;Aorist Tense&lt;/a&gt;&lt;/th&gt;&#xA;          &lt;th&gt;Adjective&lt;/th&gt;&#xA;          &lt;th&gt;Adjective meaning&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;-ω&lt;/td&gt;&#xA;          &lt;td&gt;χαμογέλασα&lt;/td&gt;&#xA;          &lt;td&gt;-ό&lt;/td&gt;&#xA;          &lt;td&gt;smiling&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;ταιριάζω&lt;/td&gt;&#xA;          &lt;td&gt;ταιρίασα&lt;/td&gt;&#xA;          &lt;td&gt;-ό&lt;/td&gt;&#xA;          &lt;td&gt;fitting&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h3 id=&#34;-τικός&#34;&gt;-τικός&lt;/h3&gt;&#xA;&lt;p&gt;This means that the object is suitable for/associated with&lt;/p&gt;&#xA;&lt;h4 id=&#34;examples-1&#34;&gt;Examples&lt;/h4&gt;&#xA;&lt;h3 id=&#34;-άτος&#34;&gt;-άτος&lt;/h3&gt;&#xA;&lt;h4 id=&#34;examples-2&#34;&gt;Examples&lt;/h4&gt;&#xA;&lt;h2 id=&#34;noun-derivatives&#34;&gt;Noun Derivatives&lt;/h2&gt;&#xA;&lt;h3 id=&#34;-ινος&#34;&gt;-ινος&lt;/h3&gt;&#xA;&lt;h3 id=&#34;-ινός-ιανός&#34;&gt;-ινός/-ιανός&lt;/h3&gt;&#xA;&lt;h3 id=&#34;-ιακός&#34;&gt;-ιακός&lt;/h3&gt;&#xA;&lt;h2 id=&#34;more-information&#34;&gt;More information&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.greekpod101.com/lesson/lower-intermediate-11-a-greek-human-story/?lp=132&#34;&gt;Greekpod 101 Level 3 Greek Lesson 11 notes&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Asynchronous Lambda Invocation</title>
      <link>https://www.kylestratis.com/notes/asynchronous-lambda-invocation/</link>
      <pubDate>Tue, 30 Aug 2022 18:57:17 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/asynchronous-lambda-invocation/</guid>
      <description>&lt;p&gt;In order to invoke a Lambda asynchronously, pass &lt;code&gt;InvocationType=&amp;quot;Event&amp;quot;&lt;/code&gt; to the &lt;code&gt;invoke&lt;/code&gt; call. This is useful for, among other things, a hub/message routing Lambda that calls other ones in a fire-and-forget manner. &lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html&#34;&gt;Lambda API Invoke AWS Documentation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;This is likely not an ideal architecture, there are usually better alternatives&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Managing a Project as a Tech Lead</title>
      <link>https://www.kylestratis.com/notes/managing-a-project-as-a-tech-lead/</link>
      <pubDate>Fri, 26 Aug 2022 00:11:24 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/managing-a-project-as-a-tech-lead/</guid>
      <description>&lt;p&gt;These are some step-by-step guidelines to approach project management as a tech lead.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Break down the work&lt;/strong&gt; - use your favorite tools to recursively break down the ask into smaller pieces of work. Once some of the work is broken down, look at the ordering of the work and hand off tasks to people who can turn them into ticket-sized work.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Push through the details and unknowns&lt;/strong&gt; - &amp;ldquo;the trick of project management is not to stop when you feel a little bit stuck.&amp;rdquo; Push past those points by asking an experienced manager to push through with you, ask you questions to prompt you, or work through it together with you.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Run the project and adjust as you go&lt;/strong&gt; - a good planning process helps you know about how far the project has come and about how far it is from being finished. Things &lt;strong&gt;will&lt;/strong&gt; slip, the key is to communicate that to stakeholders along with underscoring completed milestones and remaining work.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use what you learn during planning to manage requirement changes&lt;/strong&gt; - apply what you learned from breaking down the project with its original requirements to what it would look like with the new requirements. Communicate the cost of those changes (new planning? more work? significant risk?) clearly. Having an idea of the effort the changes will take will help make the optimal compromise to achieve a deadline.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Revisit details at you get close to completion&lt;/strong&gt; - do a &lt;em&gt;pre-mortem&lt;/em&gt;: run through all that could fail on the launch of the project, and figure out where &lt;em&gt;good enough&lt;/em&gt; is, socialize it, and commit to it. Cut out any remaining work that falls below that line. Attend to the finishing details as well: what is missing? What testing is left? What verification must be done?&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>Estimating Home Maintenance Costs</title>
      <link>https://www.kylestratis.com/notes/estimating-home-maintenance-costs/</link>
      <pubDate>Tue, 26 Jul 2022 00:47:23 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/estimating-home-maintenance-costs/</guid>
      <description>&lt;p&gt;There are two different rules of thumb for estimating ongoing maintenance costs of a home: The 1% rule and the square foot rule. These are useful in rough budgeting what you can afford in a home.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-1-rule&#34;&gt;The 1% Rule&lt;/h2&gt;&#xA;&lt;p&gt;Budget 1-4% of the home&amp;rsquo;s cost for maintenance per year. The number should be on the higher end of that range if the house is older.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-square-footage-rule&#34;&gt;The Square Footage Rule&lt;/h2&gt;&#xA;&lt;p&gt;Budget $1 per square foot of the home. This is very broad, however, and glosses over differing costs of labor across the country, the type of finishes, etc.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Two Pointer or Iterator Algorithm</title>
      <link>https://www.kylestratis.com/notes/two-pointer-or-iterator-algorithm/</link>
      <pubDate>Fri, 15 Jul 2022 01:43:58 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/two-pointer-or-iterator-algorithm/</guid>
      <description>&lt;p&gt;In this algorithm, you keep track of two pointers to items in an array, and iterate one or the other as needed. This works with sorted lists.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-to-use&#34;&gt;When To Use&lt;/h2&gt;&#xA;&lt;p&gt;This algorithm is used when you have a sorted list and you need to operate on pairs, triplets, or more. This is a good first choice when you need to find two numbers in an array that satisy some condition.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Passive Participle -μένος, -μένη, -μένω</title>
      <link>https://www.kylestratis.com/notes/the-passive-participle-%CE%BC%CE%B5-%CE%BD%CE%BF%CF%82-%CE%BC%CE%B5-%CE%BD%CE%B7-%CE%BC%CE%B5-%CE%BD%CF%89/</link>
      <pubDate>Thu, 14 Jul 2022 15:18:30 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/the-passive-participle-%CE%BC%CE%B5-%CE%BD%CE%BF%CF%82-%CE%BC%CE%B5-%CE%BD%CE%B7-%CE%BC%CE%B5-%CE%BD%CF%89/</guid>
      <description>&lt;h2 id=&#34;the-passive-participle--μένος--μένη--μένω&#34;&gt;The Passive Participle -μένος, -μένη, -μένω&lt;/h2&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;p&gt;τυπώνω (to print) -&amp;gt; τυπωμένος - printed&lt;/p&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.greekpod101.com/lesson/lower-intermediate-2-living-with-change-in-greece/?lp=132&#34;&gt;Greekpod101 Level 3 Greek Lesson 2&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Uses of Να</title>
      <link>https://www.kylestratis.com/notes/uses-of-%CE%BD%CE%B1/</link>
      <pubDate>Wed, 29 Jun 2022 22:44:54 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/uses-of-%CE%BD%CE%B1/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;[down: &lt;a href=&#34;https://www.kylestratis.com/notes/%CE%BD%CE%B1-with-noun-or-pronoun/&#34;&gt;Να with noun or pronoun&lt;/a&gt; &lt;a href=&#34;https://www.kylestratis.com/notes/simple-subjunctive/&#34;&gt;Simple Subjunctive&lt;/a&gt;]&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;!--ID: 1677121825187--&gt;&#xA;&lt;h2 id=&#34;the-many-uses-of-να&#34;&gt;The Many Uses of Να&lt;/h2&gt;&#xA;&lt;p&gt;Να is a Grammatical Particle&lt;/p&gt;&#xA;&lt;h2 id=&#34;subjunctive-particle&#34;&gt;Subjunctive Particle&lt;/h2&gt;&#xA;&lt;p&gt;The particle να can be used to indicate the subjunctive.&#xA;Θέλω να μαγειρέψω σήμερα -&amp;gt; I want to cook today&lt;/p&gt;&#xA;&lt;p&gt;See also &lt;a href=&#34;https://www.kylestratis.com/notes/simple-subjunctive/&#34;&gt;Simple Subjunctive&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;indicative-particle&#34;&gt;Indicative Particle&lt;/h2&gt;&#xA;&lt;p&gt;Να can also be used to indicate where something is. This is constructed as να + noun or να + pronoun.&lt;/p&gt;&#xA;&lt;p&gt;When using να with αυτός/αυτή/αυτό, the αυ gets cut off: να αυτός -&amp;gt; να τος (here he is). This can also be translated as &amp;ldquo;here he comes.&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>When To Use Log Levels</title>
      <link>https://www.kylestratis.com/notes/when-to-use-log-levels/</link>
      <pubDate>Sat, 11 Jun 2022 05:04:55 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/when-to-use-log-levels/</guid>
      <description>&lt;h2 id=&#34;when-to-use-different-log-levels&#34;&gt;When to Use Different Log Levels&lt;/h2&gt;&#xA;&lt;p&gt;This note comprises some heuristics others and myself have found success with when it comes to deciding when and how to use the different log levels in a logging utility.&lt;/p&gt;&#xA;&lt;h2 id=&#34;debug&#34;&gt;Debug&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Every logged class method should log that it was called as DEBUG along with its parameters.&lt;/li&gt;&#xA;&lt;li&gt;You should be able to pretty much recreate all that happened with DEBUG logs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;info&#34;&gt;Info&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;API or external system calls should be logged, at least at this level. Log the start and end times of each call to get an idea of how long that call takes.&lt;/li&gt;&#xA;&lt;li&gt;At this level, you shuold be able to tell whether it ran reasonably and see what choices might have been made.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;warn&#34;&gt;Warn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Any time an exception is handled&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Every method of any class I&amp;rsquo;ve built logs that it&amp;rsquo;s called as DEBUG; I&amp;rsquo;ll often include whatever variables were passed to it. This way in debug mode I can see every step of the process&#xA;2.  API calls or other interactions with external systems definitely should be logged, probably at INFO level at least. Log when it starts and when it ends. This way you can tell about how long it took.&#xA;3.  Clearly any time you handle an exception that&amp;rsquo;s a good WARNING, because something happened that needed managing.&#xA;If I look at the log at DEBUG level, I should be able to pretty much recreate everything that happened. Clearly this is helpful, but it&amp;rsquo;s also a lot of junk, so it can be annoying. At the INFO level I should be able to tell whether it ran reasonably, and I should be able to see choices that were made (e.g. did it choose to do calculation A or calculation B? which toggle did they select before saying &amp;ldquo;next&amp;rdquo;?).&#xA;And of course the best way to tell what needs logging is that you ran your code and thought to yourself &amp;ldquo;I wonder if. . . &amp;ldquo;. You should log that thing you wondered.&#xA;&lt;a href=&#34;https://reddit.com/r/learnpython/comments/v9judz/_/ibxnuv1/?context=1&#34;&gt;https://reddit.com/r/learnpython/comments/v9judz/_/ibxnuv1/?context=1&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Open Writing</title>
      <link>https://www.kylestratis.com/notes/open-writing/</link>
      <pubDate>Fri, 10 Jun 2022 02:00:57 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/open-writing/</guid>
      <description>&lt;p&gt;Open writing is a tentative name for a writing style or exercise where you write about something, but use purposefully vague language and underdefined/undefined concepts. This exercise fits somewhere between free association writing and precise writing, where concepts are broken down, defined, and explained.&lt;/p&gt;&#xA;&lt;p&gt;Some potential benefits of this style:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Triggering diffuse thinking modes&lt;/li&gt;&#xA;&lt;li&gt;Make space for more poetic writing&lt;/li&gt;&#xA;&lt;li&gt;Breaking writer&amp;rsquo;s block&lt;/li&gt;&#xA;&lt;li&gt;Writing more by feel, allowing more precise writing to be less stiff and breathe a bit more&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Catching and Responding To Failures in AWS Step Functions</title>
      <link>https://www.kylestratis.com/notes/catching-and-responding-to-failures-in-aws-step-functions/</link>
      <pubDate>Tue, 07 Jun 2022 18:40:26 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/catching-and-responding-to-failures-in-aws-step-functions/</guid>
      <description>&lt;p&gt;To handle errors within a Step Function, you can use a Catch block that hands off execution to an Error State. This State can be a Task type, which can (among other things) trigger a Lambda that does the actual error handling.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&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:#75715e&#34;&gt;## Step function failure handler - in the future this will be more complex than writing to DB&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;failure_handler &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; lambda_python&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;PythonFunction(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; self,&#xA;&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;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;failure-handler&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; entry&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;lambda/&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; index&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;failure_handler.py&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; runtime&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;_lambda&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Runtime&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;PYTHON_3_9,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;failure_task &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sfn_tasks&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;LambdaInvoke(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; self,&#xA;&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;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;failure-lambda-task&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; lambda_function&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;training_pipeline_failure_handler,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; output_path&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;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;## State machine definition&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;task_one&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;add_catch(failure_task, result_path&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;$.error&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;task_two&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;add_catch(failure_task, result_path&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;$.error&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state_machine_def &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; task_one&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;next(task_two)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state_machine &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sfn&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;StateMachine(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; self, &lt;span style=&#34;color:#e6db74&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;failing-state-machine&amp;#34;&lt;/span&gt;, definition&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;state_machine_def&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-handling-error-conditions.html#using-state-machine-error-conditions-step-4&#34;&gt;AWS Step Function Documentation - handling error conditions&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>CDK Deployment Troubleshooting</title>
      <link>https://www.kylestratis.com/notes/cdk-deployment-troubleshooting/</link>
      <pubDate>Tue, 07 Jun 2022 18:23:48 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/cdk-deployment-troubleshooting/</guid>
      <description>&lt;p&gt;There are a number of avenues to explore for troubleshooting a CDK deployment.&lt;/p&gt;&#xA;&lt;h2 id=&#34;more-than-one-index-error&#34;&gt;More Than One Index Error&lt;/h2&gt;&#xA;&lt;p&gt;If you know you haven&amp;rsquo;t actually created or deleted multiple DynamoDB indexes, &lt;code&gt;npx aws-cdk diff&lt;/code&gt; (or &lt;code&gt;cdk diff&lt;/code&gt; if CDK was installed globally) will tell you what the differences between the synthesized template and deployed template actually are.&lt;/p&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;</description>
    </item>
    <item>
      <title>API Gateway URL Construction</title>
      <link>https://www.kylestratis.com/notes/api-gateway-url-construction/</link>
      <pubDate>Tue, 07 Jun 2022 16:39:00 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/api-gateway-url-construction/</guid>
      <description>&lt;p&gt;This is the construction of the base URL of an API Gateway API: &lt;code&gt;https://{restapi_id}.execute-api.{region}.amazonaws.com/{stage_name}/&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-call-api.html&#34;&gt;AWS Docs - How to call API&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>REST API Best Practices</title>
      <link>https://www.kylestratis.com/notes/rest-api-best-practices/</link>
      <pubDate>Tue, 07 Jun 2022 15:50:53 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/rest-api-best-practices/</guid>
      <description>&lt;h2 id=&#34;path-vs-request-parameters&#34;&gt;Path vs. Request Parameters&lt;/h2&gt;&#xA;&lt;p&gt;Path parameters (&lt;code&gt;/item&lt;/code&gt;) identify a specific resource(s), while request parameters (&lt;code&gt;/item?color=blue&lt;/code&gt;) should act to filter items of that resource.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://stackoverflow.com/questions/30967822/when-do-i-use-path-params-vs-query-params-in-a-restful-api&#34;&gt;Path vs. Request Parameters&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Click Quickstart and Reference</title>
      <link>https://www.kylestratis.com/notes/click-quickstart-and-reference/</link>
      <pubDate>Wed, 27 Apr 2022 01:33:12 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/click-quickstart-and-reference/</guid>
      <description>&lt;h2 id=&#34;quickstart&#34;&gt;Quickstart&lt;/h2&gt;&#xA;&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:#a6e22e&#34;&gt;@click.command&lt;/span&gt;&#xA;&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;@click.option&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;-c&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;--count&amp;#39;&lt;/span&gt;, default&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, help&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;number of greetings&amp;#39;&lt;/span&gt;)&#xA;&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;@click.argument&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;)&#xA;&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;hello&lt;/span&gt;(count, name):&#xA;&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;for&lt;/span&gt; x &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; range(count):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; click&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;echo(&lt;span style=&#34;color:#e6db74&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Hello &lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;{&lt;/span&gt;name&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;!&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;^jaloxu&lt;/p&gt;&#xA;&lt;p&gt;What it looks like:&lt;/p&gt;&#xA;&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-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ python hello.py --help&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Usage: hello.py &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;OPTIONS&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt; NAME&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Options:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; --count INTEGER number of greetings&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; --help Show this message and exit.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;arguments-vs-options&#34;&gt;Arguments vs. Options&lt;/h2&gt;&#xA;&lt;p&gt;Arguments and options are the two parameter types supported by Click.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;arguments&#34;&gt;Arguments&lt;/h3&gt;&#xA;&lt;p&gt;Arguments do less than options, but can do some things that options can not, such as take in an arbitrary number of arguments. They are also always required.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Entry Points in Poetry</title>
      <link>https://www.kylestratis.com/notes/using-entry-points-in-poetry/</link>
      <pubDate>Wed, 27 Apr 2022 00:59:17 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/using-entry-points-in-poetry/</guid>
      <description>&lt;p&gt;same: &lt;a href=&#34;https://www.kylestratis.com/notes/using-poetry-to-change-python-versions-and-create-new-virtual-environment/&#34;&gt;Using Poetry to Change Python Versions and Create New Virtual Environment&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;using-entry-points-in-poetry&#34;&gt;Using Entry Points in Poetry&lt;/h2&gt;&#xA;&lt;p&gt;If you need to use &lt;a href=&#34;https://stackoverflow.com/questions/774824/explain-python-entry-points&#34;&gt;entry points&lt;/a&gt; in a Poetry project, you can use a feature in &lt;code&gt;pyproject.toml&lt;/code&gt; for the same behavior as in setuptools. This feature is the heading &lt;code&gt;[tool.poetry.scripts]&lt;/code&gt;. Under this, you create the linkage between a command and a function in your script in the form of &lt;code&gt;cmd = &amp;quot;package.module.path:function&amp;quot;&lt;/code&gt;, giving the fully qualified location of the function using the same dot notation as you would with an &lt;code&gt;import&lt;/code&gt; statement.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Use multiple context managers in Python</title>
      <link>https://www.kylestratis.com/notes/use-multiple-context-managers-in-python/</link>
      <pubDate>Wed, 27 Apr 2022 00:36:53 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/use-multiple-context-managers-in-python/</guid>
      <description>&lt;p&gt;In Python, you can use multiple context managers on the same block. To do that, simply separate the context manager declarations with a comma.&lt;/p&gt;&#xA;&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:#66d9ef&#34;&gt;with&lt;/span&gt; context_manager1 &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; ctx1, context_manager2 &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; ctx2:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     do_stuff()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;Original note&lt;/p&gt;</description>
    </item>
    <item>
      <title>IAM Bucket Policies for User-Level Access</title>
      <link>https://www.kylestratis.com/notes/iam-bucket-policies-for-user-level-access/</link>
      <pubDate>Tue, 26 Apr 2022 21:57:03 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/iam-bucket-policies-for-user-level-access/</guid>
      <description>&lt;p&gt;If you want to have user-level access for an indvidual bucket (or other resource), create an IAM policy scoped to that individual resource (or the whole class of resources if you want), and attach it directly only to the users that need that access. Other users won&amp;rsquo;t be able to access it by default.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://stackoverflow.com/questions/39855466/aws-s3-deny-all-access-except-for-1-user-bucket-policy&#34;&gt;Source&lt;/a&gt;&#xA;Original note&lt;/p&gt;</description>
    </item>
    <item>
      <title>What Is An Evergreen Note Anyways</title>
      <link>https://www.kylestratis.com/notes/what-is-an-evergreen-note-anyways/</link>
      <pubDate>Wed, 20 Apr 2022 02:35:33 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/what-is-an-evergreen-note-anyways/</guid>
      <description>&lt;p&gt;An attempt to classify different note types, their definitions/defining characteristics, and what they&amp;rsquo;re for. This is largely a synthesis/summary of Andy Matuschak&amp;rsquo;s notes on notes, as his system has resonated the most with me.&lt;/p&gt;&#xA;&lt;h2 id=&#34;literature-note&#34;&gt;Literature Note&lt;/h2&gt;&#xA;&lt;p&gt;These are lightweight insights that are processed &lt;a href=&#34;https://www.kylestratis.com/notes/what-is-an-evergreen-note-anyways/#1sxpuq&#34;&gt;like fleeting notes&lt;/a&gt;. They&amp;rsquo;re usually very small, and that&amp;rsquo;s okay. A literature note should be a reminder for some passage with just &amp;ldquo;a few words of context to jog your memory about what the passage was about&amp;rdquo; or what you were thinking about.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Object Pronouns</title>
      <link>https://www.kylestratis.com/notes/object-pronouns/</link>
      <pubDate>Wed, 13 Apr 2022 21:51:01 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/object-pronouns/</guid>
      <description>&lt;h2 id=&#34;order-of-indirect-and-direct-object-pronouns&#34;&gt;Order of Indirect and Direct Object Pronouns&lt;/h2&gt;&#xA;&lt;p&gt;When using indirect and direct object pronouns together, the indirect comes first, followed by the direct object pronoun. Any non-pronoun objects can be referred to in any order.&lt;/p&gt;&#xA;&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Αγοράσατε &lt;strong&gt;το κινητό&lt;/strong&gt; &lt;em&gt;στο παιδί σας&lt;/em&gt;/Αγοράσατε &lt;em&gt;στο παιδί σας&lt;/em&gt; &lt;strong&gt;το κινητό&lt;/strong&gt;. (both valid constructions)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Του&lt;/em&gt; &lt;strong&gt;το&lt;/strong&gt; αγοράσατε&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;pronouns-with-indefinite-articles&#34;&gt;Pronouns with Indefinite Articles&lt;/h2&gt;&#xA;&lt;p&gt;If you would normally use an indefinite article with an object, you can&amp;rsquo;t use an object pronoun for it. This is because object pronouns refer to a specific instance of an object, rather than &lt;em&gt;any&lt;/em&gt; instance.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Short Stories in Greek Vocabulary and Exercises</title>
      <link>https://www.kylestratis.com/notes/short-stories-in-greek-vocabulary-and-exercises/</link>
      <pubDate>Sat, 09 Apr 2022 02:54:54 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/short-stories-in-greek-vocabulary-and-exercises/</guid>
      <description>&lt;h2 id=&#34;chapter-1&#34;&gt;Chapter 1&lt;/h2&gt;&#xA;&lt;h2 id=&#34;vocabulary&#34;&gt;Vocabulary&lt;/h2&gt;&#xA;&lt;p&gt;επόμενος/η/ο - next&#xA;η παιδική χαρά - playground&#xA;η κούνια  - swing&#xA;η τραμπάλα - see-saw&#xA;η τσουλήθρα - slide&#xA;πέρα δώθε - back and forth&#xA;ξεκουράζομαι - to rest, relax&#xA;opposite of κουράζομαι&#xA;με τίποτα - in no way&#xA;η άμμος - sand&#xA;πλατσουρίζω - splash in/wade (only in water)&#xA;κάνοντας - making/doing (present participle)&#xA;Κάνοντας πως δεν μας είδε, συνέχισε να περπατάει.&#xA;Pretending (lit: making as if) he didn&amp;rsquo;t see us, he kept on walking&#xA;μαζεύω - gather, pick up, collect&#xA;το περίπτερο - kiosk, newsstand&#xA;συνήθως - usually&#xA;απολαυστικός/ή/ό - enjoyable/pleasurable&lt;/p&gt;</description>
    </item>
    <item>
      <title>Indirect Object Pronouns</title>
      <link>https://www.kylestratis.com/notes/indirect-object-pronouns/</link>
      <pubDate>Sun, 03 Apr 2022 20:07:59 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/indirect-object-pronouns/</guid>
      <description>&lt;p&gt;same: &lt;a href=&#34;https://www.kylestratis.com/notes/direct-object-prounouns/&#34;&gt;Direct Object Prounouns&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Indirect object pronouns are pronouns that are affected by verb&amp;rsquo;s action in place of the object itself. In English, an example would be &lt;strong&gt;&amp;ldquo;I gave the book to her&amp;rdquo;&lt;/strong&gt; where &lt;strong&gt;her&lt;/strong&gt; is the indirect object pronoun that (indirectly) receives the action of &lt;strong&gt;gave&lt;/strong&gt;. In Greek, this example would be &lt;strong&gt;Της έδωσα το βιβλίο&lt;/strong&gt;. Indirect object pronouns can be used for any object of a sentence that in English would be accompanied by a preposition.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Direct Object Prounouns</title>
      <link>https://www.kylestratis.com/notes/direct-object-prounouns/</link>
      <pubDate>Wed, 30 Mar 2022 22:25:14 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/direct-object-prounouns/</guid>
      <description>&lt;p&gt;same: &lt;a href=&#34;https://www.kylestratis.com/notes/indirect-object-pronouns/&#34;&gt;Indirect Object Pronouns&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Direct object prounouns are pronouns that receive a verb&amp;rsquo;s action in place of the object itself. In English, an example would be &lt;strong&gt;&amp;ldquo;I borrowed it&amp;rdquo;&lt;/strong&gt; where &lt;strong&gt;it&lt;/strong&gt; is the direct object pronoun of &lt;strong&gt;borrowed&lt;/strong&gt;. In Greek, an example would be &lt;strong&gt;Το διαβάζω&lt;/strong&gt; or &amp;ldquo;I am reading it&amp;rdquo;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;strong-and-weak-forms&#34;&gt;Strong and Weak Forms&lt;/h2&gt;&#xA;&lt;p&gt;Direct object pronouns have two forms: the &amp;ldquo;strong&amp;rdquo; and the &amp;ldquo;weak&amp;rdquo; forms. The strong form can stand on its own and comes after the verb - it is also considered an &amp;ldquo;emphatic&amp;rdquo; form. The weak form can not, is placed before the verb (except with imperative and gerund verbs, e.g. πάρε την), and can&amp;rsquo;t be used after prepositions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Pass Arguments to Training Code in Sagemaker via a Step Function</title>
      <link>https://www.kylestratis.com/notes/how-to-pass-arguments-to-training-code-in-sagemaker-via-a-step-function/</link>
      <pubDate>Tue, 29 Mar 2022 03:43:22 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/how-to-pass-arguments-to-training-code-in-sagemaker-via-a-step-function/</guid>
      <description>&lt;p&gt;To pass arguments to training code in Sagemaker by itself or via a Step Function, set up an argument parser in the Python script with keyword arguments.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;p&gt;Implement an argument parser in the Sagemaker entry point script. For example, in a Python script:&lt;/p&gt;&#xA;&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; argparse&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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; __name__ &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; parser &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; argparse&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;ArgumentParser&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; parser&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;add_argument(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--learning-rate&amp;#34;&lt;/span&gt;, type&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;int, default&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; parser&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;add_argument(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--batch-size&amp;#34;&lt;/span&gt;, type&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;int, default&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;64&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; parser&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;add_argument(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--communicator&amp;#34;&lt;/span&gt;, type&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;str)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; parser&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;add_argument(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--frequency&amp;#34;&lt;/span&gt;, type&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;int, default&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;20&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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; parser&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;parse_args&#xA;&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;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Start a training job with hyperparameters.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Baseline Competency for Engineering Teams</title>
      <link>https://www.kylestratis.com/notes/baseline-competency-for-engineering-teams/</link>
      <pubDate>Tue, 29 Mar 2022 03:39:07 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/baseline-competency-for-engineering-teams/</guid>
      <description>&lt;p&gt;A baseline level of competency should be defined and understood by an organization as the minimum skillset needed across the team/org. It is difficult to define, but the definition should be based on the shape and structure of the team network, and understood to change over time.&lt;/p&gt;&#xA;&lt;p&gt;This is in context of contagions as ideas that spread through a team (or network), if there are wide bridges between nodes, the contagion can spread more easily. An example of a contagion would be a new technology.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Poetry to Change Python Versions and Create New Virtual Environment</title>
      <link>https://www.kylestratis.com/notes/using-poetry-to-change-python-versions-and-create-new-virtual-environment/</link>
      <pubDate>Fri, 25 Mar 2022 00:05:44 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/using-poetry-to-change-python-versions-and-create-new-virtual-environment/</guid>
      <description>&lt;p&gt;With Poetry, to change an underlying Python version (for testing, etc.) and create a new virtualenv on top of that, use &lt;code&gt;poetry env use /PATH/TO/VERSION/BINARY&lt;/code&gt;. For pyenv, this will be &lt;code&gt;poetry env use ~/.pyenv/versions/x.y.z/bin/python3&lt;/code&gt;. This will create and activate a new virtual environment, but it won&amp;rsquo;t show up automatically in the shell. To make it show up, get the full path of the activated virtual environment with &lt;code&gt;poetry env list --full-path&lt;/code&gt;, then use that with &lt;code&gt;source /VIRTUALENV/PATH/bin/activate&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Real World Problem Spaces Exhibit Non-Stationarity ie They Drift</title>
      <link>https://www.kylestratis.com/notes/real-world-problem-spaces-exhibit-non-stationarity-ie-they-drift/</link>
      <pubDate>Thu, 24 Mar 2022 22:32:56 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/real-world-problem-spaces-exhibit-non-stationarity-ie-they-drift/</guid>
      <description>&lt;h2 id=&#34;data-drift&#34;&gt;Data Drift&lt;/h2&gt;&#xA;&lt;p&gt;Machine learning models are stationary. The trained model is an artifact that doesn&amp;rsquo;t move, however the problem space in the real world does (see &lt;a href=&#34;https://www.kylestratis.com/notes/supervised-machine-learning-data-exists-in-a-euclidean-space/#qbglai&#34;&gt;this diagram&lt;/a&gt;), which is referred to as &lt;strong&gt;data drift&lt;/strong&gt;. Recall that &lt;a href=&#34;https://www.kylestratis.com/notes/supervised-machine-learning-data-exists-in-a-euclidean-space/&#34;&gt;machine learning models can be thought of as existing in a multidimensional Euclidian space&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;There are two kinds of drift:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;concept drift&lt;/strong&gt; - also known as &lt;em&gt;real drift&lt;/em&gt;, this is a shift in the relationship between model inputs and outputs. Because p(y | x) changes, this always causes &lt;em&gt;model decay&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;data drift&lt;/strong&gt; - also known as &lt;em&gt;input drift&lt;/em&gt;, &lt;em&gt;feature drift&lt;/em&gt;, or &lt;em&gt;covariate shift&lt;/em&gt;, this is a change to the statistical distributions within the input data. It can cause model decay by driving a change in p(y | x) but doesn&amp;rsquo;t necessarily. When it doesn&amp;rsquo;t, it is referred to as &lt;em&gt;virtual drift&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Both kinds of drift can manifest in at least 4 modes:&#xA;1. Abrupt&#xA;2. Incremental&#xA;3. Gradual&#xA;4. Reoccurring (e.g. seasonality)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Supervised Machine Learning Data Exists in a Euclidean Space</title>
      <link>https://www.kylestratis.com/notes/supervised-machine-learning-data-exists-in-a-euclidean-space/</link>
      <pubDate>Thu, 24 Mar 2022 15:32:29 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/supervised-machine-learning-data-exists-in-a-euclidean-space/</guid>
      <description>&lt;p&gt;All training data exists as points in a multidimensional Euclidean space. You can visualize an enclosure of this data (the &lt;em&gt;training domain&lt;/em&gt;). Within that space, supervised ML acts as interpolation geometry.&lt;/p&gt;&#xA;&lt;h2 id=&#34;visualization&#34;&gt;Visualization&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.kylestratis.com/notes/supervised-machine-learning-data-exists-in-a-euclidean-space/Pasted-image-20220324115913.png&#34; alt=&#34;Pasted image 20220324115913&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;In reality, the training domain will look jagged and weird because data is messy, incomplete, and often doesn&amp;rsquo;t line up with the regional problem space. Because ML models can not extrapolate, the model won&amp;rsquo;t work well at the edges or outside of the training domain.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FourthBrain - ML Model Drift and Decay</title>
      <link>https://www.kylestratis.com/notes/fourthbrain-ml-model-drift-and-decay/</link>
      <pubDate>Tue, 22 Mar 2022 21:43:08 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/fourthbrain-ml-model-drift-and-decay/</guid>
      <description>&lt;p&gt;FourthBrain - ML Model Drift and Decay&lt;/p&gt;&#xA;&lt;h2 id=&#34;metadata&#34;&gt;Metadata&lt;/h2&gt;&#xA;&lt;p&gt;URL: &lt;a href=&#34;https://www.youtube.com/watch?v=C1yiOonTYqM&#34;&gt;https://www.youtube.com/watch?v=C1yiOonTYqM&lt;/a&gt;&#xA;Author: FourthBrain&lt;/p&gt;&#xA;&lt;!--ID: 1677121825250--&gt;&#xA;&lt;h2 id=&#34;literature-notes&#34;&gt;Literature Notes&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-dataview&#34; data-lang=&#34;dataview&#34;&gt;TABLE rows.file.link AS &amp;#34;Literature Note&amp;#34;, rows.file.cday AS &amp;#34;Date&amp;#34;&#xA;FROM #note/literature AND Example Title&#xA;GROUP BY file.link&#xA;sort date ASCENDING&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: there may not be many literature notes for this, because it&amp;rsquo;s a how-to type of talk, where there won&amp;rsquo;t be notes on the piece itself, but on what it teaches.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fleeting-notes&#34;&gt;Fleeting Notes&lt;/h2&gt;&#xA;&lt;p&gt;Supervised ML is interpolation geometry. &amp;ldquo;All training data exists as points in a Euclidean space&amp;hellip;we can create an enclosure. Then, inside that enclosure, we can interpolate.&amp;rdquo;&#xA;Global problem space -&amp;gt; regional problem space -&amp;gt; training domain -&amp;gt; model. When we get data, there are quantity and quality gaps which are smaller than the ideal training domain. This means that a model won&amp;rsquo;t work well at trying to predict on observations that fall outside the training domain because &lt;strong&gt;machine learning models for non-linear problems are interpolation machines&lt;/strong&gt;. They can not extrapolate.&#xA;Active learning can fix gaps between the training domain and regional problem space. This flags and prioritizes confusing inputs for human ground-truthing and augments the training set with newly labeled observations to fill gaps in the training domain.&#xA;Most machine learning methods are based on the assumption that the problem space does not change over time. In the real world, though, the problem space does indeed change - this is called &lt;strong&gt;non-stationarity&lt;/strong&gt;. In other words, the problem space &lt;em&gt;drifts&lt;/em&gt; out of alignment with the existing training domain and model (&lt;strong&gt;data drift&lt;/strong&gt;).&#xA;Addressing data drift can take the form of filling gaps with active learning or pruning old or obsolete observations by using a weighting scheme (among other strategies).&#xA;MLOps and Pipelines are beneficial for monitoring models for appreciable drift and refitting the model on augmented training data when drift is detected.&#xA;Two kinds of drift:&#xA;- &lt;strong&gt;concept drift&lt;/strong&gt; - or real drift; a shift in the relationship between model inputs and outputs (changes p(y | x)). This always causes model decay.&#xA;- &lt;strong&gt;data drift&lt;/strong&gt; - change to the statistical distributions within the input data (also known as &lt;em&gt;input drift&lt;/em&gt;, &lt;em&gt;feature drift&lt;/em&gt;, &lt;em&gt;covariate shift&lt;/em&gt;). This &lt;strong&gt;can&lt;/strong&gt; cause model decay by driving a change in p(y | x). If it doesn&amp;rsquo;t cause that change, then it&amp;rsquo;s called &lt;em&gt;virtual drift&lt;/em&gt;.&#xA;Both kinds of drift can manifest in 4 modes:&#xA;1. Abrupt&#xA;2. Incremental&#xA;3. Gradual&#xA;4. Reoccurring (like seasonality)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rebuilding Missing Resources in CDK</title>
      <link>https://www.kylestratis.com/notes/rebuilding-missing-resources-in-cdk/</link>
      <pubDate>Mon, 14 Mar 2022 19:37:06 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/rebuilding-missing-resources-in-cdk/</guid>
      <description>&lt;p&gt;In AWS CDK, if a resource like a DynamoDB table is missing (maybe it was accidentally manually deleted) with a &lt;code&gt;ResourceNotFound&lt;/code&gt; or &lt;code&gt;Unable to retrieve arn&lt;/code&gt; error, you can recover it without tearing down the whole stack by recreating the resource with the same full name that the CDK stack/CloudFormation template is looking for.&lt;/p&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://aws.amazon.com/premiumsupport/knowledge-center/failing-stack-updates-deleted/&#34;&gt;AWS docs&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Testing Python Code with Pytest</title>
      <link>https://www.kylestratis.com/notes/testing-python-code-with-pytest/</link>
      <pubDate>Mon, 14 Mar 2022 19:20:53 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/testing-python-code-with-pytest/</guid>
      <description>&lt;h2 id=&#34;mocking-external-code&#34;&gt;Mocking External Code&lt;/h2&gt;&#xA;&lt;p&gt;To mock outside function calls with Pytest, install the &lt;code&gt;pytest-mock&lt;/code&gt; package and use &lt;code&gt;mocker&lt;/code&gt; as a parameter to your test function. Then you set the patch with the following syntax: &lt;code&gt;mocker.patch.object(Class, &amp;quot;function_name&amp;quot;, replacement_function)&lt;/code&gt;. Note how there aren&amp;rsquo;t any parantheses for the functions - either in the string representation or the actual function. This is because if they were used, the function would be evaluated at the call, rather than passed in to the patch.object function. These are best done in setup functions rather than the test function itself.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PynamoDB Filters</title>
      <link>https://www.kylestratis.com/notes/pynamodb-filters/</link>
      <pubDate>Mon, 07 Mar 2022 23:50:59 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/pynamodb-filters/</guid>
      <description>&lt;h2 id=&#34;filter-conditions-in-pynamodb&#34;&gt;Filter Conditions in PynamoDB&lt;/h2&gt;&#xA;&lt;p&gt;Filter conditions in PynamoDB are objects of the class pynamodb.expressions.condition.Comparison. For testing, you can get the string representation by casting it to a string, and I can use that for matching.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;h3 id=&#34;creating-a-condition&#34;&gt;Creating a condition&lt;/h3&gt;&#xA;&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;condition &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;None&lt;/span&gt;&#xA;&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; source:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    condition &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;=&lt;/span&gt; Model&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;source &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; source&#xA;&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; time_limit:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    time_limit_min &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; datetime&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;timestamp(datetime&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;now() &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; timedelta(days&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;time_limit))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    condition &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;=&lt;/span&gt; time_limit_min &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;=&lt;/span&gt; Model&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;last_updated&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In PynamoDB, filter objects overload common Python logic operators for translation into DynamoDB&amp;rsquo;s conditional filter operators. You can find the translation table &lt;a href=&#34;https://pynamodb.readthedocs.io/en/latest/conditional.html&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Force a Python Function to Only Accept Keyword Arguments</title>
      <link>https://www.kylestratis.com/notes/force-a-python-function-to-only-accept-keyword-arguments/</link>
      <pubDate>Fri, 04 Mar 2022 22:03:04 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/force-a-python-function-to-only-accept-keyword-arguments/</guid>
      <description>&lt;p&gt;In Python 3, you can force a function to only accept keyword arguments (even without default values) by making the first parameter an asterisk &lt;code&gt;*&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&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:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;myfunc&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;, a, b, c):&#xA;&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;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.vegardstikbakke.com/python-keyword-only/&#34;&gt;Source&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Unpacking Object Parameters in Python</title>
      <link>https://www.kylestratis.com/notes/unpacking-object-parameters-in-python/</link>
      <pubDate>Fri, 04 Mar 2022 21:20:19 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/unpacking-object-parameters-in-python/</guid>
      <description>&lt;p&gt;In Python, if two objects have the same parameters, you can unpack the output of the &lt;code&gt;__dict__&lt;/code&gt; method of an instance of one into the constructor of another to transmute an object.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&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:#75715e&#34;&gt;## Create an instance of Class B using the properties of an instance of Class A&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;b &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; ClassB(&lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;instance_a&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;__dict__)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Imports and Class Instances</title>
      <link>https://www.kylestratis.com/notes/imports-and-class-instances/</link>
      <pubDate>Fri, 04 Mar 2022 21:17:11 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/imports-and-class-instances/</guid>
      <description>&lt;p&gt;In Python, if you return a class instance, that instance has everything a consumer needs to use it. So for instance, if I pass a PynamoDB model object (indicating a document in DynamoDB) back to a consumer, they&amp;rsquo;ll be able to use it without importing Pynamo directly.&lt;/p&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://stackoverflow.com/questions/27991552/when-does-a-passed-class-instance-require-an-import-in-python&#34;&gt;https://stackoverflow.com/questions/27991552/when-does-a-passed-class-instance-require-an-import-in-python&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Database Engineering and Machine Learning Systems for Data Science Curriculum</title>
      <link>https://www.kylestratis.com/notes/database-engineering-and-machine-learning-systems-for-data-science-curriculum/</link>
      <pubDate>Fri, 18 Feb 2022 00:47:25 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/database-engineering-and-machine-learning-systems-for-data-science-curriculum/</guid>
      <description>&lt;p&gt;This is a list of resources to gain an advanced understanding of databases and machine learning systems that data engineers, MLOps professionals, ML engineers, and other titles build for R&amp;amp;D groups. Because this is a major part of my own job description, I wanted to compile this list of courses to be consumed as projects to improve what I build for my own teams.&lt;/p&gt;&#xA;&lt;p&gt;The first iteration of this comes completely from &lt;a href=&#34;https://twitter.com/TweetAtAKK&#34;&gt;Arun Kumar&lt;/a&gt;&amp;rsquo;s &lt;a href=&#34;https://twitter.com/TweetAtAKK/status/1492925448174505984&#34;&gt;response thread&lt;/a&gt; to me asking about how to learn these things without shelling out for an MS in CS (still a goal of mine, though!).&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS Lambda Return Values for API Triggering</title>
      <link>https://www.kylestratis.com/notes/aws-lambda-return-values-for-api-triggering/</link>
      <pubDate>Mon, 07 Feb 2022 21:41:05 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/aws-lambda-return-values-for-api-triggering/</guid>
      <description>&lt;p&gt;A Lambda triggered by an API has to return a dictionary with certain keys and values in order to not cause an error in execution (e.g. &amp;ldquo;malformed lambda proxy response&amp;rdquo;). These are the status code, body (JSONified), and if it&amp;rsquo;s base64 encoded. Headers can also be added to this structure, but they don&amp;rsquo;t seem required.&lt;/p&gt;&#xA;&lt;h2 id=&#34;code-example&#34;&gt;Code Example&lt;/h2&gt;&#xA;&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:#66d9ef&#34;&gt;return&lt;/span&gt; {  &#xA;&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;statusCode&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;200&lt;/span&gt;,  &#xA;&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;body&amp;#34;&lt;/span&gt;: json&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;dumps(&lt;span style=&#34;color:#e6db74&#34;&gt;f&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;User &lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;{&lt;/span&gt;username&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt; not found&amp;#34;&lt;/span&gt;),  &#xA;&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;isBase64Encoded&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://aws.amazon.com/premiumsupport/knowledge-center/malformed-502-api-gateway/&#34;&gt;https://aws.amazon.com/premiumsupport/knowledge-center/malformed-502-api-gateway/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.onlinetutorialspoint.com/aws/fixed-malformed-lambda-proxy-response-status-502.html&#34;&gt;https://www.onlinetutorialspoint.com/aws/fixed-malformed-lambda-proxy-response-status-502.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Passing Secrets into Lambdas in CDK</title>
      <link>https://www.kylestratis.com/notes/passing-secrets-into-lambdas-in-cdk/</link>
      <pubDate>Mon, 07 Feb 2022 18:43:52 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/passing-secrets-into-lambdas-in-cdk/</guid>
      <description>&lt;p&gt;same: &lt;a href=&#34;https://www.kylestratis.com/notes/aws-lambda-return-values-for-api-triggering/&#34;&gt;AWS Lambda Return Values for API Triggering&lt;/a&gt;, &lt;a href=&#34;https://www.kylestratis.com/notes/to-build-a-lambda-from-a-dockerfile-in-cdk/&#34;&gt;To Build a Lambda from a Dockerfile in CDK&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;passing-secrets-into-lambdas-in-cdk&#34;&gt;Passing Secrets into Lambdas in CDK&lt;/h2&gt;&#xA;&lt;p&gt;Do not pass Secret Manager values via environment variables in your CDK Stack! This is a problem for two reasons:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;This exposes the Secret in the generated CF templates.&lt;/li&gt;&#xA;&lt;li&gt;This only pulls the Secret value at deploy time &lt;strong&gt;only if&lt;/strong&gt; the Secrets construct or Lambda in question will be rebuilt upon deploy or synthesis. If the keys are rotated, and the constructs in the CDK stack aren&amp;rsquo;t changed, this won&amp;rsquo;t be picked up by the app.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;To address this, handle Secret Manager secrets in the following way:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Specific CDK Version And-Or By Project</title>
      <link>https://www.kylestratis.com/notes/install-specific-cdk-version-and-or-by-project/</link>
      <pubDate>Mon, 07 Feb 2022 18:32:33 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/install-specific-cdk-version-and-or-by-project/</guid>
      <description>&lt;h2 id=&#34;install-specific-cdk-versions-andor-by-project&#34;&gt;Install Specific CDK Versions And/Or By Project&lt;/h2&gt;&#xA;&lt;p&gt;You can install the CDK toolkit for a specific project by omitting &lt;code&gt;-g&lt;/code&gt; from the &lt;code&gt;npm install&lt;/code&gt; command then invoking it with &lt;code&gt;npx aws-cdk&lt;/code&gt;. You can also install the toolkit for a specific version with &lt;code&gt;npm install -g aws-cdk@x.yyy.z&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-specific-version-for-a-project&#34;&gt;Install specific version for a project&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Navigate to project directory&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;npm install aws-cdk@x.yy.zzz&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;npx aws-cdk ...&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;install-specific-version-globally&#34;&gt;Install specific version globally&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;npm install -g aws-cdk@x.yyy.z&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;aws-cdk ...&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;use-the-installed-version&#34;&gt;Use the installed version&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;npx aws-cdk ...&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS API Gateway Changes Break Deployment</title>
      <link>https://www.kylestratis.com/notes/aws-api-gateway-changes-break-deployment/</link>
      <pubDate>Mon, 07 Feb 2022 15:43:47 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/aws-api-gateway-changes-break-deployment/</guid>
      <description>&lt;p&gt;If you try to rename a parameter in a deployed API Gateway object via CDK, deployment will break (you won&amp;rsquo;t be able to deploy the change). This seems to do with how CloudFormation diffs are applied, and it will cause a conflict during the deployment process (see &lt;a href=&#34;https://stackoverflow.com/questions/62346608/aws-lambda-rest-api-a-sibling-id-of-this-resource-already-has-a-variable-pa&#34;&gt;here&lt;/a&gt;). The workaround is to comment out all the API code in the CDK stack, deploy, then uncomment and redeploy. This removes and remakes the API.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DynamoDB Index Read and Write Capacity in PynamoDB</title>
      <link>https://www.kylestratis.com/notes/dynamodb-index-read-and-write-capacity-in-pynamodb/</link>
      <pubDate>Fri, 04 Feb 2022 19:42:30 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/dynamodb-index-read-and-write-capacity-in-pynamodb/</guid>
      <description>&lt;p&gt;When setting up a Global Secondary Index model in PynamoDB, the read and write capacity units have to be specified. These are &lt;a href=&#34;https://github.com/pynamodb/PynamoDB/issues/629#issuecomment-517898130&#34;&gt;not needed if not provisioning a table or index&lt;/a&gt;, yet are not optional. Arbitrary values can be used and nothing will be done with them.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&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:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;ModelIndex&lt;/span&gt;(GlobalSecondaryIndex):&#xA;&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;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Meta&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      index_name &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;model-index&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      read_capacity_index &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 style=&#34;color:#75715e&#34;&gt;# Not used, since the table isn&amp;#39;t being provisioned&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      write_capacity_index &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      projection &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; AllProjection&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  model_key &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; UnicodeAttribute(hash_key&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>PynamoDB Field Aliases</title>
      <link>https://www.kylestratis.com/notes/pynamodb-field-aliases/</link>
      <pubDate>Fri, 04 Feb 2022 17:59:50 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/pynamodb-field-aliases/</guid>
      <description>&lt;p&gt;To give an alias to DynamoDB field with PynamoDB, use the &lt;code&gt;attr_name&lt;/code&gt; parameter for the appropriate attribute constructor:&lt;/p&gt;&#xA;&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:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Thread&lt;/span&gt;(Model):&#xA;&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;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Meta&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    table_name &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Thread&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;forum_name &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; UnicodeAttribute(hash_key&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&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;# This attribute will be called &amp;#39;tn&amp;#39; in DynamoDB&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;thread_name &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; UnicodeAttribute(null&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;, attr_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;tn&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>The Past Imperfect (Continuous Past) Tense</title>
      <link>https://www.kylestratis.com/notes/the-past-imperfect-continuous-past-tense/</link>
      <pubDate>Thu, 27 Jan 2022 17:49:12 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/the-past-imperfect-continuous-past-tense/</guid>
      <description>&lt;h2 id=&#34;the-past-imperfect-or-continuous-past-tense-ο-παρατατικός&#34;&gt;The Past Imperfect or Continuous Past Tense (ο Παρατατικός)&lt;/h2&gt;&#xA;&lt;h2 id=&#34;meaning&#34;&gt;Meaning&lt;/h2&gt;&#xA;&lt;p&gt;A habitual or continuous action that happened in the past with no fixed temporal boundary.&lt;/p&gt;&#xA;&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;&#xA;&lt;p&gt;I was reading the book -&amp;gt; Διάβαζα το βιβλίο&lt;/p&gt;&#xA;&lt;h2 id=&#34;conjugation&#34;&gt;Conjugation&lt;/h2&gt;&#xA;&lt;p&gt;Past imperfect (continuous past) is the same as the present tense but has the ending of the aorist (simple past) as well as the accent shift:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Present&lt;/th&gt;&#xA;          &lt;th&gt;Continuous past (παρατατικός)&lt;/th&gt;&#xA;          &lt;th&gt;Aorist (αόριστος)&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;νοικιάζω&lt;/td&gt;&#xA;          &lt;td&gt;νοίκιαζα&lt;/td&gt;&#xA;          &lt;td&gt;νοίκιασα (aorist)&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;διαβάζω&lt;/td&gt;&#xA;          &lt;td&gt;διάβαζα&lt;/td&gt;&#xA;          &lt;td&gt;διάβασα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;νιώθω&lt;/td&gt;&#xA;          &lt;td&gt;ένιωθα&lt;/td&gt;&#xA;          &lt;td&gt;ένιωσα&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;πθγαίνω&lt;/td&gt;&#xA;          &lt;td&gt;πήγαινα&lt;/td&gt;&#xA;          &lt;td&gt;πήγα (&lt;a href=&#34;https://www.kylestratis.com/notes/the-past-imperfect-continuous-past-tense/#4giphr&#34;&gt;*&lt;/a&gt;)&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;θέλω&lt;/td&gt;&#xA;          &lt;td&gt;ήθελα&lt;/td&gt;&#xA;          &lt;td&gt;ήθελα (&lt;a href=&#34;https://www.kylestratis.com/notes/the-past-imperfect-continuous-past-tense/#8gx983&#34;&gt;*&lt;/a&gt;)&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;μένω&lt;/td&gt;&#xA;          &lt;td&gt;έμενα&lt;/td&gt;&#xA;          &lt;td&gt;έμεινα (&lt;a href=&#34;https://www.kylestratis.com/notes/the-past-imperfect-continuous-past-tense/#8gx983&#34;&gt;*&lt;/a&gt;)&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h3 id=&#34;group-a--ω-endings&#34;&gt;Group A (-ω) Endings&lt;/h3&gt;&#xA;&lt;p&gt;-α&#xA;-εσ&#xA;-ε&#xA;-αμε&#xA;-ατε&#xA;-αν&lt;/p&gt;</description>
    </item>
    <item>
      <title>Personal Site Redesign</title>
      <link>https://www.kylestratis.com/notes/personal-site-redesign/</link>
      <pubDate>Wed, 26 Jan 2022 04:46:05 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/personal-site-redesign/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;I want to move away from webflow and build a simpler, static site for my articles and stuff.&lt;/p&gt;&#xA;&lt;h2 id=&#34;lessons-learned&#34;&gt;Lessons Learned&lt;/h2&gt;&#xA;&lt;p&gt;Hugo archetypes are templates for different content types. They allow you to configure different frontmatter.&#xA;- &lt;a href=&#34;https://www.kylestratis.com/notes/hugo-archetypes/&#34;&gt;Hugo Archetypes&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Each directory within the &lt;code&gt;content/&lt;/code&gt; directory defines a different content section (like tutorials, articles, etc.), and this is used to determine a content&amp;rsquo;s content type.&#xA;- &lt;a href=&#34;https://www.kylestratis.com/notes/hugo-project-architecture/&#34;&gt;Hugo Project Architecture&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://gohugo.io/content-management/page-bundles/&#34;&gt;Page Bundles&lt;/a&gt; are a way to organize pages. Branch bundles are used for a home page, section page, taxonomy terms, etc. (these are &lt;em&gt;list pages&lt;/em&gt;) and must contain at least an &lt;code&gt;_index.md&lt;/code&gt; file. Leaf bundles contain at least an &lt;code&gt;index.md&lt;/code&gt; file and define a regular page. These aren&amp;rsquo;t required organization methods, however. This all occurs within the &lt;code&gt;content/&lt;/code&gt; directory.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PynamoDB Arguments</title>
      <link>https://www.kylestratis.com/notes/pynamodb-arguments/</link>
      <pubDate>Wed, 26 Jan 2022 04:37:46 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/pynamodb-arguments/</guid>
      <description>&lt;p&gt;In PynamoDB, when running a DynamoDB query, the first two positional arguments are the hash key (primary key) and filters for the range key (sort key). To do a filter expression without querying on the range key, explicitly provide the &lt;code&gt;filter_condition_expression&lt;/code&gt; parameter.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&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:#66d9ef&#34;&gt;return&lt;/span&gt; [&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        post&#xA;&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;for&lt;/span&gt; post &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; PostModel&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;query(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            user_id,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            filter_condition&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;(PostModel&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;media_type &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;IMAGE&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt; PostModel&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;image_key&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;exists(),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            limit&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ]&#xA;&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;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>TypedDicts in Python</title>
      <link>https://www.kylestratis.com/notes/typeddicts-in-python/</link>
      <pubDate>Thu, 13 Jan 2022 17:11:28 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/typeddicts-in-python/</guid>
      <description>&lt;p&gt;In Python 3.8+, you can create a dictionary with type annotations with the TypedDict class in the typing module. This is a regular dictionary that allows you to define it with type hints, allowing for better documentation of simple objects like dictionaries. To use them, create a class that inherits from &lt;code&gt;typing.TypedDict&lt;/code&gt; and define your expected keys and their types like so:&lt;/p&gt;&#xA;&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;from&lt;/span&gt; typing &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; TypedDict&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&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;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;ModelMetadata&lt;/span&gt;(TypedDict):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    audience_id: str&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    training_correlation: List[float]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    validation_correlation: List[float]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    final_sample_count: int&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    final_accounts: List[AccountMetadata]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Software Engineering MOC</title>
      <link>https://www.kylestratis.com/notes/software-engineering-moc/</link>
      <pubDate>Sun, 09 Jan 2022 19:38:23 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/software-engineering-moc/</guid>
      <description>&lt;hr&gt;&#xA;&lt;h3 id=&#34;cloud-engineering&#34;&gt;Cloud Engineering&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/aws-moc/&#34;&gt;AWS MOC&lt;/a&gt; | Cloud Engineering MOC&lt;/p&gt;&#xA;&lt;h3 id=&#34;languages&#34;&gt;Languages&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/tags/python/&#34;&gt;python&lt;/a&gt; | Elixir MOC | Rust MOC&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools&#34;&gt;Tools&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/addressing-docker-no-space-left-on-device-errors/&#34;&gt;Addressing Docker No Space Left on Device Errors&lt;/a&gt; | Docker Copy and Add | Configure a Docker Interpreter in PyCharm&lt;/p&gt;&#xA;&lt;h3 id=&#34;miscellaneous&#34;&gt;Miscellaneous&lt;/h3&gt;&#xA;&lt;p&gt;Learning How to Program | Database Engineering MOC | Algorithms MOC | Data Structures MOC&lt;/p&gt;&#xA;&lt;hr&gt;</description>
    </item>
    <item>
      <title>Setting Pynamo Model&#39;s Table After Instantiation</title>
      <link>https://www.kylestratis.com/notes/setting-pynamo-models-table-after-instantiation/</link>
      <pubDate>Mon, 22 Nov 2021 03:35:57 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/setting-pynamo-models-table-after-instantiation/</guid>
      <description>&lt;p&gt;In some cases you may not know the table for a Pynamo model until you instantiate it. You can&amp;rsquo;t do this when you construct the object, but you can create a static method that takes the model class and table name and sets &lt;code&gt;model.Meta.table_name&lt;/code&gt; to the &lt;code&gt;table_name&lt;/code&gt; parameter, changing the table that model is connected to. This is useful if you set up models in one module and then import it elsewhere, and the table names come from user input.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Addressing Docker No Space Left on Device Errors</title>
      <link>https://www.kylestratis.com/notes/addressing-docker-no-space-left-on-device-errors/</link>
      <pubDate>Mon, 15 Nov 2021 23:03:06 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/addressing-docker-no-space-left-on-device-errors/</guid>
      <description>&lt;p&gt;When you build Docker assets with CDK, they are still built locally and aren&amp;rsquo;t removed when the process is complete. You may eventually hit this error: &lt;code&gt;#8 29.62 ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device&lt;/code&gt;. This is because the images and containers are sitting in the Docker disk image that is of a fixed size. To fix this, you can prune all stopped containers, images, and volumes with &lt;code&gt;docker system prune --all&lt;/code&gt;, volumes only &lt;code&gt;docker system prune --volumes&lt;/code&gt;. To prune all images: &lt;code&gt;docker prune images -af&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>To Build a Lambda from a Dockerfile in CDK</title>
      <link>https://www.kylestratis.com/notes/to-build-a-lambda-from-a-dockerfile-in-cdk/</link>
      <pubDate>Wed, 27 Oct 2021 19:24:41 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/to-build-a-lambda-from-a-dockerfile-in-cdk/</guid>
      <description>&lt;h2 id=&#34;creating-the-dockerfile&#34;&gt;Creating the Dockerfile&lt;/h2&gt;&#xA;&lt;p&gt;To set up a Dockerfile for a Lambda function that relies on non-AWS base images, you have to include the Python package &lt;code&gt;awslambdaric&lt;/code&gt; in your requirements and install it. Then, do the following in the Dockerfile:&lt;/p&gt;&#xA;&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-dockerfile&#34; data-lang=&#34;dockerfile&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;ENTRYPOINT&lt;/span&gt; [ &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/usr/local/bin/python&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;-m&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;awslambdaric&amp;#34;&lt;/span&gt; ]  &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;CMD&lt;/span&gt; [&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;lambda_code.function_name&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;&#xA;&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-dockerfile&#34; data-lang=&#34;dockerfile&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;ARG&lt;/span&gt; FUNCTION_DIR&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/function&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt; tensorflow/tensorflow:2.4.3 as DEV  &lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;ARG&lt;/span&gt; FUNCTION_DIR  &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;RUN&lt;/span&gt; mkdir -p &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;FUNCTION_DIR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#75715e&#34;&gt;## copies python code into container&amp;#39;s FUNCTION_DIR&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;COPY&lt;/span&gt; lambda_code.py &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;FUNCTION_DIR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#75715e&#34;&gt;## copies lambda_requirements.txt into container&amp;#39;s requirements.txt&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;COPY&lt;/span&gt; lambda_requirements.txt ./requirements.txt  &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#75715e&#34;&gt;## copies dataset into container&amp;#39;s FUNCTION_DIR/dataset/&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;COPY&lt;/span&gt; dataset &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;FUNCTION_DIR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;/dataset/  &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;RUN&lt;/span&gt; pip install --no-cache-dir --upgrade pip &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\ &lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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;    pip install -r requirements.txt --target &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;FUNCTION_DIR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;  &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;WORKDIR&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt; ${FUNCTION_DIR}  &lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;ENTRYPOINT&lt;/span&gt; [ &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;python&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;-m&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;awslambdaric&amp;#34;&lt;/span&gt; ]  &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&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 style=&#34;color:#66d9ef&#34;&gt;CMD&lt;/span&gt; [&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;lambda_code.function_name&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;setting-up-the-lambda-in-cdk&#34;&gt;Setting Up the Lambda in CDK&lt;/h2&gt;&#xA;&lt;p&gt;To create a Lambda from a Dockerfile in CDK, use  &lt;code&gt;cdk.aws-lambda.DockerImageFunction&lt;/code&gt; when defining your Lambda:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Input and Output Channels for Sagemaker Training Jobs</title>
      <link>https://www.kylestratis.com/notes/input-and-output-channels-for-sagemaker-training-jobs/</link>
      <pubDate>Wed, 27 Oct 2021 19:08:01 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/input-and-output-channels-for-sagemaker-training-jobs/</guid>
      <description>&lt;h2 id=&#34;inputs&#34;&gt;Inputs&lt;/h2&gt;&#xA;&lt;p&gt;With SageMaker training jobs, you specify an &amp;ldquo;input channel&amp;rdquo; and configure it in the job definition. Each channel is a dictionary that specifies the data split. Each of these items will be made available on the instance in &lt;code&gt;/opt/ml/input/data/&amp;lt;stage&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;json-example&#34;&gt;JSON Example&lt;/h3&gt;&#xA;&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;{&#xA;&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;train&amp;#34;&lt;/span&gt;: {&#xA;&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;ContentType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;trainingContentType&amp;#34;&lt;/span&gt;,&#xA;&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;TrainingInputMode&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;File&amp;#34;&lt;/span&gt;,&#xA;&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;S3DistributionType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;FullyReplicated&amp;#34;&lt;/span&gt;,&#xA;&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;RecordWrapperType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;None&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },&#xA;&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;evaluation&amp;#34;&lt;/span&gt;: {&#xA;&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;ContentType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;evalContentType&amp;#34;&lt;/span&gt;,&#xA;&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;TrainingInputMode&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;File&amp;#34;&lt;/span&gt;,&#xA;&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;S3DistributionType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;FullyReplicated&amp;#34;&lt;/span&gt;,&#xA;&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;RecordWrapperType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;None&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },&#xA;&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;validation&amp;#34;&lt;/span&gt;: {&#xA;&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;TrainingInputMode&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;File&amp;#34;&lt;/span&gt;,&#xA;&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;S3DistributionType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;FullyReplicated&amp;#34;&lt;/span&gt;,&#xA;&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;RecordWrapperType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;None&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;cdk-example&#34;&gt;CDK Example&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-training-algo-running-container.html&#34;&gt;Source&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;outputs&#34;&gt;Outputs&lt;/h2&gt;&#xA;&lt;p&gt;With SageMaker training jobs, model artifacts should be saved to &lt;code&gt;/opt/ml/model/&lt;/code&gt; so that, with the training job output configuration, they will be zipped and added to S3. Failures can be written to the file &lt;code&gt;/opt/ml/output/failure&lt;/code&gt; and the first 1024 characters will be returned as &lt;code&gt;FailureReason&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Advantage of gRPC is Language-Agnosticism</title>
      <link>https://www.kylestratis.com/notes/the-advantage-of-grpc-is-language-agnosticism/</link>
      <pubDate>Tue, 19 Oct 2021 21:05:15 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/the-advantage-of-grpc-is-language-agnosticism/</guid>
      <description>&lt;p&gt;The major advantage of gRPC on AWS seems to be the ability to call services in a language agnostic manner from code, without having to use HTTP and the limitations that come with it. The other advantage is that the calling code just has to call the defined method for the service.&lt;/p&gt;&#xA;&lt;h2 id=&#34;related&#34;&gt;Related&lt;/h2&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;p&gt;Introduction to gRPC&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Diminutive in Greek</title>
      <link>https://www.kylestratis.com/notes/the-diminutive-in-greek/</link>
      <pubDate>Mon, 18 Oct 2021 23:06:53 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/the-diminutive-in-greek/</guid>
      <description>&lt;h2 id=&#34;nouns&#34;&gt;Nouns&lt;/h2&gt;&#xA;&lt;h3 id=&#34;diminutive-uses&#34;&gt;Diminutive Uses&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Actual diminutive&#xA;&lt;ul&gt;&#xA;&lt;li&gt;παιδάκι - little kid&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Affection&#xA;&lt;ul&gt;&#xA;&lt;li&gt;παιδάκι for adult kids&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Insult&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ανθρωπάκι - a little man&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;diminutives&#34;&gt;Diminutives&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Neutral&#xA;&lt;ul&gt;&#xA;&lt;li&gt;-ακι&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Feminine&#xA;&lt;ul&gt;&#xA;&lt;li&gt;-ιτσα&lt;/li&gt;&#xA;&lt;li&gt;-ουλα&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Masculine&#xA;&lt;ul&gt;&#xA;&lt;li&gt;-ακης&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mostly found on names&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;-ούλης&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mostly found on adjectives&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;adjectives&#34;&gt;Adjectives&lt;/h2&gt;&#xA;&lt;p&gt;-ούτσικος turns a masculine adjective into a diminutive form&lt;/p&gt;&#xA;&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;&#xA;&lt;p&gt;καλός (good) -&amp;gt; καλούτσικος (not bad, so-so)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Να with noun or pronoun</title>
      <link>https://www.kylestratis.com/notes/%CE%BD%CE%B1-with-noun-or-pronoun/</link>
      <pubDate>Mon, 18 Oct 2021 23:01:17 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/%CE%BD%CE%B1-with-noun-or-pronoun/</guid>
      <description>&lt;p&gt;Θέλω να αγοράσω - να means &amp;ldquo;to&amp;rdquo;&#xA;να πάμε για φαγητό - να means &amp;ldquo;shall&amp;rdquo; (shall we go for food)&#xA;να ο Γιάννης, τον βλέπω, έρχεται - να means &amp;ldquo;here is&amp;rdquo;&#xA;&lt;strong&gt;να is an indicative particle&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;να + noun or να + pronoun -&amp;gt; &amp;ldquo;here is&amp;rdquo;&#xA;Πού είναι ο Γιάννης;&#xA;Αυτός είναι εδώ -&amp;gt; Να τος&lt;/li&gt;&#xA;&lt;li&gt;Basically for αυτός/αυτή/αυτό αυτοί/αυτές/αυτό you take out the αυ to prepend the να&#xA;&lt;ul&gt;&#xA;&lt;li&gt;να τος - here he is&lt;/li&gt;&#xA;&lt;li&gt;να τη&lt;/li&gt;&#xA;&lt;li&gt;να το&lt;/li&gt;&#xA;&lt;li&gt;να τοι&lt;/li&gt;&#xA;&lt;li&gt;να τες&lt;/li&gt;&#xA;&lt;li&gt;να το&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;εμείς είμαστε εδώ (we are here) -&amp;gt; να μαστε&#xA;See also Ελληνικά για σας Α2 p. 124 γραμματική 2&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS MOC</title>
      <link>https://www.kylestratis.com/notes/aws-moc/</link>
      <pubDate>Mon, 27 Sep 2021 14:47:02 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/aws-moc/</guid>
      <description>&lt;h2 id=&#34;how-tos&#34;&gt;How Tos&lt;/h2&gt;&#xA;&lt;p&gt;How to Set Up an API with AWS API Gateway to Trigger a Step Function with Input&lt;/p&gt;&#xA;&lt;h2 id=&#34;service-notes&#34;&gt;Service Notes&lt;/h2&gt;&#xA;&lt;p&gt;ECS Notes | &lt;a href=&#34;https://www.kylestratis.com/tags/sagemaker/&#34;&gt;sagemaker&lt;/a&gt; | AWS Lambda MOC&lt;/p&gt;</description>
    </item>
    <item>
      <title>Events in Solidity</title>
      <link>https://www.kylestratis.com/notes/events-in-solidity/</link>
      <pubDate>Wed, 15 Sep 2021 02:34:35 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/events-in-solidity/</guid>
      <description>&lt;p&gt;Events are smart contract members in Solidity, which allow a smart contract to emit events to any listeners on the blockchain. These allow outside applications to consume data from a smart contract in real time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sources&#34;&gt;Sources&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://hackernoon.com/how-to-use-events-in-solidity-pe1735t5&#34;&gt;https://hackernoon.com/how-to-use-events-in-solidity-pe1735t5&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Making Notes from Outside Sources</title>
      <link>https://www.kylestratis.com/notes/making-notes-from-outside-sources/</link>
      <pubDate>Wed, 01 Sep 2021 22:58:12 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/making-notes-from-outside-sources/</guid>
      <description>&lt;h2 id=&#34;highlights-and-fleeting-notes&#34;&gt;Highlights and Fleeting Notes&lt;/h2&gt;&#xA;&lt;p&gt;These can be done the same way as fleeting notes from original work are, or on a page of notes for a source within the Sources folder. They can be the raw material for creating Literature Notes as highlights, as well as original ideas, questions, etc. to &amp;ldquo;serve as reminders of what is in your head.&amp;rdquo; (&lt;a href=&#34;https://fortelabs.co/blog/how-to-take-smart-notes/&#34;&gt;https://fortelabs.co/blog/how-to-take-smart-notes/&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;Process highlights as you would fleeting notes - preferably right after taking them - and turn them into literature notes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ham Radio MOC</title>
      <link>https://www.kylestratis.com/notes/ham-radio-moc/</link>
      <pubDate>Sun, 29 Aug 2021 18:15:07 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/ham-radio-moc/</guid>
      <description>&lt;!--ID: 1677121824721--&gt;&#xA;&lt;!--ID: 1677121824722--&gt;&#xA;&lt;h2 id=&#34;radios&#34;&gt;Radios&lt;/h2&gt;&#xA;&lt;p&gt;RTLSDR MOC | Icom IC-&lt;/p&gt;&#xA;&lt;h2 id=&#34;antennas&#34;&gt;Antennas&lt;/h2&gt;&#xA;&lt;p&gt;Random Wire Antenna&lt;/p&gt;&#xA;&lt;h2 id=&#34;projects&#34;&gt;Projects&lt;/h2&gt;&#xA;&lt;p&gt;Get on the Air with FT-8&lt;/p&gt;&#xA;&lt;h2 id=&#34;modes&#34;&gt;Modes&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/notes/aprs-moc/&#34;&gt;APRS MOC&lt;/a&gt; | FT-8 | &lt;a href=&#34;https://www.kylestratis.com/notes/ads-b/&#34;&gt;ADS-B&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;activities&#34;&gt;Activities&lt;/h2&gt;&#xA;&lt;p&gt;SDR Listening | Parks on the Air | DX&lt;/p&gt;&#xA;&lt;hr&gt;</description>
    </item>
    <item>
      <title>Learn Functional Programming With Elixir</title>
      <link>https://www.kylestratis.com/notes/learn-functional-programming-with-elixir/</link>
      <pubDate>Thu, 19 Aug 2021 21:35:26 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/learn-functional-programming-with-elixir/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://m.media-amazon.com/images/I/91B-u7PRbEL._SY160.jpg&#34; alt=&#34;rw-book-cover&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;metadata&#34;&gt;Metadata&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Author: Ulisses Almeida&lt;/li&gt;&#xA;&lt;li&gt;Full Title: Learn Functional Programming With Elixir&lt;/li&gt;&#xA;&lt;li&gt;Category: #books&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;literature-notes&#34;&gt;Literature Notes&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-dataview&#34; data-lang=&#34;dataview&#34;&gt;TABLE rows.file.link AS &amp;#34;Literature Note&amp;#34;, rows.file.cday AS &amp;#34;Date&amp;#34;&#xA;&#xA;FROM #note/literature AND [Learn Functional Programming With Elixir](/notes/learn-functional-programming-with-elixir/)&#xA;&#xA;GROUP BY file.link&#xA;&#xA;sort date ASCENDING&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;summaries&#34;&gt;Summaries&lt;/h2&gt;&#xA;&lt;h3 id=&#34;chapter-1-thinking-functionally&#34;&gt;Chapter 1: Thinking Functionally&lt;/h3&gt;&#xA;&lt;p&gt;In functional programming, functions are the basic building blocks of a program, values are immutable, and the code is declarative, rather than imperative. Functions, immutability, and declarative code are the core principles of functional programming.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Interests MOC</title>
      <link>https://www.kylestratis.com/notes/interests-moc/</link>
      <pubDate>Wed, 18 Aug 2021 03:33:09 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/interests-moc/</guid>
      <description>&lt;p&gt;Navigate your &amp;ldquo;library&amp;rdquo; with a classification system modified for PKM. This is for knowledge. Navigate research topics at Things To Explore.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;knowledge-management&#34;&gt;Knowledge Management&lt;/h3&gt;&#xA;&lt;p&gt;The Note-Taking MOC defines some standards for taking notes.&lt;/p&gt;&#xA;&lt;h3 id=&#34;personal-management&#34;&gt;Personal Management&lt;/h3&gt;&#xA;&lt;p&gt;Writing MOC | Projects MOC | Finances MOC | Fitness MOC&lt;/p&gt;&#xA;&lt;h3 id=&#34;philosophy--psychology-spirituality--religion&#34;&gt;Philosophy &amp;amp; Psychology Spirituality &amp;amp; Religion&lt;/h3&gt;&#xA;&lt;h3 id=&#34;social-sciences&#34;&gt;Social Sciences&lt;/h3&gt;&#xA;&lt;p&gt;Politics | Society | Law | Relationships&lt;/p&gt;&#xA;&lt;h3 id=&#34;communications--rhetoric-language--linguistics&#34;&gt;Communications &amp;amp; Rhetoric; Language &amp;amp; Linguistics&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.kylestratis.com/tags/greek/&#34;&gt;greek&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;natural-sciences&#34;&gt;Natural Sciences&lt;/h3&gt;&#xA;&lt;p&gt;Biology MOC | Physics MOC&lt;/p&gt;</description>
    </item>
    <item>
      <title>I want to...</title>
      <link>https://www.kylestratis.com/notes/i-want-to/</link>
      <pubDate>Tue, 17 Aug 2021 03:21:13 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/i-want-to/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;I want to get my bearings. Click +Home.&lt;/li&gt;&#xA;&lt;li&gt;I want to journal in a new daily note.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Click on &amp;ldquo;Open today&amp;rsquo;s note&amp;rdquo;. Tag it with #my/journal&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to process new #source material, adding my own commentary.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to Sources MOC&lt;/li&gt;&#xA;&lt;li&gt;From that processing, I want to make new notes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to find undeveloped notes and build them.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Click #state/develop&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to further develop half-formed seedlings into fuller notes.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Click #state/boat (also search TK).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to forge, collide, and craft ideas in an #MOC note.&lt;/li&gt;&#xA;&lt;li&gt;I want to further tidy up valuable, but messy notes.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Click #state/tidy&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to build something&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to Projects MOC&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to write something&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to Writing MOC&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to spend some time researching a topic&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Click #research-topic&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to navigate my existing spatial constellation of ideas.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Either go to: &lt;a href=&#34;https://www.kylestratis.com/notes/interests-moc/&#34;&gt;Interests MOC&lt;/a&gt; or &amp;ldquo;Open graph view&amp;rdquo;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I just want to browse around and have fun. Same as above.&lt;/li&gt;&#xA;&lt;li&gt;I want to review my timestamped notes&#xA;&lt;ul&gt;&#xA;&lt;li&gt;(If you have hotkeys set up, you can go from day to day with a click. It&amp;rsquo;s pretty awesome.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to do a deeper reflection and planning session.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to: #my/review, #my/goals, and #my/planning&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to dig into my projects and ideas&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to Projects MOC&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I want to be surprised (click on &amp;ldquo;Open random note&amp;rdquo;)&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Simple Subjunctive</title>
      <link>https://www.kylestratis.com/notes/simple-subjunctive/</link>
      <pubDate>Mon, 16 Aug 2021 11:56:52 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/simple-subjunctive/</guid>
      <description>&lt;p&gt;να + aorist verb stem indicates the simple subjunctive (one time)&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Αυτό το Σάββατο όμως αποφασίσαμε &lt;strong&gt;να μη&lt;/strong&gt; &lt;a href=&#34;%CE%B2%CE%B3%CE%B1%CE%AF%CE%BD%CF%89&#34;&gt;βγούμε&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Εγώ και η Τάνια αποφασίσαμε &lt;strong&gt;να βγαίνουμε&lt;/strong&gt; έξω κάθε Σάββατο.&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>ADS-B</title>
      <link>https://www.kylestratis.com/notes/ads-b/</link>
      <pubDate>Mon, 16 Aug 2021 11:56:51 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/ads-b/</guid>
      <description>&lt;p&gt;Flight tracking @ 1090 MHz&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Powers &lt;a href=&#34;https://filghtaware.com&#34;&gt;FlightAware&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;radio&#34;&gt;Radio&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;RTLSDRs work well out of the box for ADS-B listening&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I use the &lt;a href=&#34;https://amzn.to/3pDnwEx&#34;&gt;Nooelec NESDR Smart V4&lt;/a&gt; (affiliate link)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;software&#34;&gt;Software&lt;/h2&gt;&#xA;&lt;h3 id=&#34;macos&#34;&gt;MacOS&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cocoa1090&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Need to run &lt;code&gt;rtl_tcp&lt;/code&gt; first&lt;/li&gt;&#xA;&lt;li&gt;Map view isn&amp;rsquo;t great&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Dump1090 by antirez&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Much better map view, but doesn&amp;rsquo;t work in Brave&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;./dump1090 --interactive --net&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;raspberry-pi&#34;&gt;Raspberry Pi&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/openskynetwork/raspberry-pi-adsb&#34;&gt;Dump1090 and OpenSky tutorial&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;antennas&#34;&gt;Antennas&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://antirez.com/news/46&#34;&gt;Wine cork antenna&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The shorter antennas with the RTLSDR work great&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://smile.amazon.com/1090MHz-ADS-B-Antenna-66cm-26in/dp/B00WZL6WPO?sa-no-redirect=1&#34;&gt;ADS-B Antenna&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>APRS MOC</title>
      <link>https://www.kylestratis.com/notes/aprs-moc/</link>
      <pubDate>Mon, 16 Aug 2021 11:56:51 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/aprs-moc/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://www.algissalys.com/amateur-radio/aprs-over-satellites&#34;&gt;APRS Over Satellites&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Successful listening with gqrx and the built-in AFSK1200 decoder&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;img src=&#34;https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%2Fapp%2Fkyles-second-brain%2FHO4OHqxGCF.png?alt=media&amp;amp;token=83c07fdd-5351-4454-94f4-cfd8be214c51&#34; alt=&#34;&#34;&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Installing Xastir to set up an APRS iGate&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://xastir.org/index.php/Homebrew&#34;&gt;http://xastir.org/index.php/Homebrew&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Use via command line after running XQuartz with &lt;code&gt;xastir &amp;amp;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Still need to do some configuration. Installation was done 2021-06-06&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.bytebang.at/Blog/Receive&amp;#43;APRS&amp;#43;stations&amp;#43;with&amp;#43;rtl-str&amp;#43;and&amp;#43;display&amp;#43;them&amp;#43;with&amp;#43;Xastir&#34;&gt;Xastir with RTLSDR&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Need to use multimon-ng with rtl_fm and &lt;code&gt;socat&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;rtl_fm -f 144390000 -s 22050 -o 4 -g 100 - | multimon-ng -a AFSK1200 -A -t raw - | sed -u -r &#39;s/^.{6}//&#39; | socat -u STDIN TCP-LISTEN:14580,reuseaddr,fork&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Then Xastir needs to have connect to an internet server with localhost:14580&lt;/li&gt;&#xA;&lt;li&gt;I set this to an alias &lt;code&gt;start_aprs&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Configuration&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Run callpass to generate&lt;/li&gt;&#xA;&lt;li&gt;Station&#xA;&lt;ul&gt;&#xA;&lt;li&gt;GPS, comments&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Defaults&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Enable RF-&amp;gt;Inet OR 2-way&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Interface&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Internet for APRS Tier 2 server interface (along with radio interface if want to function as igate)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This should be allowed to transmit&lt;/li&gt;&#xA;&lt;li&gt;Password from &lt;code&gt;callpass&lt;/code&gt; goes here&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;To use Xastir with SDR&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Run &lt;code&gt;start_aprs&lt;/code&gt; alias&lt;/li&gt;&#xA;&lt;li&gt;Launch XQuartz&lt;/li&gt;&#xA;&lt;li&gt;From the terminal that pops up, run &lt;code&gt;xastir &amp;amp;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;How to pass messages to internet?&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Set up password by running &lt;code&gt;callpass &amp;lt;callsign&amp;gt;&lt;/code&gt; to send and receive, add that to Tier 2 server interface config&lt;/li&gt;&#xA;&lt;li&gt;I added another internet interface and pointed it to one of the Tier 2 APRS servers. I haven&amp;rsquo;t seen anything on APRS.fi yet though.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Enable RF-&amp;gt;Inet OR 2-way also needed. Verified on aprs.fi&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Thinking about getting a Baofeng UV-5R for cheap APRS operation&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Got it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Get Started with APRS with RTLSDR and Xastir on Mac Hub Page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;other-modes&#34;&gt;Other Modes&lt;/h2&gt;&#xA;&lt;p&gt;FT-8&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
