Programming Leftovers

-
tee is broken?
Just found a highly surprising behavior in a core tool I've used for decades, so clearly I'm making a note here.
[...]
Answer time! After a tee, a single writer parent feeds two reader children. If a child exits before reading all the data, then when the parent tries to feed that dead child, the parent will get a SIGPIPE. And apparently the default behavior of tee in GNU coreutils (and in the zsh multios redirection) is to give up and to stop feeding all the children at that point. So the second child (wc -l in the examples) ends up with incomplete input. No errors are thrown anywhere, and there's no indication at all that any data was truncated. Lots of the data is just silently missing.
-
4 ways to control the flow of your awk script
There are many ways to control the flow of an awk script, including loops, switch statements and the break, continue, and next commands.
-
Qt 5.14.0 RC released
Qt 5.14.0 RC is released today. As usual you can get it by using online installer (for new installations) or by using maintenance tool (existing online installation). And in addition there is also offline installers in qt account or download.qt.io for users who can't use online ones. Delta to beta3 as an attachment.
Target is to release Qt 5.14.0 12th December so please test RC now & report all new release blockers immediately. Also make sure those are visible in release blocker list (https://bugreports.qt.io/issues/?filter=21539). But remember that Qt 5.14.1 is also coming soon so we can fix most of findings there and fix only real blockers in '5.14.0'.
-
Qt 5.14 On Track For Releasing Next Week With New Scenegraph Renderer, Better HiDPI
While missing the original release target of the end of November, The Qt Company is buttoning up Qt 5.14 for debut next week. Today, however, marks the release candidate availability for those wanting to test out this forthcoming Qt5 release prior to more of the development efforts shifting to Qt 6.0.
-
Rust 2020
Technically speaking, it’s past the deadline for #rust2020 posts, but I’m running late this year, and I’m going to post something anyway. In this post, I am focusing on what I see as the “largest scale” issues, and not on technical initiatives. If I have time, I will try to post a follow-up talking about some of the key technical initiatives that I think we should focus on as well.
-
Automatically downloading nursery photos from ParentZone using Selenium
My son goes to a nursery part-time, and the nursery uses a system called ParentZone from Connect Childcare to send information between us (his parents) and nursery. Primarily, this is used to send us updates on the boring details of the day (what he’s had to eat, nappy changes and so on), and to send ‘observations’ which include photographs of what he’s been doing at nursery.
-
Auto-generating API specifications as OpenAPI, WSDL and Sphinx
Let's consider the services below - they represent a subset of a hypothetical API of a telecommunication company. In this case, they are to do with pre-paid cards. Deploy them on your servers in a module called api.py.
Note that their implementation is omitted, we only deal with their I/O, as it is expressed using SimpleIO.
What we would like to have, and what we will achieve here, is a website with static HTML describing the services in terms of a formal API specification.
-
GUI Automation using Pyautogui, Python
PYAUTOGUI is an automation module provided by Python for controlling keyboard and mouse functions via program. This module has almost all the functions which can be performed by keyboard and mouse. We can use these functions to automate mouse and keyboard actions.
-
Beautiful Soup: Build a Web Scraper With Python
The incredible amount of data on the Internet is a rich resource for any field of research or personal interest. To effectively harvest that data, you’ll need to become skilled at web scraping. The Python libraries requests and Beautiful Soup are powerful tools for the job. If you like to learn with hands-on examples and you have a basic understanding of Python and HTML, then this tutorial is for you.
-
Tensorflow 2.0: Solving Classification and Regression Problems
After much hype, Google finally released TensorFlow 2.0 which is the latest version of Google's flagship deep learning platform. A lot of long-awaited features have been introduced in TensorFlow 2.0. This article very briefly covers how you can develop simple classification and regression models using TensorFlow 2.0.
-
Two New Typosquatting Libraries Found on PyPI
Two new malicious packages were found on the Python Packaging Index (PyPI) that were designed to steal GPG and SSH keys according to ZDNet. The packages were named python3-dateutil and jeIlyfish where the first “L” is actually an I. These two libraries mimicked the dateutil and jellyfish packages respectively.
-
Framework Patterns
A software framework is code that calls your (application) code. That's how we distinguish a framework from a library. Libraries have aspects of frameworks so there is a gray area.
My friend Christian Theune puts it like this: a framework is a text where you fill in the blanks. The framework defines the grammar, you bring some of the words. The words are the code you bring into it.
If you as a developer use a framework, you need to tell it about your code. You need to tell the framework what to call, when. Let's call this configuring the framework.
There are many ways to configure a framework. Each approach has its own trade-offs. I will describe some of these framework configuration patterns here, with brief examples and mention of some of the trade-offs. Many frameworks use more than a single pattern. I don't claim this list is exhaustive -- there are more patterns.
The patterns I describe are generally language agnostic, though some depend on specific language features. Some of these patterns make more sense in object oriented languages. Some are easier to accomplish in one language compared to another. Some languages have rich run-time introspection abilities, and that make certain patterns a lot easier to implement. A language with a powerful macro facility will make other patterns easier to implement.
Where I give example code, I will use Python. I give some abstract code examples, and try to supply a few real-world examples as well. The examples show the framework from the perspective of the application developer.
-
Django 3 taps Python async to speed web apps
Django 3.0, the newest version of the Python framework that allows fast creation of database-backed websites and web services, now supports Python async, one of the most powerful new features in Python to make websites and network services faster.
Async allows Python programs, especially networking apps, to run more efficiently, but existing applications must be rewritten to use it. Django 3 will only work with Python 3.6 and later versions, the better to work with Python’s async programming features.
A key way Django provides support for async is via ASGI, a protocol that serves as a standard interface between asynchronous Python applications and async-capable web servers. Previously, Django only supported WSGI, which only supported synchronous web applications. Django 3 will only allow async features to run in an app if it’s deployed as ASGI.
-
CSS: An Art, a Science, a Nightmare (Overview of CSS Concepts)
Some people think CSS is really hard and it's too much of a hassle to learn. Some people think that since it's not a programming language (or is it?), it's so easy that you don't even have to bother learning it. Ultimately, there's a lot to CSS, but it doesn't have to be overwhelming. If you learn a few key concepts, you should feel confident looking at or thinking of any design and turning it into reality.
I'm going to go over some of the parts of CSS that are important on a daily basis, and give some of tips and tricks I've come to learn over the years.
-

- Login or register to post comments
Printer-friendly version- 3167 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
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.
|
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.
|
today's howtos
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago