
For some reason I am following the progress of the Global Interpreter Lock (GIL). Google uses Python and MIT switched to it from LISP for non-CS introduction. I like the use of mandatory whitespace and human convenient syntax (not sure why managed code languages mimic C syntax so blindly) so to learn Python, I read the Programming in Python 3 book which I can recommend.
Googling I see some opinions on the attempt to convert Python to a VM, http://stackoverflow.com/questions/714242/opinions-on-unladen-swallow
This hour lecture http://blip.tv/file/2232410 is laugh out loud funny at the Python's threading.. then read this fix from today, http://mail.python.org/pipermail/python-dev/2009-October/093321.html
The Python answer to multiple cores is to use multiple processes but then what are threads for? I think the GIL's days are numbered and I'll keep checking the Unladen Swallow project.
Post A Comment | Add to Memories | Tell a Friend | Link
Start-Sleep -s 1800 ; Get-Process | Where { $_.Name -Eq "iTunes" } | Kill
in PowerShell. Nice huh?
Time is in seconds.
Post A Comment | Add to Memories | Tell a Friend | Link
I love doing amateur statistics. Such as looking up languages on Dice.com to compare their popularity.
Overall Java is ahead of C#. Here's a contrary report from the publisher O'reilly,
http://radar.oreilly.com/2009/02/state-of-the-computer-book-mar-22.html
which also has lots of other languages mentioned.
Post A Comment | Add to Memories | Tell a Friend | Link
As title of this blog I had a comment to look at some homepage I threw up, first. To like make a disclaimer and also top links of stuff I've done. Except now there's a squatter on it with (dubious content) and I hadn't bothered to check to see what had happened to the URL.
Thanks squatter. I hope that didn't cost me any leads.
I had expected a squatter but more like what happened to my domain stormfall.com which isn't dubious content.
Post A Comment | Add to Memories | Tell a Friend | Link
 |
|
Problem: sometimes mp3 players don't order the files right.
Attempt #1: see if sorting the file creation order on disk will help. And file name sorting. (Fail.)
#!/usr/bin/env python3.0
import os import shutil import re
directory = '/media/.../Michael Pollan - In Defense of Food' base_dir = os.path.split(directory)[-1] outdir = '/media/SANSA/AUDIOBOOKS' outdir = os.path.join(outdir, base_dir) try: os.makedirs(outdir) except EnvironmentError as err: print("nevermind: " + str(err))
operations = []
for root, dirnames, files in os.walk(directory): for file in files: fullname = os.path.join(root, file) base_dir = os.path.split(root)[-1] match = re.search(r"(\d+)", base_dir) num_dir = match.group(match.lastindex) if match else '' match = re.search(r"\.MP3", fullname, re.IGNORECASE) if match: file_dest = num_dir + "_-_" + file file_dest = os.path.join(outdir, file_dest) print(fullname + " -> " + file_dest) operations.append((fullname, file_dest))
for src, dst in sorted(operations, key=lambda a: a[0]): shutil.copyfile (src, dst)
Attempt #2: cat all the files into 1 big file. (Fail, fail.)
The mp3 frames actually don't mind as far as I could tell online, but my new player had some problems with these files, unlike my other player. Also you don't get to jump around tracks.
Attempt #2: Add tags. (Win.)
Obviously the best solution.
#!/usr/bin/python
# (downgrade to Python 2 for eyeD3 library support.)
import os import eyeD3 import re
directory = '/.../Michael Pollan - In Defense of Food' tag = eyeD3.Tag()
for root, dirnames, files in os.walk(directory): for filename in files: fullname = os.path.join(root, filename) discname = os.path.split(root)[-1] print("filename: " + fullname + " discname: " + discname) match = re.search(r"\.MP3", fullname, re.IGNORECASE) if match: if (not tag.link(fullname)): print("no id3 tag yet.") else: print("album: " + tag.getAlbum()) continue tag.header.setVersion(eyeD3.ID3_V2_3) tag.setArtist(u"Michael Pollan") tag.setAlbum(discname) tag.setTitle(filename) tag.update()
Note: the directory structure here is directory/disc-n for n discs. Hard coded since I wrote it for a one-off.
Post A Comment | Add to Memories | Tell a Friend | Link
Or so I heard on a job advice leader on PBS news.
I have the (mis)fortune to be easily searchable.
Problem: Internet searches were not the target audience of this blog. This blog was directed at myself and maybe 6 other people, and is not a big deal. Solution: Don't read too much into it. Also helpful if during an interview you don't pull up this blog and start asking me questions about it. This actually happened. Who cares? But also that interviewer slammed furniture while on a video link so I guess it was a "stress" interview since it was an tech support position. (Normally I don't blog about work. Actually now, normally I don't publicly blog at all.)
I'll try to camouflage this blog as a technical site / start posting only neutral tech items instead of the meandering stream of trivia that it was. Enjoy.
Post A Comment | Add to Memories | Tell a Friend | Link
I'm switching from livejournal.com for real this time.
If you know me in real life and don't receive an invite in the next week, then let me know.
Post A Comment | Add to Memories | Tell a Friend | Link
Gamer is a fashion style to me. Has the lazy of grunge, but with cleanliness and funny tshirts and accessories.
I'd like to be gamer but I'm climbing the hill instead.
Otherwise, I'd totally get this tshirt and wear it once:
 http://www.topatoco.com/merchant.mvc?Screen=PROD&Store_Code=TO&Product_Code=SMBC-DIOGENES&Category_Code=SMBC-SHIRTS
Post A Comment | Add to Memories | Tell a Friend | Link
Appeal to emotion is a logical fallacy. Yet Western Civilization only teaches ad misercordium.
Post A Comment | Add to Memories | Tell a Friend | Link
I'm trying to find people with zabasearch and google. humans are like bugs in the great windshield of the Internet.
I feel powerful and digitally conservative at the same time.
May be the aftereffects of that movie.
Post A Comment | Add to Memories | Tell a Friend | Link
soldier translations via babelfish.altavista.com = 1. chinese 戰士 2. chinese 战士 3. dutch militair 4. french soldat 5. german Soldat 6. greek (hello empire) στρατιώτης 7. italian (ve are made of high heel) soldato 8. japanese (5 modes of shall we say, politeness) 兵士 9. korean (we like PCs) 군인 10. portuguese soldado 11. russian (sometimes is left-to-right) воин 12. spanish soldado 13. [] all out of babelfish.
If a name has empty set symbols in it, then it is a Swedish name. old joke: the army is no longer recruiting. it already has one guy. matt damon.
Post A Comment | Add to Memories | Tell a Friend | Link
"There are 20,000 edible plant species," Endy noted. "At present we eat only 30." - blog[s].wired.com/sterling
Post A Comment | Add to Memories | Tell a Friend | Link
If you stop paying LJ then your pics are froze out. So if you're going to die, you should ask your estate to switch your journal to ad supported. If it wasn't a worthless blog. Like this one.
be depressed: "Hope2604 - Steve Rambam Pt 1 – Privacy Is Dead – Get Over It" (123 minutes) http://video.google.com/videoplay?docid=3079242748023143842 "Hope2604 - Steve Rambam Pt 2 – Privacy Is Dead – Get Over It" (71 minutes) http://video.google.com/videoplay?docid=2219573359400519690
Next time someone quotes Google's slogan along with the requisite ironic question, ask them if they would bother to expectantly quote Pepsi's slogan. Don't be a /. clone.
Post A Comment | Add to Memories | Tell a Friend | Link
Wikipedia 1liners: - Mountain Dew was originally marketed as “zero proof moonshine” and had pictures of hillbillies on the bottle until 1973. whatever who cares.
Other stuff: - I was listening to bluegrass on the radio and the announcer used the term "deviltalking." It must mean the same thing as a "Freudian slip" but have more applicability. I find this term interesting.
i find this very interesting.
Post A Comment | Add to Memories | Tell a Friend | Link

In bad scifi technology resolves the plot. In good scifi technology advances the plot. Star Trek, especially The Next Generation, is bad scifi by this metric.
Post A Comment | Add to Memories | Tell a Friend | Link
|