This is a quick guide that sumarizes the manual deployment setup of Home Assistant OS into a Proxmox VM, all the credits to this post in the proxmox community . I usually go there every time that I need to go through the setup process but then I also need to remember all the tweaks that I made to it so I wrote this for easy reference. Home Assistant OS does not offer a .iso image that you can just…
I started running my own ActivityPub instance with Takahē . I got interested in contributing to the project and one of my first implemented features was the poll support. While implementing it I noticed that the informations about this topic were scattered throughout multiple places. So, for me to remember how it works, and maybe to help someone looking for the same information I decided to write…
Movement is part of a large portion of games. When jumping between platforms, shooting against a horde of enemies, piloting a space ship and running through the streets, we are causing movement and interacting with the game environment, applying action and causing reactions. This chapter is to describe the basics of moving objects across the screen and their interaction with other elements through…
Games always connected me with technology since the beginning. My father and I, we built our first computer (a Pentium 286) and the first thing that I remember to do was to play some DOS games like Prince of Persia and Lunar Lander. I learned a bunch of CLI commands just to play my favorite games. The passion for playing and making games followed me as a hobby. I have a pygame series of posts on…
I’m starting this series of posts to give you tips on libraries that can be handy on your day to day as a Developer and also to present libraries I think you should keep on eye on. One of the perks of a good Developer is having a proper tool-set available on your belt, and nothing more appropriate to start this series than a library that installs other libraries! How many times did you…
Raise your hand if you never versioned the Django’s SECRET_KEY at the beginning of a project and needed to generate a new one before going to production. This TLDR is a quick reminder of how to generate a secret key locally, without going to some website on the internet to generate it for you. Django generates a secret key every time that you create a new project, so this function already…
Recently, I had the opportunity to face a frontend challenge at Configr . It consists of improving the tracking rate of the new users who come to the system (a.k.a. leads). More specifically, the tracking rate from the UTM parameters of the marketing campaigns. TLDR : I created a javascript library called utmkeeper that do the job for you, and it’s available at…
Chatting with a friend, Mário Sérgio , about problems that happen when you migrate your codebase from Python versions, I came out with the idea of writing this TLDR . I hope it can help someone that is trying to work with texts that contain Unicode characters that don’t fall back into the ASCII table like other than the roman alphabet and emoji . On Python 2 there’s no distinction…
Someday, during the Python Tuesdays event at Calango Hacker Club , one of the participants came with a question on how to automate its email reading process at Gmail categorizing their messages into something that could be important and something that is not. That question motivated me looking after how to that, and then into this post that maybe can help someone that is trying to do something…
Some libraries aren’t 100% packaged Python code, some of them are bindings to external libraries. They offer a Python interface so you can call them inside your code. On these cases, we need to install them previously at the system so the python package can work. When that happens, we get this kind of error: ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in…
This post it the result of a bug that haunted me for three months until I finally could isolate the error properly, and get to the root of the issue. Disclaimer: this information exists at the Django docs, however strengthening the importance of this info is vital to prevent people to spend a lot of time with this kind of bug. One of the core parameters of a Django Model field is the default . It…
Almost every system that runs on the internet and stores user data has an authentication layer. With the API architecture becoming popular nowadays, the complexity of the authentication layer also grew. This post was made to explain the authentication process between a frontend written in Angular 6 and a backend written in Django 2 using the architecture proposed on my previous post…
Have you ever asked yourself how to publish your Python package, so you can install it using pip ? It is less complex than it seems, and anyone can do it. The first step is to create an account on the Python Package Index (PyPI) were all Python packages are registered. After that, you need to create a file called setup.py on the root folder of the Python code that you will publish with the…
Recently someones asked me how to perform a connection to a server to run the command df -h using ssh to display the disk usage of the machine. After a quick chat, I discovered that the question was more than just a single check to a server. It was to extend that to multiple servers. The answer to the question was quick and came with a “click”. How about to document these quick tips at…
At web development, things evolve and grow in complexity faster than we can follow. That old way of creating websites where the pages were built only with HTML and if you had to change something you had to go through many pages changing the same thing is something rare nowadays. Now, even to create static websites, we use tools to optimize our work. On the last years, we had an increase in…
A while ago, I made a post on how to organize a coding dojo that was published right after the Python DF community anniversary dojo where I prepared a challenge to create the game of life from John Horton Conway. To let the challenge more dynamic, I prepared a graphic simulator using pygame so everyone could see the code running visually. The simulator uses all the concepts that we saw on the last…
Now that we learned how to draw on the screen ( previous post ) would be good that our game keeps running until someone closes it, and to do that we will use one of the basic concepts of game development with is the Game Loop. Concept The concept of loop is something very common at computing, it is nothing but a sequence of actions and decision makings that repeats inside on a cycle. At a low…
During a game lifetime, we are constantly drawing on the screen. Now that we learned how to create a program with pygame it’s time to start to draw. Drawing axis Going back to math classes at high school we were introduced to the Cartesian coordinate system . It is basically one bidimensional plane oriented by the axis x and y where the x values grow from left to right while y grows from…
Game development is one of the most common reasons to start to study programming. With me it was not different, despite not following the game developer path, this was always a field that caught my attention. I’m creating this series of posts to learn more about the game development basics and to share my discoveries with everyone. I’ll use the pygame library as tool and I will start…
My first Coding Dojo happened right after my first contact with the Python language at college. A classmate ( Dirley ) that had back from Python Brasil conference where he discovered the concept of Coding Dojo and was excited to put that to practice. That was a really fun day and probably the most important moment that started a spark on me to learn more about Python. In the same way as that…
Recently I participated in a discussion at the Grupy-DF Telegram Comunity group about how to explain the differences between Open Source and Free Software to non tech people and during that discussion I realized that on every try to create a simple answer we create more doubts about it. So to try answer that question i posted here my toughs on this question. Free Software The Free Software is a…
First published at : df.python.org.br/blog/github-pages-com-pelican-e-travis-ci I’m making this post to help everyone who want to create their first website at GitHub Pages using Pelican to create the pages and Travis-CI to automate the task of static page generation and publishing. This guide assumes that the reader have an account at GitHub and Travis-CI and have familiarity with the…
Django’s official documentation nicely covers its generic relationship functionality when you have to make an OneToMany (one-to-many or 1:N ) relation, but when you need to implement a generic ManyToMany (many-to-many or N:N ) relation, there is not much documentation about it. I recently had to implement an N:N with a generic side, and discovered a library called django-gm2m that was very…
Theres about 4 years that I try to start a blog and during that time I created some for the community but never my own. Using publishing tools like WordPress the problem was the difficulty of customizing it and the amount of tooling that I would never use, plus it’s not Python . Then I discovered GitHub Pages , and at the same time Pelican by indication of Magnun Leno and I started to do a…
Hello everyone, This is my first post at this blog, here I will talk about Python, technology, open source, the universe and everything. I created this blog with focus on consolidate my knowledge, and eventually to help someone with my thoughts. Without further ado, keep watching for the next posts…