Sobes.tech

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.

121

What is the feature of abstract classes and abstract methods, and why are they needed?

121

Describe the delivery pipeline for changes during urgent production bug fixes.

121

Tell us what you did at your previous jobs. Let's start with the company [company].

120

How does `with` and the context manager work?

120

What libraries have you used for interacting with RabbitMQ and Kafka?

119

How do indexes interact with WHERE ... LIKE conditions in SQL?

118

At which OSI layer do TCP and UDP operate, and what is the difference between them?

117

Are you familiar with regular expressions?

115

How to make an object class attribute immutable in Python? Suggest at least one way.

114

Provide an example of polymorphism in Python's built-in or standard libraries.

113

What is the complexity of adding and removing elements in a Python list and what does it depend on?

113

Why might a server respond to ping but be unavailable over TCP/UDP, for example, via HTTP or FTP?

112

In which case is the principle of open-closed violated?

112

What happens in Python when a string is modified?

112
/4