Write a decorator rate_limit(max_calls, period) that limits the number of function calls with a sliding window over time: no more than max_calls calls in the last period seconds. If the limit is exceeded, the call should not be executed. Consider that the function can be called from multiple threads. Example: @rate_limit(max_calls=5, period=60) the sixth call within a minute should be rejected.
Python
What is the feature of abstract classes and abstract methods, and why are they needed?
Describe the delivery pipeline for changes during urgent production bug fixes.
Tell us what you did at your previous jobs. Let's start with the company [company].
What is duck typing?
How does `with` and the context manager work?
What does the YAGNI principle mean?
What libraries have you used for interacting with RabbitMQ and Kafka?
How do indexes interact with WHERE ... LIKE conditions in SQL?
At which OSI layer do TCP and UDP operate, and what is the difference between them?
Are you familiar with regular expressions?
How to exchange data between processes?
Name all SOLID principles.
How to make an object class attribute immutable in Python? Suggest at least one way.
What are abstract classes used for?
Provide an example of polymorphism in Python's built-in or standard libraries.
What is the complexity of adding and removing elements in a Python list and what does it depend on?
Why might a server respond to ping but be unavailable over TCP/UDP, for example, via HTTP or FTP?
In which case is the principle of open-closed violated?
What happens in Python when a string is modified?