What is TDD and what is the meaning of this approach?
Python
What version of Python have you worked with in your last company?
Using any task as an example, tell how you identified bottlenecks in PostgreSQL queries: what tools you used and how you found the problem.
How does a generator differ from a regular function?
How is an abstract syntax tree (AST) used in Python?
What types of testing do you know?
In which areas of Python development do you consider yourself to be the strongest specialist?
There is a module that accepted a task and is dependent. What will you do?
Name the basic principles of OOP.
Is it possible to access an attribute or method of a class starting with two underscores? What are the features?
"""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"""}]}]}
When and why do you choose multiprocessing processes?
What types of queues as data structures do you know?
Tell about an interesting incident or a difficult situation at work.
What is the difference between a shallow copy and a deep copy (`copy` and `deepcopy`)?
What profiling tools in Python do you know?
What good things did you do at [company]? Tell us about interesting projects.
What can cause memory leaks if there is a garbage collector?
What types of replication does PostgreSQL support?
How to deal with table bloat in PostgreSQL?