Religious Orders

import time

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Non-Sectarian

from rpi_ws281x import PixelStrip, Color

# LED strip configuration:
LED_COUNT = 64 # Number of LED pixels.
LED_PIN = 12 # GPIO pin connected to the pixels (18 uses $
LED_FREQ_HZ = 800000 # LED signal frequency in hertz (usually 800$
LED_DMA = 10 # DMA channel to use for generating signal ($
LED_BRIGHTNESS = 10 # Set to 0 for darkest and 255 for brightest
LED_INVERT = False # True to invert the signal (when using NPN $
LED_CHANNEL = 0 # set to '1' for GPIOs 13, 19, 41, 45 or 53

RIGHT_BORDER = [7,15,23,31,39,47,55,63]
LEFT_BORDER = [0,8,16,24,32,40,48,56]

# Define functions which animate LEDs in various ways.
def colorWipe(strip, color, wait_ms=50):
"""Wipe color across display a pixel at a time."""
for i in range(strip.numPixels()):
strip.setPixelColor(i, color)
strip.show()
time.sleep(wait_ms / 1000.0)


def theaterChase(strip, color, wait_ms=50, iterations=10):
"""Movie theater light style chaser animation."""
for j in range(iterations):
for q in range(3):
for i in range(0, strip.numPixels(), 3):
strip.setPixelColor(i + q, color)
strip.show()
time.sleep(wait_ms / 1000.0)
for i in range(0, strip.numPixels(), 3):
strip.setPixelColor(i + q, 0)


def wheel(pos):
"""Generate rainbow colors across 0-255 positions."""
if pos < 85:
return Color(pos * 3, 255 - pos * 3, 0)
elif pos < 170:
pos -= 85
return Color(255 - pos * 3, 0, pos * 3)
else:
pos -= 170
return Color(0, pos * 3, 255 - pos * 3)


def rainbow(strip, wait_ms=20, iterations=1):
"""Draw rainbow that fades across all pixels at once."""
for j in range(256 * iterations):
for i in range(strip.numPixels()):
strip.setPixelColor(i, wheel((i + j) & 255))
strip.show()
time.sleep(wait_ms / 1000.0)


# Create NeoPixel object with appropriate configuration.
strip = PixelStrip(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL)
# Intialize the library (must be called once before other functions).
strip.begin()
# start animation
print('Color wipe animations.')
colorWipe(strip, Color(255, 0, 0)) # Red wipe
colorWipe(strip, Color(0, 255, 0)) # Green wipe
colorWipe(strip, Color(0, 0, 255)) # Blue wipe
print('Theater chase animations.')
theaterChase(strip, Color(127, 127, 127)) # White theater chase
theaterChase(strip, Color(127, 0, 0)) # Red theater chase
theaterChase(strip, Color(0, 0, 127)) # Blue theater chase
print('Rainbow animations.')
rainbow(strip)
print('Wipe LEDs')
colorWipe(strip, Color(0, 0, 0), 10)

Go ahead, add a comment, don't cost nuthin'...


We Sure Can Pick 'Em

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

I don't know which is sadder, that we've owned three of the Ten Worst-Selling Handhelds of All-Time or that we've owned four of the Ten Worst-Selling Consoles of All-Time.

Actually, the saddest thing is that we sold some of the consoles. That was a mistake. They were too much fun and I wish we had them back.

Go ahead, add a comment, don't cost nuthin'...


Crash-O-Rama

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

Hey Apple! Thanks for a new version of Safari! One that crashes all the damn time!

Idiots!

Go ahead, add a comment, don't cost nuthin'...


Why Ain't There Any...

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

Why ain't there any good basic XML editors for the Mac? I know one guy you finally resorted to just writing his own.

And, for that matter, why ain't there any good simple graphic packages, similar to older versions of Paint Shop Pro, for the Mac? Everything is either really low-end stuff, on par with Microsoft Paint, or else some sort of Photoshop clone.

I needed to add a border to an image yesterday. I ended up resorting to running Paint Shop Pro 5 under Windows 2000 Advanced Server under VM Ware. Just to add a stupid border!

Go ahead, add a comment, don't cost nuthin'...


Where All The Cheap Digicams At?

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

While we were in Norway, I tried to take a lot of 3D shots. I'd take a photo, then move to the side a little and take another. Once home, I melded them together into a 3D image that you could view with red/blue glasses. Here are two of my favorite examples:

The problem? It's hard to keep everything level and at the same height. Much of the time, one shot would be crooked. Or one would be higher than the other. Convert those to 3D and you get an instant headache.

Sure, you could rotate one or the other, but then you still have to crop them to exactly the same size. It's just a pain. Plus, there's a time lag between the shots, meaning you can't take them from moving objects and you can't have things moving in the scene.

The solution would be to have two identical cameras, mounted next to each other. Then you could just fire their shutters at the same time. So, all I need to do is find a couple of cheap, but decent, digital cameras.

Wow! That's actually hard to do. I know there should be 2-3 year old cameras around for less than $100, but I can't find any. Anything below $100 is inevitably a focus-free piece of junk. Real cameras are inevitably more then $100.

I could scour eBay, but how many sellers are going to be selling the same model at any given time?

I really thought this would be easy. It's not. Grrrr!

Go ahead, add a comment, don't cost nuthin'...


Wordle Wordle Wordle

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

The Mississippifarian has a thing for Wordle lately. It let's you generate really swank tag clouds. I stuck one on this site. (It's over there on the left.)

It's great for your blog, of course. But it's also a nice tool for text analysis.

I should mention that the tag cloud on the left is static and doesn't represent recent posts. I'm lazy that way.

(Is it just me, or was Wikipedia out of commission most of yesterday?)

This post already has 2 comment(s). Go ahead and add your own...


Wham Bam!

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

Chances of Mars getting hammered have just doubled. See, there's this asteroid that's on a possible collision course with the red planet. The asteroid, 2007 WD5, had been given a 1.3% chance of hitting Mars. That probability was recently upped to 3.9%!

Sweet! I just hope John Carter takes cover in time!

This post already has 13 comment(s). Go ahead and add your own...


The Alternative Medicine Game!

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

A while back, we went to the Women in Secularism 2 conference and had a great time. The first session was about the vast wasteland of alternative medicine. Surly Amy talked about why alternative medicine can often appear to work at an anecdotal level. The thing is, if you're feeling like crap, random chance says you'll likely feel better the next day. People try cures when they're at extreme lows and then think the cure worked if they feel better the next day. But that can just be random chance. The technical jargon is Regression to the Mean.

I wanted to get a feel for how much of an effect there really is, so I made up a quick dice game. Don't worry, you don't need one of those 20-sided D&D jobs. A normal 6-sided die is fine.

The numbers 1-6 on the die represent how good you feel, with 1 being really good and 6 being really awful. Here's how the game is played:

  1. Roll the die.
  2. If you roll a 5 or a 6, you feel crappy enough to resort to alternative medicine.
  3. Roll the die again and see how you feel the next day, after the alternative medicine. If the number is higher than the previous roll, you feel worse. If the number is the same, you feel the same. If the number is lower, you feel better.
  4. Repeat until you have some good statistics or just get bored.

It should be immediately obvious that, if you rolled a 6 the first time, you won't be rolling an even bigger number the second time. Also plain to see is that there's only one roll to equal a 6, while there are five ways to roll a lower number.

The situation is similar when rolling a 5. There is a way to get worse on the second roll, namely by rolling a 6. There's one way to stay the same and four ways to get a lower number.

When you add up all the percentages, the probabilities about how you'll feel after resorting to alternative medicine look like this:

How You'll FeelIn FractionsAs Decimals
You'll feel worse1/128.3%
You'll feel the same2/1216.7%
You'll feel better9/1275%

As you can see, the odds drastically favor feeling better, despite the alternative medicine in this game not having any role in the outcome of the roll. Also keep in mind that feeling the same isn't any big prize. You started out feeling shitty and still feel shitty.

(As a check, I also wrote a short chunk of Perl to simulate the rolls. It confirmed the percentages.)

But wait, it gets worse!

What if we assume that the alternative medicine actually hurts you a little? To model that, we'll add 1 to the second roll. So, if you roll, say, a 3, we'll treat it as a 4. What to do when you roll a 6? Treat it as a 7, I guess? For this game, we'll just round anything bigger than a 6 to a 6. In the real world, a 7 would mean you die and your story is left untold. We could also just leave the 7 as a 7. The only effect would be to make the numbers even worse, shifting much of the feel the same outcome to feel worse. In general, I mentally group the feel-worse and feel-the-same together anyway.

Obviously, this twist is going to change the outcome and make it less likely to see fake improvement, right? Well, yeah, but just barely.

There's still no way to get worse after an initial 6, but now there are two ways to stay the same, rolling either a 5 or a 6. (Because the 5 will get 1 added to it.) Now there are only four ways to roll a lower number and feel better, namely rolling anything from 1 to 4.

The change is similar when rolling an initial 5. There are now two ways to get worse (5 & 6), one way to stay the same (4), and three ways to get better (1-3). Here are the resulting percentages:

How You'll FeelIn FractionsAs Decimals
You'll feel worse2/1216.7%
You'll feel the same3/1225%
You'll feel better7/1258.3%

Wait, what? Your chances of feeling better are still more than half, even if the so-called medicine actually makes you sicker? That's right!

Okay, so let's make the medicine even worse for you, by adding 2 to the second roll. I'll spare you the details and just show the resulting percentages:

How You'll FeelIn FractionsAs Decimals
You'll feel worse3/1225%
You'll feel the same4/1233.3%
You'll feel better5/1241.7%

Well, at least the chances you'll feel better are below 50% now. Yet feeling better is still the most likely outcome and feeling worse is the least likely. Although, again, feeling the same is no great prize when you already feel shitty. So, at this point, folks might start to doubt the validity of this harmful treatment.

Fine, fuck it, crank up the harm of the medicine to 3. We'll add 3 to the second roll. Given that it's half the range, that's really quite a lot. Here's what you get:

How You'll FeelIn FractionsAs Decimals
You'll feel worse4/1233.3%
You'll feel the same5/1241.7%
You'll feel better3/1225%

Finally, we're getting to where feeling better is the least likely outcome. Note that you're still most likely to feel the same, but that feeling the same level is basically feeling shitty.

If we make the medicine flat out poison and add 4 to the second roll:

How You'll FeelIn FractionsAs Decimals
You'll feel worse5/1241.7%
You'll feel the same6/1250%
You'll feel better1/128.3%

Adding 5 gives you a 50/50 chance of feeling the same or worse, based on whether the first roll was a 6 or 5.

So, that's why folks can be easily fooled into thinking that alternative medicine works. Now, real science has controls and procedures to take regression to the mean into account, as well as placebo effects, which we didn't talk about at all in this post. For more on this sort of stuff, give Trick or Treatment a read, even though it's not that great a read.

This post already has 4 comment(s). Go ahead and add your own...


In the news...

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

My former employer is in the news, but not in a good way. Last year, they published an awful comic book that tries to educate kids about how the court system works. Unfortunately, they're experts on court administration, not the laws themselves. (Except for Anne, who was utilized too late in the process to save it.) So it really, really, really, really, really, really, really sucks.

It basically reads like a RIAA propaganda piece, although Anne assures me it wasn't meant that way. Still, that how it reads. Anyway, now, a year later, the tech blogs are just learning about it. (Despite someone trying to clue some of them in on it a year ago.)

So, it's causing an uproar, one that's just gonna be ignored by the source of the comic and forgotten by everyone else in a week.

But, for now, here's a list of the blog posts talking about it. Have fun:

I've left p2pnet.net for last, as they've had the most complete coverage. Unfortunately, they don't link the posts together. So here they are, in chronological order:

The sad thing is that the NCSC does good work, generally. They just simply screwed up royally on this comic. They look like they're a front for the RIAA. Anne's been feverishly trying to correct misperceptions on the various blogs. But, frankly, if I didn't personally know her, I wouldn't believe her. (And even Anne doesn't know everything. Was Ramsey taking payments under the table? Or was it just another case of him being monumentally stupid.)

If you want to keep track of the blog postings, a Google search on NCSC propaganda will get you most of them.

This post already has 3 comment(s). Go ahead and add your own...


Cat Army!

Posted: Monday November 01 2021 @ 6:31am

Religious Order: Technology

Create your own Cat Army to do your bidding through the isolation of nepetalactone from catnip!

Go ahead, add a comment, don't cost nuthin'...



Secular Stuff

RSS 2.0 Feed