# So, the requirements "what and how this code should do" should be accepted as it actually works now.
# So, the requirements "what and how this code should do" should be accepted as it actually works now.
db = Model()
def process(data):
print("file size: " + str(len(data)))
users_lines = open("/opt/data/users.txt").read().splitlines()
resultat = []
for stroka in users_lines:
trasictions_lines = open("/opt/data/transactions.txt").read().splitlines()
process(trasictions_lines)
for str2 in trasictions_lines:
parts = str2.split()
is_valid = db.check_transaction(
user_id=parts[3],
change=parts[4],
)
if not re.search("\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\s+\d+\s+\w+\s+\d+.\d+", str2):
continue
user_id = stroka.split()[0]
regdate = db.get_regdate(user_id)
if re.search("\d{4}-\d{2}-\d{2}", regdate) and re.search("\d+.\d+", parts[4]):
resultat.append(str2)
if len(resultat) > 0:
print("match")