Go to file
2023-12-13 22:48:01 +03:00
controls 3H/W 2023-10-26 22:41:54 +03:00
doc new commit 2023-10-13 00:25:35 +03:00
equipment Change_turtle_device 2023-12-13 22:48:01 +03:00
tests 3H/W 2023-10-26 22:41:54 +03:00
time_execution new commit 2023-10-13 00:25:35 +03:00
.gitignore new commit 2023-10-13 00:25:35 +03:00
LICENSE new commit 2023-10-13 00:25:35 +03:00
noblocking_turtle_shell.py H/W4 2023-11-17 01:16:33 +03:00
README.md new commit 2023-10-13 00:25:35 +03:00
setup.py new commit 2023-10-13 00:25:35 +03:00
turtle_shell.py For homework 4 2023-11-04 19:05:45 +03:00

advanced-python-homework-2023

1. The sequence of commands to create the virtual enviroment:

sudo apt install python3.10-venv
cd advanced-python-homework-2023 
python3 -m vemv devenv
source devenv/bin/activate
python3 -m pip install sphinx
python3 -m pip install Pylint
python3 -m pip install MyPy
deactivate

2. The sequence of commands to create the automated sphinx documentation:

cd advanced-python-homework-2023
mkdir doc
cd doc
sphinx-quickstart
cd ..
sphinx-apidoc -o doc .
cd doc
rm modules.rst
rm setup.rst

Move controls.rst to the source.

cd source
vim conf.py

import os import sys

sys.path.insert(0, os.path.abspath(os.path.join("..", "..")))

extensions = ['sphinx.ext.autodoc']

vim index.rst

./controls.rst

cd ..
make html

Open file://wsl.localhost/Ubuntu/home/zefirka/advanced-python-homework-2023/doc/build/html/index.html

Tadam

3. Function running time for different interpreters

CPython3.9 CPython3.11 PyPy7.3
without TH 0.395806057 0.23031235 0.099493876
with TH 0.398283844 0.223160335 0.109582296
with numpy 0.69133805 0.473824731 5.184651649
user+sys 1.689+0.308 1.066+0.319 6.215+0.350

PyPy 5.7 didn't download due to error: '...libffi.so.6: cannot open shared object file: No such file or directory'. It's too hard than requied: I did my homework in WSL.