Tagged Questions
0
votes
1answer
26 views
Opinions/Improvements on a run periodically/timer function in Python 2.7
I'm looking for some opinions on this bit of code that I wrote and if there are any ways it can be improved.
The scripts aim is to run the function runme() every 60 seconds with a random interval ...
3
votes
2answers
148 views
Generating random sequences while keeping sum fixed
The output is a random sequence, and the input is the sum of the sequence.
My solution is generating a random number *rand_num* from (0, sum_seq) at first, then draw another number randomly from (0, ...
1
vote
3answers
117 views
What is wrong with my Genetic Algorithm?
I am trying to understand how genetic algorithms work. As with everything, I learn by attempting to write something on my own;however, my knowledge is very limited and I am not sure if I am doing this ...
1
vote
1answer
173 views
randrename — insert random nums in filenames
I have an old mp3 player with a broken screen. Consequently, it's a real pain to turn shuffle mode on and off; however, there are a few albums that I wanted to mix together and have shuffled for when ...
1
vote
2answers
302 views
Random Topic Generator
I've written a python module that randomly generates a list of ideas that
can be used as the premises for furthur research. For instance, it would be useful in situations where a new thesis topic is ...
5
votes
1answer
768 views
Randomly sampling a population and keeping means: tidy up, generalize, document?
This is part from an answer to a Stack Overflow question. The OP needed a way to perform calculations on samples from a population, but was hitting memory errors due to keeping samples in memory.
...
8
votes
1answer
467 views
Quasi-random sequences: how to improve style and tests?
The requirements for this one were (original SO question):
Generate a random-ish sequence of items.
Sequence should have each item N times.
Sequence shouldn't have serial runs longer than a given ...