This is from xkcd. Shows off everything great about Python.
I wanted to use Poker Tracker to keep track of my stats when playing at the play money tables of Poker Stars. Poker Tracker doesn’t support the play money tables.
I wrote some Perl to convert the the lots from the play money format into the real money format.
#!/usr/bin/perl use strict; use Cwd; use File::Find; my $some_dir = "Z:\\HandHistory"; my $startDir = &Cwd::cwd(); find(\&processFile, $some_dir); exit; sub processFile { shift; return if not /\.txt$/; my $inFileName = $_; my $infile = "$startDir/$File::Find::name"; my $outfile = "$startDir/outHands/$inFileName.$$.converted.txt"; open (inFILE, "<$infile") or die "can't open in file!: #$infile# ($!)"; open (outFILE, ">$outfile") or die "can't open out file!:#$outfile# ($!)"; my @players; while(<inFILE>) { chomp; @players = () if (s/^(PokerStars Game .*\()(\d+)\/(\d*)(\).*)$/\1\$\2.00\/\$\3.00\4/); push(@players, $1) if (/^Seat [\d+]: (.*) \(\d+ in chips\)/); foreach my $key (@players) { my $value = $key; $value =~ s/\s+/_/; ($value = $1) =~ s/($1)/_\1/ if ($key =~ /^(\d+)$/); s/$key/$value/; } s/([\( ])(\d+)([\) \.])/\1\$\2.00\3/g; s/\(Play Money\) //g; s/^\s+//; s/\s+$//; print outFILE "$_\n"; } close(inFILE); close(outFILE); }
I remember a theme for mac os 9 that I’m pretty sure came with the bondi blue style iMacs. There was one theme with matching colors for each of the iMacs. I’m pretty sure I’m not making this up. I’ve googles around but can’t come up with anything. Does anyone remember this?
I finally upgraded to [REDACTED] beta 5 on one of my iPhones. Everything seemed to go just fine. I upgraded Xcode and installed the new SDK. Yay. Things were looking pretty good until I tried to build some of my existing applications.
‘Error from Debugger: Unknown packet reply: “timeout” to environment packet.’
I don’t even know where to start with that error. I’m only getting it on the iPhone 1st gen that was upgraded to beta 5. The same project builds and runs just fine on my 2.2.1 3G.
I just tried another project and it builds and runs just fine on both my beta 5 1st gen and on my 2.2.1 3G.
Anyone else getting this? How did you fix it?
I’ve been big into using git for all of my Python Version Control. I’ve been mucking around with GitX to use it with my Xcode projects and that works out pretty well. I wanted to have something that was actually integrated into Xcode, that limits me to Subversion, Perforce and CVS.
I’m not a fan of CVS so its out. Never used Perforce and Subversion seems to be the easiest to get started with.
I ran svnadmin create SVNrep and the set it up in Xcode and found it gave me Error: 180001. That’s no good. After some googling I found a post by James Murty which describes the problem. It seems Xcode 3.1 isn’t compatible with versions after 1.4. I’m I’m running 1.6.1. svnadmin has a flag –pre-1.5-compatible that will create repositories that are compatible with versions less than 1.5.
After removing the previous SVNrep and running svnadmin –pre-1.5-compatible create SVNrep I now have a SVN repository that Xcode 3.1 can use.
