Kwker

Tutorials (archived)

Note

This is the earlier list of lessons, kept for reference. The current Tutorials page groups them by workflow.

Each tutorial builds one thing from start to finish: you start with a small example you can read at a glance, then run the same code on millions of rows and check the answer another way. The steps build on each other, so run them in order in one Python session. The how-to guides are better when you already know which call you need.

  • TutorialRank a leaderboard

    Build a game leaderboard in Python - ranks with ties, a sorted table with a tiebreak, and the top three - then check it on a million players.

  • TutorialTop-k recommendations

    Pick the three best items for every user from a table of scored candidates, skip what they already bought, and scale it to a million candidates.

  • TutorialGroup-by on a table

    Total sales per store in a pandas table with Kwker - revenue, order count and median order per store, the best stores first - then five million rows.

  • TutorialSort a file larger than memory

    Sort a binary file bigger than the memory you give it - keys and then fixed-size records - check the result, and follow progress as it runs.

  • TutorialORDER BY in DuckDB

    Use Kwker for ORDER BY, ORDER BY ... LIMIT and GROUP BY on a DuckDB table, get DuckDB relations back, and check the results against DuckDB's SQL.

  • TutorialSpeed up a PyTorch model

    Speed up a PyTorch model on the CPU in three steps - drop-in kernels, the torch.compile backend, then a timing on your own machine - checking results at each step.