@BinanceAlphaAirdropTracker · Post #192 · 26.08.2025 г., 06:59
⏰#TOWN Claim with minimum 200 pts starts in about 1 minute 🎁 Airdrop: 1600 $TOWN ($44)
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #210 · 3 фев.
Что делать если нужно поставить какую-то Python-библиотеку а root-прав нет? То есть в систему библиотеку никак и ничего не поставить. Есть как минимум два способа это решить правильно! 🔸 Сделать виртуальное окружение и ставить там что угодно. Это позволит создать полностью независимое исполняемое окружение для ваших приложений. Все библиотеки будут храниться в домашней директории юзера а значит доступ на запись имеется. Создать очень просто: python3 -m venv ~/venvs/myenvname Теперь активируем окружение # Linux source ~/venvs/myenvname/bin/activate # Windows %userprofile%\venvs\myenvname\Scripts\activate.bat Можно ставить любые библиотеки и запускать приложение. Это стандартный метод работы с любым проектом. Если еще не используете его, то пора начинать. Даже при наличии root доступа! 🔸 Бывает, что нет возможности запустить приложение из своего виртуального окружения. Например, его запускает какой-то сервис от вашего юзера и вставить активацию окружения вы не можете. В этом случае можно установить библиотеки для Python не глобально в систему, а только для юзера. Выполните этот код в консоли: python3 -m site Вы получите что-то такое: sys.path = [ '/home/user', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/user/.local/lib/python3.7/site-packages', ... ] USER_BASE: '/home/user/.local' USER_SITE: '/home/user/.local/lib/python3.7/site-packages' ENABLE_USER_SITE: True Нас интересует параметр USER_SITE. Это путь к пользовательским библиотекам, которые доступны по умолчанию, если они есть. Именно сюда будут устанавливаться модули если добавить флаг --user при установке чего-либо через pip pip install --user requests Для этой команды не нужны root-права. После неё можно запускать системный интерпретатор без виртуальных окружений и установленная библиотека будет доступна для текущего юзера. Параметр USER_BASE показывает корневую директорию для хранения user-библиотек. Её можно изменить с помощью переменной окружения PYTHONUSERBASE export PYTHONUSERBASE=~/pylibs python3 -m site ... USER_BASE: '/home/user/pylibs' USER_SITE: '/home/user/pylibs/lib/python3.7/site-packages' Получается некоторое подобие виртуального окружения для бедных 😁 которое можно менять через эту переменную (не делайте так!Лучше venv!) 🔸 Дописывание пути в PYTHONPATH Этот способ не входит в список "двух правильных", но тоже рабочий. Здесь придётся сделать всё несколько сложней. Сначала ставим библиотеку в любое место указывая путь установки pip3 install -t ~/mylibs modulename Библиотека установится без привязки к какому-либо интерпретатору. То есть по умолчанию не будет видна. Теперь в нужный момент добавляем этот путь в sys.path или в PYTHONPATH. Не буду советовать так делать. Единственный раз когда этот способ мне пригодился и решил поставленную задачу, это при создании общей библиотеки для кластера компьютеров. Модули лежат в сети и подгружаются для всех из одного и того же места. То есть обновлять файлы требуется только один раз а не на всех хосты отдельно. Минусы такого подхода: ▫️Нужно всем хостам пробить нужный путь в .bashrc или ещё куда-то чтобы он сетапился на старте. ▫️Чем больше хостов тем больше нагрузка на сеть. Иногда такой способ не подходит именно по этой причине. Тогда Ansible вам в помощь. ▫️Не очень подходит если хосты с разными операционками. Некоторые библиотеки различаются для Linux и Windows (там, где есть бинарники) и приходится мудрить более сложные схемы. #tricks#basic
Пребарај: #town
@BinanceAlphaAirdropTracker · Post #192 · 26.08.2025 г., 06:59
⏰#TOWN Claim with minimum 200 pts starts in about 1 minute 🎁 Airdrop: 1600 $TOWN ($44)
Hashtags
@TFGames · Post #1339 · 06.12.2023 г., 18:42
#DR#PANDA#TOWN#TALES#NEW#LIFE#GAMES https://testflight.apple.com/join/Ekoa1DSk
@american_observer · Post #5098 · 10.02.2026 г., 15:49
Russia Is Close To Capturing a Key Ukrainian Town The attritional advances are on the verge of paying off. Russia appears poised to complete the capture of three strategic areas in the coming weeks or months, according to military experts. Capturing all three areas — the town of Huliaipole in the southeast and the cities of Pokrovsk and Myrnohrad, about 60 miles northeast — would give Russia an urban foothold to base troops and organize logistics for future offensives, as well as new leverage in U.S.-mediated peace talks. Russia is likely to rapidly convert these gains into further territorial expansion given how slowly its troops have advanced over the past year, experts say. The gains would reinforce Moscow’s argument that its ground advance, while slow, is inevitable, and that Ukraine would be better off ceding land now as part of a deal, rather than losing it later in bloody fighting. Russia’s most threatening push is in the southeastern Zaporizhzhia region. Huliaipole, a town that anchored part of this front for years, is almost entirely under Russian control, according to battlefield maps from independent groups and to Capt. Dmytro Filatov, a Ukrainian officer fighting in the area. Huliaipole, with a prewar population of 12,000, was one of the last Ukrainian-held urban centers in the region outside the regional capital, the city of Zaporizhzhia. Beyond Huliaipole lie open fields, giving Ukrainian troops few built-up areas to hunker down and thwart Russian advances. About 40 miles west of Huliaipole, Russian forces are closing in on the outskirts of the city of Zaporizhzhia, an industrial hub of 700,000 people known for its steel. Battlefield maps show Moscow’s troops about 15 miles from the city’s southern entrance. Military experts warn that further advances would put the area within range of small attack drones, exposing residents to round-the-clock aerial assaults. Analysts attribute Russia’s gains in the area to thin Ukrainian defenses, as Kyiv concentrates its forces on holding cities in the neighboring Donetsk region. In Donetsk, Ukraine has focused on defending the cities of Pokrovsk and Myrnohrad, which together had a prewar population of more than 100,000. Troop deployments there, combined with sophisticated drone warfare, have slowed Russian assaults to a crawl. A report in January from the Center for Strategic and International Studies, a Washington-based think tank, found that Russian troops had advanced only 230 feet per day in their year-and-a-half-long offensive on Pokrovsk and Myrnohrad — slower than the movement by Allied troops in the Battle of the Somme during World War I. Russia has captured than 10.5 percent of Ukrainian territory since 2024, according to the report. The think tank also estimated that Russian forces suffered about 415,000 dead, wounded and missing last year in battles that were largely focused on the two cities. Should Russia fully capture those cities, it could use them to conceal drone operators and exploit roads and railways to streamline logistics. A Ukrainian brigade commander recently said that approaching Kostyantynivka had become so dangerous that most supply missions into the city were entrusted to robot-like remotely operated vehicles. If Russian troops advance on the battlefield, Ukraine is likely to face more pressure on the diplomatic front — including from Trump, who has echoed Moscow’s argument that Ukraine should cede land in a peace deal to avoid more fighting. #russia#capture#key#ukrainian#town#kostyantynivka#myrnohrad 📱American Оbserver - Stay up to date on all important events 🇺🇸