<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python | Snippets on Bas-Man's Musings</title><link>https://bas-man.dev/cheatsheets/python/snippets/</link><description>Recent content in Python | Snippets on Bas-Man's Musings</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 12 Jan 2021 16:00:00 +0900</lastBuildDate><atom:link href="https://bas-man.dev/cheatsheets/python/snippets/index.xml" rel="self" type="application/rss+xml"/><item><title>Return a dictionary of Regex Matches</title><link>https://bas-man.dev/cheatsheets/python/snippets/multiple-group-regex/</link><pubDate>Tue, 12 Jan 2021 16:00:00 +0900</pubDate><guid>https://bas-man.dev/cheatsheets/python/snippets/multiple-group-regex/</guid><description>A GitHub gist showing how to return a dict of regex matches</description></item><item><title>Decoding Email Header and Contents</title><link>https://bas-man.dev/cheatsheets/python/snippets/email-header-subject/</link><pubDate>Thu, 15 Oct 2020 09:59:45 +0900</pubDate><guid>https://bas-man.dev/cheatsheets/python/snippets/email-header-subject/</guid><description>&lt;script src="https://gist.github.com/Bas-Man/7c7a6c9a7c141033063efc879d5be46e.js"&gt;&lt;/script&gt;

&lt;p&gt;Using &lt;code&gt;email.parser&lt;/code&gt; and &lt;code&gt;email.policy&lt;/code&gt; along with &lt;code&gt;policy.default&lt;/code&gt; means that
you do not need to worry about character encoding as the modules will take care
of it automatically.&lt;/p&gt;
&lt;p&gt;I forget where I saw it but I believe that policy.default will become the real
default in the future.&lt;br&gt;
Current &lt;code&gt;policy.compat32&lt;/code&gt; is the module default.&lt;/p&gt;</description></item><item><title>Different String Padding Approaches</title><link>https://bas-man.dev/cheatsheets/python/snippets/padding-numbers/</link><pubDate>Tue, 07 Jul 2020 23:55:00 +0900</pubDate><guid>https://bas-man.dev/cheatsheets/python/snippets/padding-numbers/</guid><description>How to pad numbers in Python.</description></item><item><title>Generate QR Codes</title><link>https://bas-man.dev/cheatsheets/python/snippets/qr-code/</link><pubDate>Tue, 07 Jul 2020 23:55:00 +0900</pubDate><guid>https://bas-man.dev/cheatsheets/python/snippets/qr-code/</guid><description>Generate QR codes</description></item><item><title>Mock Python version for Testing</title><link>https://bas-man.dev/cheatsheets/python/snippets/mock-python-version/</link><pubDate>Tue, 07 Jul 2020 23:55:00 +0900</pubDate><guid>https://bas-man.dev/cheatsheets/python/snippets/mock-python-version/</guid><description>&lt;script src="https://gist.github.com/Bas-Man/bd3425dd09585398da7e7970f62b67e7.js"&gt;&lt;/script&gt;</description></item></channel></rss>