Halstead Software Complexity of Perl Code

The other day I stumbled across the Wikipedia entry for Halstead software complexity and became curious about how the language Perl would measure up. Now I knew the age old adage that “only perl can parse perl”, but I also knew about the PPI set of modules on the CPAN.  So I got to reading/experimenting…

Personal Developer Productivity Tools

It seems that everyone has a “Here’s my toolbox” write-up.  So here’s mine (in abbreviated laundry-list form)!

Bach Choral Harmony Network Diagrams

Today I decided to revisit the Bach Choral Harmony data set and look at chord progression transitions. In order to do this I wrote a small program that tallies the movement from one chord to another, and then outputs a Graphviz dot file that can be turned into an image.

Zen Markov Machine

Today I used the requests and BeautifulSoup Python libraries to harvest 101 Zen koans.  Next I used the NLTK and markovify libraries to generate random statements:

How Many Primes Are In A Slice Of Pi?

Questions: What is the number of primes per n-slice of the decimal part of pi? What does the graph look like? Are there many overlapping primes (i.e. start at the same position in the slice)?

Predicting Beatles Song Authorship with scikit-Learn

Yesterday I read about a 10 year effort to predict the author of Beatles songs by lyrics, tonal contour and chord analysis. Hmm very curious.  Can I replicate a part of this I wonder?  tl;dr: beatles.py

Predicting Star Trek TOS Spoken Lines with scikit-Learn

In a previous post, I collected the transcripts of all the original Star Trek seasons and analyzed linguistic features of Kirk and Spock.  In this post, I train a scikit-Learn model on the Kirk, Spock and McCoy lines spoken in hopes that one of those three speakers can be guessed when given unknown lines.

Investigating Kasparov Chess Moves with scikit-Learn

I am practicing my machine learning (ML) skills and became curious if chess moves could be predicted, somehow.  Crazy right? ;-) tldr: kasparov.py

Predicting Player Features of the English Premier League with scikit-Learn

In a previous installment, I harvested football stats for every player in the English Premier League and saved them as CSV files (separated by tabs actually). In this installment, I use the same data but predict the player rating (a floating point number) and field position (a string) with the techniques of linear regression and […]

80s Number One Hits

Recently I harvested all the number one singles of the 1980s from this comprehensive Billboard charts database. Naturally, I whipped up some handy perl code (not shown here) to analyze the records and get the following results.