Sobes.tech

How exactly is the value obtained in the sixth line when calling res(2)?

182

What is WAL (Write-Ahead Log) in PostgreSQL and what is it used for?

154

What are nested transactions in PostgreSQL and why are they needed?

149

Design an indexing system for a table that stores all cities in Russia, considering that searches will be based on city names.

140

What do you think about the readability of an alternative solution to late binding problems via nested lambda factories?

138

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.

138

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?

132

Tell me about indexes in PostgreSQL: why are they needed, what types are there, when to use them.

129

# What will this code print def calc(): return [lambda x: i * x for i in range(4)] for res in calc(): print(res(2))

127

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.

124

Which is faster for exact matching — B-tree or Hash index in PostgreSQL?

118

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?

116

def cache(): """ Add decorator code here """ pass

111

Why is a value of 3 used in all calls (value i=3)?

106