Press "Enter" to skip to content

Population: One

Jupyter Notebooks, GitHub, & Secrets

This week I needed to do some analysis of JIRA tickets that goes beyond the reporting JIRA provides — not entirely an uncommon task. My usual quickie toolkit for that purpose involves Jupyter notebooks, which I prefer over downloading CSVs and playing with spreadsheets because I can automate the notebooks given a JIRA API key.

In this case, though, I really want one of my PMs to be able to run these reports, and I don’t want to get into the whole “OK then type this at the command line” thing. The post title kind of gives this away, but after some thought I realized, hey, just check the notebook into the company’s GitHub and there we go.

But how about that API key? Obviously I don’t want to embed mine in the notebook. Is there some way to use GitHub secrets for this? Answer: yes, there is, and it’s really simple, but I don’t see it documented step by step anywhere else so I’m gonna do that here.

If you want the quick answer: GitHub makes secrets available as environment variables, and if you’re working in the GitHub Jupyter environment, you don’t need to do anything special with workflows to make that happen. Therefore, you can just use Python’s os.environ mapping object to get at secrets.

Letterboxd Feed Update

I love copying my Letterboxd reviews over here, but I hate how much they dominate my feed. This week I started rewriting my script so that it’ll batch reviews up a week at a time. Gonna take a little more thought about formatting and such, but I’ve got the basic aggregation working and the output looks like this:

Year: 2022
    Week: 9
        Polytechnique, 2009 - ★★★★★ (contains spoilers)
    Week: 10
        Forbidden City, U.S.A., 1989 - ★★★½
        The Last Days of Disco, 1998 - ★★½
        A Bay of Blood, 1971 - ★★★

So that’s cool. This’ll also let me comfortably grab the whole backlog from Letterboxd via their export feature, which I didn’t want to do because a lot of my older reviews (from, say, Fantasia) are one-liners.

AEW Hard Eight

I was chatting the other day about how I’d book an AEW round-robin tournament and I thought I’d expand on the subject somewhat here.

Background: most US pro wrestling tournaments are single elimination. There’s a bracket, and if you lose you’re out. In contrast, the big Japanese promotions tend to run round robin tournaments, where you earn points for wins, and the wrestlers with the most points face off in the finals.

Round robin tournaments chew up way more time. Typically, while something like NJPW’s G1 is going on, the majority of each show is dedicated to tournament matches. This would be hard for an American promotion.

The G1 has 20 wrestlers in two blocks. In each block, each wrestler fights every other wrestler in the block, so everyone has nine matches. That means you’re running 18 shows with four tournament matches apiece on them, and there’s no way AEW could devote over two months of TV time to something like that.

But the value of a round robin tournament is that you can book a lot of matches that might be awkward otherwise — faction members against each other, and so on. You can also do a few stunning upsets because nobody can be expected to win all their matches. So how would you make it work in the US?

I think you cut it down to eight wrestlers in two blocks of four. Now each wrestler only has three matches. Each week, you put two tournament matches on Dynamite and one on Rampage. One match is always the main event each night to maintain significance. Each block gets Dynamite one week and Rampage the second week, so over the course of the two week cycle each block completes one set of matches.

That means the whole tournament except the finals takes six weeks to run and only occupies a third of the available TV time. That’s not bad at all, even after you double it to fit in the women’s tournament.

Okay, how do you book it?

You run this at the end of the year. AEW resets win-loss records at the end of the year for the purpose of rankings. The first consequence of the tournament is that the wrestlers are seeded in the new year’s rankings based on their records. Come in third, and you’re third in the top five. Second, and more important, you give the winner the traditional shot at any title they want. Include tag team titles in that.

Finally, you determine the entrants by a mixture of skill and luck. First off, the top four wrestlers in the rankings as of the start of the tournament get in. That ensures you have stars. Second, you “randomly” pick four other wrestlers to fill out the field. That means you can give a newcomer a boost, you can set up inter-faction matches, all that good stuff.

And to maintain the gambling theme, you call it Hard Eight. You also get a bonus gambling note by using a roulette wheel or something to do the random selection.