"Pirates of Penzance" is a Comic Opera from 1879 by
Gilbert and Sullivan
There is a 1983 Film adaption. John Cook posted on 5 October 2022
on his blog
that an adaptation opera has appeared also in the book "Improving almost Anything: Ideas and Essays"
by the British statistician George Box. The lines from Gilbert and Sullivan were:
I'm very well acquainted, too, with matters mathematical,
I understand equations, both the simple and quadratical,
About binomial theorem I'm teeming with a lot o' news,
With many cheerful facts about the square of the hypotenuse.
I'm very good at integral and differential calculus;
I know the scientific names of beings animalculous:
In short, in matters vegetable, animal, and mineral,
I am the very model of a modern Major-General.