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”
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”
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”
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”
Human pose estimation is something useful for robotics/programming as you can see what position a person is in a picture. For last weekend’s Hackrithmitic I did an experiment for fun using computer vision pose estimation. To start with I found several possibilities with available libraries:
- Tensorflow js has been used to say, don’t touch your face, but it takes a massive amount of cpu.
- Openpose is a popular one, only licensed for noncommercial research use, and there is a Opencv example for it that doesn’t quite show how to use it.
- AlphaPose is supposedly faster and has a more clear license and possibility for commercial use – if you want that as a possibility. I checked out the install instructions and worked but for “python3” instead of “python”. It also misses obvious step of installing cuda for your Nvidia system before running.
- GluonCV is another, which seems more user friendly. This one I was able to get running in a few minutes with their example:
Remember when there were mini mp3 players with one button and a shuffle feature? If like many geeks you have a bunch of interesting ebooks from Humble Bundle, Oreilly or Github or wherever you get technical books, you probably have folders and folders of lots of interesting books. What if you want to “shuffle” or randomly pick one off your virtual bookshelf and read a bit while staying home? Today I’ll show how to virtually “grab a book off the shelf” of your collection with a simple Python script:Continue reading “The eBook Shuffle”
There’s a big difference between having that quick python script set up with a GUI, and having a full desktop or mobile app ready to click install. In this post I’ll show the steps to build a Python script into an installable application.Continue reading “Building a Linux App part 7: Building an Installer File”
Another important part of many mobile apps is location tracking – there is, fortunately, there is a built in api for most Linux systems called Geoclue that should work… There is even a Python-geoclue package, but after some digging I found that this package does not work in Python3. In fact it’s hard to find examples or documentation, if you look at the files of the package you can see there are some basic docs:Continue reading “Building a mobile app for Linux, part 4: GPS/mobile tracking”