My WordPress Blog
Trying to figure out some multiprocessing code from last night. As one would expect, the single thread code maxes out a single core and the other three(it’s a dual core HT chip) are very lightly loaded with random background crap. For multiprocessing, the average load per core is in between the peak vs…
So, the latest Daily Programmer project I’m working on(I’ll get to finishing the last one, eventually) is this weeks Easy level project, Game of Threes. This one wasn’t complicated, here’s the code. [code language=”python”] def get_diff_from_multiple(n): """ Returns -1, 0, or 1, whichever will add to n to make the sum divisible by 3 """…
One of my current projects is the Daily Programmer challenge here. It’s a project to write a program to play a version of a hacking minigame from the Fallout series. Here, I’ll work through my design process for a Python 3.4 implementation. I started by just throwing out a little bit of code. I didn’t expect…
So, working on learning Python, I’ll be blogging short bits of code and tutorials to help hone my own understanding- and hopefully someone out there will find it helpful. So, a for loop is used in Python for iterating over a container, and for other loops where you can easily know ahead of time how…