with requests.Session() as session:
cookies = dict(uid=uid, usess=usess)
auth = dict(username=login, password=password) # Данные в виде словаря, которые отправлятся в POST
r = session.get(url, timeout=5) # Получаем страницу с формой логина
r.encoding = 'utf-8'
session.post(url, auth) # Отправляем данные в POST, в session записываются наши куки
r = session.get(link, cookies=cookies, timeout=5)
open('some_file_name', 'wb').write(r.content)
CREATE TABLE IF NOT EXISTS games
(game TEXT NOT NULL, play_date TEXT NOT NULL, play_time TEXT NOT NULL,
team_a TEXT NOT NULL, team_b TEXT NOT NULL, cup TEXT,
PRIMARY KEY (game , play_date , play_time ));
SELECT *
FROM taxi_anketa
WHERE
id IN
(SELECT id FROM taxi_anketa GROUP BY
id HAVING COUNT(id) > 1)
AND
korob_result IS NOT NULL;
-o --output=STRING Change journal output mode (short, short-precise,
short-iso, short-iso-precise, short-full,
short-monotonic, short-unix, verbose, export,
json, json-pretty, json-sse, cat)
journalctl --output=short-iso
2018-01-28T18:58:20+0300 ubuntu kernel: BIOS-e820: [mem 0x00000000bfd15000-0x00000000bfd5ffff] ACPI NVS
2018-01-28T18:58:20+0300 ubuntu kernel: BIOS-e820: [mem 0x00000000bfd60000-0x00000000bfd68fff] ACPI data
2018-01-28T18:58:20+0300 ubuntu kernel: BIOS-e820: [mem 0x00000000bfd69000-0x00000000bfd6bfff] ACPI NVS
user_id = 123
get_id_from_db = 6
user_data = {user_id: {'city':'', 'fio':'', 'phone':'', 'inn':'', 'address':'', 'napravlenie':'', 'id': get_id_from_db}}
print(user_data)
user_data[user_id]['city'] = 'Павлодар'
print(user_data)
user_data[user_id]['fio'] = 'Иванов а м'
print(user_data)
user_data[user_id]['phone'] = '77777777'
print(user_data)
user_data[user_id]['inn'] = '4679085467'
print(user_data)
user_data[user_id]['address'] = 'Петрова 65 кв 98'
print(user_data)
user_data[user_id]['napravlenie'] = 'сайт-визитка'
print(user_data)