Published onRecently 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 the blog?
Published onA 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 posts of this series.
Published onNow 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.
Published onDuring 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 bottom to top:
Published onGame 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 by the most basic principles of game development until the creation of a single player pong like game.
Published onMy 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 brought me to Python and after to the community, Coding Dojo can be an entry door to a lot of people to programming.
Published onFirst 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 Python environment. The version of Pelican used at this post was 3.6. The images have a little of Portuguese due to the original language publication
Published onDjango’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 useful to me in this task, and I will describe here giving tips on how to make this implementation and how to avoid possible headaches.
Published onTheres 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 lot things with it.