Writing unit tests for the async message queue server

Marton Trencseni - Sat 15 June 2024 • Tagged with python, async, message, queue, unit, test

I write a small library of unit tests for the message queue servers.

.

Continue reading

Writing a simple Python async message queue server - Part III

Marton Trencseni - Wed 22 May 2024 • Tagged with python, async, message, queue

In this final post on the toy Python async message queue server implementation, I make further feature and code improvements.

.

Continue reading

Can ChatGPT write the Python async message queue codes from the previous posts?

Marton Trencseni - Sun 05 March 2023 • Tagged with python, async, message, queue, chatgpt

I try to get ChatGPT to write the codes in the previous posts. It's able to write the basic message queue skeleton, but cannot implement more complicated features such as delivery semantics with caching.

.

Continue reading

Writing a simple Python async message queue server - Part II

Marton Trencseni - Thu 02 March 2023 • Tagged with python, async, message, queue

I write a somewhat more complicated, but still relatively simple async message queue server in Python.

.

Continue reading

Writing a simple Python async message queue server - Part I

Marton Trencseni - Mon 27 February 2023 • Tagged with python, async, message, queue

I write a simple, bi-directional async message queue server in Python.

.

Continue reading

Useful Python decorators for Data Scientists

Marton Trencseni - Sun 22 May 2022 • Tagged with python, decorators

I show toy implementations of Python decorator patterns that may be useful for Data Scientists.

Python decorators

Continue reading

Building a toy Python @dataclass decorator

Marton Trencseni - Thu 12 May 2022 • Tagged with python, dataclass, decorator

I write a toy implementation of Python's @dataclass decorator to improve my Python fu and learn more about decorators and metaprogramming.

Python enum

Continue reading

Python decorator patterns

Marton Trencseni - Sun 08 May 2022 • Tagged with python, decorators

I show toy implementations of Python decorator patterns such as @measure, @repeat, @trace, @count, @singleton, and @app.route (made famous by Flask).

Python enum

Continue reading

Building a toy Python Enum class - Part II

Marton Trencseni - Thu 05 May 2022 • Tagged with python, enum

I extend my previous toy implementation of Python's Enum class to add more features.

Python enum

Continue reading

Building a toy Python Enum class - Part I

Marton Trencseni - Tue 03 May 2022 • Tagged with python, enum

I write a toy implementation of Python's Enum class to learn about Python metaclasses.

Python enum

Continue reading

Python types for Data Scientists - Part III

Marton Trencseni - Fri 22 April 2022 • Tagged with python, types

I show slightly more advanced aspects of type checking in Python for Data Scientists.

Mypy

Continue reading

Python types for Data Scientists - Part II

Marton Trencseni - Sun 17 April 2022 • Tagged with python, types

I show slightly more advanced uses of type checking in Python.

Python snake

Continue reading

Python types for Data Scientists - Part I

Marton Trencseni - Fri 08 April 2022 • Tagged with python, types

I show how to use basic type hints and get type checking working in ipython notebooks.

Python types for Data Scientists

Continue reading

rxe: literate and composable regular expressions

Marton Trencseni - Sat 02 March 2019 • Tagged with python

rxe is a thin wrapper around Python's re module. The various rxe functions are wrappers around corresponding re patterns. For example, rxe.digit().one_or_more('a').whitespace() corresponds to \da+\s. Because rxe uses parentheses but wants to avoid unnamed groups, the internal (equivalent) representation is actually \d(?:a)+\s. This pattern can always be retrieved with get_pattern().

rxe example code

Continue reading