')
+def result(nickname, level, rating):
+ return f"""
+
+
+
+
+ Колонизация
+
+
+ Результаты отбора
+ Претендента на участие в миссии {nickname}:
+ Поздравляем! Ваш рейтинг после {level} этапа отбора
+ составляет {rating}!
+ Желаем удачи!
+
+ """
+
+
+@app.route('/load_photo', methods=['POST', 'GET'])
+def photo():
+ if request.method == 'GET':
+ return f'''
+
+
+
+
+
+
+ Отбор астронавтов
+
+
+ Загрузка фотографии
+ для участия в миссии
+
+
+ '''
+ elif request.method == 'POST':
+ f = request.files['file']
+ if f:
+ with open("static/img/img.png", "wb") as file:
+ file.write(f.read())
+ return f'''
+
+
+
+
+
+
+ Отбор астронавтов
+
+
+ Загрузка фотографии
+ для участия в миссии
+
+
+ '''
+
+
+if __name__ == '__main__':
+ app.run(port=8080, host='127.0.0.1')
diff --git a/WEB. HTML/static/css/style.css b/01-flask-html/static/css/style.css
similarity index 93%
rename from WEB. HTML/static/css/style.css
rename to 01-flask-html/static/css/style.css
index fa8c8d5..a040562 100644
--- a/WEB. HTML/static/css/style.css
+++ b/01-flask-html/static/css/style.css
@@ -1,54 +1,54 @@
-h1.red {
- color: #d22e3a;
-}
-
-h1.font {
- font-size: 36px;
-}
-
-img.width {
- width: 430px;
-}
-
-form.login_form {
- margin-left: auto;
- margin-right: auto;
- max-width: 450px;
- background-color: #ffdcbb;
- border: 1px solid gray;
- border-radius: 5px;
- padding: 10px;
-}
-
-div.font {
- font-size: 20px;
- width: 600px;
- height: 40px;
- text-align: left;
- line-height: 50px;
-}
-
-div.red {
- color: #6b1c29;
- background-color: #f7d7dc;
-}
-
-div.black {
- color: #000000;
- background-color: #d6d9d9;
-}
-
-div.green {
- color: #185921;
- background-color: #d3eedc;
-}
-
-div.gray {
- color: #393c42;
- background-color: #e1e3e4;
-}
-
-div.yellow {
- color: #845900;
- background-color: #fff3ce;
+h1.red {
+ color: #d22e3a;
+}
+
+h1.font {
+ font-size: 36px;
+}
+
+img.width {
+ width: 430px;
+}
+
+form.login_form {
+ margin-left: auto;
+ margin-right: auto;
+ max-width: 450px;
+ background-color: #ffdcbb;
+ border: 1px solid gray;
+ border-radius: 5px;
+ padding: 10px;
+}
+
+div.font {
+ font-size: 20px;
+ width: 600px;
+ height: 40px;
+ text-align: left;
+ line-height: 50px;
+}
+
+div.red {
+ color: #6b1c29;
+ background-color: #f7d7dc;
+}
+
+div.black {
+ color: #000000;
+ background-color: #d6d9d9;
+}
+
+div.green {
+ color: #185921;
+ background-color: #d3eedc;
+}
+
+div.gray {
+ color: #393c42;
+ background-color: #e1e3e4;
+}
+
+div.yellow {
+ color: #845900;
+ background-color: #fff3ce;
}
\ No newline at end of file
diff --git a/WEB. HTML/static/img/1.png b/01-flask-html/static/img/1.png
similarity index 100%
rename from WEB. HTML/static/img/1.png
rename to 01-flask-html/static/img/1.png
diff --git a/WEB. HTML/static/img/2.png b/01-flask-html/static/img/2.png
similarity index 100%
rename from WEB. HTML/static/img/2.png
rename to 01-flask-html/static/img/2.png
diff --git a/WEB. HTML/static/img/3.png b/01-flask-html/static/img/3.png
similarity index 100%
rename from WEB. HTML/static/img/3.png
rename to 01-flask-html/static/img/3.png
diff --git a/WEB. HTML/static/img/img.png b/01-flask-html/static/img/img.png
similarity index 100%
rename from WEB. HTML/static/img/img.png
rename to 01-flask-html/static/img/img.png
diff --git a/WEB. HTML/static/img/planet.jpg b/01-flask-html/static/img/planet.jpg
similarity index 100%
rename from WEB. HTML/static/img/planet.jpg
rename to 01-flask-html/static/img/planet.jpg
diff --git a/WEB. HTML flask-wtf/news.json b/02-flask-wtf-forms/news.json
similarity index 96%
rename from WEB. HTML flask-wtf/news.json
rename to 02-flask-wtf-forms/news.json
index 75fac2a..51349bd 100644
--- a/WEB. HTML flask-wtf/news.json
+++ b/02-flask-wtf-forms/news.json
@@ -1,16 +1,16 @@
-{
- "news": [
- {
- "title": "Сегодня хорошая погода",
- "content": "Невероятно, сегодня хорошая погода"
- },
- {
- "title": "Завтра хорошая погода",
- "content": "С ума сойти, и завтра хорошая погода"
- },
- {
- "title": "Послезавтра дождь",
- "content": "Все вошло в норму"
- }
- ]
+{
+ "news": [
+ {
+ "title": "Сегодня хорошая погода",
+ "content": "Невероятно, сегодня хорошая погода"
+ },
+ {
+ "title": "Завтра хорошая погода",
+ "content": "С ума сойти, и завтра хорошая погода"
+ },
+ {
+ "title": "Послезавтра дождь",
+ "content": "Все вошло в норму"
+ }
+ ]
}
\ No newline at end of file
diff --git a/WEB. HTML flask-wtf/static/css/style.css b/02-flask-wtf-forms/static/css/style.css
similarity index 91%
rename from WEB. HTML flask-wtf/static/css/style.css
rename to 02-flask-wtf-forms/static/css/style.css
index f38977b..0f9fcd2 100644
--- a/WEB. HTML flask-wtf/static/css/style.css
+++ b/02-flask-wtf-forms/static/css/style.css
@@ -1,7 +1,7 @@
-h4.color_edit {
- color: "black";
-}
-
-p.padmarging {
- margin-left: 20px;
+h4.color_edit {
+ color: "black";
+}
+
+p.padmarging {
+ margin-left: 20px;
}
\ No newline at end of file
diff --git a/WEB. HTML 2/static/img/kb1.jpg b/02-flask-wtf-forms/static/img/kb1.jpg
similarity index 100%
rename from WEB. HTML 2/static/img/kb1.jpg
rename to 02-flask-wtf-forms/static/img/kb1.jpg
diff --git a/WEB. HTML 2/static/img/kb2.jpg b/02-flask-wtf-forms/static/img/kb2.jpg
similarity index 100%
rename from WEB. HTML 2/static/img/kb2.jpg
rename to 02-flask-wtf-forms/static/img/kb2.jpg
diff --git a/WEB. HTML 2/static/img/mars_ico.png b/02-flask-wtf-forms/static/img/mars_ico.png
similarity index 100%
rename from WEB. HTML 2/static/img/mars_ico.png
rename to 02-flask-wtf-forms/static/img/mars_ico.png
diff --git a/WEB. HTML flask-wtf/templates/auto_answer.html b/02-flask-wtf-forms/templates/auto_answer.html
similarity index 96%
rename from WEB. HTML flask-wtf/templates/auto_answer.html
rename to 02-flask-wtf-forms/templates/auto_answer.html
index 3c9069b..4668928 100644
--- a/WEB. HTML flask-wtf/templates/auto_answer.html
+++ b/02-flask-wtf-forms/templates/auto_answer.html
@@ -1,15 +1,15 @@
-{% extends "base_two.html" %}
-
-{% block content1 %}
-
-
И на Марсе будут яблони цвести!
-
-
- Фамилия: {{surname}}
- Имя: {{name}}
- Образование: {{education}}
- Профессия: {{profession}}
- Пол: {{sex}}
- Мотивация: {{motivation}}
- Готовы остаться на Марсе? {{ready}}
+{% extends "base_two.html" %}
+
+{% block content1 %}
+
+
И на Марсе будут яблони цвести!
+
+
+ Фамилия: {{surname}}
+ Имя: {{name}}
+ Образование: {{education}}
+ Профессия: {{profession}}
+ Пол: {{sex}}
+ Мотивация: {{motivation}}
+ Готовы остаться на Марсе? {{ready}}
{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML flask-wtf/templates/base.html b/02-flask-wtf-forms/templates/base.html
similarity index 96%
rename from WEB. HTML flask-wtf/templates/base.html
rename to 02-flask-wtf-forms/templates/base.html
index 075e439..e91bd0d 100644
--- a/WEB. HTML flask-wtf/templates/base.html
+++ b/02-flask-wtf-forms/templates/base.html
@@ -1,32 +1,32 @@
-
-
-
-
-
-
-
-
-
-
-
- {{title}}
-
-
-
-
-
- {% block content1 %}{% endblock %}
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{title}}
+
+
+
+
+
+ {% block content1 %}{% endblock %}
+
+
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/base_two.html b/02-flask-wtf-forms/templates/base_two.html
similarity index 92%
rename from WEB. HTML 2/templates/base_two.html
rename to 02-flask-wtf-forms/templates/base_two.html
index f4d32b4..b4109d6 100644
--- a/WEB. HTML 2/templates/base_two.html
+++ b/02-flask-wtf-forms/templates/base_two.html
@@ -1,10 +1,10 @@
-{% extends "base.html" %}
-
-{% block content1 %}
-
-
И на Марсе будут яблони цвести!
-
-
- {% block content2 %}{% endblock %}
-
+{% extends "base.html" %}
+
+{% block content1 %}
+
+
И на Марсе будут яблони цвести!
+
+
+ {% block content2 %}{% endblock %}
+
{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/distribution.html b/02-flask-wtf-forms/templates/distribution.html
similarity index 93%
rename from WEB. HTML 2/templates/distribution.html
rename to 02-flask-wtf-forms/templates/distribution.html
index 9327eaf..76a41f2 100644
--- a/WEB. HTML 2/templates/distribution.html
+++ b/02-flask-wtf-forms/templates/distribution.html
@@ -1,8 +1,8 @@
-{% extends "base_two.html" %}
-
-{% block content2 %}
- Размещение по каютам
- {% for user in users %}
- {{ user }} - Каюта № {{ loop.index }} {% if loop.first %} - первый в очереди {% endif %}
- {% endfor %}
+{% extends "base_two.html" %}
+
+{% block content2 %}
+ Размещение по каютам
+ {% for user in users %}
+ {{ user }} - Каюта № {{ loop.index }} {% if loop.first %} - первый в очереди {% endif %}
+ {% endfor %}
{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/index.html b/02-flask-wtf-forms/templates/index.html
similarity index 79%
rename from WEB. HTML 2/templates/index.html
rename to 02-flask-wtf-forms/templates/index.html
index f847176..8ce6232 100644
--- a/WEB. HTML 2/templates/index.html
+++ b/02-flask-wtf-forms/templates/index.html
@@ -1,5 +1,5 @@
-{% extends "base.html" %}
-
-{% block content1 %}
- {{label}}
+{% extends "base.html" %}
+
+{% block content1 %}
+ {{label}}
{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/list_prof.html b/02-flask-wtf-forms/templates/list_prof.html
similarity index 96%
rename from WEB. HTML 2/templates/list_prof.html
rename to 02-flask-wtf-forms/templates/list_prof.html
index 97739fe..42e937d 100644
--- a/WEB. HTML 2/templates/list_prof.html
+++ b/02-flask-wtf-forms/templates/list_prof.html
@@ -1,27 +1,27 @@
-{% extends "base_two.html" %}
-
-{% block content2 %}
- {% set all_prof = ['врач', "экзобиолог", "климатолог", "астрогеолог", "гляциолог", "метеоролог",
- 'инженер-исследователь', "пилот", "строитель", "инженер по терраформированию",
- "специалист по радиационной защите", "инженер жизнеобеспечения", "оператор марсохода",
- "киберинженер", "штурман", "пилот дронов"] %}
- {% if var == "ol" %}
- Список профессий
-
-
- {% for p in all_prof %}
- {{p}}
- {% endfor %}
-
-
- {% elif var == "ul" %}
- Список профессий
-
- {% for p in all_prof %}
-
{{p}}
- {% endfor %}
-
- {% else %}
- Индекс указан неправильно!
- {% endif %}
+{% extends "base_two.html" %}
+
+{% block content2 %}
+ {% set all_prof = ['врач', "экзобиолог", "климатолог", "астрогеолог", "гляциолог", "метеоролог",
+ 'инженер-исследователь', "пилот", "строитель", "инженер по терраформированию",
+ "специалист по радиационной защите", "инженер жизнеобеспечения", "оператор марсохода",
+ "киберинженер", "штурман", "пилот дронов"] %}
+ {% if var == "ol" %}
+ Список профессий
+
+
+ {% for p in all_prof %}
+ {{p}}
+ {% endfor %}
+
+
+ {% elif var == "ul" %}
+ Список профессий
+
+ {% for p in all_prof %}
+
{{p}}
+ {% endfor %}
+
+ {% else %}
+ Индекс указан неправильно!
+ {% endif %}
{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML flask-wtf/templates/login.html b/02-flask-wtf-forms/templates/login.html
similarity index 96%
rename from WEB. HTML flask-wtf/templates/login.html
rename to 02-flask-wtf-forms/templates/login.html
index bb6ec1e..77e7387 100644
--- a/WEB. HTML flask-wtf/templates/login.html
+++ b/02-flask-wtf-forms/templates/login.html
@@ -1,45 +1,45 @@
-{% extends "base_two.html" %}
-
-{% block content2 %}
- Аварийный доступ
-
+{% extends "base_two.html" %}
+
+{% block content2 %}
+ Аварийный доступ
+
{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML flask-wtf/templates/training.html b/02-flask-wtf-forms/templates/training.html
similarity index 97%
rename from WEB. HTML flask-wtf/templates/training.html
rename to 02-flask-wtf-forms/templates/training.html
index 2f4b270..45de75d 100644
--- a/WEB. HTML flask-wtf/templates/training.html
+++ b/02-flask-wtf-forms/templates/training.html
@@ -1,17 +1,17 @@
-{% extends "base_two.html" %}
-
-{% block content2 %}
- {% set sin = ['врач', "экзобиолог", "климатолог", "астрогеолог", "гляциолог", "метеоролог"] %}
- {% set inj = ['инженер-исследователь', "пилот", "строитель", "инженер по терраформированию",
- "специалист по радиационной защите", "инженер жизнеобеспечения", "оператор марсохода",
- "киберинженер", "штурман", "пилот дронов"] %}
- {% if spec.lower() in sin %}
- Научные симуляторы
-
- {% elif spec.lower() in inj %}
- Инженерные тренажеры
-
- {% else %}
- В наших списках ваша профессия отсутствует!
- {% endif %}
+{% extends "base_two.html" %}
+
+{% block content2 %}
+ {% set sin = ['врач', "экзобиолог", "климатолог", "астрогеолог", "гляциолог", "метеоролог"] %}
+ {% set inj = ['инженер-исследователь', "пилот", "строитель", "инженер по терраформированию",
+ "специалист по радиационной защите", "инженер жизнеобеспечения", "оператор марсохода",
+ "киберинженер", "штурман", "пилот дронов"] %}
+ {% if spec.lower() in sin %}
+ Научные симуляторы
+
+ {% elif spec.lower() in inj %}
+ Инженерные тренажеры
+
+ {% else %}
+ В наших списках ваша профессия отсутствует!
+ {% endif %}
{% endblock %}
\ No newline at end of file
diff --git a/Полный поиск/delta.py b/03-yandex-maps-search/delta.py
similarity index 89%
rename from Полный поиск/delta.py
rename to 03-yandex-maps-search/delta.py
index 964a076..8895db9 100644
--- a/Полный поиск/delta.py
+++ b/03-yandex-maps-search/delta.py
@@ -1,21 +1,21 @@
-def delta(org, adr):
- first = "0.0001"
- adr = list(map(float, adr.split(',')))
-
- k1 = float(first)
- while True:
- k = adr[0] + k1
- if org[0] + 0.001 >= k:
- k1 *= 10
- else:
- break
-
- k2 = float(first)
- while True:
- k = adr[1] + k2
- if org[1] + 0.001 >= k:
- k2 *= 10
- else:
- break
-
+def delta(org, adr):
+ first = "0.0001"
+ adr = list(map(float, adr.split(',')))
+
+ k1 = float(first)
+ while True:
+ k = adr[0] + k1
+ if org[0] + 0.001 >= k:
+ k1 *= 10
+ else:
+ break
+
+ k2 = float(first)
+ while True:
+ k = adr[1] + k2
+ if org[1] + 0.001 >= k:
+ k2 *= 10
+ else:
+ break
+
return str(max(k1, k2))
\ No newline at end of file
diff --git a/WEB. HTML 2/loginform.py b/WEB. HTML 2/loginform.py
deleted file mode 100644
index 90464b9..0000000
--- a/WEB. HTML 2/loginform.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from flask_wtf import FlaskForm
-from wtforms import StringField, PasswordField, BooleanField, SubmitField
-from wtforms.validators import DataRequired
-
-
-class LoginForm(FlaskForm):
- id_user = StringField('Id астронавта', validators=[DataRequired()])
- pas_user = PasswordField('Пароль астронавта', validators=[DataRequired()])
- id_cap = StringField('Id капитана', validators=[DataRequired()])
- pas_cap = PasswordField('Пароль капитана', validators=[DataRequired()])
- # remember_me = BooleanField('Запомнить меня') {{ form.remember_me() }} {{ form.remember_me.label }}
- submit = SubmitField('Доступ')
-
-
diff --git a/WEB. HTML 2/server.py b/WEB. HTML 2/server.py
deleted file mode 100644
index 5b16af1..0000000
--- a/WEB. HTML 2/server.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from flask import Flask, render_template, redirect
-from loginform import LoginForm
-
-
-app = Flask(__name__)
-app.config['SECRET_KEY'] = 'yandexlyceum_secret_key'
-
-
-@app.route('/')
-@app.route('/index')
-def index(label):
- param = {'label': 'И на Марсе будут яблони цвести!', 'title': label}
- return render_template('index.html', **param)
-
-
-@app.route('/training/')
-def training(prof):
- param = {'title': "Тренировки в полёте", "spec": prof}
- return render_template('training.html', **param)
-
-
-@app.route('/list_prof/')
-def list_prof(var):
- param = {'title': "Список профессий", "var": var}
- return render_template('list_prof.html', **param)
-
-
-@app.route('/answer')
-@app.route('/auto_answer')
-def answer():
- param = {'title': "Анкета", 'surname': "Фёдоров", 'name': "Марк", 'education': "Среднее", 'profession': " Писатель",
- 'sex': "Male", 'motivation': "Распространить хип-хоп в космос!", 'ready': "True"}
- return render_template('auto_answer.html', **param)
-
-
-@app.route('/login', methods=['GET', 'POST'])
-def login():
- param = {'title': "Аварийный доступ"}
- form = LoginForm()
- if form.validate_on_submit():
- return redirect('/success')
- return render_template('login.html', **param, form=form)
-
-
-@app.route('/distribution')
-def success():
- param = {'title': "По каютам!", "users": ['Ридли Скотт', 'Энди Уир', 'Марк Уотни', "Венката Капур",
- 'Тедди Сандерс', 'Шон Бин']}
- return render_template('distribution.html', **param)
-
-
-if __name__ == '__main__':
- app.run(port=8080, host='127.0.0.1')
diff --git a/WEB. HTML 2/static/css/style.css b/WEB. HTML 2/static/css/style.css
deleted file mode 100644
index f38977b..0000000
--- a/WEB. HTML 2/static/css/style.css
+++ /dev/null
@@ -1,7 +0,0 @@
-h4.color_edit {
- color: "black";
-}
-
-p.padmarging {
- margin-left: 20px;
-}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/auto_answer.html b/WEB. HTML 2/templates/auto_answer.html
deleted file mode 100644
index 3c9069b..0000000
--- a/WEB. HTML 2/templates/auto_answer.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends "base_two.html" %}
-
-{% block content1 %}
-
-
И на Марсе будут яблони цвести!
-
-
- Фамилия: {{surname}}
- Имя: {{name}}
- Образование: {{education}}
- Профессия: {{profession}}
- Пол: {{sex}}
- Мотивация: {{motivation}}
- Готовы остаться на Марсе? {{ready}}
-{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/base.html b/WEB. HTML 2/templates/base.html
deleted file mode 100644
index 075e439..0000000
--- a/WEB. HTML 2/templates/base.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- {{title}}
-
-
-
-
-
- {% block content1 %}{% endblock %}
-
-
-
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/login.html b/WEB. HTML 2/templates/login.html
deleted file mode 100644
index bb6ec1e..0000000
--- a/WEB. HTML 2/templates/login.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{% extends "base_two.html" %}
-
-{% block content2 %}
- Аварийный доступ
-
-{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/training.html b/WEB. HTML 2/templates/training.html
deleted file mode 100644
index 2f4b270..0000000
--- a/WEB. HTML 2/templates/training.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "base_two.html" %}
-
-{% block content2 %}
- {% set sin = ['врач', "экзобиолог", "климатолог", "астрогеолог", "гляциолог", "метеоролог"] %}
- {% set inj = ['инженер-исследователь', "пилот", "строитель", "инженер по терраформированию",
- "специалист по радиационной защите", "инженер жизнеобеспечения", "оператор марсохода",
- "киберинженер", "штурман", "пилот дронов"] %}
- {% if spec.lower() in sin %}
- Научные симуляторы
-
- {% elif spec.lower() in inj %}
- Инженерные тренажеры
-
- {% else %}
- В наших списках ваша профессия отсутствует!
- {% endif %}
-{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML flask-wtf/loginform.py b/WEB. HTML flask-wtf/loginform.py
deleted file mode 100644
index 90464b9..0000000
--- a/WEB. HTML flask-wtf/loginform.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from flask_wtf import FlaskForm
-from wtforms import StringField, PasswordField, BooleanField, SubmitField
-from wtforms.validators import DataRequired
-
-
-class LoginForm(FlaskForm):
- id_user = StringField('Id астронавта', validators=[DataRequired()])
- pas_user = PasswordField('Пароль астронавта', validators=[DataRequired()])
- id_cap = StringField('Id капитана', validators=[DataRequired()])
- pas_cap = PasswordField('Пароль капитана', validators=[DataRequired()])
- # remember_me = BooleanField('Запомнить меня') {{ form.remember_me() }} {{ form.remember_me.label }}
- submit = SubmitField('Доступ')
-
-
diff --git a/WEB. HTML flask-wtf/server.py b/WEB. HTML flask-wtf/server.py
deleted file mode 100644
index d9aa1f7..0000000
--- a/WEB. HTML flask-wtf/server.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from flask import Flask, render_template, redirect
-from loginform import LoginForm
-
-
-app = Flask(__name__)
-app.config['SECRET_KEY'] = 'yandexlyceum_secret_key'
-
-
-@app.route('/')
-@app.route('/index/')
-def index(label):
- param = {'label': 'И на Марсе будут яблони цвести!', 'title': label}
- return render_template('index.html', **param)
-
-
-@app.route('/training/')
-def training(prof):
- param = {'title': "Тренировки в полёте", "spec": prof}
- return render_template('training.html', **param)
-
-
-@app.route('/list_prof/')
-def list_prof(var):
- param = {'title': "Список профессий", "var": var}
- return render_template('list_prof.html', **param)
-
-
-@app.route('/answer')
-@app.route('/auto_answer')
-def answer():
- param = {'title': "Анкета", 'surname': "Фёдоров", 'name': "Марк", 'education': "Среднее", 'profession': " Писатель",
- 'sex': "Male", 'motivation': "Распространить хип-хоп в космос!", 'ready': "True"}
- return render_template('auto_answer.html', **param)
-
-
-@app.route('/login', methods=['GET', 'POST'])
-def login():
- param = {'title': "Аварийный доступ"}
- form = LoginForm()
- if form.validate_on_submit():
- return redirect('/success')
- return render_template('login.html', **param, form=form)
-
-
-@app.route('/distribution')
-def success():
- param = {'title': "По каютам!", "users": ['Ридли Скотт', 'Энди Уир', 'Марк Уотни', "Венката Капур",
- 'Тедди Сандерс', 'Шон Бин']}
- return render_template('distribution.html', **param)
-
-
-if __name__ == '__main__':
- app.run(port=8080, host='127.0.0.1')
diff --git a/WEB. HTML flask-wtf/static/img/kb1.jpg b/WEB. HTML flask-wtf/static/img/kb1.jpg
deleted file mode 100644
index fe25a04..0000000
Binary files a/WEB. HTML flask-wtf/static/img/kb1.jpg and /dev/null differ
diff --git a/WEB. HTML flask-wtf/static/img/kb2.jpg b/WEB. HTML flask-wtf/static/img/kb2.jpg
deleted file mode 100644
index ebf6e1a..0000000
Binary files a/WEB. HTML flask-wtf/static/img/kb2.jpg and /dev/null differ
diff --git a/WEB. HTML flask-wtf/static/img/mars_ico.png b/WEB. HTML flask-wtf/static/img/mars_ico.png
deleted file mode 100644
index 5f7fc2f..0000000
Binary files a/WEB. HTML flask-wtf/static/img/mars_ico.png and /dev/null differ
diff --git a/WEB. HTML flask-wtf/templates/base_two.html b/WEB. HTML flask-wtf/templates/base_two.html
deleted file mode 100644
index f4d32b4..0000000
--- a/WEB. HTML flask-wtf/templates/base_two.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends "base.html" %}
-
-{% block content1 %}
-
-
И на Марсе будут яблони цвести!
-
-
- {% block content2 %}{% endblock %}
-
-{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML flask-wtf/templates/distribution.html b/WEB. HTML flask-wtf/templates/distribution.html
deleted file mode 100644
index 9327eaf..0000000
--- a/WEB. HTML flask-wtf/templates/distribution.html
+++ /dev/null
@@ -1,8 +0,0 @@
-{% extends "base_two.html" %}
-
-{% block content2 %}
- Размещение по каютам
- {% for user in users %}
- {{ user }} - Каюта № {{ loop.index }} {% if loop.first %} - первый в очереди {% endif %}
- {% endfor %}
-{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML flask-wtf/templates/index.html b/WEB. HTML flask-wtf/templates/index.html
deleted file mode 100644
index f847176..0000000
--- a/WEB. HTML flask-wtf/templates/index.html
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "base.html" %}
-
-{% block content1 %}
- {{label}}
-{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML flask-wtf/templates/list_prof.html b/WEB. HTML flask-wtf/templates/list_prof.html
deleted file mode 100644
index 97739fe..0000000
--- a/WEB. HTML flask-wtf/templates/list_prof.html
+++ /dev/null
@@ -1,27 +0,0 @@
-{% extends "base_two.html" %}
-
-{% block content2 %}
- {% set all_prof = ['врач', "экзобиолог", "климатолог", "астрогеолог", "гляциолог", "метеоролог",
- 'инженер-исследователь', "пилот", "строитель", "инженер по терраформированию",
- "специалист по радиационной защите", "инженер жизнеобеспечения", "оператор марсохода",
- "киберинженер", "штурман", "пилот дронов"] %}
- {% if var == "ol" %}
- Список профессий
-
-
- {% for p in all_prof %}
- {{p}}
- {% endfor %}
-
-
- {% elif var == "ul" %}
- Список профессий
-
- {% for p in all_prof %}
-
{{p}}
- {% endfor %}
-
- {% else %}
- Индекс указан неправильно!
- {% endif %}
-{% endblock %}
\ No newline at end of file
diff --git a/Полный поиск/main.py b/Полный поиск/main.py
deleted file mode 100644
index 6b9256f..0000000
--- a/Полный поиск/main.py
+++ /dev/null
@@ -1,45 +0,0 @@
-from io import BytesIO
-from PIL import Image
-from delta import delta
-import requests
-
-
-search_api_server = "https://search-maps.yandex.ru/v1/"
-api_key = "your_yandex_api_key_here"
-
-address_ll = "37.588392,55.734036"
-
-search_params = {
- "apikey": api_key,
- "text": "магазин",
- "lang": "ru_RU",
- "ll": address_ll,
- "type": "biz"
-}
-
-response = requests.get(search_api_server, params=search_params)
-if not response:
- pass
-
-json_response = response.json()
-
-organization = json_response["features"][0]
-org_name = organization["properties"]["CompanyMetaData"]["name"]
-org_address = organization["properties"]["CompanyMetaData"]["address"]
-
-point = organization["geometry"]["coordinates"]
-org_point = "{0},{1}".format(point[0], point[1])
-delta = delta(point, address_ll)
-
-map_params = {
- "ll": address_ll,
- "spn": ",".join([delta, delta]),
- "l": "map",
- "pt": "{0},pm2dgl".format(org_point)
-}
-
-map_api_server = "http://static-maps.yandex.ru/1.x/"
-response = requests.get(map_api_server, params=map_params)
-
-Image.open(BytesIO(
- response.content)).show()
\ No newline at end of file