HN user

radus

846 karma
Posts62
Comments242
View on HN
github.com 8mo ago

Yet another redundant workflow engine

radus
2pts0
www.nature.com 9mo ago

The FAIR Guiding Principles for scientific data management and stewardship

radus
1pts0
posit-dev.github.io 1y ago

Great Tables: The Polars DataFrame Styler of Your Dreams

radus
9pts0
emma.has-a.blog 1y ago

Why, in 2025, do we still need a 3rd party app to write a REST API with Django?

radus
2pts0
tonybaloney.github.io 1y ago

Using the Python Match Statement

radus
3pts0
lerner.co.il 2y ago

In PostgreSQL, as in life, don't wait too long to commit

radus
1pts0
medium.com 2y ago

New Dockerfile Capabilities in v1.7.0

radus
1pts0
mise.jdx.dev 2y ago

Mise-en-place: The front-end to your dev env

radus
2pts0
github.com 2y ago

Funcy: Fancy and practical functional tools [Python]

radus
1pts0
arstechnica.com 2y ago

The first foldable PC era is unfolding

radus
1pts0
insitro.github.io 2y ago

Redun: Yet another redundant workflow engine

radus
3pts0
en.wikibooks.org 2y ago

Unicode/List of Useful Symbols

radus
1pts0
histoire.dev 2y ago

Histoire: A new way to write stories, powered by Vite

radus
52pts48
www.science.org 3y ago

Speaking of Illusions: Sirtuins and Longevity

radus
17pts2
certification.vuejs.org 3y ago

Vue.js – Official Certification Program

radus
4pts1
www.crunchydata.com 3y ago

Postgres Query Optimization: Left Join vs. Union All

radus
21pts1
github.com 3y ago

Postgresqltuner: Analyse Your PostgreSQL Database

radus
2pts0
github.com 3y ago

Redframes: General Purpose Data Manipulation Library

radus
2pts0
github.com 3y ago

IVM (Incremental View Maintenance) Implementation as a PostgreSQL Extension

radus
2pts0
frostming.com 4y ago

What's New in PDM 2.0?

radus
4pts1
www.phoronix.com 4y ago

Python 3.11 Performance Benchmarks Are Looking Fantastic

radus
3pts2
python-patterns.guide 4y ago

The Composition over Inheritance Principle (2020)

radus
130pts102
medium.com 4y ago

My JavaScript Is Faster Than Your Rust

radus
2pts0
dockerswarm.rocks 4y ago

Docker Swarm Rocks

radus
4pts3
www.xmodulo.com 4y ago

How to speed up slow apt-get install on Debian or Ubuntu

radus
1pts0
github.com 4y ago

Tbump: Bump Software Releases

radus
1pts0
github.com 4y ago

JSONForms: Customizable JSON Schema-based forms

radus
35pts5
tomaugspurger.github.io 4y ago

Modern Pandas (Part 2): Method Chaining

radus
107pts69
pypyr.io 4y ago

Task-runner for automation pipelines defined in YAML – pypyr

radus
2pts0
tus.io 4y ago

Tus – Open Protocol for Resumable File Uploads

radus
5pts0

I'm working on adding features to the snakemake aws batch executor plugin. The existing plugin supports execution on AWS Batch by dynamically creating job definitions based on rule resource configuration, but was missing support for features like using different containers for different rules, consumable resources, secrets, etc. Two approaches:

1) https://github.com/radusuciu/snakemake-executor-plugin-aws-b... (my fork). Just add the features to the batch job building code 2) https://github.com/radusuciu/snakemake-executor-plugin-aws-b.... This is more experimental and not yet fully working. I wanted to try a few things. a) can we rely on existing job definitions (managed through IaC instead). b) can we implement a fire-and-forget model where the main snakemake process runs on Batch as well? c) Can we slim down the snakemake container by stripping off unnecessary features.

Polars has a much more consistent API, give it a shot.

Regarding your plotting question: use seaborn when you can, but you’ll still need to know matplotlib.

docker swarm is also a decent solution if you do need to distribute some workloads, while still using a docker compose file with a few extra tweaks. I use this to distribute compute intensive jobs across a few servers and it pretty much just works at this scale. The sharp edges I've come across are related to differences between the compose file versions supported by compose and swarm. Swarm continues to use Compose file version 3 which was used by Compose V1 [1].

1: https://docs.docker.com/engine/swarm/stack-deploy/

My approach for this is to use multi-stage dockerfiles. Build tools live and operate in a build stage, and you copy the /venv into your runtime stage. I think this same approach should work with uv so long as it doesn't bundle itself into the venv.

Polars 3 years ago

That's awesome, thanks for sharing! Though tbh I'm not likely to use it.. it's a bit too magical - though still a delicious hack.

Polars 3 years ago

I'm not including parsing time, both pandas and polars versions started from an in-memory data structure parsed from two XML files (low GB range). This is on my workstation with a single Xeon 4210 (10 cores, 20 threads @ 2.20-3.20Ghz).

Perhaps I can focus on a subset of this processing and write this up since it seems like there's at least some interest in real examples. As pointed out in a reply to a sibling comment, I don't guarantee that my starting code is the best that pandas can do -- to be honest, the runtime of the original code did not line up with my intuition of how long these operations should take. Maybe someone will school me but either way switching to polars was a relatively easy win that came with other benefits and feels right to me in a way that pandas never did.

Polars 3 years ago

To add some balance:

- I can't rule out that a pandas wizard couldn't have achieved the same speed-up in pandas

- polars code was slightly more verbose. For example, when calculating columns based on other columns in the same chain, in pandas, each new column can be defined as a kwarg in a single call to `assign`, whereas in polars, columns that depend on other must be defined in their own calls to `with_columns`

- handling of categoricals in polars seemed a little underbaked, though my main complaint, that categories cannot be pre-defined, seems to have been recently addressed: https://github.com/pola-rs/polars/issues/10705

- polars is not yet 1.0, breaking changes will happen

Polars 3 years ago

It allowed me to take some code that reads in a bunch of data and performs a few rounds of some pretty standard operations (groupby, filtering, calculating mean/stdevs) and going from pandas to polars allowed me to go from ~1 minute per dataset to 1 second (yes, I tried the Arrow backend for pandas too). This was after spending some time profiling the pandas code and fixing up the slowest parts as best as I could. The translation was pretty straightforward. The output of this pipeline code was a few different dataframes (each to be inserted into a separate table) and each dataframe was output from a function. I was able to migrate one function at a time after asserting that the outputs of the two functions were identical and that all relevant tests passed (I used `to_pandas()` where needed).

I'm not sure how much faster I could go, since ~1 second/dataset allowed me to answer some questions that I had that required scanning values for a few parameters. The biggest wins for me were in grouping and merging operations.

I'm a complete convert now. The API is simpler and more obvious IMO, and the ability to compose expressions (`polars.Expr`) is awesome. The performance benefits are nice and what motivated me in the first place, but I'm more swayed by the aforementioned benefits.

Ruby 3.3 3 years ago

Many plots contain thousands of data points. Eg: 10 x 100 heatmap which supports sorting by various metadata. This is a common visualization for biological data where your data matrix is samples x proteins, so potentially much larger than 1000 data points.

For most items you don’t need to do anything beyond a scrub and rinse. Others have pointed out that glassware is expensive and sometimes unique. Additionally, if you don’t need much product (eg. you’re screening reaction conditions), you can work with small disposable vials or even plates.

Django 5.0 3 years ago

It's easier to re-use if you need the same generated field in multiple places.