Love music though.
197 karma · joined March 29, 2008
Love music though.
That's neat for code. Not so for discussions I think.
Inline comments make it hard to read all the comments at once. And I often care more about that than being able to select which comment I'll read according to it's subject.
# It reflects conditional probability better
def boy_girl_problem():
from random import choice
families = {}
for i in range(1000):
families[i] = []
families[i].append(choice(['BOY', 'GIRL']))
families[i].append(choice(['BOY', 'GIRL']))
had_both_sex = filter(lambda f: set(f) == set(['BOY', 'GIRL']), families.values())
had_one_girl = filter(lambda f: 'GIRL' in f, families.values())
return len(had_both_sex) / float(len(had_one_girl))# The fact as ALREADY happened.
# BG/GB being DIFFERENT is NOT THE TWIST.
# Whether they are or not it will amount to 50% total.
# TWIST: BB is not possible.
def boy_girl_problem():
from random import choice
families = {}
for i in range(1000):
families[i] = []
families[i].append(choice(['BOY', 'GIRL']))
families[i].append(choice(['BOY', 'GIRL']))
had_both_sex = filter(lambda f: set(f) == set(['BOY', 'GIRL']), families.values())
had_two_boys = filter(lambda f: 'GIRL' not in f, families.values())
return len(had_both_sex) / float(len(families) - len(had_two_boys))
# average(boy_girl_problem) == 2/3I tried with HSB. It didn't produce good results. The image was always too dark.
In HSB, colors that are far apart in our perception can have close distance. For example two colors with the same Brightness, Saturation but a different Hue.
Using HSB in the DNA was perfect. It's hard to mutate a RGB color in the right direction. You have to get 3 composants right. In HSB a single modification can change everything.
BTW, I coded a Java version after seeing the original. It works, but first, it doesn't converge very fast, second, it's stuck at: http://i33.tinypic.com/2yycdc8.jpg
On the bright side, I can easily switch the population size to 50. Java is very good at this. I piggy back on automatic hardware acceleration for rendering.
How did you get yours to converge sooo fast?!
I classified myself as INTP after reading the descriptions.
My-Type classified me as INTP after I took the test.
There are multiple plan you can update to. And since it's a VPS, updating is painless.
The hits are dead on for obscure subjects.
Your site was interesting at first but there are two drawbacks.
You don't give free credits on registration. We want to use banner exchange to jumpstart our site. We don't have users. We want users. Without starting credits I have a cold start problem.
1 for 1 banner exchange doesn't solve my problem. I want to drive traffic to by newborn site. Another formula would be better.
I love this approach to engineering. Feynman always manages to remind me what I like about science and engineering.
thanks
The desktop is just a bunch of applications co-existing. Some programs have a document-centric interface because they deal with documents. Others have evolved an interface suited to the streams they deal with. MSN, IRC, RSS aggregators come to mind. I don't think there's more to it.
I agree that people are using streams more than before but I'm not sure of the implications of this fact.
The comprehensions from twisted were not written for clarity so they aren't good examples. The programmer wanted a one-liner to define these constants.
"The main problem I see with Ruby is that the Principle of Least Surprise can lead you astray, as it did with implicit lexical scoping. The question is, whose surprise are you pessimizing? Experts are surprised by different things than beginners. People who are trying to grow small programs into large programs are surprised by different things than people who design their programs large to begin with.
For instance, I think it's a violation of the Beginner's Principle of Least Surprise to make everything an object. To a beginner, a number is just a number. A string is a string. They may well be objects as far as the computer is concerned, and it's even fine for experts to treat them as objects. But premature OO is a speed bump in the novice's onramp. " Larry Wall, http://interviews.slashdot.org/article.pl?sid=02/09/06/13432...
I wonder if there's a market of buyers. The idea is cool though.
I feel like this article gives a good method to find out.
Darwin