Language Selection

English French German Italian Portuguese Spanish

Python Programming

Filed under
Development
  • Invoking Zato Python microservices with OpenAPI

    One of the exciting additions of the upcoming Zato 3.2 release is the ability to invoke services through OpenAPI endpoints without a need for creation of REST channels explicitly - read more for details.

    Python code

    Supposing we have a service such as below - note that it is uses SimpleIO and that each of its input/output attributes is documented in the docstring - we would like to invoke it from an external application while delegating to Zato as much effort involved in it as possible.

  • … and benchmarks

    And he also tries Cython on this benchmark. However, for whatever reason, he tries it on the second version, where the Python runtime is doing all the work, not on the first one, which is the one that is computationally heavy in user code. Unsurprisingly, compiling the second version gives almost no speed-up compared to exercising the exact same implementation of the built-in range(), str(), map() and list() functions in the interpreter.

  • A beginner's guide to web scraping with Python

    Many people find instructional books useful, but I do not typically learn by reading a book front to back. I learn by doing a project, struggling, figuring some things out, and then reading another book. So, throw away your book (for now), and let's learn some Python.

    What follows is a guide to my first scraping project in Python. It is very low on assumed knowledge in Python and HTML. This is intended to illustrate how to access web page content with Python library requests and parse the content using BeatifulSoup4, as well as JSON and pandas. I will briefly introduce Selenium, but I will not delve deeply into how to use that library—that topic deserves its own tutorial. Ultimately I hope to show you some tricks and tips to make web scraping less overwhelming.

  • Waiting in asyncio

    One of the main appeals of using asyncio is being able to fire off many coroutines and run them concurrently. How many ways do you know for waiting for their results?

    There’s quite a bit of them! However the different ways have different properties and all of them deserve their place. However I regularly have to look them up to find the right one.

More in Tux Machines

Android Leftovers

Graphics: Intel Gen12, Navy Flounder, Sway and DRM-Next

  • Intel Gen12 Graphics Bring EU Fusion - EUs Fused In Pairs

    While we remain eager to find out more about (and benchmark) Intel Gen12 graphics in Tiger Lake and Xe discrete graphics with this generation bringing the biggest changes to the ISA since i965, Linux patches and bug reports do continue offering new tid-bits of information on Gen12. One bit that I don't believe has been reported publicly or at least not widely is that starting with Intel Gen12 graphics there is "EU Fusion" or the execution units now being paired for yielding a larger warp size.

  • "Navy Flounder" Is The Newest AMD Navi 2 GPU Being Added To The Linux Driver

    In addition to the "Sienna Cichlid" support recently published for the open-source AMD Radeon Linux kernel graphics driver, there is another new graphics processor being added to their driver: Navy Flounder. Sent out this week were patches for Navy Flounder as another Navi 2 part, Navi 22 to be exact. The patches mostly reuse the existing Sienna Cichlid code paths. The codename, like Sienna Cichlid, is the Linux naming convention currently being used by the AMD Linux team of a color followed by a fish species.

  • Sway 1.5 Wayland Compositor Released With Adaptive-Sync/VRR, New Protocols

    Sway 1.5 is out as a big feature update to this Wayland compositor inspired by the i3 window manager. A big user-facing feature with Sway 1.5 is support for Adaptive Synchronization / Variable Refresh Rate, such as AMD FreeSync. Up to now the FreeSync/Adaptive-Sync has been principally been in place for the Linux desktop when running on an X.Org session. However, Sway now supports Adaptive-Sync/VRR for reducing stuttering and tearing within games.

  • Early Intel DG1 Graphics Card Enablement Sent In To DRM-Next For Linux 5.9

    As we have been anticipating for weeks, initial (but still early) enablement of the Intel DG1 graphics card on their open-source driver stack will indeed be sent in for the upcoming Linux 5.9 cycle and is currently being queued in the DRM-Next repository. It was in late May that Intel sent out the DG1 patches to light up the graphics card on Linux and building off all the existing Gen12/Xe graphics code already mainlined within the kernel. Since then the kernel work has continued with other features getting squared away.

Record, Edit and Mix Audio Using Latest Ardour 6.2 Release

Ardour Digital Audio Workstation aka DAW application recently released the first maintenance release version 6.2 after its major release Ardour 6.0 which was released earlier. Read more

today's howtos