How exactly is the value obtained in the sixth line when calling res(2)?
Python
What is WAL (Write-Ahead Log) in PostgreSQL and what is it used for?
What are nested transactions in PostgreSQL and why are they needed?
Design an indexing system for a table that stores all cities in Russia, considering that searches will be based on city names.
What do you think about the readability of an alternative solution to late binding problems via nested lambda factories?
The description is provided by a business analyst who wrote the task "as they could" and can give business requirements descriptions. There is a terrible legacy PHP code that receives log files from S3 parses them, writes the result to the necessary location. Known: files arrive once an hour, currently 5 files all files are in one bucket Data should be directed to different places depending on the format – postgres/local file It is necessary to write an ETL that implements this functionality. Specific implementation of methods (reading data/sending data, etc.) can be neglected.
If a function can legitimately return NaN (which is normal behavior), and your current cache implementation will throw an error in this case or always recalculate — how would you fix this?
Tell me about indexes in PostgreSQL: why are they needed, what types are there, when to use them.
# What will this code print def calc(): return [lambda x: i * x for i in range(4)] for res in calc(): print(res(2))
The description is provided by a business analyst who wrote the task "as they could" and can give business requirements descriptions. There is a terrible legacy PHP code that receives log files from S3 parses them, writes the result to the required location. It is known: files arrive once an hour, currently 5 files all files are in one bucket Data should be directed to different places depending on the format – postgres/local file It is necessary to write an ETL that implements this functionality. Writing specific implementations of methods (reading data/sending data, etc.) can be neglected.
Which is faster for exact matching — B-tree or Hash index in PostgreSQL?
Without changing the main code, only change the list comprehension to keep the lambda, so that each lambda captures its own value of i — how to do this?
def cache(): """ Add decorator code here """ pass
Why is a value of 3 used in all calls (value i=3)?