Bayesian modeling of StarCraft II ladder performance
I've been in a bit of a pickle recently. I really need to figure out Bayesian inference as practice for my masters' thesis. I've been wondering, what kind of cool project - hopefully with my own data - could I make?, I thought as I fired up StarCraft II in the evening, as I usually do to unwind nowadays. What kind of fun use of PyMC3, the neat Python library for probabilistic programming, could I showcase?, I wondered as I watched my ladder ratings fall from the distraction. What kind of useful knowledge could I try to acquire using it?, I thought, watching my game performance fluctuate over the course of months.
And then it hit me.
Dealing with backlogs
I have a backlog problem.
Like probably many of you in 2020, I suffer from having too much interesting content to read, watch, listen to or play through. I've been thinking about ways to tackle my gathering points, and I think I finally have something I'm willing to share that could be useful for you as well.
First JOSS review!
Several months ago, I stumbled upon the journal they call Joss. Well, actually, JOSS - the Journal of Open Source Software, "a developer friendly, open access journal for research software packages". It's a completely free, open-source and open-access alternative to established, for-(often-a-lot-of)-profit journals such as those by Reed-Elsevier or Springer.
And a few days ago, I've been called into service to review VlaPy, "1D-1V Vlasov-Poisson(-Fokker-Planck) Plasma Physics Simulation Tool". While I'm digging into that code, I thought I'd write something up about JOSS in general!
Recent happenings
Just grasshopper noise since February, huh? There goes my new year's resolution.
Export YouTube's Watch Later playlist
YouTube is increasingly becoming a walled garden. One of the dark patterns I see in it is that the Watch Later playlist, which you may have gathered over what feels like a millenia (so many lectures, so little time...), cannot be exported - you can only add one video at a time to another playlist. That obviously doesn't scale. Here's a quick trick to solve that!
Self-organized criticality - student project post-mortem
We just got finished with our student team project, which you can find here, and I thought I'd do a little post mortem on it.
It's a neat little project that implements various simulations of self organized criticality on 2D grids. What is self organized criticality, you might ask? Dunno, I can't tell you.
All right, I do know a little. Imagine the ising system I've written about before. In the version without an external magnetic field, it has a single important parameter that we can set - the temperature. If you sweep through the values of temperature, you can find a single point where the behavior of the system changes qualitatively - order wins over disorder at temperatures below roughly 2.72 in reasonable [set everything to 1] units. Near that value - at criticality - you get large scale behavior, huge fluctuations, exponential slowdowns, etc.
Self organized criticality, as I currently understand it, is basically that, except that as you run your simulation, you realize that it displays criticality for a wide range of parameters (here - temperature). To quote Wikipedia (emphasis mine):
the complexity observed emerged in a robust manner that did not depend on finely tuned details of the system: variable parameters in the model could be changed widely without affecting the emergence of critical behavior: hence, self-organized criticality.
Update on the year 2019
2019 has been a weird year.
I don't feel like it's been all too good for my mental health, as I've definitely experienced burnout, mayhaps even depression. Suffice to say, the lows were low. I feel a bit like I procrastinated all there was to procrastinate.
It wasn't all bad, though - I'd say it was right up there in my top 25.
In trying to get some more work-life balance, I did get back to playing StarCraft - I'd cut it out of my life previously, along with all gaming - but I figured I do need some of that competitive drive in my life, and I still think there's a lot it can still teach me. You wouldn't drop chess from your life if you were passionate about it, right? So far, it's been treating me all right.
At the start of December, I started a research software job at the Institute for Plasma Physics and Laser Microfusion here in Warsaw, Poland! This is also where I'll be writing and developing my master's thesis, related to Bayesian inference for plasma diagnostics on Wendelstein 7-x, using Python and more specifically PyMC3. A step forwards for modern, open, reproducible and maintainable science software! At least, I hope so. :)
I was planning on putting some photos, stats etc here, but I haven't found the time to get to do those yet (remember all that procrastination? Yeah, it's coming back to bite me in the predictive posterior), and Matthew Rocklin says I should write shorter blog posts more frequently, anyway, and that sounds like good advice.
Thus, to get this out the door more quickly... onwards to 2020!
Better Numba calculation of inter-particle distance matrices
Recently, I've been looking for efficient ways to compute a distance matrix in Python. I'm deliberately trying to implement a naive n-body simulation so as to find optimized ways of calculating those, as practice. Let's do that using Numba.
Simple Binder usage with Sphinx-Gallery through Jupytext
It's been a busy week for PlasmaPy. I recently found out about Binder support in sphinx-gallery. The latter is a package that we use to turn python scripts with comments into Sphinx pages and Jupyter Notebooks. I figured adding that could be a nice fit for our existing example gallery .
However, I quickly realized that the system in place is a bit unwieldy. Binder takes a link to an existing GitHub repository and executes .ipynb
notebooks located there online. However, with sphinx-gallery, we don't have those notebooks in the repository - we have .py
files with comments. The currently recommended way of setting this up with sphinx-gallery is keeping your built documentation in another repository and hosting it via something along the lines of GitHub Pages rather than ReadTheDocs, which we are currently using.
I added the results of this investigation to sphinx-gallery's docs, but I didn't want to switch away from RTD, so I figured I'd go ahead and find another way. I think I've got something that works well enough now!
Trigger warning: later on during this post, there may be monkeypatching of sphinx_gallery internals. Beware.
Post mortem for my engineering thesis code, PythonPIC
I'm giving a presentation on this less-than-glorious subject on Friday, so I figured, hey, it might be a nice time to write a summary of what that old repository on my GitHub page is. In a single video:
Admittedly, this post is going to be rather personal - this messy little code was basically my life for a few hundreds of hours.