{"id":302342,"date":"2020-04-22T21:00:23","date_gmt":"2020-04-22T21:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=302342"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-04-22T21:00:23","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=302342","title":{"rendered":"Telegram \u0431\u043e\u0442 \u043d\u0430 python \u043f\u0440\u043e\u0442\u0438\u0432 COVID-19"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/496516\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wg\/nr\/0o\/wgnr0o3blvggk6xlfoynxss68hu.jpeg\">  <\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043e\u0431\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043d\u0438\u043a\u0438 \u0438 \u0434\u0435\u0437\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043b\u044c\u0435\u0442\u0441\u044f \u043a \u043d\u0430\u043c \u0438\u0437 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0435\u0445 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u044b, \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b, \u0440\u0430\u0434\u0438\u043e, \u0442\u0435\u043b\u0435\u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c \u043a\u043e\u0440\u043e\u043d\u0430\u0432\u0438\u0440\u0443\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u043e\u0442\u0430 \u043d\u0430 <a href=\"https:\/\/www.python.org\" rel=\"nofollow\">python<\/a> \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0438\u043d\u0433\u0440\u0435\u0434\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f <a href=\"https:\/\/telegram.org\" rel=\"nofollow\">Telegram<\/a> (<s>\u0448\u0443\u0442\u043a\u0430<\/s>)!<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u043a\u0446\u0438\u043d\u0430-\u0431\u043e\u0442\u0430 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u044d\u0432\u043c, python, <a href=\"https:\/\/www.docker.com\" rel=\"nofollow\">docker<\/a>, <a href=\"https:\/\/devcenter.heroku.com\/articles\/heroku-cli\" rel=\"nofollow\">heroku CLI<\/a>, telegram \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u043a\u0430\u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0438 <a href=\"https:\/\/www.mongodb.com\" rel=\"nofollow\">mongoDB<\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u0441\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043d\u0435\u0431\u0440\u0435\u0447\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430, \u0432 \u043a\u043e\u043d\u0446\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u0434\u043e\u0437\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f.<\/p>\n<p>  <\/p>\n<h3>\u0427\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0431\u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u043c\u0435\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%BE%D1%80%D0%BE%D0%BD%D0%B0%D0%B2%D0%B8%D1%80%D1%83%D1%81%D0%BD%D0%B0%D1%8F_%D0%B8%D0%BD%D1%84%D0%B5%D0%BA%D1%86%D0%B8%D1%8F_COVID-19\" rel=\"nofollow\">COVID-19<\/a> \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0434\u0430\u0442\u0443 \u043f\u043e \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0435<\/li>\n<li>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f COVID-19 \u043f\u043e \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438<\/li>\n<li>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441\u0442\u0440\u0430\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438<\/li>\n<li>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/li>\n<li>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u0445<\/li>\n<li>\u0421\u043f\u0440\u0430\u0432\u043a\u0443, \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u0442\u043e\u043c<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0427\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441 \u044d\u0442\u043e\u0433\u043e \u0438\u043c\u0435\u0442\u044c<\/h3>\n<p>  <\/p>\n<p>\u0427\u0435\u043c\u0443 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u043a\u0446\u0438\u043d\u0430-\u0431\u043e\u0442\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li> \u0420\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 mongodb(\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435)<\/li>\n<li> \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"https:\/\/github.com\/eternnoir\/pyTelegramBotAPI\" rel=\"nofollow\">PyTelegramBotAPI<\/a><\/li>\n<li> \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/API\" rel=\"nofollow\">API<\/a><\/li>\n<li> \u0423\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440<\/li>\n<li> \u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u043e\u0442\u0430 \u043d\u0430 <a href=\"https:\/\/www.heroku.com\" rel=\"nofollow\">PAAS \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Heroku<\/a><\/li>\n<li> <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9D%D0%B5%D0%BF%D1%80%D0%B5%D1%80%D1%8B%D0%B2%D0%BD%D0%B0%D1%8F_%D0%B8%D0%BD%D1%82%D0%B5%D0%B3%D1%80%D0%B0%D1%86%D0%B8%D1%8F\" rel=\"nofollow\">CI<\/a> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\" rel=\"nofollow\">Github<\/a> \u0438 Heroku<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0431\u043e\u0442\u0430 \u0432 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0435 Telegram<\/h3>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0432 Telegram \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 \u043e\u043f\u0438\u0448\u0443 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041d\u0430\u0439\u0442\u0438 \u0431\u043e\u0442\u0430 \u0432 Telegram \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u201c<a href=\"https:\/\/telegram.me\/BotFather\" rel=\"nofollow\">BotFather<\/a>\u201d<\/li>\n<li>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \/start<\/li>\n<li>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \/newbot<\/li>\n<li>\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0438\u043a \u0431\u043e\u0442\u0430 \u0438 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 Telegram<\/li>\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c token \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u043e\u0442 \u0432\u0435\u0440\u043d\u0443\u043b \u043d\u0430\u043c \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043c\u0430\u0448\u0438\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0431\u043e\u0442\u0430 \u0434\u043b\u044f Telegram \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/www.python.org\/downloads\/\" rel=\"nofollow\">Python<\/a><\/li>\n<li>\u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/devcenter.heroku.com\/articles\/heroku-cli\" rel=\"nofollow\">Heroku CLI<\/a><\/li>\n<li>\u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/git-scm.com\/downloads\" rel=\"nofollow\">git CLI<\/a><\/li>\n<li>\u0421\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 <a href=\"https:\/\/www.docker.com\/products\/docker-desktop\" rel=\"nofollow\">Docker<\/a><\/li>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/www.mongodb.com\/download-center\" rel=\"nofollow\">MongoDb<\/a><\/li>\n<li>IDE \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u041f\u041e \u043d\u0430 Python, \u044f \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c <a href=\"https:\/\/www.jetbrains.com\/pycharm\/\" rel=\"nofollow\">Pycharm \u043e\u0442 JetBrains<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0432\u0430\u043c\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439, \u0446\u0435\u043b\u0435\u0439 \u0438 \u043e\u043f\u044b\u0442\u0430. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 github \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0438 \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a \u0441\u0435\u0431\u0435 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0443, \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 CI \u0432 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0435.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0448 \u0432\u0430\u043a\u0446\u0438\u043d\u0430-\u0431\u043e\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">tree -L 2 \u251c\u2500\u2500 Dockerfile \u251c\u2500\u2500 .gitignore \u251c\u2500\u2500 README.md \u251c\u2500\u2500 common \u2502   \u251c\u2500\u2500 containers.py \u2502   \u2514\u2500\u2500 tg_analytics.py \u251c\u2500\u2500 data \u2502   \u2514\u2500\u2500 mongo_context.py \u251c\u2500\u2500 data.csv \u251c\u2500\u2500 heroku.yml \u251c\u2500\u2500 setup.py \u251c\u2500\u2500 requirements.txt \u251c\u2500\u2500 services \u2502   \u251c\u2500\u2500 country_service.py \u2502   \u2514\u2500\u2500 statistics_service.py \u2514\u2500\u2500 templates     \u251c\u2500\u2500 contacts.html     \u251c\u2500\u2500 country_statistics.html     \u251c\u2500\u2500 himydear.html     \u251c\u2500\u2500 idunnocommand.html     \u251c\u2500\u2500 notfound.html     \u2514\u2500\u2500 query_statistics.html <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/h2>\n<p>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c<a href=\"https:\/\/docs.python.org\/3\/tutorial\/venv.html\" rel=\"nofollow\"> \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/a> \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0439\u0442\u0438 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">python -m venv env # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f sourse env\/bin\/activate # \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f  <\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439(\u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439) \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0442\u043e \u043e\u043d\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0430\u043c\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0434\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">deactivate # \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.python.org\/3\/tutorial\/venv.html\" rel=\"nofollow\">\u0442\u0443\u0442<\/a>, \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">touch requirements.txt # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 touch setup.py # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 python \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437:<\/p>\n<p>  <\/p>\n<ul>\n<li>Requests \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/li>\n<li>Pytelegrambotapi \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Telegram API<\/li>\n<li>Pymongo \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 Mongo<\/li>\n<li>Dependency_injector \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/li>\n<li>Geocoder \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Geonames API<\/li>\n<li>Jinja2 \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438<\/li>\n<li>Ciso8601 \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 ISO 8601<\/li>\n<li>Cachetools \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<li>Pandas \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>Flask \u2014 \u043c\u0438\u043a\u0440\u043e web framework \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 python<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">requests==2.23.0 pytelegrambotapi==3.6.7 pymongo==3.10.1 dependency_injector==3.15.6 geocoder==1.38.1 jinja2==2.11.1 ciso8601==2.1.3 cachetools==4.0.0 pandas==1.0.3 flask==1.1.2 <\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430\u0448 \u0431\u043e\u0442, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043b\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 API, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043f\u0440\u0438\u043a\u0430\u0437\u044b ;).<\/p>\n<p>  <\/p>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430<\/h2>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 requirements.txt \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043b\u0438 \u0432\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pip install -r requirements.txt #\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 setup.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \/setup.py file #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*- # dependencies import telebot import os  from telebot import types  # bot initialization token = os.getenv('API_BOT_TOKEN') bot = telebot.TeleBot(token)   # start command handler @bot.message_handler(commands=['start']) def command_start_handler(message):     cid = message.chat.id     bot.send_chat_action(cid, 'typing')     markup = types.ReplyKeyboardMarkup(row_width=1, resize_keyboard=True)     button_geo = types.KeyboardButton(text='send location', request_location=True)     markup.add(button_geo)     bot.send_message(cid, 'Hello stranger, please choose commands from the menu', reply_markup=markup)   # application entry point if __name__ == '__main__':     bot.polling(none_stop=True, interval=0) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u043e\u0442\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0430\u0434\u0438\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Environment_variable\" rel=\"nofollow\">\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/a> API_BOT_TOKEN, \u0447\u0435\u0440\u0435\u0437 pycharm IDE \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <a href=\"https:\/\/www.jetbrains.com\/help\/objc\/add-environment-variables-and-program-arguments.html\" rel=\"nofollow\">\u0432\u043e\u0442 \u0442\u0430\u043a<\/a>. \u0412 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443 \u0435\u0441\u0442\u044c \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0435 \u043c\u0435\u043d\u044e \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u201cEdit configurations\u201d, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u044d\u0442\u043e \u043c\u0435\u043d\u044e, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0435\u0440\u0435\u043c \u0438\u0437 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430 \u043a\u0443\u0434\u0430 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 token \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-m\/93\/sx\/-m93sxsfvn1jd5eeed3bdblnxks.png\">  <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u0438\u0437\u0430\u0440\u0434 \u0433\u0434\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pp\/sa\/-_\/ppsa-_vqfrssclhss_6ogi1h04s.png\">  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Telegram \u0434\u043b\u044f \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5m\/71\/bt\/5m71btma5e_mmnah6nkl4cuybp0.png\">  <\/p>\n<p>\u0421\u0443\u043f\u0435\u0440, \u0431\u043e\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c \u0438 \u0440\u0438\u0441\u0443\u0435\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u201csend location\u201d, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u00abcontacts\u00bb, \u00abhelp\u00bb \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u0430\u043a\u0446\u0438\u043d\u0430-\u0431\u043e\u0442\u0443.<\/p>\n<p>  <\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u0447\u0442\u043e \u0431\u043e\u0442 \u0443\u043c\u0435\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u043e\u0439 <a href=\"https:\/\/en.wikipedia.org\/wiki\/HTML\" rel=\"nofollow\">HTML<\/a> \u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Markdown\" rel=\"nofollow\">Markdown<\/a>, <a href=\"https:\/\/en.wikipedia.org\/wiki\/HTML_element\" rel=\"nofollow\">\u0442\u044d\u0433\u0438<\/a> \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Telegram \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f HTML \u0434\u043b\u044f \u044d\u0441\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 setup.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \/setup.py file #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*-  known_users = [] user_steps = {} commands = {     'start': 'Start using this bot',     'help': 'Useful information about this bot',     'contacts': 'Contacts' }  # decorator for bot actions def send_action(action):     &quot;&quot;&quot;Sends `action` while processing func command.&quot;&quot;&quot;      def decorator(func):         @wraps(func)         def command_func(message, *args, **kwargs):             bot.send_chat_action(chat_id=message.chat.id, action=action)             return func(message, *args, **kwargs)         return command_func     return decorator   # help command handler @bot.message_handler(commands=['help']) @send_action('typing') def command_help_handler(message):     help_text = 'The following commands are available: \\n'     for key in commands:         help_text += '\/' + key + ': '         help_text += commands[key] + '\\n'     help_text += 'ANTICOVID19BOT speaks english, be careful and take care!'     bot.send_message(message.chat.id, help_text)   # contacts command handler @bot.message_handler(commands=['contacts']) @send_action('typing') def command_contacts_handler(message):     with codecs.open('templates\/contacts.html') as file:         template = Template(file.read())         bot.send_message(message.chat.id, template.render(username=message.chat.username), parse_mode='HTML') <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0430\u043d\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 mongo_context.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \/data\/mongo_context.py #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*- # dependencies import os  from datetime import datetime from pymongo import MongoClient   class MongoDbContext:     &quot;&quot;&quot;Mongo database context class&quot;&quot;&quot;      # constructor of class     def __init__(self):         try:             self.connection_string = os.getenv('CONNECTION_STRING')             self.client = MongoClient(self.connection_string)         except Exception as e:             raise e      # save user query method     def save_query(self, country, user_name):         db = self.client[os.getenv('DB_NAME')]         countries_stats = db.country_stats         result = countries_stats.insert_one({'date': datetime.now(), 'country': country, 'username': user_name})      # get users queries method     def get_users_queries(self):         db = self.client[os.getenv('DB_NAME')]         countries_stats = db.country_stats         queries = countries_stats.aggregate([             {'$group': {'_id': '$country', 'count': {'$sum': 1}}},             {'$sort': {'count': -1}},             {'$limit': 5}         ])         users = countries_stats.aggregate([             {'$group': {'_id': '$username', 'count': {'$sum': 1}}},             {'$sort': {'count': -1}},             {'$limit': 5}         ])         return {'queries': list(queries), 'users': list(users)}  <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 containers.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \/common\/containers.py #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*- # dependencies  import dependency_injector.containers as containers import dependency_injector.providers as providers from data.mongo_context import MongoDBContext   class DbContext(containers.DeclarativeContainer):     &quot;&quot;&quot;di for future development&quot;&quot;&quot;     mongo_db_context = providers.Singleton(MongoDBContext) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u043e\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 API. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 API \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430, \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u044d\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e <a href=\"https:\/\/rapidapi.com\/api-sports\/api\/covid-193\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0430\u043c<\/a>, \u0432\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u044d\u0442\u043e <a href=\"https:\/\/www.geonames.org\" rel=\"nofollow\">\u0441\u0435\u0440\u0432\u0438\u0441 \u0433\u0435\u043e\u043a\u043e\u0434\u0438\u043d\u0433\u0430<\/a> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b(\u0448\u0438\u0440\u043e\u0442\u0430, \u0434\u043e\u043b\u0433\u043e\u0442\u0430) \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u044b \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0442\u0434\u0430\u0435\u0442 Telegram.  <\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 country_service.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \/services\/country_service.py #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*- # dependencies  import os import requests  from cachetools import cached, TTLCache   class CountryService:     &quot;&quot;&quot;This class provide country information&quot;&quot;&quot;      # 3 hours cache time     cache = TTLCache(maxsize=100, ttl=10800)      # method for getting country information by lat nad lng     @cached(cache)     def get_country_information(self, latitude, longitude):         url = 'http:\/\/api.geonames.org\/countrySubdivisionJSON'         query_string = {'lat': latitude, 'lng': longitude, 'username': os.getenv('GEO_NAME_API_KEY')}         geo_result = requests.request('GET', url, params=query_string)         return geo_result.json() <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 statistics_service.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \/services\/statistics_service.py #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*- # dependencies  import os import requests import codecs import ciso8601  from jinja2 import Template from cachetools import cached, TTLCache from common.containers import DBContext   class StatisticsService:     &quot;&quot;&quot;This class provide information about statistics&quot;&quot;&quot;      # cache time 3 hours     cache = TTLCache(maxsize=100, ttl=10800)      def __init__(self):         try:             self.covid_api_token = os.getenv('COVID_STAT_API_TOKEN')             self.db_context = DBContext.mongo_db_context()         except Exception as e:             raise e      # method for getting statistics from API     def __get_statistics_by_country_from_api(self, country_name):         url = &quot;https:\/\/covid-193.p.rapidapi.com\/statistics&quot;         query_string = {'country': country_name}         headers = {             'x-rapidapi-host': &quot;covid-193.p.rapidapi.com&quot;,             'x-rapidapi-key': &quot;db21e48371msh30968ff2ec637d3p19bd08jsn32426bcabdaf&quot;         }         response = requests.request(&quot;GET&quot;, url, headers=headers, params=query_string)         return response.json()      # method for rendering statistics as html     @cached(cache)     def __get_statistics_by_country_as_html(self, country_name):         try:             statistics_json = self.__get_statistics_by_country_from_api(country_name)             if len(statistics_json['response']) == 0:                 with codecs.open('templates\/idunnocommand.html', 'r', encoding='UTF-8') as file:                     template = Template(file.read())                     return template.render(text_command=country_name)             else:                 with codecs.open('templates\/country_statistics.html', 'r', encoding='UTF-8') as file:                     template = Template(file.read())                     return template.render(date=ciso8601.parse_datetime(statistics_json['response'][0]['time']).date(),                                            country=statistics_json['response'][0]['country'].upper(),                                            new_cases=statistics_json['response'][0]['cases']['new'],                                            active_cases=statistics_json['response'][0]['cases']['active'],                                            critical_cases=statistics_json['response'][0]['cases']['critical'],                                            recovered_cases=statistics_json['response'][0]['cases']['recovered'],                                            total_cases=statistics_json['response'][0]['cases']['total'],                                            new_deaths=statistics_json['response'][0]['deaths']['new'],                                            total_deaths=statistics_json['response'][0]['deaths']['total'])         except Exception as e:             raise e      # method for getting statistics by country_name     def get_statistics_by_country_name(self, country_name, user_name):         self.db_context.save_query(country_name, user_name)         return self.__get_statistics_by_country_as_html(country_name)      # method for getting statistics of users and queries     def get_statistics_of_users_queries(self):         query_statistics = self.db_context.get_users_queries()         with codecs.open('templates\/query_statistics.html', 'r', encoding='UTF-8') as file:             template = Template(file.read())             return template.render(queries=query_statistics['queries'], users=query_statistics['users'])  <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432 \u0431\u043e\u0442\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043a\u0430\u043a <a href=\"https:\/\/chatbase.com\" rel=\"nofollow\">chatbase<\/a>, \u043d\u043e \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comma-separated_values\" rel=\"nofollow\">csv<\/a> \u0444\u0430\u0439\u043b, \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u0442\u043e\u043c, \u043d\u0435\u0436\u0435\u043b\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430. \u041a\u043e\u0434 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u044f \u0432\u0437\u044f\u043b <a href=\"https:\/\/habr.com\/ru\/post\/487208\/\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0443 <a href=\"https:\/\/habr.com\/ru\/users\/alekskram\/\" class=\"user_link\">alekskram<\/a>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 tg_analitycs.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \/common\/tg_analitycs.py #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*- # dependencies  import csv import datetime import os import pandas as pd  users_type = {     1: '\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c',     2: '\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f',     3: '\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f',     4: '\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f' } day_type = {     1: '\u0434\u0435\u043d\u044c',     2: '\u0434\u043d\u044f',     3: '\u0434\u043d\u044f',     4: '\u0434\u043d\u044f' }   # remove txt file def remove(user_id):     path = os.getcwd() + '\/%s.txt' % user_id     os.remove(path)   # write data to csv def statistics(user_id, command):     data = datetime.datetime.today().strftime(&quot;%Y-%m-%d&quot;)     with open('data.csv', 'a', newline=&quot;&quot;) as fil:         wr = csv.writer(fil, delimiter=';')         wr.writerow([data, user_id, command])   # make report def analysis(bid, user_id):     season = int(bid[1])     df = pd.read_csv('data.csv', delimiter=';', encoding='utf8')     number_of_users = len(df['id'].unique())     number_of_days = len(df['data'].unique())      message_to_user = '\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430 \u0437\u0430 %s %s: \\n' % (season, day_type.get(season, '\u0434\u043d\u0435\u0439'))     message_to_user += '\u0412\u0441\u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u0437\u0430 %s %s \\n' % (number_of_days, day_type.get(season, '\u0434\u043d\u0435\u0439'))     if season &gt; number_of_days:         season = number_of_days         message_to_user += '\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432\u0430\u043c\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043d\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435,\u0447\u0435\u043c \u0438\u043c\u0435\u0435\u0442\u0441\u044f\\n' \\                            '\u0411\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0437\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f\\n'      df_user = df.groupby(['data', 'id']).count().reset_index().groupby('data').count().reset_index()     list_of_dates_in_df_user = list(df_user['data'])     list_of_number_of_user_in_df_user = list(df_user['id'])     list_of_dates_in_df_user = list_of_dates_in_df_user[-season:]     list_of_number_of_user_in_df_user = list_of_number_of_user_in_df_user[-season:]     df_command = df.groupby(['data', 'command']).count().reset_index()     unique_commands = df['command'].unique()     commands_in_each_day = []     list_of_dates_in_df_command = list(df_command['data'])     list_of_number_of_user_in_df_command = list(df_command['id'])     list_of_name_of_command_in_df_command = list(df_command['command'])     commands_in_this_day = dict()     for i in range(len(list_of_dates_in_df_command)):         commands_in_this_day[list_of_name_of_command_in_df_command[i]] = list_of_number_of_user_in_df_command[i]         if i + 1 &gt;= len(list_of_dates_in_df_command) or list_of_dates_in_df_command[i] != list_of_dates_in_df_command[             i + 1]:             commands_in_each_day.append(commands_in_this_day)             commands_in_this_day = dict()     commands_in_each_day = commands_in_each_day[-season:]      if '\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438' in bid:         message_to_user += '\u0417\u0430 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0431\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e ' + '%s' % number_of_users \\                            + ' %s ' % users_type.get(number_of_users, '\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439') + '\\n' \\                                                                                          '\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 %s %s: \\n' % (                                season, day_type.get(season, '\u0434\u043d\u0435\u0439'))         for days, number, comm_day in zip(list_of_dates_in_df_user, list_of_number_of_user_in_df_user,                                           commands_in_each_day):             message_to_user += '\u0414\u0430\u0442\u0430:%s \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e:%d \u0418\u0437 \u043d\u0438\u0445 \u043d\u043e\u0432\u044b\u0445:%s\\n' % (days, number, comm_day.get('\/start', 0))     if '\u043a\u043e\u043c\u0430\u043d\u0434\u044b' in bid:         message_to_user += '\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 %s %s: \\n' % (season, day_type.get(season, '\u0434\u043d\u0435\u0439'))         for days, commands in zip(list_of_dates_in_df_user, commands_in_each_day):             message_to_user += '\u0414\u0430\u0442\u0430:%s\\n' % days             for i in unique_commands:                 if i in commands:                     message_to_user += '%s - %s \u0440\u0430\u0437\\n' % (i, commands.get(i))                 else:                     message_to_user += '%s - 0 \u0440\u0430\u0437\\n' % i      if 'txt' in bid or '\u0442\u0445\u0442' in bid:         with open('%s.txt' % user_id, 'w', encoding='UTF-8') as fil:             fil.write(message_to_user)             fil.close()     else:         return message_to_user <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>\u0410\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043e\u0442\u043e\u043c.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 setup.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \/setup.py #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*- # dependencies  import telebot import os import codecs import common.tg_analytics as tga  from functools import wraps from telebot import types from jinja2 import Template from services.country_service import CountryService from services.statistics_service import StatisticsService  # bot initialization token = os.getenv('API_BOT_TOKEN') bot = telebot.TeleBot(token) user_steps = {} known_users = [] stats_service = StatisticsService() country_service = CountryService() commands = {'start': 'Start using this bot',             'country': 'Please, write a country name',             'statistics': 'Statistics by users queries',             'help': 'Useful information about this bot',             'contacts': 'Developer contacts'}   def get_user_step(uid):     if uid in user_steps:         return user_steps[uid]     else:         known_users.append(uid)         user_steps[uid] = 0         return user_steps[uid]   # decorator for bot actions def send_action(action):      def decorator(func):         @wraps(func)         def command_func(message, *args, **kwargs):             bot.send_chat_action(chat_id=message.chat.id, action=action)             return func(message, *args, **kwargs)         return command_func     return decorator   # decorator for save user activity def save_user_activity():      def decorator(func):         @wraps(func)         def command_func(message, *args, **kwargs):             tga.statistics(message.chat.id, message.text)             return func(message, *args, **kwargs)         return command_func     return decorator   # start command handler @bot.message_handler(commands=['start']) @send_action('typing') @save_user_activity() def start_command_handler(message):     cid = message.chat.id     markup = types.ReplyKeyboardMarkup(row_width=1, resize_keyboard=True)     button_geo = types.KeyboardButton(text='send location', request_location=True)     markup.add(button_geo)     bot.send_message(cid, 'Hello, {0}, please choose command from the menu'.format(message.chat.username),                      reply_markup=markup)     help_command_handler(message)   # country command handler @bot.message_handler(commands=['country']) @send_action('typing') @save_user_activity() def country_command_handler(message):     cid = message.chat.id     user_steps[cid] = 1     bot.send_message(cid, '{0}, write name of country please'.format(message.chat.username))   # geo command handler @bot.message_handler(content_types=['location']) @send_action('typing') @save_user_activity() def geo_command_handler(message):     cid = message.chat.id     geo_result = country_service.get_country_information(message.location.latitude, message.location.longitude)     statistics = stats_service.get_statistics_by_country_name(geo_result['countryName'], message.chat.username)     user_steps[cid] = 0     bot.send_message(cid, statistics, parse_mode='HTML')   # country statistics command handler @bot.message_handler(func=lambda message: get_user_step(message.chat.id) == 1) @send_action('typing') @save_user_activity() def country_statistics_command_handler(message):     cid = message.chat.id     country_name = message.text.strip()      try:         statistics = stats_service.get_statistics_by_country_name(country_name, message.chat.username)     except Exception as e:         raise e      user_steps[cid] = 0     bot.send_message(cid, statistics, parse_mode='HTML')   # query statistics command handler @bot.message_handler(commands=['statistics']) @send_action('typing') @save_user_activity() def statistics_command_handler(message):     cid = message.chat.id     bot.send_message(cid, stats_service.get_statistics_of_users_queries(), parse_mode='HTML')   # contacts command handler @bot.message_handler(commands=['contacts']) @send_action('typing') @save_user_activity() def contacts_command_handler(message):     cid = message.chat.id     with codecs.open('templates\/contacts.html', 'r', encoding='UTF-8') as file:         template = Template(file.read())         bot.send_message(cid, template.render(user_name=message.chat.username), parse_mode='HTML')   # help command handler @bot.message_handler(commands=['help']) @send_action('typing') @save_user_activity() def help_command_handler(message):     cid = message.chat.id     help_text = 'The following commands are available \\n'     for key in commands:         help_text += '\/' + key + ': '         help_text += commands[key] + '\\n'     help_text += 'ANTI_COVID_19_BOT speaks english, be careful and take care'     bot.send_message(cid, help_text)   # hi command handler @bot.message_handler(func=lambda message: message.text.lower() == 'hi') @send_action('typing') @save_user_activity() def hi_command_handler(message):     cid = message.chat.id     with codecs.open('templates\/himydear.html', 'r', encoding='UTF-8') as file:         template = Template(file.read())         bot.send_message(cid, template.render(user_name=message.chat.username), parse_mode='HTML')   # default text messages and hidden statistics command handler @bot.message_handler(func=lambda message: True, content_types=['text']) @send_action('typing') @save_user_activity() def default_command_handler(message):     cid = message.chat.id     if message.text[:int(os.getenv('PASS_CHAR_COUNT'))] == os.getenv('STAT_KEY'):         st = message.text.split(' ')         if 'txt' in st:             tga.analysis(st, cid)             with codecs.open('%s.txt' % cid, 'r', encoding='UTF-8') as file:                 bot.send_document(cid, file)                 tga.remove(cid)         else:             messages = tga.analysis(st, cid)             bot.send_message(cid, messages)     else:         with codecs.open('templates\/idunnocommand.html', 'r', encoding='UTF-8') as file:             template = Template(file.read())             bot.send_message(cid, template.render(text_command=message.text), parse_mode='HTML')  # application entry point if __name__ == '__main__':     bot.polling(none_stop=True, interval=0) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h2>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u0442\u0430<\/h2>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <a href=\"https:\/\/github.com\/Oskar987\/anti_covid19bot\/tree\/master\/templates\" rel=\"nofollow\">\u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 HTML<\/a> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u00abtemplates\u00bb \u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b<\/p>\n<h3>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u044b \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>  <\/p>\n<ul>\n<li>API_BOT_TOKEN \u2014 \u0442\u043e\u043a\u0435\u043d Telegram \u0431\u043e\u0442\u0430<\/li>\n<li>COVID_STAT_API_TOKEN \u2014 \u0442\u043e\u043a\u0435\u043d API \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e \u043a\u043e\u0440\u043e\u043d\u043e\u0432\u0438\u0440\u0443\u0441\u0443<\/li>\n<li>GEO_NAME_API_KEY \u2014 \u0442\u043e\u043a\u0435\u043d API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0433\u0435\u043e\u043a\u043e\u0434\u0438\u043d\u0433\u0430 geonames<\/li>\n<li>CONNECTION_STRING \u2014 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>STAT_KEY \u2014 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430<\/li>\n<li>DB_NAME \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0431\u043e\u0442\u0430 \u0438 \u0440\u0443\u0447\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430\u0439\u0434\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0432 Telegram \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0435 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0435\u043c\u0443 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043b\u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 BotFather \u0431\u043e\u0442\u0430. \u0418 \u043e\u043f\u0440\u043e\u0441\u0438\u043c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0437\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0438\u0441\u044c \u0432 \u043c\u0435\u043d\u044e \u0431\u043e\u0442\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 Botfather \u0431\u043e\u0442\u0430. \u0422\u0430\u043a\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 BotFather \u0431\u043e\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0448\u0435\u043c\u0443 \u0431\u043e\u0442\u0443 \u0430\u0432\u0430\u0442\u0430\u0440, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u043c\u0430\u043d\u0434\u044b start, help<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7w\/ze\/fh\/7wzefhzq6s-hrzull_i5cfxaycu.png\">  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u043c\u0430\u043d\u0434\u0430 statistics<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8a\/tc\/ca\/8atccabez2rdnv4_k9bngvzvu90.png\">  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u043c\u0430\u043d\u0434\u0430 country<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vp\/e7\/jv\/vpe7jvk2ss1c2n0owtqskb7vqpw.png\">  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u043c\u0430\u043d\u0434\u0430 contacts<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/67\/tz\/fi\/67tzfii281pqw_qenidrd3s9tnk.png\">  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u043c\u0430\u043d\u0434\u0430 send location<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/at\/fe\/rq\/atferqu9ly6d5jifomwzxfa18a8.png\">  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/25\/v6\/tm\/25v6tmh0j7qalgnqa55j65h-ly4.png\">  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>Long polling \u0438\u043b\u0438 webhook \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u0431\u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u0435\u0437 \u0441\u0431\u043e\u0435\u0432 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 heroku, \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0441 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0430 \u043d\u0430 <a href=\"https:\/\/www.heroku.com\/pricing\" rel=\"nofollow\">\u043f\u043b\u0430\u043d \u201cHobby\u201d<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u043c \u043f\u043b\u0430\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0441\u044b\u043f\u0430\u0435\u0442 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 30 \u043c\u0438\u043d\u0443\u0442 \u0438 \u0431\u043e\u043b\u0435\u0435, \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a \u043f\u043e\u043b\u0435\u0447\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u043e\u0448\u0443 <a href=\"https:\/\/medium.com\/better-programming\/keeping-my-heroku-app-alive-b19f3a8c3a82\" rel=\"nofollow\">\u0441\u044e\u0434\u0430<\/a><\/li>\n<li>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c Telegram \u0441 <a href=\"https:\/\/core.telegram.org\/bots\/api#getupdates\" rel=\"nofollow\">long polling<\/a> \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/core.telegram.org\/bots\/api#setwebhook\" rel=\"nofollow\">webhook<\/a> \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f HEROKU_URL<\/li>\n<\/ol>\n<p>  <\/p>\n<pre><code class=\"python\"># \/setup.py #!\/usr\/bin\/env python3 # -*- coding: utf-8 -*- # dependencies  from flask import Flask, request  # set webhook server = Flask(__name__)   @server.route('\/' + token, methods=['POST']) def get_message():     bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode(&quot;utf-8&quot;))])     return &quot;!&quot;, 200   @server.route(&quot;\/&quot;) def web_hook():     bot.remove_webhook()     bot.set_webhook(url=os.getenv('HEROKU_URL') + token)     return &quot;!&quot;, 200  if __name__ == &quot;__main__&quot;:     server.run(host=&quot;0.0.0.0&quot;, port=int(os.environ.get('PORT', 8443))) <\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0431\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u043e\u0439 \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u043c \u0447\u0430\u0441\u0442\u044f\u043c \u043d\u0430\u0448\u0435\u0439 \u044d\u043f\u043e\u043f\u0435\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u043e\u0442\u0430 \u043d\u0430 PAAS \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Heroku, CI \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Github \u0438 Heroku.<\/p>\n<p>  <\/p>\n<h2>\u0423\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c <a href=\"https:\/\/docs.docker.com\/engine\/reference\/builder\/\" rel=\"nofollow\">Dockerfile<\/a> \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. Dockerfile \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043a\u0430\u043a.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\"># \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043d\u0430\u043c \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0437 FROM python:3.7   # \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0437 COPY \/requirements.txt \/app\/requirements.txt  # \u0437\u0430\u0434\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e WORKDIR \/app   # \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 RUN pip install -r \/app\/requirements.txt # \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e COPY . \/app # \u0437\u0430\u0443\u043f\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 CMD python \/app\/setup.py <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u043e\u0442\u0430 \u043d\u0430 PAAS \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Heroku<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Heroku \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043f\u043b\u0430\u043d \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0435\u0433\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li> \u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u0437 IDE \u0432 Heroku \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u201cSettings\u201d \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u201c<a href=\"https:\/\/devcenter.heroku.com\/articles\/config-vars\" rel=\"nofollow\">Reveal config vars<\/a>\u201d<\/li>\n<li> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c <a href=\"https:\/\/devcenter.heroku.com\/articles\/mongolab\" rel=\"nofollow\">addon \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 MongoDb<\/a> \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u201cResources\u201d, \u0432\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u0430\u0434\u0434\u043e\u043d \u0441 MongoDb \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c, \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f<\/li>\n<li> \u0422\u0430\u043a\u0436\u0435 Heroku \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443 \u0432\u0430\u0441 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0443 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u043f\u043b\u0430\u043d \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u044d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c addon-\u044b<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a MongoDb \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0431\u0430\u0437\u043e\u0439(connection string) \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Heroku, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u0430 Heroku \u0438 \u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u041f\u041e \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Docker \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cd project_folder_name # go to project folder heroku container:login # login to Heroku Heroku apps # see available apps and copy name to next command heroku container:push web --app anticovid19bot #push docker image to Heroku heroku container:release web --app anticovid19bot #release docker image to Heroku heroku logs --tail --app anticovid19bot # see what\u2019s going on (logs) <\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043d\u0430\u0448\u0435\u0433\u043e Heroku \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 CI.<\/p>\n<p>  <\/p>\n<h2>CI \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Github \u0438 Heroku<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 CI \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <a href=\"https:\/\/devcenter.heroku.com\/articles\/build-docker-images-heroku-yml\" rel=\"nofollow\">heroku.yml<\/a> \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u043d\u0435\u043c \u043a\u0430\u043a \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0442\u0430\u043a \u0438 \u043f\u0438\u0448\u0435\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">build:   docker:     web: Dockerfile <\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 heroku.yml \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u043c\u043c\u0438\u0442 \u0438 \u043f\u0443\u0448 \u0432 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 Github. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 heroku, \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u201cDeploy\u201d \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c Github \u201cconnect to github\u201d \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u0432\u0435\u0442\u043a\u0443 \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 heroku \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435, \u043d\u0430\u0448 \u0431\u043e\u0442 \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c\u0443 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044e \u0438 \u0431\u043e\u0440\u044c\u0431\u0435 \u0441 COVID-19 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c Telegram.<\/p>\n<p>  <\/p>\n<h2>\u042d\u043f\u0438\u043b\u043e\u0433<\/h2>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0431\u043e\u0438\u0442\u0441\u044f \u0442\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u0430\u0445\u0430 \u0438 \u043f\u0430\u043d\u0438\u043a\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0443\u0436\u043d\u0430 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u0430\u044f \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u043e.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440, \u0446\u0438\u0444\u0440\u0430 10 000 \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u0430, \u043d\u043e \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u0438\u043f\u0440\u0430\u0432\u0438\u043c \u0435\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c, 10 000 \u0441\u043c\u0435\u0440\u0442\u0435\u0439, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0430\u0448\u043d\u0435\u0435, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438? \u0415\u0441\u043b\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0439\u0442\u0438 \u0434\u043e \u0443\u0436\u0430\u0441\u0430\u044e\u0449\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u201c10000 \u043d\u043e\u0432\u044b\u0445 \u0441\u043c\u0435\u0440\u0442\u0435\u0439 \u043e\u0442 \u043a\u043e\u0440\u043e\u043d\u0430\u0432\u0438\u0440\u0443\u0441\u0430 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0432 \u0434\u0435\u043d\u044c\u201d \u0438 \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u043d\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u0430, \u0447\u0442\u043e \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0440\u0430\u0437\u0443\u043c\u0430 \u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f, \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u0435\u0433\u043e \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u043c \u0442\u0440\u0435\u0432\u043e\u0433\u0438 \u0438 \u043d\u0435\u0438\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0432\u043e\u0437\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0433\u043e \u0441 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0439 \u0440\u0435\u0430\u043a\u0446\u0438\u0435\u0439 \u00ab\u0434\u0435\u0440\u0438\u0441\u044c \u0438\u043b\u0438 \u0431\u0435\u0433\u0438\u00bb.<br \/>  \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043d\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u043d\u043e \u0434\u0430\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u043e\u043c Telegram, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0434\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0442\u0435\u043c \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u043d\u0433\u0430!<\/p>\n<p>  <\/p>\n<h2>P.S&#8230;<\/h2>\n<p>  <\/p>\n<p>\u041a\u043e\u0434 \u0431\u043e\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/Oskar987\/anti_covid19bot\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043e\u0442 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/bit.ly\/3bw1T10\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044f \u0441\u043d\u044f\u043b \u0432\u0438\u0434\u0435\u043e-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0433\u0434\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u043e\u0442\u0430.<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/_SQVG5VmJIk?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/496516\/\"> https:\/\/habr.com\/ru\/post\/496516\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/496516\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wg\/nr\/0o\/wgnr0o3blvggk6xlfoynxss68hu.jpeg\">  <\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043e\u0431\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043d\u0438\u043a\u0438 \u0438 \u0434\u0435\u0437\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043b\u044c\u0435\u0442\u0441\u044f \u043a \u043d\u0430\u043c \u0438\u0437 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0435\u0445 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u044b, \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b, \u0440\u0430\u0434\u0438\u043e, \u0442\u0435\u043b\u0435\u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c \u043a\u043e\u0440\u043e\u043d\u0430\u0432\u0438\u0440\u0443\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u043e\u0442\u0430 \u043d\u0430 <a href=\"https:\/\/www.python.org\" rel=\"nofollow\">python<\/a> \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0438\u043d\u0433\u0440\u0435\u0434\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f <a href=\"https:\/\/telegram.org\" rel=\"nofollow\">Telegram<\/a> (<s>\u0448\u0443\u0442\u043a\u0430<\/s>)!<\/p>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-302342","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=302342"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302342\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=302342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=302342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=302342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}