Many helpful tools available in Python are essential for effective development - some of them are less known, others are way more popular. This article presents class methods and static methods (constructs of Python), conversion from class to dictionary (and vice versa) and metaclasses and their applications. All these things are vital for beginners and mid-senior Python engineers.
The optimal stopping is one of the most important topics in pure (theoretical) mathematics with many impacts in real life. It gives you an optimal pattern of how to approach many situations. It includes hiring a new employee, renting a flat, selling a house, finding your next love or just searching for a parking place. Despite the horrendous name, the underpinning logic is relatively simple.
One of the traditional arguments on avoiding using ORM is the lack of performance. Although it is generally speaking correct, there are many ways to write queries in your application. Some of them are better (faster and more efficient) than others. There is almost always a way to significantly increase the performance of an application without avoiding the ORM approach. We anticipate some preliminary knowledge of Django and SQL here (so make sure you understand basic concepts before continuing).
There are many interesting use-cases for generating static websites. They reach from a specific website (like documentation) to a general-purpose application (like cached images of e-shops, blogs, etc.). The main advantage of a static website is the simplicity of the product, almost no requirements to infrastructure (even GitHub can host them) and security. Many technologies help to generate static websites, from complex frameworks to simple generators.
Library GDAL (developed by OSGeo) is more or less standard for processing geospatial data. However, although it implements almost all the tools needed for this purpose, it is notoriously known for many operational problems. Mainly, it is practically impossible to install it quickly (as it requires many system-level dependencies), API is obsolete (designed in the late nineties), and it is not difficult to find unexpected behaviours, etc. So it is not surprising that many developers actively started to seek different tools. This post presents some possibilities for the most common issues (mainly focused on Python users).
One of the common challenges when dealing with big multidimensional data sets is how effectively store them. There are many problems to deal with, but maybe the most important is choosing the proper dimension order. Although typically, the selection of the optimal dimensional order does not impact the size of the output file (if you use some compression situation that may differ), it has a profound effect on the response time when accessing stored data.
One of the typical challenges when exporting numerical computations is how to include the way the calculations were achieved. Typically, if results should be in an Excel sheet, you want to see a formula if you click on each cell. A naive method is using some Excel driver (like XlsxWriter) directly. But if you are dealing with a big Excel sheet (or multiple sheets in one file), this approach becomes quite inconvenient. Therefore, this article presents a library called Portable Spreadsheet - it can easily export defined formulas in Python to many formats, including Excel and JSON.