From ababa36483b23cfd43723278e20c8ce9d141594d Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Tue, 27 Sep 2022 23:18:30 +0300 Subject: [PATCH 01/14] Create read_me --- hw_1/read_me | 1 + 1 file changed, 1 insertion(+) create mode 100644 hw_1/read_me diff --git a/hw_1/read_me b/hw_1/read_me new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/hw_1/read_me @@ -0,0 +1 @@ +hello From 3e3f867afcae08d3ffd35c8f26e222acf8f2e536 Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Tue, 27 Sep 2022 23:19:13 +0300 Subject: [PATCH 02/14] Add files via upload --- hw_1/hw1.md | 30 +++++++++++++++++++ ...20\263\320\260\320\264\320\272\320\270.py" | 22 ++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 hw_1/hw1.md create mode 100644 "hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" diff --git a/hw_1/hw1.md b/hw_1/hw1.md new file mode 100644 index 0000000..b0d3ef3 --- /dev/null +++ b/hw_1/hw1.md @@ -0,0 +1,30 @@ +Задача: реализовать игру в загадки + +Требования: +- Программа выводит в консоль текст загадкок по одной и ждет ввода ответа от пользователя +- Программа после ввода ответа пользователя должна вывести в консоль результат. Если пользователь дал правильный ответ, то программа должна написать "Ответ {ОТВЕТ_ПОЛЬЗОВАТЕЛЯ} верен". Вместо "{ОТВЕТ_ПОЛЬЗОВАТЕЛЯ}" необходимо подставить ответ, введенный пользователем. Если пользователь ввел неправильный ответ, то программа должна написать "Неверный ответ." +- Программа задает пользователю 10 вопросов из списка ниже + +Список вопросов и правильных ответов для работы: +1. "Какая версия языка сейчас актуальна?" - "Python3" +2. "Какая кодировка используется в строках?" - "UTF8" +3. "Какой оператор сравнения нужно использовать для работы с None и bool?" - "is" +4. "Сколько значений есть у bool?" - 2 + +Дополнительные требования (для продвинутых): +- Программа должна в конце игры сказать, сколько ответов дал пользователь: сколько из них было верных +- Программа должна не учитывать регистр ответа пользователя, например: "utf8" и "UTF8" оба должны быть правильным ответом на вопрос "Какая кодировка используется в строках?" + +Форма сдачи работы: *** + +Материалы для прочтения: +- Что нельзя использовать как имя переменной: https://pythonworld.ru/osnovy/klyuchevye-slova-modul-keyword.html +- Escape символы в строках: https://learnpythonthehardway.org/book/ex10.html +- Как задавать вопросы: http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem +- Разница между for и while: http://stackoverflow.com/questions/920645/when-to-use-while-or-the-for-in-python + +Материалы для продвинутых: +- Таблица истинности из булевой алгебры: https://ru.wikipedia.org/wiki/%D0%A2%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D0%B0_%D0%B8%D1%81%D1%82%D0%B8%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D0%B8 (так же необходимо прочитать про (Дизъюнкция и Конъюнкция) +- Как хранятся числа в памяти: http://www.5byte.ru/11/0008.php +- Что такое Unicode: https://habrahabr.ru/post/135913/ +- Разница между UTF-8, UTF-16 и UTF-32: http://stackoverflow.com/questions/496321/utf-8-utf-16-and-utf-32 diff --git "a/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" "b/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" new file mode 100644 index 0000000..2e3fe33 --- /dev/null +++ "b/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" @@ -0,0 +1,22 @@ +import random +# A game of riddles: + +count = 0 +n = 10 +questions = ('Какая версия языка сейчас актуальна?', 'Какая кодировка используется в строках?', +'Какой оператор сравнения нужно использовать для работы с None и bool?', 'Сколько значений есть у bool?') +ansvers = ('Python3', 'UTF8', 'is', '2') + + +for i in range(n): + j = random.randint(0,3) + print(questions[j]) + users_input = str(input('Введите ответ: ')) + if users_input.lower() == ansvers[j].lower() : + count+=1 + print("Ответ {0} верен".format(users_input)) + else: + print("Ответ неверный\n") + +print('Число отгаданных загадок: {0} из 10'.format(count)) + From 4944bd90f08f2bd8e48286aee7efc468cdbc009b Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Tue, 27 Sep 2022 23:19:29 +0300 Subject: [PATCH 03/14] Delete read_me --- hw_1/read_me | 1 - 1 file changed, 1 deletion(-) delete mode 100644 hw_1/read_me diff --git a/hw_1/read_me b/hw_1/read_me deleted file mode 100644 index ce01362..0000000 --- a/hw_1/read_me +++ /dev/null @@ -1 +0,0 @@ -hello From 96136fdc807f5d906c14b66b7d4555514303da3d Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Tue, 27 Sep 2022 23:19:57 +0300 Subject: [PATCH 04/14] Create readme --- hw_2/readme | 1 + 1 file changed, 1 insertion(+) create mode 100644 hw_2/readme diff --git a/hw_2/readme b/hw_2/readme new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/hw_2/readme @@ -0,0 +1 @@ +hello From 9daa2c6aa0619a5fae450f37388e06e80b8a2b99 Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Tue, 27 Sep 2022 23:20:32 +0300 Subject: [PATCH 05/14] Add files via upload --- hw_2/Array.py | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ hw_2/hw2_.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 hw_2/Array.py create mode 100644 hw_2/hw2_.md diff --git a/hw_2/Array.py b/hw_2/Array.py new file mode 100644 index 0000000..441c9f1 --- /dev/null +++ b/hw_2/Array.py @@ -0,0 +1,66 @@ +class Array(object): + + def __init__(self, *args): + self._data = tuple(args) + + def append(self, new_arg): + self._data += (new_arg, ) + + def __add__(self, new): + return self._data + new._data + + def __len__(self): + return len(self._data) + + def index(self, arg): + if arg in self._data: + return self._data.index(arg) + return -1 + + def __iter__(self): + return iter(self._data) + + def __getitem__(self, item): + return self._data[item] + + def print(self): + print(self._data) + +# init_test +print('Init test:') +A = Array(1, 2, 3, 4, 5) +print('Array A') +A.print() + +# append_test +print('Append test:') +A.append('abc') +print('Append element "abc" to array A') +A.print() + +# add_test +print('Addition test:') +B = Array(100, 200) +print('Add array (100, 200) to array A') +print(A + B) + +#len_test +print('Length test:') +print('Length of last array = {0}'.format(len(A+B))) + +# index_test +print('Index test:') +print('Index of element 2 in array A') +print(A.index(2)) +print('Index of element 89 in array A') +print(A.index(89)) + +# for_test +print('For loop test:') +for arg in A: + print(arg) + +# []_test +print('Indexing test:') +print('Print first element of the array A:') +print(A[0]) \ No newline at end of file diff --git a/hw_2/hw2_.md b/hw_2/hw2_.md new file mode 100644 index 0000000..572126e --- /dev/null +++ b/hw_2/hw2_.md @@ -0,0 +1,67 @@ +## Теория + +Порядок прочтения важен! + +### Материалы по Python + +- Документация `tuple`: https://docs.python.org/3/library/stdtypes.html#typesseq-tuple +- Документация `list`: https://docs.python.org/3/tutorial/datastructures.html +- Документация `dict`: https://docs.python.org/3/tutorial/datastructures.html#dictionaries +- `tuple` vs `list`: http://stackoverflow.com/questions/1708510/python-list-vs-tuple-when-to-use-each http://stackoverflow.com/questions/626759/whats-the-difference-between-lists-and-tuples http://nedbatchelder.com/blog/201608/lists_vs_tuples.html +- `dict`: https://pythonworld.ru/tipy-dannyx-v-python/slovari-dict-funkcii-i-metody-slovarej.html +- Что такое функция? https://www.tutorialspoint.com/python/python_functions.htm +- Что значит - вызвать функцию? https://stackoverflow.com/questions/19130958/what-does-it-mean-to-call-a-function-in-python +- Что такое `*args` и `**kwargs`: https://lancelote.gitbooks.io/intermediate-python/content/book/args_and_kwargs.html + +### Материалы для продвинутых + +- Что такое хеш-таблицы? https://ru.wikipedia.org/wiki/%D0%A5%D0%B5%D1%88-%D1%82%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D0%B0 +- Какие бывают списки? https://en.wikipedia.org/wiki/Linked_list#Linked_lists_vs._dynamic_arrays +- Как устроен список внутри? https://www.quora.com/How-are-Python-lists-implemented-internally +- Что такое `Sequence`: https://docs.python.org/3/library/stdtypes.html#typesseq +- Что такое `Iterable`: https://docs.python.org/3/glossary.html#term-iterable +- Сложность операций: https://wiki.python.org/moin/TimeComplexity +- Modern dictionaries (from Python Core developer): https://www.youtube.com/watch?v=p33CVV29OG8 + +### ООП в целом + +- Начальный уровень теории: https://habrahabr.ru/post/87119/ +- Принципы ООП: https://habrahabr.ru/post/87205/ + +### ООП и Python + +- Основы: https://pythonworld.ru/osnovy/obektno-orientirovannoe-programmirovanie-obshhee-predstavlenie.html +- Примеры использования: http://snakeproject.ru/rubric/article.php?art=python_oop +- Большая теоритическая статья: https://jeffknupp.com/blog/2014/06/18/improve-your-python-python-classes-and-object-oriented-programming/ +- Магические методы: https://rszalski.github.io/magicmethods/ + +### Критика + +- Почему в некоторых случаях не нужен ООП: https://habrahabr.ru/post/140581/ +- Сомнение в принципах ООП: https://habrahabr.ru/post/147927/ + +### Детали реализации + +- super: http://pythonicway.com/education/python-oop-themes/21-python-inheritance и https://www.youtube.com/watch?v=EiOglTERPEo +- Магические методы: https://habrahabr.ru/post/186608/ +- class attributes vs instance attributes: http://stackoverflow.com/questions/207000/python-difference-between-class-and-instance-attributes + + +## Практика + +Написать свой собственный класс "списков", который мы назовем `Array`. + +Что должен делать уметь ваш `Array`? + +- Создавать себя как на примере: `Array()` - пустой списо, `Array(1)` = список из одного объекта `1`, `Array(1, 2, 3)` - список из трех объектов. `Array` должен уметь работать с любым количеством аргументов +- Добавлять новый объект внутрь списка через метод `.append()` +- Складываться с другими `Array`. Например: `Array(1) + Array(2) == Array(1, 2)` +- Узнавать свою длину через функцию `len()` +- Находить индекс переданного объекта через метод `.index()`, возвращаем `-1`, если такого объекта в списке нет. Например: `Array('a', 'b').index('b') == 1` +- Работать с циклом `for`: `for element in Array(1, 2, 3):` +- Получать значение по индексу при помощи `[]`. Пример: `Array('a')[0] == 'a'` + +Требования: + +- Хранить состояние `Array` в свойстве `self._data`, использовать `tuple` +- Наследоваться нужно и можно только от `object` From f5533c6027604604c7fcef67e873b7d9db535ef4 Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Tue, 27 Sep 2022 23:20:45 +0300 Subject: [PATCH 06/14] Delete readme --- hw_2/readme | 1 - 1 file changed, 1 deletion(-) delete mode 100644 hw_2/readme diff --git a/hw_2/readme b/hw_2/readme deleted file mode 100644 index ce01362..0000000 --- a/hw_2/readme +++ /dev/null @@ -1 +0,0 @@ -hello From 5c423ea63a289298232e1ee6feaca70149398b33 Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Wed, 28 Sep 2022 18:57:00 +0300 Subject: [PATCH 07/14] Delete hw1.md --- hw_1/hw1.md | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 hw_1/hw1.md diff --git a/hw_1/hw1.md b/hw_1/hw1.md deleted file mode 100644 index b0d3ef3..0000000 --- a/hw_1/hw1.md +++ /dev/null @@ -1,30 +0,0 @@ -Задача: реализовать игру в загадки - -Требования: -- Программа выводит в консоль текст загадкок по одной и ждет ввода ответа от пользователя -- Программа после ввода ответа пользователя должна вывести в консоль результат. Если пользователь дал правильный ответ, то программа должна написать "Ответ {ОТВЕТ_ПОЛЬЗОВАТЕЛЯ} верен". Вместо "{ОТВЕТ_ПОЛЬЗОВАТЕЛЯ}" необходимо подставить ответ, введенный пользователем. Если пользователь ввел неправильный ответ, то программа должна написать "Неверный ответ." -- Программа задает пользователю 10 вопросов из списка ниже - -Список вопросов и правильных ответов для работы: -1. "Какая версия языка сейчас актуальна?" - "Python3" -2. "Какая кодировка используется в строках?" - "UTF8" -3. "Какой оператор сравнения нужно использовать для работы с None и bool?" - "is" -4. "Сколько значений есть у bool?" - 2 - -Дополнительные требования (для продвинутых): -- Программа должна в конце игры сказать, сколько ответов дал пользователь: сколько из них было верных -- Программа должна не учитывать регистр ответа пользователя, например: "utf8" и "UTF8" оба должны быть правильным ответом на вопрос "Какая кодировка используется в строках?" - -Форма сдачи работы: *** - -Материалы для прочтения: -- Что нельзя использовать как имя переменной: https://pythonworld.ru/osnovy/klyuchevye-slova-modul-keyword.html -- Escape символы в строках: https://learnpythonthehardway.org/book/ex10.html -- Как задавать вопросы: http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem -- Разница между for и while: http://stackoverflow.com/questions/920645/when-to-use-while-or-the-for-in-python - -Материалы для продвинутых: -- Таблица истинности из булевой алгебры: https://ru.wikipedia.org/wiki/%D0%A2%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D0%B0_%D0%B8%D1%81%D1%82%D0%B8%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D0%B8 (так же необходимо прочитать про (Дизъюнкция и Конъюнкция) -- Как хранятся числа в памяти: http://www.5byte.ru/11/0008.php -- Что такое Unicode: https://habrahabr.ru/post/135913/ -- Разница между UTF-8, UTF-16 и UTF-32: http://stackoverflow.com/questions/496321/utf-8-utf-16-and-utf-32 From 6666b1df4e346e81eb1f12b0881204d4e5e740ef Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Wed, 28 Sep 2022 18:57:15 +0300 Subject: [PATCH 08/14] Delete hw2_.md --- hw_2/hw2_.md | 67 ---------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 hw_2/hw2_.md diff --git a/hw_2/hw2_.md b/hw_2/hw2_.md deleted file mode 100644 index 572126e..0000000 --- a/hw_2/hw2_.md +++ /dev/null @@ -1,67 +0,0 @@ -## Теория - -Порядок прочтения важен! - -### Материалы по Python - -- Документация `tuple`: https://docs.python.org/3/library/stdtypes.html#typesseq-tuple -- Документация `list`: https://docs.python.org/3/tutorial/datastructures.html -- Документация `dict`: https://docs.python.org/3/tutorial/datastructures.html#dictionaries -- `tuple` vs `list`: http://stackoverflow.com/questions/1708510/python-list-vs-tuple-when-to-use-each http://stackoverflow.com/questions/626759/whats-the-difference-between-lists-and-tuples http://nedbatchelder.com/blog/201608/lists_vs_tuples.html -- `dict`: https://pythonworld.ru/tipy-dannyx-v-python/slovari-dict-funkcii-i-metody-slovarej.html -- Что такое функция? https://www.tutorialspoint.com/python/python_functions.htm -- Что значит - вызвать функцию? https://stackoverflow.com/questions/19130958/what-does-it-mean-to-call-a-function-in-python -- Что такое `*args` и `**kwargs`: https://lancelote.gitbooks.io/intermediate-python/content/book/args_and_kwargs.html - -### Материалы для продвинутых - -- Что такое хеш-таблицы? https://ru.wikipedia.org/wiki/%D0%A5%D0%B5%D1%88-%D1%82%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D0%B0 -- Какие бывают списки? https://en.wikipedia.org/wiki/Linked_list#Linked_lists_vs._dynamic_arrays -- Как устроен список внутри? https://www.quora.com/How-are-Python-lists-implemented-internally -- Что такое `Sequence`: https://docs.python.org/3/library/stdtypes.html#typesseq -- Что такое `Iterable`: https://docs.python.org/3/glossary.html#term-iterable -- Сложность операций: https://wiki.python.org/moin/TimeComplexity -- Modern dictionaries (from Python Core developer): https://www.youtube.com/watch?v=p33CVV29OG8 - -### ООП в целом - -- Начальный уровень теории: https://habrahabr.ru/post/87119/ -- Принципы ООП: https://habrahabr.ru/post/87205/ - -### ООП и Python - -- Основы: https://pythonworld.ru/osnovy/obektno-orientirovannoe-programmirovanie-obshhee-predstavlenie.html -- Примеры использования: http://snakeproject.ru/rubric/article.php?art=python_oop -- Большая теоритическая статья: https://jeffknupp.com/blog/2014/06/18/improve-your-python-python-classes-and-object-oriented-programming/ -- Магические методы: https://rszalski.github.io/magicmethods/ - -### Критика - -- Почему в некоторых случаях не нужен ООП: https://habrahabr.ru/post/140581/ -- Сомнение в принципах ООП: https://habrahabr.ru/post/147927/ - -### Детали реализации - -- super: http://pythonicway.com/education/python-oop-themes/21-python-inheritance и https://www.youtube.com/watch?v=EiOglTERPEo -- Магические методы: https://habrahabr.ru/post/186608/ -- class attributes vs instance attributes: http://stackoverflow.com/questions/207000/python-difference-between-class-and-instance-attributes - - -## Практика - -Написать свой собственный класс "списков", который мы назовем `Array`. - -Что должен делать уметь ваш `Array`? - -- Создавать себя как на примере: `Array()` - пустой списо, `Array(1)` = список из одного объекта `1`, `Array(1, 2, 3)` - список из трех объектов. `Array` должен уметь работать с любым количеством аргументов -- Добавлять новый объект внутрь списка через метод `.append()` -- Складываться с другими `Array`. Например: `Array(1) + Array(2) == Array(1, 2)` -- Узнавать свою длину через функцию `len()` -- Находить индекс переданного объекта через метод `.index()`, возвращаем `-1`, если такого объекта в списке нет. Например: `Array('a', 'b').index('b') == 1` -- Работать с циклом `for`: `for element in Array(1, 2, 3):` -- Получать значение по индексу при помощи `[]`. Пример: `Array('a')[0] == 'a'` - -Требования: - -- Хранить состояние `Array` в свойстве `self._data`, использовать `tuple` -- Наследоваться нужно и можно только от `object` From 727af79b4892026d7f4a43d772527fb2368fc306 Mon Sep 17 00:00:00 2001 From: AnnaKul5 <81855902+AnnaKul5@users.noreply.github.com> Date: Mon, 3 Oct 2022 17:49:52 +0300 Subject: [PATCH 09/14] Create read_me --- homeworks/hw1/read_me | 1 + 1 file changed, 1 insertion(+) create mode 100644 homeworks/hw1/read_me diff --git a/homeworks/hw1/read_me b/homeworks/hw1/read_me new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/homeworks/hw1/read_me @@ -0,0 +1 @@ +hello From dedafd037df74bd1f41d7b72e087cd941e80c72c Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 3 Oct 2022 17:59:52 +0300 Subject: [PATCH 10/14] new_folder --- homeworks/hw1/read_me | 1 - ...20\263\320\260\320\264\320\272\320\270.py" | 44 +++--- {hw_2 => homeworks/hw_2}/Array.py | 130 +++++++++--------- 3 files changed, 87 insertions(+), 88 deletions(-) delete mode 100644 homeworks/hw1/read_me rename "hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" => "homeworks/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" (97%) rename {hw_2 => homeworks/hw_2}/Array.py (95%) diff --git a/homeworks/hw1/read_me b/homeworks/hw1/read_me deleted file mode 100644 index ce01362..0000000 --- a/homeworks/hw1/read_me +++ /dev/null @@ -1 +0,0 @@ -hello diff --git "a/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" "b/homeworks/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" similarity index 97% rename from "hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" rename to "homeworks/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" index 2e3fe33..21196b2 100644 --- "a/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" +++ "b/homeworks/hw_1/\320\227\320\260\320\263\320\260\320\264\320\272\320\270.py" @@ -1,22 +1,22 @@ -import random -# A game of riddles: - -count = 0 -n = 10 -questions = ('Какая версия языка сейчас актуальна?', 'Какая кодировка используется в строках?', -'Какой оператор сравнения нужно использовать для работы с None и bool?', 'Сколько значений есть у bool?') -ansvers = ('Python3', 'UTF8', 'is', '2') - - -for i in range(n): - j = random.randint(0,3) - print(questions[j]) - users_input = str(input('Введите ответ: ')) - if users_input.lower() == ansvers[j].lower() : - count+=1 - print("Ответ {0} верен".format(users_input)) - else: - print("Ответ неверный\n") - -print('Число отгаданных загадок: {0} из 10'.format(count)) - +import random +# A game of riddles: + +count = 0 +n = 10 +questions = ('Какая версия языка сейчас актуальна?', 'Какая кодировка используется в строках?', +'Какой оператор сравнения нужно использовать для работы с None и bool?', 'Сколько значений есть у bool?') +ansvers = ('Python3', 'UTF8', 'is', '2') + + +for i in range(n): + j = random.randint(0,3) + print(questions[j]) + users_input = str(input('Введите ответ: ')) + if users_input.lower() == ansvers[j].lower() : + count+=1 + print("Ответ {0} верен".format(users_input)) + else: + print("Ответ неверный\n") + +print('Число отгаданных загадок: {0} из 10'.format(count)) + diff --git a/hw_2/Array.py b/homeworks/hw_2/Array.py similarity index 95% rename from hw_2/Array.py rename to homeworks/hw_2/Array.py index 441c9f1..11f1d8f 100644 --- a/hw_2/Array.py +++ b/homeworks/hw_2/Array.py @@ -1,66 +1,66 @@ -class Array(object): - - def __init__(self, *args): - self._data = tuple(args) - - def append(self, new_arg): - self._data += (new_arg, ) - - def __add__(self, new): - return self._data + new._data - - def __len__(self): - return len(self._data) - - def index(self, arg): - if arg in self._data: - return self._data.index(arg) - return -1 - - def __iter__(self): - return iter(self._data) - - def __getitem__(self, item): - return self._data[item] - - def print(self): - print(self._data) - -# init_test -print('Init test:') -A = Array(1, 2, 3, 4, 5) -print('Array A') -A.print() - -# append_test -print('Append test:') -A.append('abc') -print('Append element "abc" to array A') -A.print() - -# add_test -print('Addition test:') -B = Array(100, 200) -print('Add array (100, 200) to array A') -print(A + B) - -#len_test -print('Length test:') -print('Length of last array = {0}'.format(len(A+B))) - -# index_test -print('Index test:') -print('Index of element 2 in array A') -print(A.index(2)) -print('Index of element 89 in array A') -print(A.index(89)) - -# for_test -print('For loop test:') -for arg in A: - print(arg) - -# []_test -print('Indexing test:') -print('Print first element of the array A:') +class Array(object): + + def __init__(self, *args): + self._data = tuple(args) + + def append(self, new_arg): + self._data += (new_arg, ) + + def __add__(self, new): + return self._data + new._data + + def __len__(self): + return len(self._data) + + def index(self, arg): + if arg in self._data: + return self._data.index(arg) + return -1 + + def __iter__(self): + return iter(self._data) + + def __getitem__(self, item): + return self._data[item] + + def print(self): + print(self._data) + +# init_test +print('Init test:') +A = Array(1, 2, 3, 4, 5) +print('Array A') +A.print() + +# append_test +print('Append test:') +A.append('abc') +print('Append element "abc" to array A') +A.print() + +# add_test +print('Addition test:') +B = Array(100, 200) +print('Add array (100, 200) to array A') +print(A + B) + +#len_test +print('Length test:') +print('Length of last array = {0}'.format(len(A+B))) + +# index_test +print('Index test:') +print('Index of element 2 in array A') +print(A.index(2)) +print('Index of element 89 in array A') +print(A.index(89)) + +# for_test +print('For loop test:') +for arg in A: + print(arg) + +# []_test +print('Indexing test:') +print('Print first element of the array A:') print(A[0]) \ No newline at end of file From fcd1ff4fd9e6055ceda4c374365f218d70271ba2 Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 3 Oct 2022 18:05:23 +0300 Subject: [PATCH 11/14] practice --- practice/game.py | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 practice/game.py diff --git a/practice/game.py b/practice/game.py new file mode 100644 index 0000000..cbaea60 --- /dev/null +++ b/practice/game.py @@ -0,0 +1,86 @@ +# `random` module is used to shuffle field, see: +# https://docs.python.org/3/library/random.html#random.shuffle +import random + +# Empty tile, there's only one empty cell on a field: +EMPTY_MARK = 'x' + +# Dictionary of possible moves if a form of: +# key -> delta to move the empty tile on a field. +MOVES = { + 'w': -4, + 's': 4, + 'a': -1, + 'd': 1, +} + + +def shuffle_field(): + field = [] + for i in range(15): + field.append(random.randint(1,15)) + field.append(EMPTY_MARK) + random.shuffle(field) + return field + + +def print_field(field): + i = 0 + j = 0 + for i in range(4): + print(field[j:j+4]) + j+=4 + return field + + +def is_game_finished(field): + if field[15] != EMPTY_MARK: + return False + for i in range(14): + if field[i] != field[i+1]: + return False + return True + + + +def perform_move(field, key): + """ + Moves empty-tile inside the field. + + :param field: current field state. + :param key: move direction. + :return: new field state (after the move) + or `None` if the move can't me done. + """ + pass + + +def handle_user_input(): + """ + Handles user input. + + List of accepted moves: + 'w' - up, + 's' - down, + 'a' - left, + 'd' - right + + :return: current move. + """ + pass + + +def main(): + """ + The main function. It starts when the program is called. + + It also calls other functions. + :return: None + """ + pass + + +if __name__ == '__main__': + # See what this means: + # http://stackoverflow.com/questions/419163/what-does-if-name-main-do + main() From ce7d52c2973f5cf939e6ec60972c858646369148 Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 5 Oct 2022 19:25:30 +0300 Subject: [PATCH 12/14] practice 2 --- practice/Exeptions.py | 65 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 practice/Exeptions.py diff --git a/practice/Exeptions.py b/practice/Exeptions.py new file mode 100644 index 0000000..a5c06ae --- /dev/null +++ b/practice/Exeptions.py @@ -0,0 +1,65 @@ +y = [1, 2, 3] +x = iter(y) +x.__next__() +x.__next__() +x.__next__() +try: + x.__next__() +except StopIteration: + print("StopIteration") + +dict = {'a' : 1, 'b' : 2} +try: + dict[0] +except KeyError: + print("KeyError") + + +def devision(a, b): + return a/b + +try: + devision(1, 0) +except ZeroDivisionError: + print("ZeroDivisionError") + + +try: + devision(1, 'a') +except TypeError: + print("TypeError") + +try: + devision(10, 3) +except FloatingPointError: + print("FloatingPointError") + + +try: + devision(1, z) +except NameError: + print("NameError") + + +try: + a = input() + print ("Try using KeyboardInterrupt") + +except KeyboardInterrupt: + print ("KeyboardInterrupt exception") #Ошибка возникнет, например, если нажать ctrl +c +else: + print ("No exceptions are caught") + + + +# IndentationError + #if 0 == 0: + #print('0=0') + + +#SyntaxError: +#numbers = [1, 2, 3] +#if 1 in numbers: +# print('1 is number') +# break + From 5660b65e892f11af2a25dd1ff7cc896c91579a1f Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 17 Oct 2022 17:43:09 +0300 Subject: [PATCH 13/14] hw_4 --- homeworks/hw_3/hw_3.py | 91 +++++++++++ homeworks/hw_4/__MACOSX/hw5/._hw5.md | Bin 0 -> 176 bytes homeworks/hw_4/hw5/README.md | 27 ++++ homeworks/hw_4/hw5/hw5.md | 53 +++++++ homeworks/hw_4/hw5/tests/conftest.py | 5 + homeworks/hw_4/hw5/tests/test_done_command.py | 31 ++++ .../hw_4/hw5/tests/test_representations.py | 18 +++ homeworks/hw_4/hw5/tests/test_to_read_item.py | 43 +++++ .../hw_4/hw5/tests/test_undone_command.py | 31 ++++ homeworks/hw_4/hw5/todo/__init__.py | 0 homeworks/hw_4/hw5/todo/__main__.py | 28 ++++ homeworks/hw_4/hw5/todo/commands.py | 147 ++++++++++++++++++ homeworks/hw_4/hw5/todo/custom_exceptions.py | 2 + homeworks/hw_4/hw5/todo/models.py | 67 ++++++++ homeworks/hw_4/hw5/todo/reflection.py | 34 ++++ homeworks/hw_4/hw5/todo/runtime.py | 52 +++++++ homeworks/hw_4/hw5/todo/storage.py | 21 +++ 17 files changed, 650 insertions(+) create mode 100644 homeworks/hw_3/hw_3.py create mode 100644 homeworks/hw_4/__MACOSX/hw5/._hw5.md create mode 100644 homeworks/hw_4/hw5/README.md create mode 100644 homeworks/hw_4/hw5/hw5.md create mode 100644 homeworks/hw_4/hw5/tests/conftest.py create mode 100644 homeworks/hw_4/hw5/tests/test_done_command.py create mode 100644 homeworks/hw_4/hw5/tests/test_representations.py create mode 100644 homeworks/hw_4/hw5/tests/test_to_read_item.py create mode 100644 homeworks/hw_4/hw5/tests/test_undone_command.py create mode 100644 homeworks/hw_4/hw5/todo/__init__.py create mode 100644 homeworks/hw_4/hw5/todo/__main__.py create mode 100644 homeworks/hw_4/hw5/todo/commands.py create mode 100644 homeworks/hw_4/hw5/todo/custom_exceptions.py create mode 100644 homeworks/hw_4/hw5/todo/models.py create mode 100644 homeworks/hw_4/hw5/todo/reflection.py create mode 100644 homeworks/hw_4/hw5/todo/runtime.py create mode 100644 homeworks/hw_4/hw5/todo/storage.py diff --git a/homeworks/hw_3/hw_3.py b/homeworks/hw_3/hw_3.py new file mode 100644 index 0000000..446a34c --- /dev/null +++ b/homeworks/hw_3/hw_3.py @@ -0,0 +1,91 @@ +class ContractError(Exception): + """We use this error when someone breaks our contract.""" + +#: Special value, that indicates that validation for this type is not required. +Any = object() + + +def contract(arg_types=None, return_type=None, raises=None): + def decorator(function): + def argument_check(*args, **kwargs): + if arg_types is not None: + arguments = tuple(args) + tuple(kwargs.values()) + + if len(arguments) != len(arg_types): + raise ContractError("Argument count error") + else: + for index, arg_t in enumerate(arg_types): + if arg_t != Any and arg_t != type(arguments[index]): + raise ContractError("Argument type mismatch error") + + if return_type is None: + pass + else: + if return_type != type(function(*args, **kwargs)) and return_type != Any: + raise ContractError("Return type error") + + try: + result = function(*args, **kwargs) + except: + raise raises + + return result + return argument_check + return decorator + + + +#First example +#@contract(arg_types=(int, int), return_type=int) +#def add_two_numbers(first, second): +# return first + second +#print(add_two_numbers(1, 2)) + + + +#Second example +#add_two_numbers('a', 'b') + + + +#Third example +#@contract(arg_types=(int, int), return_type=float, raises=(ZeroDivisionError,)) +#def div(first, second): +# return first / second +# +#print(div(1, 2)) # ok +#print(div(1, 0)) # raises ZeroDisionError +#print(div(1, None)) # raises ContractError from TypeError + + + +#Fourth example +#validates only return type, args and raises are ignored: +#@contract(return_type=int) +#def return_myself(x): +# return x +# +#print(return_myself(10)) + +# validation is completely disabled: +#@contract(return_type=None, arg_types=None, raises=None) +#def hello_world(): +# print('Hello, World!') +#hello_world() + +# return type and raises checks are disabled: +#@contract(arg_types=(str, str)) +#def sum_string(x, y): +# return x+y +#print(sum_string('abc', 'def')) + + + +#Fifth example +#@contract(arg_types=(int, Any)) +#def add_two_numbers(first, second): +# return first + second +# +#print(add_two_numbers(1, 2)) # ok +#print(add_two_numbers(1, 3.4)) # ok +#print(add_two_numbers(2.1, 1)) # raises ContractError \ No newline at end of file diff --git a/homeworks/hw_4/__MACOSX/hw5/._hw5.md b/homeworks/hw_4/__MACOSX/hw5/._hw5.md new file mode 100644 index 0000000000000000000000000000000000000000..f84d25c8fdea3ec2d1b8ee0815ccaa894be86d63 GIT binary patch literal 176 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUBqY_#1$j2;dkJ5(HHS(y;)D1)zKw z#Rz090AirHRC0c dict: + # Dynamic load: + return dict(find_classes(BaseItem)) + + def _select_item(self, classes): + selection = int(input('Input number: ')) + if selection < 0: + raise IndexError('Index needs to be >=0') + + if selection >= len(list(classes.keys())): + raise IndexError('Invalid index value') + return list(classes.keys())[selection] + + +class ExitCommand(BaseCommand): + label = 'exit' + + def perform(self, _store): + raise UserExitException('See you next time!') + + +class DoneCommand(BaseCommand): + label = 'done' + + def perform(self, store): + if len(store.items) == 0: + print('There are no items in the storage.') + return + + selection = None + selected_note = None + + while True: + try: + selected_note = self._select_item(store) + except ValueError: + print('Bad input, try again.') + except IndexError: + print('Wrong index, try again.') + else: + break + + selected_note.done = True + + print('Note {0} id done'.format(str(selected_note))) + print() + + def _select_item(self, store): + selection = int(input('Input number: ')) + if selection < 0: + raise IndexError('Index needs to be >=0') + + if selection >= len(store.items): + raise IndexError('Invalid index value') + return store.items[selection] + + +class UndoneCommand(DoneCommand): + label = 'undone' + + def perform(self, store): + if len(store.items) == 0: + print('There are no items for change status.') + return + + selection = None + selected_note = None + + while True: + try: + selected_note = self._select_item(store) + except ValueError: + print('Bad input, try again.') + except IndexError: + print('Wrong index, try again.') + else: + break + + selected_note.done = False + + print('Note {0} is undone'.format(str(selected_note))) + print() + diff --git a/homeworks/hw_4/hw5/todo/custom_exceptions.py b/homeworks/hw_4/hw5/todo/custom_exceptions.py new file mode 100644 index 0000000..5e8963c --- /dev/null +++ b/homeworks/hw_4/hw5/todo/custom_exceptions.py @@ -0,0 +1,2 @@ +class UserExitException(Exception): + """We use this exception when user wants to exit.""" diff --git a/homeworks/hw_4/hw5/todo/models.py b/homeworks/hw_4/hw5/todo/models.py new file mode 100644 index 0000000..736d03f --- /dev/null +++ b/homeworks/hw_4/hw5/todo/models.py @@ -0,0 +1,67 @@ +class BaseItem(object): + def __init__(self, heading): + self.heading = heading + self.done = False # TODO: make sure we can use it... + + #def __str__(self): + # return self.__class__.__name__[:-4] #Return class name without 'Item' + + def __str__(self): + return '{0} {1}'.format( + '+' if self.done else '-', #Статус готовности + self.__class__.__name__[:-4], #Название типа задачи (без'Item') + ) + @classmethod + def construct(cls): + raise NotImplementedError() + + +class ToDoItem(BaseItem): + def __str__(self): + return '{0}: {1}'.format( + super().__str__(), + self.heading, + ) + + @classmethod + def construct(cls): + heading = input('Input heading: ') + return cls(heading) + + +class ToBuyItem(BaseItem): + def __init__(self, heading, price): + super().__init__(heading) + self.price = price + + def __str__(self): + return '{0}: {1} for {2}'.format( + super().__str__(), + self.heading, + self.price, + ) + + @classmethod + def construct(cls): + heading = input('Input heading: ') + price = input('Input price: ') + return cls(heading, price) + + +class ToReadItem(BaseItem): + def __init__(self, heading, url): + super().__init__(heading) + self.url = url + + def __str__(self): + return '{0}: {1} {2}'.format( + super().__str__(), + self.heading, + self.url, + ) + + @classmethod + def construct(cls): + heading = input('Input heading: ') + url = input('Input url: ') + return cls(heading, url) \ No newline at end of file diff --git a/homeworks/hw_4/hw5/todo/reflection.py b/homeworks/hw_4/hw5/todo/reflection.py new file mode 100644 index 0000000..04ced21 --- /dev/null +++ b/homeworks/hw_4/hw5/todo/reflection.py @@ -0,0 +1,34 @@ +import inspect +import sys + + +def find_classes(base_class) -> tuple: + """ + Finds all subclasses of a class inside module. + + :param base_class: Base class to search children. + :return: tuple of subclasses + """ + return inspect.getmembers( + sys.modules[base_class.__module__], + _reflect_filter(base_class), + ) + + +def _reflect_filter(base_class): + """ + Reflection is used to load modules dynamically. + + This method is complex. It does some dark magic. + How is it even possible to understand it? + + :param base_class: Target base class + :return: function to filter only subclasses of `base_class` + """ + def class_filter(klass): + return inspect.isclass( + klass, + ) and klass.__module__ == base_class.__module__ and issubclass( + klass, base_class, + ) and klass is not base_class + return class_filter \ No newline at end of file diff --git a/homeworks/hw_4/hw5/todo/runtime.py b/homeworks/hw_4/hw5/todo/runtime.py new file mode 100644 index 0000000..0bf58c2 --- /dev/null +++ b/homeworks/hw_4/hw5/todo/runtime.py @@ -0,0 +1,52 @@ +from todo.commands import BaseCommand +from todo.custom_exceptions import UserExitException +from todo.reflection import find_classes +from todo.storage import Storage + + +def get_routes() -> dict: + """ + This function contains the dictionary of possible commands. + :return: `dict` of possible commands, with the format: `name -> class` + """ + routes = find_classes(BaseCommand) + return { + route().label: route + for _, route in routes + } + + +def perform_command(command: str) -> None: + """ + Performs the command by name. + Stores the result in `Storage()`. + :param command: command name, selected by user. + """ + command = command.lower() + routes = get_routes() + + try: + command_class = routes[command] + except KeyError: + print('Bad command, try again.') + return + + command_inst = command_class() + storage = Storage() + + try: + command_inst.perform(storage) + except UserExitException as ex: + # Handling `exit` command. + print(ex) + raise + + +def parse_user_input(): + """ + Gets the user input. + :return: `str` with the user input. + """ + commands = get_routes().keys() + message = 'Input your command: ({0}): '.format('|'.join(commands)) + return input(message) \ No newline at end of file diff --git a/homeworks/hw_4/hw5/todo/storage.py b/homeworks/hw_4/hw5/todo/storage.py new file mode 100644 index 0000000..914fbd0 --- /dev/null +++ b/homeworks/hw_4/hw5/todo/storage.py @@ -0,0 +1,21 @@ +class Storage(object): # storage = Storge() + """ + Singleton storage. + + Read more about singleton design pattern: + https://stackoverflow.com/questions/6760685/creating-a-singleton-in-python + https://en.wikipedia.org/wiki/Singleton_pattern + + It is used to emulate in-memory storage. + It should be replaced with a database in a real application. + """ + + obj = None + items = None + + @classmethod + def __new__(cls, *args): + if cls.obj is None: + cls.obj = object.__new__(cls) + cls.items = [] + return cls.obj \ No newline at end of file From aa60d0fad7238877201af90112cabc09cf94c04e Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 26 Oct 2022 02:05:24 +0300 Subject: [PATCH 14/14] my_awesome_script --- homeworks/hw_3/hw_3.py | 8 +- homeworks/hw_5/hw6/README.md | 0 .../hw_5/hw6/my_awesome_script/__init__.py | 1 + .../hw_5/hw6/my_awesome_script/__main__.py | 11 + .../hw_5/hw6/my_awesome_script/cmd_input.py | 26 + .../hw_5/hw6/my_awesome_script/commands.py | 56 ++ homeworks/hw_5/hw6/poetry.lock | 674 ++++++++++++++++++ homeworks/hw_5/hw6/pyproject.toml | 23 + 8 files changed, 795 insertions(+), 4 deletions(-) create mode 100644 homeworks/hw_5/hw6/README.md create mode 100644 homeworks/hw_5/hw6/my_awesome_script/__init__.py create mode 100644 homeworks/hw_5/hw6/my_awesome_script/__main__.py create mode 100644 homeworks/hw_5/hw6/my_awesome_script/cmd_input.py create mode 100644 homeworks/hw_5/hw6/my_awesome_script/commands.py create mode 100644 homeworks/hw_5/hw6/poetry.lock create mode 100644 homeworks/hw_5/hw6/pyproject.toml diff --git a/homeworks/hw_3/hw_3.py b/homeworks/hw_3/hw_3.py index 446a34c..5ddd8cc 100644 --- a/homeworks/hw_3/hw_3.py +++ b/homeworks/hw_3/hw_3.py @@ -36,10 +36,10 @@ def argument_check(*args, **kwargs): #First example -#@contract(arg_types=(int, int), return_type=int) -#def add_two_numbers(first, second): -# return first + second -#print(add_two_numbers(1, 2)) +@contract(arg_types=(int, int), return_type=int) +def add_two_numbers(first, second): + return first + second +print(add_two_numbers(1, 2)) diff --git a/homeworks/hw_5/hw6/README.md b/homeworks/hw_5/hw6/README.md new file mode 100644 index 0000000..e69de29 diff --git a/homeworks/hw_5/hw6/my_awesome_script/__init__.py b/homeworks/hw_5/hw6/my_awesome_script/__init__.py new file mode 100644 index 0000000..59fbf55 --- /dev/null +++ b/homeworks/hw_5/hw6/my_awesome_script/__init__.py @@ -0,0 +1 @@ +"""Empty file.""" diff --git a/homeworks/hw_5/hw6/my_awesome_script/__main__.py b/homeworks/hw_5/hw6/my_awesome_script/__main__.py new file mode 100644 index 0000000..f8b861e --- /dev/null +++ b/homeworks/hw_5/hw6/my_awesome_script/__main__.py @@ -0,0 +1,11 @@ +"""Main program.""" +from .cmd_input import parse_cmd_input + + +def main(): + """Call parse_cmd_input function.""" + parse_cmd_input() + + +if __name__ == '__main__': + main() diff --git a/homeworks/hw_5/hw6/my_awesome_script/cmd_input.py b/homeworks/hw_5/hw6/my_awesome_script/cmd_input.py new file mode 100644 index 0000000..fc594bc --- /dev/null +++ b/homeworks/hw_5/hw6/my_awesome_script/cmd_input.py @@ -0,0 +1,26 @@ +"""Parser file.""" +import argparse + +from .commands import select_command + + +def parse_cmd_input(): + """Create a parser.""" + parser = argparse.ArgumentParser() + parser.add_argument('command', type=str, choices=[ + 'highlight', + 'cowsay', + 'time', + 'help', + ], + help="""Available commands: + highlight, + cowsay, + time, + help,""") + parser.add_argument('parametr', type=str, help= + """Argument for highlight command is text\n + Argument for cowsay command is text'\n + Argument for time command region/city""") + pars_args = parser.parse_args() + select_command(pars_args.command, pars_args.parametr) diff --git a/homeworks/hw_5/hw6/my_awesome_script/commands.py b/homeworks/hw_5/hw6/my_awesome_script/commands.py new file mode 100644 index 0000000..c3ab307 --- /dev/null +++ b/homeworks/hw_5/hw6/my_awesome_script/commands.py @@ -0,0 +1,56 @@ +"""Commands file.""" +import pytz +from pygments import highlight +from pygments.formatters import TerminalFormatter +from pygments.lexers import PythonLexer +from cowsay import ghostbusters +from datetime import datetime + + +def select_command(command, parametr = None): + """ + Select command. + + Args: + command, parametr + """ + commands[command](parametr) + + +def highlight_fun(text): + """ + Highlight text. + + Args: + text + """ + print(highlight(text, PythonLexer(), TerminalFormatter())) + + +def cowsay_ghostbusters(text): + """ + Use ghostbusters text wrapping. + + Args: + text + """ + print(ghostbusters(text)) + + +def time_fun(region): + """ + Show the time of the specified region. + + Args: + region + """ + timezone = pytz.timezone(region) + local_time = datetime.now(timezone) + print('Time: {0}'.format(local_time.time())) + + +commands = { + 'highlight': highlight_fun, + 'cowsay': cowsay_ghostbusters, + 'time': time_fun, + } diff --git a/homeworks/hw_5/hw6/poetry.lock b/homeworks/hw_5/hw6/poetry.lock new file mode 100644 index 0000000..7061a4a --- /dev/null +++ b/homeworks/hw_5/hw6/poetry.lock @@ -0,0 +1,674 @@ +[[package]] +name = "argparse" +version = "1.4.0" +description = "Python command-line parsing library" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "astor" +version = "0.8.1" +description = "Read/rewrite/write Python ASTs" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" + +[[package]] +name = "attrs" +version = "22.1.0" +description = "Classes Without Boilerplate" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] +docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] +tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] +tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] + +[[package]] +name = "bandit" +version = "1.7.4" +description = "Security oriented static analyser for python code." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +colorama = {version = ">=0.3.9", markers = "platform_system == \"Windows\""} +GitPython = ">=1.0.1" +PyYAML = ">=5.3.1" +stevedore = ">=1.20.0" + +[package.extras] +test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)", "toml"] +toml = ["toml"] +yaml = ["PyYAML"] + +[[package]] +name = "colorama" +version = "0.4.5" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "cowpy" +version = "1.1.5" +description = "" +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "cowsay" +version = "5.0" +description = "The famous cowsay for GNU/Linux is now available for python" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "darglint" +version = "1.8.1" +description = "A utility for ensuring Google-style docstrings stay up to date with the source code." +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "docutils" +version = "0.19" +description = "Docutils -- Python Documentation Utilities" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "eradicate" +version = "2.1.0" +description = "Removes commented-out code." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "flake8" +version = "4.0.1" +description = "the modular source code checker: pep8 pyflakes and co" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +mccabe = ">=0.6.0,<0.7.0" +pycodestyle = ">=2.8.0,<2.9.0" +pyflakes = ">=2.4.0,<2.5.0" + +[[package]] +name = "flake8-bandit" +version = "3.0.0" +description = "Automated security testing with bandit and flake8." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +bandit = ">=1.7.3" +flake8 = "*" +flake8-polyfill = "*" +pycodestyle = "*" + +[[package]] +name = "flake8-broken-line" +version = "0.5.0" +description = "Flake8 plugin to forbid backslashes for line breaks" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[package.dependencies] +flake8 = ">=3.5,<6" + +[[package]] +name = "flake8-bugbear" +version = "22.9.23" +description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +attrs = ">=19.2.0" +flake8 = ">=3.0.0" + +[package.extras] +dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit"] + +[[package]] +name = "flake8-commas" +version = "2.1.0" +description = "Flake8 lint for trailing commas." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +flake8 = ">=2" + +[[package]] +name = "flake8-comprehensions" +version = "3.10.0" +description = "A flake8 plugin to help you write better list/set/dict comprehensions." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +flake8 = ">=3.0,<3.2.0 || >3.2.0" + +[[package]] +name = "flake8-debugger" +version = "4.1.2" +description = "ipdb/pdb statement checker plugin for flake8" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +flake8 = ">=3.0" +pycodestyle = "*" + +[[package]] +name = "flake8-docstrings" +version = "1.6.0" +description = "Extension for flake8 which uses pydocstyle to check docstrings" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +flake8 = ">=3" +pydocstyle = ">=2.1" + +[[package]] +name = "flake8-eradicate" +version = "1.4.0" +description = "Flake8 plugin to find commented out code" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" + +[package.dependencies] +attrs = "*" +eradicate = ">=2.0,<3.0" +flake8 = ">=3.5,<6" + +[[package]] +name = "flake8-isort" +version = "4.2.0" +description = "flake8 plugin that integrates isort ." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +flake8 = ">=3.2.1,<6" +isort = ">=4.3.5,<6" + +[package.extras] +test = ["pytest-cov"] + +[[package]] +name = "flake8-polyfill" +version = "1.0.2" +description = "Polyfill package for Flake8 plugins" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +flake8 = "*" + +[[package]] +name = "flake8-quotes" +version = "3.3.1" +description = "Flake8 lint for quotes." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +flake8 = "*" + +[[package]] +name = "flake8-rst-docstrings" +version = "0.2.7" +description = "Python docstring reStructuredText (RST) validator" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +flake8 = ">=3.0.0" +pygments = "*" +restructuredtext-lint = "*" + +[[package]] +name = "flake8-string-format" +version = "0.3.0" +description = "string format checker, plugin for flake8" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +flake8 = "*" + +[[package]] +name = "gitdb" +version = "4.0.9" +description = "Git Object Database" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +smmap = ">=3.0.1,<6" + +[[package]] +name = "gitpython" +version = "3.1.29" +description = "GitPython is a python library used to interact with Git repositories" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +gitdb = ">=4.0.1,<5" + +[[package]] +name = "isort" +version = "5.10.1" +description = "A Python utility / library to sort Python imports." +category = "main" +optional = false +python-versions = ">=3.6.1,<4.0" + +[package.extras] +colors = ["colorama (>=0.4.3,<0.5.0)"] +pipfile-deprecated-finder = ["pipreqs", "requirementslib"] +plugins = ["setuptools"] +requirements-deprecated-finder = ["pip-api", "pipreqs"] + +[[package]] +name = "mccabe" +version = "0.6.1" +description = "McCabe checker, plugin for flake8" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pbr" +version = "5.11.0" +description = "Python Build Reasonableness" +category = "main" +optional = false +python-versions = ">=2.6" + +[[package]] +name = "pep8-naming" +version = "0.13.2" +description = "Check PEP-8 naming conventions, plugin for flake8" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +flake8 = ">=3.9.1" + +[[package]] +name = "pycodestyle" +version = "2.8.0" +description = "Python style guide checker" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "pydocstyle" +version = "6.1.1" +description = "Python docstring style checker" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +snowballstemmer = "*" + +[package.extras] +toml = ["toml"] + +[[package]] +name = "pyflakes" +version = "2.4.0" +description = "passive checker of Python programs" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pygments" +version = "2.13.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +plugins = ["importlib-metadata"] + +[[package]] +name = "pytz" +version = "2022.5" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pyyaml" +version = "6.0" +description = "YAML parser and emitter for Python" +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "restructuredtext-lint" +version = "1.4.0" +description = "reStructuredText linter" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +docutils = ">=0.11,<1.0" + +[[package]] +name = "smmap" +version = "5.0.0" +description = "A pure Python implementation of a sliding window memory map manager" +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "stevedore" +version = "4.1.0" +description = "Manage dynamic plugins for Python applications" +category = "main" +optional = false +python-versions = ">=3.8" + +[package.dependencies] +pbr = ">=2.0.0,<2.1.0 || >2.1.0" + +[[package]] +name = "typing-extensions" +version = "4.4.0" +description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "wemake-python-styleguide" +version = "0.17.0" +description = "The strictest and most opinionated python linter ever" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" + +[package.dependencies] +astor = ">=0.8,<0.9" +attrs = "*" +darglint = ">=1.2,<2.0" +flake8 = ">=3.7,<5" +flake8-bandit = ">=2.1,<4" +flake8-broken-line = ">=0.5,<0.6" +flake8-bugbear = ">=22.9,<23.0" +flake8-commas = ">=2.0,<3.0" +flake8-comprehensions = ">=3.1,<4.0" +flake8-debugger = ">=4.0,<5.0" +flake8-docstrings = ">=1.3,<2.0" +flake8-eradicate = ">=1.0,<2.0" +flake8-isort = ">=4.0,<5.0" +flake8-quotes = ">=3.0,<4.0" +flake8-rst-docstrings = ">=0.2,<0.3" +flake8-string-format = ">=0.3,<0.4" +pep8-naming = ">=0.13,<0.14" +pygments = ">=2.4,<3.0" +typing_extensions = ">=4.0,<5.0" + +[metadata] +lock-version = "1.1" +python-versions = "^3.10" +content-hash = "34e1fa271ed2d33c66773394aa19f44f78c7b671c6ca934076e0cd9604ffd5ab" + +[metadata.files] +argparse = [ + {file = "argparse-1.4.0-py2.py3-none-any.whl", hash = "sha256:c31647edb69fd3d465a847ea3157d37bed1f95f19760b11a47aa91c04b666314"}, + {file = "argparse-1.4.0.tar.gz", hash = "sha256:62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4"}, +] +astor = [ + {file = "astor-0.8.1-py2.py3-none-any.whl", hash = "sha256:070a54e890cefb5b3739d19f30f5a5ec840ffc9c50ffa7d23cc9fc1a38ebbfc5"}, + {file = "astor-0.8.1.tar.gz", hash = "sha256:6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e"}, +] +attrs = [ + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, +] +bandit = [ + {file = "bandit-1.7.4-py3-none-any.whl", hash = "sha256:412d3f259dab4077d0e7f0c11f50f650cc7d10db905d98f6520a95a18049658a"}, + {file = "bandit-1.7.4.tar.gz", hash = "sha256:2d63a8c573417bae338962d4b9b06fbc6080f74ecd955a092849e1e65c717bd2"}, +] +colorama = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] +cowpy = [ + {file = "cowpy-1.1.5-py3-none-any.whl", hash = "sha256:de5ae7646dd30b4936013666c6bd019af9cf411cc3b377c8538cfd8414262921"}, + {file = "cowpy-1.1.5.tar.gz", hash = "sha256:089172db1d88c30a2e1b741b18945ee84170bd943a3ca71948e4ae3a3255e554"}, +] +cowsay = [ + {file = "cowsay-5.0.tar.gz", hash = "sha256:c00e02444f5bc7332826686bd44d963caabbaba9a804a63153822edce62bbbf3"}, +] +darglint = [ + {file = "darglint-1.8.1-py3-none-any.whl", hash = "sha256:5ae11c259c17b0701618a20c3da343a3eb98b3bc4b5a83d31cdd94f5ebdced8d"}, + {file = "darglint-1.8.1.tar.gz", hash = "sha256:080d5106df149b199822e7ee7deb9c012b49891538f14a11be681044f0bb20da"}, +] +docutils = [ + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, +] +eradicate = [ + {file = "eradicate-2.1.0-py3-none-any.whl", hash = "sha256:8bfaca181db9227dc88bdbce4d051a9627604c2243e7d85324f6d6ce0fd08bb2"}, + {file = "eradicate-2.1.0.tar.gz", hash = "sha256:aac7384ab25b1bf21c4c012de9b4bf8398945a14c98c911545b2ea50ab558014"}, +] +flake8 = [ + {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, + {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, +] +flake8-bandit = [ + {file = "flake8_bandit-3.0.0-py2.py3-none-any.whl", hash = "sha256:61b617f4f7cdaa0e2b1e6bf7b68afb2b619a227bb3e3ae00dd36c213bd17900a"}, + {file = "flake8_bandit-3.0.0.tar.gz", hash = "sha256:54d19427e6a8d50322a7b02e1841c0a7c22d856975f3459803320e0e18e2d6a1"}, +] +flake8-broken-line = [ + {file = "flake8-broken-line-0.5.0.tar.gz", hash = "sha256:7c98de9dd1385b71e888709c7f2aee3f0514107ecb5875bc95d0c03392191c97"}, + {file = "flake8_broken_line-0.5.0-py3-none-any.whl", hash = "sha256:daafb19b67eead0410ce7ba155d51a15b9d020ebe7630d87de9c2b93cedb6703"}, +] +flake8-bugbear = [ + {file = "flake8-bugbear-22.9.23.tar.gz", hash = "sha256:17b9623325e6e0dcdcc80ed9e4aa811287fcc81d7e03313b8736ea5733759937"}, + {file = "flake8_bugbear-22.9.23-py3-none-any.whl", hash = "sha256:cd2779b2b7ada212d7a322814a1e5651f1868ab0d3f24cc9da66169ab8fda474"}, +] +flake8-commas = [ + {file = "flake8-commas-2.1.0.tar.gz", hash = "sha256:940441ab8ee544df564ae3b3f49f20462d75d5c7cac2463e0b27436e2050f263"}, + {file = "flake8_commas-2.1.0-py2.py3-none-any.whl", hash = "sha256:ebb96c31e01d0ef1d0685a21f3f0e2f8153a0381430e748bf0bbbb5d5b453d54"}, +] +flake8-comprehensions = [ + {file = "flake8-comprehensions-3.10.0.tar.gz", hash = "sha256:181158f7e7aa26a63a0a38e6017cef28c6adee71278ce56ce11f6ec9c4905058"}, + {file = "flake8_comprehensions-3.10.0-py3-none-any.whl", hash = "sha256:dad454fd3d525039121e98fa1dd90c46bc138708196a4ebbc949ad3c859adedb"}, +] +flake8-debugger = [ + {file = "flake8-debugger-4.1.2.tar.gz", hash = "sha256:52b002560941e36d9bf806fca2523dc7fb8560a295d5f1a6e15ac2ded7a73840"}, + {file = "flake8_debugger-4.1.2-py3-none-any.whl", hash = "sha256:0a5e55aeddcc81da631ad9c8c366e7318998f83ff00985a49e6b3ecf61e571bf"}, +] +flake8-docstrings = [ + {file = "flake8-docstrings-1.6.0.tar.gz", hash = "sha256:9fe7c6a306064af8e62a055c2f61e9eb1da55f84bb39caef2b84ce53708ac34b"}, + {file = "flake8_docstrings-1.6.0-py2.py3-none-any.whl", hash = "sha256:99cac583d6c7e32dd28bbfbef120a7c0d1b6dde4adb5a9fd441c4227a6534bde"}, +] +flake8-eradicate = [ + {file = "flake8-eradicate-1.4.0.tar.gz", hash = "sha256:3088cfd6717d1c9c6c3ac45ef2e5f5b6c7267f7504d5a74b781500e95cb9c7e1"}, + {file = "flake8_eradicate-1.4.0-py3-none-any.whl", hash = "sha256:e3bbd0871be358e908053c1ab728903c114f062ba596b4d40c852fd18f473d56"}, +] +flake8-isort = [ + {file = "flake8-isort-4.2.0.tar.gz", hash = "sha256:26571500cd54976bbc0cf1006ffbcd1a68dd102f816b7a1051b219616ba9fee0"}, + {file = "flake8_isort-4.2.0-py3-none-any.whl", hash = "sha256:5b87630fb3719bf4c1833fd11e0d9534f43efdeba524863e15d8f14a7ef6adbf"}, +] +flake8-polyfill = [ + {file = "flake8-polyfill-1.0.2.tar.gz", hash = "sha256:e44b087597f6da52ec6393a709e7108b2905317d0c0b744cdca6208e670d8eda"}, + {file = "flake8_polyfill-1.0.2-py2.py3-none-any.whl", hash = "sha256:12be6a34ee3ab795b19ca73505e7b55826d5f6ad7230d31b18e106400169b9e9"}, +] +flake8-quotes = [ + {file = "flake8-quotes-3.3.1.tar.gz", hash = "sha256:633adca6fb8a08131536af0d750b44d6985b9aba46f498871e21588c3e6f525a"}, +] +flake8-rst-docstrings = [ + {file = "flake8-rst-docstrings-0.2.7.tar.gz", hash = "sha256:2740067ab9237559dd45a3434d8c987792c7b259ca563621a3b95efe201f5382"}, + {file = "flake8_rst_docstrings-0.2.7-py3-none-any.whl", hash = "sha256:5d56075dce360bcc9c6775bfe7cb431aa395de600ca7e8d40580a28d50b2a803"}, +] +flake8-string-format = [ + {file = "flake8-string-format-0.3.0.tar.gz", hash = "sha256:65f3da786a1461ef77fca3780b314edb2853c377f2e35069723348c8917deaa2"}, + {file = "flake8_string_format-0.3.0-py2.py3-none-any.whl", hash = "sha256:812ff431f10576a74c89be4e85b8e075a705be39bc40c4b4278b5b13e2afa9af"}, +] +gitdb = [ + {file = "gitdb-4.0.9-py3-none-any.whl", hash = "sha256:8033ad4e853066ba6ca92050b9df2f89301b8fc8bf7e9324d412a63f8bf1a8fd"}, + {file = "gitdb-4.0.9.tar.gz", hash = "sha256:bac2fd45c0a1c9cf619e63a90d62bdc63892ef92387424b855792a6cabe789aa"}, +] +gitpython = [ + {file = "GitPython-3.1.29-py3-none-any.whl", hash = "sha256:41eea0deec2deea139b459ac03656f0dd28fc4a3387240ec1d3c259a2c47850f"}, + {file = "GitPython-3.1.29.tar.gz", hash = "sha256:cc36bfc4a3f913e66805a28e84703e419d9c264c1077e537b54f0e1af85dbefd"}, +] +isort = [ + {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, + {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, +] +mccabe = [ + {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, + {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, +] +pbr = [ + {file = "pbr-5.11.0-py2.py3-none-any.whl", hash = "sha256:db2317ff07c84c4c63648c9064a79fe9d9f5c7ce85a9099d4b6258b3db83225a"}, + {file = "pbr-5.11.0.tar.gz", hash = "sha256:b97bc6695b2aff02144133c2e7399d5885223d42b7912ffaec2ca3898e673bfe"}, +] +pep8-naming = [ + {file = "pep8-naming-0.13.2.tar.gz", hash = "sha256:93eef62f525fd12a6f8c98f4dcc17fa70baae2f37fa1f73bec00e3e44392fa48"}, + {file = "pep8_naming-0.13.2-py3-none-any.whl", hash = "sha256:59e29e55c478db69cffbe14ab24b5bd2cd615c0413edf790d47d3fb7ba9a4e23"}, +] +pycodestyle = [ + {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, + {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, +] +pydocstyle = [ + {file = "pydocstyle-6.1.1-py3-none-any.whl", hash = "sha256:6987826d6775056839940041beef5c08cc7e3d71d63149b48e36727f70144dc4"}, + {file = "pydocstyle-6.1.1.tar.gz", hash = "sha256:1d41b7c459ba0ee6c345f2eb9ae827cab14a7533a88c5c6f7e94923f72df92dc"}, +] +pyflakes = [ + {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, + {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, +] +pygments = [ + {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, + {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, +] +pytz = [ + {file = "pytz-2022.5-py2.py3-none-any.whl", hash = "sha256:335ab46900b1465e714b4fda4963d87363264eb662aab5e65da039c25f1f5b22"}, + {file = "pytz-2022.5.tar.gz", hash = "sha256:c4d88f472f54d615e9cd582a5004d1e5f624854a6a27a6211591c251f22a6914"}, +] +pyyaml = [ + {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, + {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, + {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, + {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, + {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, + {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, + {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, + {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, + {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, + {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, + {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, + {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, + {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, + {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, + {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, + {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, + {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, + {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, + {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, +] +restructuredtext-lint = [ + {file = "restructuredtext_lint-1.4.0.tar.gz", hash = "sha256:1b235c0c922341ab6c530390892eb9e92f90b9b75046063e047cacfb0f050c45"}, +] +smmap = [ + {file = "smmap-5.0.0-py3-none-any.whl", hash = "sha256:2aba19d6a040e78d8b09de5c57e96207b09ed71d8e55ce0959eeee6c8e190d94"}, + {file = "smmap-5.0.0.tar.gz", hash = "sha256:c840e62059cd3be204b0c9c9f74be2c09d5648eddd4580d9314c3ecde0b30936"}, +] +snowballstemmer = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] +stevedore = [ + {file = "stevedore-4.1.0-py3-none-any.whl", hash = "sha256:3b1cbd592a87315f000d05164941ee5e164899f8fc0ce9a00bb0f321f40ef93e"}, + {file = "stevedore-4.1.0.tar.gz", hash = "sha256:02518a8f0d6d29be8a445b7f2ac63753ff29e8f2a2faa01777568d5500d777a6"}, +] +typing-extensions = [ + {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, + {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, +] +wemake-python-styleguide = [ + {file = "wemake-python-styleguide-0.17.0.tar.gz", hash = "sha256:c8869fac392019c2bb3eae4287399245d10d2726b23f1b3c68d1564909c3a71a"}, + {file = "wemake_python_styleguide-0.17.0-py3-none-any.whl", hash = "sha256:d10b953bbe4fba83a34f4c224a0e1849ede89e486eacfc760690e6c87a28eaae"}, +] diff --git a/homeworks/hw_5/hw6/pyproject.toml b/homeworks/hw_5/hw6/pyproject.toml new file mode 100644 index 0000000..61bedc2 --- /dev/null +++ b/homeworks/hw_5/hw6/pyproject.toml @@ -0,0 +1,23 @@ +[tool.poetry] +name = "my-awesome-script" +version = "0.1.0" +description = "" +authors = ["Anna "] +readme = "README.md" +packages = [{include = "my_awesome_script"}] + +[tool.poetry.dependencies] +python = "^3.10" +wemake-python-styleguide = "^0.17.0" +pytz = "^2022.5" +cowpy = "^1.1.5" +argparse = "^1.4.0" +pygments = "^2.13.0" +cowsay = "^5.0" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry.scripts] +my-awesome-script = "my_awesome_script.__main__:main" \ No newline at end of file