If you’ve seen any behind-the-scenes view of any movie you probably are familiar with the green-screen – generally a way to combine an actor with some prerecorded or computer generated background. There are some unique effects you can do with this yourself using OpenCV!
Continue reading “Green-screening a recursive green screen for a unique Pie-day effect”Wordle game analysis with Python
Wordle is an interesting word game in the style of the old mastermind game. You can try it out on NYT puzzle page or other places. Check it out and try a round!
Continue reading “Wordle game analysis with Python”Testing solutions to the 100-prisoners puzzle.
Both Matt Parker and the Youtube Veritasium channel have reviewed the surprising best practice for the 100 prisoners puzzle. The puzzle is a way to find a solution that will let the prisoners win with the most probability. If you have not seen this already please see the video here before some spoilers below.
Continue reading “Testing solutions to the 100-prisoners puzzle.”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”Linux tools on Windows with MSYS2 (And a Repeater app for Windows!)
One thing many don’t consider when setting up a GTK+ window application is that the same code that runs on a Linux phone or Linux computer, can also run on MS Windows with the same libraries! Next time you are on a Windows system and trying to set up a command or tool normally working on Linux, try this:
Continue reading “Linux tools on Windows with MSYS2 (And a Repeater app for Windows!)”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”Zipf’s law, Kleiber’s law, and finding interesting patterns in browsing history
In the chapter The Long Tail of the Law, in Alex Bellos’ book The Grapes of Math, he shows some different statistical patterns that share the same properties:
Continue reading “Zipf’s law, Kleiber’s law, and finding interesting patterns in browsing history”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”