Создание и использование виртуальной среды
virtualenv — инструмент для создания изолированных сред Python. Программа создает папку, которая содержит все необходимые исполняемые файлы для использования пакетов, необходимых для проекта.
Создание новой виртуальной среды требуется только один раз для каждого проекта, для которого вы хотите изолировать зависимости:
python3 -m venv venv
Это создаст папку venv, содержащую оснастку сценариев и копию python самого двоичного файла. Название папки не имеет значения.
Чтобы активировать виртуальную среду, нужно запустить activate файл: source venv/bin/activate и далее мы можем свободно устанавливать любые зависимости, которые никак не скажутся на работе в будущих проектах.
#python#virtualenv
#python
The Jelly Evolution Simulator is a program that lets you watch jelly-like creatures evolve over time. You can run it using a simple command in Python. The simulator allows you to control various features like closing the program, toggling markers, storing species, and changing colors. It also lets you scroll through different generations to see how the creatures change. This tool is useful for understanding how evolution works in a fun and interactive way. It helps users visualize how small changes can lead to different outcomes over time.
https://github.com/carykh/jes
🖥
Tip: You can use functools.reduce() in #Python to apply a function to all elements of the iterable set.
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#Python
🖥
Test your typing knowledge in Python
Cool free project Python Type Challenger is a quiz where you have to write code. A good way to remember the basics of type hints (dictionaries, variables, return) and drill into the depths of the typing ocean (recursive, decorators, constructors, etc.).
🔗Link
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----