Language Selection

English French German Italian Portuguese Spanish

Python Programming

Filed under
Development
  • Python Comments

    Comments are the lines in a computer program that help to build a better understanding of the functionality of the system. In any programming language, comments are written in natural language and in a human-readable way. They are not executed rather they are ignored by the compiler or interpreter. The comments in Python are used for various purposes. In this article, we will explain to you how you can add comments in python.

    [...]

    Comments enhance the code understandability: Comments help us to understand why a certain code block is added in the program and what its purpose is. If a programmer writes a block of code, then he may not add the comments because he understands the purpose of writing a specific block of code. But, if another programmer wants to update the code, then it is not so easy for him to understand the code in minutes. So, when we add the comments, it helps other programmers to understand the code. Let’s assume, you are working on the Python project. It was the medium size project initially. But for now, your company to enhance this project and bringing more developers and programmers to write the code. If you have no written the comments in your program, then you will see that it will be very hard for them to understand the code and it will take more time. But if you have properly written the comments with every block of code, then the newly hired developers will easily understand the existing code. Initially, writing and maintaining the comments take some time, but it saves a lot of your time in the future.

    Comments promote the code reusability: When we develop similar software systems, then reusing the existing is the best practice. It saves a lot of our effort and time. While reusing the code, first we check what components we have to reuse. We have to understand the functionality of the particular component. Comments help us to understand the functionality of the component and they promote the code re-usability.

  • Python 3.8.5 : A sphere in Cartesian coordinates - part 001.

    I like the equation of a sphere of radius R centered at the origin is given in Cartesian coordinates:

    x*x + y*y + z*z = r*r

    It is one of the first elements that helped me better understand mathematics and later the dynamics and theory of electromagnetic fields.

  • PSA: Mailman used to harrass people

    It seems that Mailman instances are being abused to harrass [sic] people with subscribe spam. If some random people complain to you that they "never wanted to subscribe to your mailing list", you may be a victim to that attack, even if you run the latest Mailman 2.

More in Tux Machines

Septor 2020.5

Tor Browser is fully installed (10.0.2) System upgrade from Debian Buster repos as of October 21, 2020 Update Linux Kernel to 5.9.0-1 Update Thunderbird to 78.3.1-2 Update Tor to 0.4.4.5 Update Youtube-dl to 2020.09.20 Read more

Incremental backup with Butterfly Backup

This article explains how to make incremental or differential backups, with a catalog available to restore (or export) at the point you want, with Butterfly Backup. Read more

Regressions in GNU/Linux Evolution

  • When "progress" is backwards

    Lately I see many developments in the linux FOSS world that sell themselves as progress, but are actually hugely annoying and counter-productive. Counter-productive to a point where they actually cause major regressions, costs, and as in the case of GTK+3 ruin user experience and the possibility that we'll ever enjoy "The year of the Linux desktop". [...] We live in an era where in the FOSS world one constantly has to relearn things, switch to new, supposedly "better", but more bloated solutions, and is generally left with the impression that someone is pulling the rug from below one's feet. Many of the key changes in this area have been rammed through by a small set of decision makers, often closely related to Red Hat/Gnome/freedesktop.org. We're buying this "progress" at a high cost, and one can't avoid asking oneself whether there's more to the story than meets the eye. Never forget, Red Hat and Microsoft (TM) are partners and might even have the same shareholders.

  • When "progress" is backwards

Graphics: Vulkan, Intel and AMD

  • NVIDIA Ships Vulkan Driver Beta With Fragment Shading Rate Control - Phoronix

    This week's Vulkan 1.2.158 spec release brought the fragment shading rate extension to control the rate at which fragments are shaded on a per-draw, per-primitive, or per-region basis. This can be useful similar to OpenGL and Direct3D support for helping to allow different, less important areas of the screen be shaded less than areas requiring greater detail/focus. NVIDIA on Tuesday released the 455.26.02 Linux driver (and 457.00 version for Windows) that adds this fragment shading rate extension.

  • Intel Begins Adding Alder Lake Graphics Support To Their Linux Driver - Phoronix

    Intel has begun adding support for Alderlake-S to their open-source Linux kernel graphics driver. An initial set of 18 patches amounting to just around 300 lines of new kernel code was sent out today for beginning the hardware enablement work on Alderlake-S from the graphics side. Yes, it's only a few hundred lines of new driver code due to Alder Lake leveraging the existing Gen12/Tigerlake support. The Alder Lake driver patches similarly re-use some of the same workarounds and changes as set for the 14nm Rocket Lake processors with Gen12 graphics coming out in Q1.

  • AMD Linux Driver Preparing For A Navi "Blockchain" Graphics Card - Phoronix

    While all eyes are on the AMD Radeon RX 6000 "Big Navi" graphics cards set to be announced next week, it also looks like AMD is preparing for a Navi 1x "Blockchain" graphics card offering given the latest work in their open-source Linux driver. Patches posted today provide support for a new Navi graphics card referred to as the "navi10 blockchain SKU." The Navi 10 part has a device ID of 0x731E. From the AMDGPU Linux kernel driver perspective, the only difference from the existing Navi 10 GPU support is these patches disable the Display Core Next (DCN) and Video Core Next (VCN) support with this new SKU not having any display support.