<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on</title><link>https://www.ardanlabs.com/categories/python/</link><description>Recent content in Python on</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 13 Jan 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://www.ardanlabs.com/categories/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Writing Simulations Using Go</title><link>https://www.ardanlabs.com/blog/2021/01/writing-simulations-using-go.html</link><pubDate>Wed, 13 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2021/01/writing-simulations-using-go.html</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;&lt;em&gt;If you can write a for-loop, you can do statistics. - Jake Vanderplas&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;A lot of developers shy away from problems which involve statistics or probability. Which is shameful since in today&amp;rsquo;s data-rich environment, you can gain a lot of insights from data.&lt;/p&gt;&#10;&lt;p&gt;In this blog post, I&amp;rsquo;ll show you how to write a simulation tool which requires no knowledge in statistics or probability. Simulations are easy to write and can be a very effective tool in research. You only need some basic programming skills and a random number generator.&lt;/p&gt;</description></item><item><title>Working with SQLite using Go and Python</title><link>https://www.ardanlabs.com/blog/2020/11/working-with-sqlite-using-go-python.html</link><pubDate>Mon, 30 Nov 2020 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2020/11/working-with-sqlite-using-go-python.html</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;I prefer to use relational (SQL) databases in general since they provide several features that are very useful when working with data. SQLite is a great choice since the database is a single file, which makes it easier to share data. Even though it&amp;rsquo;s a single file, SQLite can handle up to 281 terabytes of data. SQLite also comes with a command line client called &lt;code&gt;sqlite3&lt;/code&gt; which is great for quick prototyping.&lt;/p&gt;</description></item><item><title>Python and Pandas : First Contact with Data</title><link>https://www.ardanlabs.com/blog/2020/11/python-pandas-first-contact-with-data.html</link><pubDate>Mon, 02 Nov 2020 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2020/11/python-pandas-first-contact-with-data.html</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;&lt;em&gt;Every single company I&amp;rsquo;ve worked at and talked to has the same problem without a single exception so far - poor data quality, especially tracking data. Either there&amp;rsquo;s incomplete data, missing tracking data, duplicative tracking data.&lt;/em&gt; - DJ Patil&lt;/p&gt;&#10;&lt;p&gt;I spend a lot of my time digging into data at various companies. Most of the time I’m surprised by what I see and so are the engineers and analysts that work at these companies. I&amp;rsquo;ve seen missing data, bad data, data nobody knows anything about, and many other oddities.&lt;/p&gt;</description></item><item><title>Python and Go : Part IV - Using Python in Memory</title><link>https://www.ardanlabs.com/blog/2020/09/using-python-memory.html</link><pubDate>Tue, 15 Sep 2020 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2020/09/using-python-memory.html</guid><description>&lt;h3 id="series-index"&gt;Series Index&lt;/h3&gt;&#10;&lt;p&gt;&lt;a href="https://www.ardanlabs.com/blog/2020/06/python-go-grpc.html%22"&gt;Python and Go: Part I - gRPC&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html%22"&gt;Python and Go: Part II - Extending Python With Go&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/08/packaging-python-code.html%22"&gt;Python and Go: Part III - Packaging Python Code&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/09/using-python-memory.html%22"&gt;Python and Go: Part IV - Using Python in Memory&lt;/a&gt;&lt;/p&gt;&#10;&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;In &lt;a href="https://www.ardanlabs.com/blog/2020/06/python-go-grpc.html"&gt;a previous post&lt;/a&gt; we used &lt;a href="https://grpc.io/"&gt;gRPC&lt;/a&gt; to call Python code from Go. gRPC is a great framework, but there is a performance cost to it. Every function call needs to marshal the arguments using &lt;a href="https://developers.google.com/protocol-buffers"&gt;protobuf&lt;/a&gt;, make a network call over &lt;a href="https://en.wikipedia.org/wiki/HTTP/2"&gt;HTTP/2&lt;/a&gt;, and then un-marshal the result using &lt;code&gt;protobuf&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Python and Go : Part III - Packaging Python Code</title><link>https://www.ardanlabs.com/blog/2020/08/packaging-python-code.html</link><pubDate>Tue, 11 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2020/08/packaging-python-code.html</guid><description>&lt;h3 id="series-index"&gt;Series Index&lt;/h3&gt;&#10;&lt;p&gt;&lt;a href="https://www.ardanlabs.com/blog/2020/06/python-go-grpc.html%22"&gt;Python and Go: Part I - gRPC&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html%22"&gt;Python and Go: Part II - Extending Python With Go&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/08/packaging-python-code.html%22"&gt;Python and Go: Part III - Packaging Python Code&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/09/using-python-memory.html%22"&gt;Python and Go: Part IV - Using Python in Memory&lt;/a&gt;&lt;/p&gt;&#10;&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;In &lt;a href="https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html"&gt;the previous post&lt;/a&gt; we compiled Go code to a shared library and used it from the Python interactive shell. In this post we&amp;rsquo;re going to finish the development process by writing a Python module that hides the low level details of working with a shared library and then package this code as a Python package.&lt;/p&gt;</description></item><item><title>Python and Go : Part II - Extending Python With Go</title><link>https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html</link><pubDate>Mon, 06 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html</guid><description>&lt;h3 id="series-index"&gt;Series Index&lt;/h3&gt;&#10;&lt;p&gt;&lt;a href="https://www.ardanlabs.com/blog/2020/06/python-go-grpc.html%22"&gt;Python and Go: Part I - gRPC&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html%22"&gt;Python and Go: Part II - Extending Python With Go&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/08/packaging-python-code.html%22"&gt;Python and Go: Part III - Packaging Python Code&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/09/using-python-memory.html%22"&gt;Python and Go: Part IV - Using Python in Memory&lt;/a&gt;&lt;/p&gt;&#10;&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;In &lt;a href="https://www.ardanlabs.com/blog/2020/06/python-go-grpc.html"&gt;the previous post&lt;/a&gt; we saw how a Go service can call a Python service using gRPC. Using gRPC to connect a Go and Python program together can be a great choice, but there’s a complexity price that goes with it. You need to manage one more service, deployment becomes more complex, and you need monitoring plus alerting for each service. Compared to a monolithic application, there is an order of magnitude more complexity.&lt;/p&gt;</description></item><item><title>Python and Go : Part I - gRPC</title><link>https://www.ardanlabs.com/blog/2020/06/python-go-grpc.html</link><pubDate>Mon, 08 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2020/06/python-go-grpc.html</guid><description>&lt;h3 id="series-index"&gt;Series Index&lt;/h3&gt;&#10;&lt;p&gt;&lt;a href="https://www.ardanlabs.com/blog/2020/06/python-go-grpc.html%22"&gt;Python and Go: Part I - gRPC&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html%22"&gt;Python and Go: Part II - Extending Python With Go&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/08/packaging-python-code.html%22"&gt;Python and Go: Part III - Packaging Python Code&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://www.ardanlabs.com/blog/2020/09/using-python-memory.html%22"&gt;Python and Go: Part IV - Using Python in Memory&lt;/a&gt;&lt;/p&gt;&#10;&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;Like tools, programming languages tend to solve problems they are designed to. You &lt;em&gt;can&lt;/em&gt; use a knife to tighten a screw, but it&amp;rsquo;s better to use a screwdriver. Plus there is less chance of you getting hurt in the process.&lt;/p&gt;</description></item></channel></rss>