Python
What components and elements should be included in a framework?
What stack was used in the project?
Which frameworks do you dislike and why?
Have you had experience using abstract classes in your projects?
How is asynchronous interaction between components of microservice architecture implemented?
What is the optimal team size, in your opinion?
Explain the concept of GIL in Python and its impact on multithreading.
What is the difference between an array and a linked list? What data structure is used under the hood in a Python list?
What is the role of finite automata in implementing bots on aiogram?
Write a function that takes a string and returns the first unique character (the character that appears exactly once).
What components are included in the URL structure?
Which authentication approach is faster: using JWT or STS?
What programming languages have you written in?
How did you participate in the pre-sales stages of projects and what is your experience in this area?
What is the role of the type() function in Python and how does it work in different scenarios?
What is the difference between Kafka and RabbitMQ?
In Kafka, there is a topic with 10 partitions. We added another consumer replica, but the performance did not increase. Why is that and what should we do?
What is the difference between programming languages that require compilation and those that are interpreted at runtime?
"""Write code that extracts links from raw text and sorts them according to certain rules. The list of links returned should not contain duplicates. Sorting rules are as follows: - Priority 1: The first detected links, up to self.first_extracted_links - Priority 2: Links to cloud drives and documents (Yandex Disk, etc.) - Priority 3: Links to files (ending with extensions like .exe, .pdf, .rar, etc.) - Priority 4: Remaining links sorted from longer to shorter strings Also, consider the limit on the number of links and implement a context manager. Can be run, for example, at [link] Total: - 30 minutes are given for execution - Write functions apply, process, and functions for the context manager - All tests must pass - Tests cannot be modified - You can use imports - After writing, you can check by running locally, and fix if something is wrong on this page Regex for link detection: (?:https?|ftp):\/\/(?:[a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.[a-zA-Z]{2,}(?::\d+)?(?:\/[^\s()]*)? """ class LinkExtractor: DEFAULT_CLOUDS = frozenset(( "drive.google.com", "mediafire.com", "yadi.sk", "disk.yandex.ru", "cloud.mail.ru", "mega.nz" )) # You can extend this method or rewrite it def __init__(self, max_links: int = 7, first_extracted_links: int = 2, clouds = None): # Maximum number of links to return in the array self.max_links = max_links # Number of links extracted for the first condition self.first_extracted_links = first_extracted_links # List of domains considered as clouds for the second condition self.clouds = clouds or self.DEFAULT_CLOUDS self._results = [] # Write this method, adds a part of text to analyze later def apply(self, text) -> "LinkExtractor": ... return self"""}]}]}
How did you onboard two new developers?