Creating and Distributing Python Packages

In 2022, I gave a talk on creating and distributing Python packages. I used Cookiecutter to show how a template could turn an empty directory into a package with a predictable structure. The goal was to make packaging less mysterious. A new Python package needs more than a folder of source code. It also needs metadata, tests, documentation, a licence, and enough structure that someone else can install it and contribute to it. Cookiecutter gave us a concrete example to inspect instead of building every file by hand. ...

2022-09-21 · 2 min · Tyler Collins

ViewClust: Early Days

In the early days of working for SHARCNET, my colleague and I decided to standardize how cluster metrics were computed across our internal data frames. As mentioned in a previous post, part of the solution was pandas. The second part was figuring out how to deploy the package for others to contribute to, as well as install on their own specific HPC clusters. Some quick searching revealed that PyPI and pip were the way to go. ...

2022-03-22 · 1 min · Tyler Collins

Conquering the Scheduler

Coming from a slightly different angle this time, I found that researchers were often isolating themselves to fewer resources on HPC systems by not investigating what the node feature mixture looked like. As such, this talk was created to help direct potentially abstract development efforts toward optimizing for the feature sets that are most available on an HPC cluster. Below is my abstract for the talk as well as the recording: ...

2022-03-22 · 1 min · Tyler Collins

Pandas Recipes for New Python Users

Eventually I got to the point in data analytics where keeping things in lists, or lists of lists, was no longer quite cutting it. My processing was slowly starting to grind to a halt, and things were getting way too abstract. I decided to call up a friend who had worked in the business longer than me, and they suggested “pandas.” I was vaguely familiar with it because users and clients had used it in the past. A “DataFrame” did sound like it would take care of a lot of my problems after reading the documentation casually… ...

2022-03-21 · 2 min · Tyler Collins

Cython: A First Look

Back when I first got hired at SHARCNET, I used a lot of Python. I mean a lot. This meant I quickly became the lightning rod for all Python-related questions and commentary. During a fun Friday chat, a colleague remarked that Python was, on average, 40x slower than C++. I defended my current language of choice, saying it was better than that, surely. To make a long story short, I was wrong. It really is about 40x slower depending on the problem. Determined to prove myself capable, and my language of choice a bit more defensible, I decided to look into ways to make Python faster. ...

2022-03-20 · 2 min · Tyler Collins