aa_dbo.py — Simplified PostGreSQL use from Python

Bookmark and Share

Screen shot 2015-05-04 at 3.00.37 PMHere’s a Python import library that, working in conjunction with the PyGreSql project, makes using PostGreSQL from within Python super, super easy. Complete with examples. You need PostGreSQL installed and running (obviously, I hope), and you’ll need to install the PyGreSQL Python module as well.

Click here to download the import library.

Revision Changes
1.0.1 Initial Release
1.0.0 Internal Version

Tags: , , , , , , , ,

Email This Post Email This Post

Amateur Radio Callsign utility

Bookmark and Share

Screen shot 2015-05-02 at 11.36.46 AMWhen creating reports involving amateur radio callsigns, it is useful to be able to sort them according to region, prefix and postfix, as this is the way we are accustomed to thinking about them. In addition, padding them so that call regions align and other types of worthy formatting are applied is something I have found to be very handy.

For this purpose, I developed aa_calllib.py, a Python import library. You are welcome to use it.

Click here to download the zipped library.
Read the rest of this entry »

Tags: , , , , , , , , , , , , , , ,

Email This Post Email This Post

Colored reports for text and HTML in Python

Bookmark and Share

One of the things that I face regularly is report generation. Often they’re free form, by which I mean not tables full of tabulated data.

Output from my htmlAnsii() class

Output from my .htmlAnsii() class

Just “is this ok, is that ok, 27 of the other happened”, that sort of thing. I like to use color — green if everything is ok, red if it isn’t and so on.

I’m often out where I want the report in a web browser. But then again, I’m often at my desk, signed in to a console and I want it there. The environments couldn’t be much more different; HTML tags on the one hand, within the wrapper of a page, and ANSII escape sequences on the other. And they’re both kind of annoying and error-prone to write out explicitly, especially when you’re doing it a lot.

What to do?
Read the rest of this entry »

Tags: , , , , , , , , , ,

Email This Post Email This Post

SdrDx 2.14o for Windows and OS X Available

Bookmark and Share

The 2.14o version of SdrDx for OS X ** and ** Windows is
now available and the online documentation has been updated
to reflect the changes that have been made.

SdrDx is free; it supports RFSPACE SDRs, both FunCubes,
the Andrus MK 1.5, and the AFEDRI.

The SoftRock/Peabody SDRs will also work, but it takes
some technical knowledge of scripting to make that happen.
Read the rest of this entry »

Email This Post Email This Post

News at 11

Bookmark and Share

Dateline: Millions of light years (even faster parsecs than the Kessel run)

Lede: Scientists in the Dark; Does it Matter?

Today scientists announced that they can’t see anything happening with stuff they can’t see, but think is there, because otherwise the math is no good. After receiving directions to his laboratory on the phone, I went to see an authority on dark matter.

During the interview, Dr. Seemore Lichspittle told this Any Paper, Any Time reporter that the thing about dark matter that one has to understand is that “it goes to eleven.” When confronted with the observation that the sensing instruments only had scales from 0-10, he responded “Yes, yes, that’s exactly it. The numbers… the numbers only work out in the dark. When the instruments are off. Matter of fact, it’s all dark, really.”

At that point the interview was cut short as two lab assistants in white coats hustled Dr. Lichspittle into his own custom white lab jacket. Late for an important meeting, no doubt. As he left, nodding, he called back “it’s really quite dark.” Food for thought!

Leaving Arkham, I was struck by the picturesque beauty of the stonework, and very appreciative of the tight security. We can rest easy, knowing that national treasures like Dr. Lichspittle work in such a safe enviroment.

Email This Post Email This Post

SdrDx 2.13w for OS X Now Available

Bookmark and Share

The 2.13w version of SdrDx for OS X is now available and the online documentation has been updated to reflect the changes that have been made. The Windows version remains at 2.13e BETA, however I hope to have an updated release for Windows shortly. I still have more testing to do there.

SdrDx is free; it supports RFSPACE SDRs, both FunCubes, the Andrus MK 1.5, and the AFEDRI.

The SoftRock/Peabody SDRs will also work, but it takes some technical knowledge of scripting to make that happen.
Read the rest of this entry »

Email This Post Email This Post

Cat Watering System

Bookmark and Share

cdishSo. Watering cats is always an issue. They go to the dish with food still in their mouths which inevitably falls in, they clean themselves with their tongues, then drink with them, cat hair gets in there, and when you have several, as we do… well, it just gets worse. Then they can — and do — get sick. Mouth infections, general degradation of immune systems, passing bacteria and viruses from one to another… it’s not good at all.

This is my final solution. I cut an adequate hole in the floor to install a drain plus some extra room, then built a drain into a watering dish and “plumbed” it with some adapters and a garden hose that drains into a utility sink in the basement almost directly below.

Then I drilled the side of the dish, dropped the assembly into/over the hole in the floor, routed the hose to the sink, and inserted a small diameter pipe/hose into the bowl that connects back to our reverse osmosis system. The water flow from that pipe to the dish is gated by a 12 volt DC valve.

To control the valve, I bought a commercial infrared proximity sensor that has an AC outlet on it, plugged the 12 VDC power supply — just a run of the mill linear wall-wart — I use to activate the valve into it, and set the IR sensor for a one minute recycle.

So the way it works is, cat walks up, IR sensor sees them, AC turns on, 12 VDC power supply comes up, valve triggers, fresh water comes out of the pipe, they drink from the arc of water — almost never from the dish — which runs for one minute, and the dish drains immediately.

This way, the water doesn’t stand. Doubly important with an R/O system, as there is almost no chlorine left in the R/O water, so the water is less able to sit around in the first place without “things” growing in it.

The IR sensor, and therefore the valve power supply, is powered from a UPS in the basement. This was done so power outages, quite common in the summer here, won’t deny them the opportunity to drink. As the UPS only has this one load on it, and the power demand is extremely low as well as intermittent, the up time, that is, the amount of time the UPS can power the system without the AC returning is many, many hours, almost the same amount of time the UPS can run without any load at all other than its own internal workings. Due to the massive explosion of UPS designs for computers, the UPS itself was surprisingly inexpensive. It cost about what the dish, drain, valve, hoses and IR sensor driven AC outlet did all taken together, which let the entire project cost come in under $150.00 USD. I consider that a bargain.

This system works extremely well. The cats figured it out within just a few minutes, there was no significant adaptation period. This, or something like it, is something that can really benefit your cats health and well-being, which in turn will extend their lives, while saving you a ton of effort, time and attention that you can put into working so you can buy better quality cat food and more cat toys. That’s why we all work, after all!

Tags: , , , , , , , , ,

Email This Post Email This Post

NewBurgers!

Bookmark and Share

NewBurgersOk, here’s the deal. I was sitting around one day recently, contemplating having some hamburgers for dinner, and feeling kind of “meh” about it, because I never get them right. They’re too big, they’re too small, they aren’t cooked right in the center, or if they are, they’re overcooked on the outside, they’re too thick, too thin, they shrink too much (some burger is made by mixing shaved ice in during the grind down process in order to increase volume; if that’s been done, the burger will shrink quite a bit when cooked as the water evaporates out.) Anyway, it just never works out. Burgers have been my cooking downfall forever. And I really don’t like those frozen patties much, either. So I thinks to meself, see, “can this be gotten around?” Well, as it turns out, yes, I figured out a way.

The result is fabulous.
Read the rest of this entry »

Email This Post Email This Post