Although my experience with Python is limited to whatever university assignments recommended it as a programming language (mostly Natural Language Processing ones) and some other smaller projects of my own, I’ve found reasons to love (and to hate) it. A former fellow student of mine, Dimitris, is obviously in love with it, and I don’t mean that in a bad way. His book on the language is one of the best programming language guides I’ve ever read, and his blog approaches a lot of problems, some less common than others, using Python. Here’s his approach on avoiding fluctuations around a threshold, based on a post from another fellow student, and friend, Vasilis.
I’ll make sure to post my thoughts on Python, and small scripts I’ve made, soon.
I read the interesting post Checking fluctuating variables using thresholds, the smart way from tzikis. Unfortunately, for some reason I can not post a comment there.
The problem is how to avoid the problem of fluctuations around “soft” thresholds. My solution simply defines a tolerance parameter. If we are “almost” at the same interval as before, we change nothing.
By the way, the bisect module is nice.