Language Selection

English French German Italian Portuguese Spanish

Python Programming

Filed under
Development
  • Add scorekeeping to your Python game

    If you've followed along with this series, you've learned all the essential syntax and patterns you need to create a video game with Python. However, it still lacks one vital component. This component isn't important just for programming games in Python; it's something you must master no matter what branch of computing you explore: Learning new tricks as a programmer by reading a language's or library's documentation.

    Luckily, the fact that you're reading this article is a sign that you're comfortable with documentation. For the practical purpose of making your platform game more polished, in this article, you will add a score and health display to your game screen. But the not-so-secret agenda of this lesson is to teach you how to find out what a library offers and how you can use new features.

    Displaying the score in Pygame

    Now that you have loot that your player can collect, there's every reason to keep score so that your player sees just how much loot they've collected. You can also track the player's health so that when they hit one of the enemies, it has a consequence.

    You already have variables that track score and health, but it all happens in the background. This article teaches you to display these statistics in a font of your choice on the game screen during gameplay.

  • Creating Sitemaps in Django

    Django comes with baked-in functionality for generating sitemaps dynamically using the sitemap framework.

    A sitemap is an XML file that informs search engines such as Google, the pages of your website, their relevance, and how frequently they are updated. Using sitemaps facilitates crawlers indexing the site, therefore sitemap plays a crucial role in modern SEO (Search Engine Optimization).

    In this article, we will go through the process of creating sitemaps in Django.

  • Python IDEs and Code Editors

    A code editor is a tool that is used to write and edit code. They are usually lightweight and can be great for learning. However, once your program gets larger, you need to test and debug your code, that's where IDEs come in.

    An IDE (Integrated Development Environment) understand your code much better than a text editor. It usually provides features such as build automation, code linting, testing and debugging. This can significantly speed up your work. The downside is that IDEs can be complicated to use.

  • The Skills to Get a Job As a Django Developer

    When I first started to learn Django. I used videos from DjangoCon US, DjangoCon Europe, Coding for Entrepeneurs, Chris Hawks and a book from Two Scoop of Django to start my journey to learn about how to program in Django.

    Those are how it got me started to learn Django. I sought to learn to build a project using the TryDjango series from the basics of deploying it to Heroku.

    So I think it might be good to offer my own two cents on what to learn to land a job as a Django developer. Besides that, you do need to know that you do not need to know everything at the start instead pick it up along the way in your job.

  • Intro to Arduino with LoRa

    If you've ever wanted to get started using LoRa wireless communication in your Arduino projects this video is for you. It covers some popular LoRa module options, a brief introduction to the Arduino code needed to control them, and an explanation of the different ways to configure your LoRa modem to maximize range or data transfer rate along with visualizations of the LoRa packet transmissions.

  • How to Read a File in Python, Write to, and Append, to a File

    In this tutorial, we are going to learn how to read a file in Python 3. After we have learned how to open a file in Python, we are going to learn how to write to the file and save it again. In previous posts, we have learned how to open a range of different files using Python. For instance, we have learned how to open JSON, CSV, Excel, and HTML files using Pandas, and the json library. Here, however, we are going to open plain files (.txt) in Python.

  • New NumPy and Panda Courses Released

    The best place to start any journey is at the beginning and NumPy is where it all started. NumPy was the library that gave rise to the Data Science / Python revolution. Therefore, as you?re working through the course, you?ll build upon the foundations of Data Science and large data processing.

  • Introduction to Speech Recognition with Python

    Speech recognition, as the name suggests, refers to automatic recognition of human speech. Speech recognition is one of the most important tasks in the domain of human computer interaction. If you have ever interacted with Alexa or have ever ordered Siri to complete a task, you have already experienced the power of speech recognition.

    Speech recognition has various applications ranging from automatic transcription of speech data (like voicemails) to interacting with robots via speech.

    In this tutorial, you will see how we can develop a very simple speech recognition application that is capable of recognizing speech from audio files, as well as live from a microphone. So, let's begin without further ado.

    Several speech recognition libraries have been developed in Python. However we will be using the SpeechRecognition library, which is the simplest of all the libraries.

  • Django: Django 3 Tutorial & Example: Build a CRUD REST API for A Simple CRM

    Django 3 is released with full async support!

    In this tutorial series, you'll learn about Django 3 by creating a CRUD example application with database, admin access, and REST API views. We'll be using MySQL as the database system.

    Throughout this beginner's tutorial for Django 3, we are going to learn to build web applications with Python and Django. This tutorial assumes no prior experience with Django, so we'll be covering the basic concepts and elements of the Django framework by emphasizing essential theory with practice.

    Basically, we are going to learn Django fundamental concepts while building a simple CRM web application.

    This tutorial doesn't only cover fundamental basics of Django but also advanced concepts such as how to use and integrate Django with modern front end frameworks like Angular 2+, Vue and React.

    You'll learn about CRUD, database ORM, how to create API views and URLs.

  • Django: Python Webviews with PyWebView

    Have you ever wanted to use your python and web development skills to build cross platform desktop GUI apps? if yes then welcome to this tutorial where we'll show you how to use PyWebView to turn your web application built using python and client side technologies such as HTML, CSS and JavaScript into a standalone cross platform GUI application that runs under major operating systems such as Linux, Windows and MAC.

    You can also use any web framework based on python such as the so popular django framework or also the lightweight web development framework flask to build business logic of your app and then wrap the whole app, server and client side, into a desktop app .

  • Weekly Python StackOverflow Report: 20 best Python questions at stackoverflow in 2019
  • 3 Tips to be Effective In Pycharm

    I had been using PyCharm for a very long time whenever I am developing in Python.

    It's one of the best IDEs for Python out there that I had encountered.

    Which I am coming from realms of Visual Studio, Netbeans & Eclipse in other programming languages.

    What blew me away for Visual Studio the most is their debugger & their IntelliSense.

    This made me set a high bar for selecting an IDE for any new programming language.

    It must have an excellent debugger and great IntelliSense.

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.