Prime Group Percentages

As usual, I am curious about the distribution of the primes.  This morning I wondered what percent of numbers with N digits were prime.  Not an earth shattering curiosity…  Naturally, I wrote a little perl program to answer it for me.  Here is the preamble:

This says that we are a Perl program and […]

Dimensional Personality Disorder Assessment

Timothy W. Butcher and I collaborated on a number of diverse projects.  One was a personality disorder quiz that he devised while taking an abnormal psychology university course. Since 1999, when we made it, the quiz and the anonymous data and chart history has been lost to time.  But recently I found and resurrected the […]

Kung Fu Wisdom

So I downloaded the transcripts of the classic television show, Kung Fu and wondered what philosophical insight they might hold… $ ack -i wisdom s01e13.txt 250: What is cowardice but the body’s wisdom of its weakness. 251: What is bravery but the body’s wisdom of its strength. $ ack -i truth s01e01.txt 192: To suppress […]

Bach Note Transition Frequency “Music”

What are the note frequencies of music by Bach?  That is, “How often does an F follow a C?” etc.  What does it sound like if you “reconstruct” playable music from these frequencies? Let’s see! First, we find some Bach MIDI.  I chose Jesu Joy of Mans Desiring. Next, we feed that to my note-transition […]

Kirk vs Spock Linguistics Head-to-Head

Today I harvested the three seasons of Star Trek TOS episode scripts from a friendly website hosting the annotated text.  Then I extracted just the lines spoken by Captain Kirk and just the lines of Mr Spock. So how does Kirk match up to Spock linguistically? First of all, the Lingua::EN::Fathom module that computes text […]

Bach Chorale Diversity

What is the relative statistical diversity of Bach chorale harmonisations? Ever since I stumbled upon this Bach Choral Harmony Data Set I’ve been wanting ways to analyze it! So I set out to do just that today with the Shannon Diversity Index with this handy perl code:

First off (above), is the standard perl […]

Traveling Salesman with Perl, R and Google Maps

tl;dr: ggplot-nyc & googlemap-nyc & TSP-Map (the Dancer app) One day I decided to glue-together a couple cool Perl modules and the visualization capabilities of R to generate a map of locations and the computed path of a traveling salesman (TSP) – who in this case is a restaurant critic. The prerequisite is to have MongoDB installed and […]

Subsequent Prime Number Distribution

In 2016, two mathematicians, Kannan Soundararajan and Robert Lemke Oliver found that the prime numbers do not occur at random when looking at the final digits of subsequent primes.  For instance, a prime ending in 9 is more likely to be followed by a prime ending in 1, than any other digits (1, 3, 7 […]

Visualization of Led Zeppelin Lyrics with R

What can be known about Led Zeppelin lyrics from the standpoint of a computer geek? First, I collected and properly named every song with lyrics, with the power of perl and persistence. Then I found/crafted some R code to process these into a few graphics.

Weighted Graph “Music”

Code: synch-weighted-randomized   This piece was constructed in 4-bar increments by running the above code and importing the generated phrases (MIDI file) into my DAW (Apple Logic).  I then gave the patterns “better” patches, used layers and added a drum track for continuity. The code uses randomly generated weighted graphs to build up a melody […]