It is quite easy to recommend your most popular posts to your readers if you are running a WordPress site. What if you are using a static site generator such as Hugo instead? On this post you'll learn how to add a popular posts section by using data from Google Analytics, and how to automate the whole process.
Nowadays Docker containers seem to be all around us. With the rise of Kubernetes they are now even more relevant in businesses that choose to run their processes in public or private clouds.
Another trending thing in the development world is Python which is especially huge in the machine learning field. In this post I'll show you how to containerize your Python application in just a few minutes.
Environment variables are key-value pairs that are defined in your shell environment outside of the Python executable. You can access them in Python with the
os.environ mapping object.
Environment variables are really useful for passing secret information or other configurations that you don't want to pass as command line arguments. A good use case for example is a containerized application running in Docker or Kubernetes where you can configure the application using environment variables.
You might have stumbled on the Ellipsis object (…) in Python and wondered what it is used for. It was originally introduced to be used in the Numeric Python package for matrix slicing but nothing stops you from using it for other purposes too.
When you think of GNU Make what is the first thing that pops up to your mind? Perhaps you remember building C or C++ programs from source and automatically associate it with languages where you need to build the code before being able to run anything.
However, Make can be a really powerful tool for your other projects too. In this article I'll show you some examples on how to utilize Make for Python development. I'll be using the Flask web framework for demonstration purposes but these principles can be really adapted to any other project.
Today I wanted to install Python natively on my Windows machine. Nowadays it is super easy as python can be installed straight from the Microsoft Store. So if you need to have Python on Windows I really recommend that you go to the Microsoft Store from the Start menu, search for Python and install it from there.
An overview of the code formatter BlackJanne Kemppainen |
Wouldn't it be nice if you didn't have to worry about code formatting to make the linter happy? What if you didn't need to complain about minor formatting issues every time you are reviewing code? Can't agree on a common code style with your team so your codebase doesn't have a consistent look and feel? You are just starting a new Python project? It might be the right time to try Black.
I was quite surprised to get my first Twitter followers after linking my earlier blog post about developing with Windows Subsystem for Linux to Twitter as I've never really had a social media presence outside of my own circles. This gave me the idea to track how my Twitter following develops over time when I start from zero.
Given that I'm using a static blogging environment there is no server that could actively serve this data and routing users to my home server is definitely not an option. This is where Google Spreadsheets comes in handy as it turns out that you can fetch data in CSV format without having to use strong authentication! Read more to find out how I built the follower chart below.