Posts

Nuitka and PyQtgraph - Bundle a Python Application into a Standalone Binary

PyQtgraph Standalone Application

Nuitka is a Python compiler that supports the conversion of a Python application to compiled code. It enables you to create a single file executable for convenient distribution.

Prerequisites

You will need a C compiler and a Python version specified in the Nuitka README.md.

Installing Nuitka

python3 -m pip install nuitka
Categories: #python #shell
Tags: #cli-tools
Creating an AppImage from a Binary Executable

Make a Portable Desktop Application without the need for Installation

To create a binary which can be run on many Linux machines, an AppImage can be generated. An AppImage wraps around the files needed to run the application and when executed, doesn't require modifications to your operating system as it is self-contained.

Download the appimage tool executable file from here.

Categories: #shell
Tags: #cli-tools
Dearpygui - Menu Bar

With dearpygui, there are two ways to create a menu bar that displays within your main application window. One method of creating a menu bar is to use the "Viewport Menu Bar" which is the traditional menu bar with the fixed horizontal row of menu entries found near the top of your main applications window and the other is the "Menu Bar" which is a floating menu window inside your main application window.

Categories: #python
Tags: #dearpygui
Word Proximity Search

When you search for related words in a general area that are not in strict sequential order, you will have to resort to use a regex pattern that search across multiple words at a time.

"firstword someword anotherword someotherword secondword".match(/\b(?:firstword(?:\W+\w+){1,3}?\W+secondword)\b/g)

// Returns
// ["firstword someword anotherword someotherword secondword"]
Categories: #JavaScript
fzf - Find CLI Application and Execute

Run the Application when Found

When you have an application you wish to search for that you know starts with a certain letter, you type the letter into your Bash shell and press tab to display all the suggestions. Most likely, there will be more applications than one would be able to identify readily by eye.

To make the task of finding your application easier, one can use fzf to perform real-time filtering of your application search.

Categories: #fzf
Tags: #cli-tools
PySide6 and Matplotlib - Simple Line Plot

Fill a Window with a Graph

The PySide6 library offers Python bindings for Qt which is a C++ cross-platform UI library. Qt has been in development for a long time and this will give a stable and mature platform for developing desktop applications. PySide enables one to leverage all the packages from the Python community while using QT. The Python graphing library, Matplotlib, becomes a naturally pairing with the QT library because Matplotlib provides integration options.

Categories: #python
Coqui STT - Extract Words from Audio Files

Speech to Text CLI Tool

There could be a time when you were listening to a podcast, but you can not make out the spelling of a word that you would like to understand. If there was a way to add a 'live-caption' feature to your podcast, this will inform you of the vocabulary that you are missing. To get remedy this problem, you can use a Speech-to-Text tool to output the transcript of the audio.

You might also want to convert an audio file to text if you are able to read quicker than you can listen to the audio file.

Categories: #shell
Tags: #cli-tools