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

Games: Celeste/Stadia, How to Play Windows Games on GNU/Linux, MOBAs on Android

  • What have you been playing lately? It's chat time

    Wow, the end of another week over here in the surprisingly hot and sunny UK. Perfect weather to be sat inside playing games and there's been plenty of that here. Thanks to the news of Celeste coming to Stadia, I was reminded of the fact that Celeste was in the recent itch.io charity bundle so I've been able to give it a thorough go after only previously playing it at a friends PC. I already liked it a lot but now I've sunk plenty more hours into it I'm totally blown away by it. It's truly no surprise to me now why it has amassed such a following, like on Steam where it has over twenty thousand views an an overall Overwhelmingly Positive rating.

  • [Older] How to Play PC Games on Linux

    If you’re new to Linux, check out our switcher’s guide before reading this, as it helps to know the basics. There’s no one distro that’s “best” for gaming, but Ubuntu-based distros like Ubuntu, Linux Mint, and Pop!_OS are good options for their widespread support and helpful communities. If you have a different Linux environment on your system, you may have to research the best way to install the right packages and drivers. However, you can almost certainly get games working. Before trying anything, you should make sure your distro comes with the requisite graphics drivers. If not, Nvidia users should grab the company’s official proprietary drivers, and AMD users should install the open-source Mesa drivers. The procedure for installing drivers may vary from system to system, so we won’t get into it too deeply here, but I used these instructions for Linux Mint for the drivers and these instructions for some extra Vulkan packages, which produced good results. Now, before we continue, temper your expectations just a tad. While Linux gaming is easier than ever, it still isn’t on par with Windows. Some games won’t run at all, and others may have small graphical quirks, or decreased performance. Others may require some Googling and command-line tweaking to get playable. The experience isn’t exactly smooth as butter yet-it’s still very Linux-y-but once you have the basics down, you might be surprised at how many games you’re able to run. Here are your options.

  • The 20 Best MOBAs for Android Device to Try in 2020

    In comparison to different Android gaming genres, MOBA is a newcomer. But this short time of presence is enough for this extensively exciting game to get immense popularity. However, MOBA is the short form of a long name gaming genre that we know as Multiplayer Online Battle Arena. The uniqueness of this game lets you enjoy fighting on the battlefield side by side with your friends though you are staying far away from each other. It’s like maintaining a connection without friends in the gaming world. If you love to try one, it should be one of the best MOBAs for Android. Otherwise, you may not find the true excitement of playing these games.

Screencasts and Audiocasts: Neptune OS 6.5, GNU World Order, Python

  • Neptune OS 6.5 Run Through

    In this video, we are looking at Neptune OS 6.5. Enjoy!

  • GNU World Order 362

    **Gutenprint**, **HPLIP**, and **htop** from Slackware software set AP.

  • Talk Python to Me: #272 No IoT things in hand? Simulate them with Device Simulator Express [Roy: "Talk Python to Me" appears to be boosting Microsoft monopolists and proprietary software again]

    Python is one of the primary languages for IoT devices. With runtimes such as CircuitPython and MicroPython, they are ideal for the really small IoT chips. Maybe you've heard of the Circuit Playground Express, BBC micro:bit, or the fancy Adafruit CLUE. They aren't too expensive (ranging from $25 to $50 each). But for large groups such as classrooms, this can be a lot of money. Moreover, getting your hands on these devices can sometimes be tricky as well.

today's howtos

Olimex Tukhla High-End Open Source Hardware NXP i.MX 8QuadMax SBC in the Works

Most open-source hardware Arm Linux SBCs are optimized for cost, and there are few higher-end boards with extensive connectivity designed for professionals. Beagleboard X15 would be one of the rare examples currently available on the market, but it was launched five years ago. One European company noticed the void in this market and asked Olimex to develop a high-end open-source Linux board with a well-documented processor. They ruled out RK3399, and instead went Olimex Tukhla SBC will be powered by NXP i.MX 8QuadMax, the top processor of i.MX 8 family with two Cortex-A72 cores, four Cortex-A53 cores, and two real-time Cortex-M4F cores. Read more