Optimal placements and unsolved math problems

Optimal placements and unsolved math problems are among the interesting problems discussed in the book, Tomorrow’s Math, Second Edition by C. Stanley Ogilvy. On chapter two, pg.23-24 he asks how a land’s defenses may be best defended by n defense stations on a disk shaped land area? They state it had known answers for n<6, and “a general solution seems remote at present”.

Continue reading “Optimal placements and unsolved math problems”

GTK Choice box with Glade and Python

There may be times you have a simple choice or listing in a GTK list box – for this example, in choosing a serial connection or other device. Glade is a good way to build an application window easily with an interface to build in to your app on Linux desktop, Ubuntu or Librem phone or other Linux based phones. I was able to use this to create a Winlink user interface for the previous tutorial to call up the Pat interface.

Continue reading “GTK Choice box with Glade and Python”

Severe weather alerts with a simple Python script

If like many you have been starting gardens and planting rather than traveling and visiting in recent months, there is one important thing to consider lately – severe weather reports including frost on your crops. I noted there was a little red (!) alert icon on an Android weather widget, but there seems to be no such alert for desktop computer or Linux computer or phone. It is a fairly simple to make this alert though with a simple script:

Continue reading “Severe weather alerts with a simple Python script”

Injecting commands and debugging a running Python program, with Project Euler example

How often has it happened to you… you build a simple script to calculate something, run some bulk process, and coming back after an hour or so it just hangs with no output. Is it doing something or stuck? You could debug it, using WinPdb or Visual Studio Code debugger or GDB to run it step by step, but that would lose the time that it has been processing. Instead, you can use Pyrasite, a program for looking in to a running Python script!

Continue reading “Injecting commands and debugging a running Python program, with Project Euler example”

Machine learning SVM – the usefulness of kernels

If you’ve read through how Support Vector Machines work, you probably know the linear simple SVM might not work in all cases… but how does it fail? Let’s take a look at an example I tried like to my simple example… but change it to be a larger space than just 4, and separated with a region in the middle, and the region around it (positive, negative labelled areas to learn):

Continue reading “Machine learning SVM – the usefulness of kernels”