TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Резултати

Пронајдени 16 слични објави

Пребарај: #protection

当前筛选 #protection清除筛选
Telegram & TON NEWS

@all_telegram_ton_news · Post #22692 · 14.01.2026 г., 10:34

STON.fi (Telegram) 🗿Impermanent Loss Protection: 2322 STON Sent to Liquidity Providers Stonfiers! We've distributed STON 2322 STON offset to liquidity providers in the STON/USDT pool for December 1-31. Check your wallets! 💎 Here's what you need to know: • You can offset up to 5.72% of your impermanent loss. • Monthly protection budget: $10,000. • Max offset per user: $100 in STON tokens. • Auto-crediting — no need to claim! 🚨Important: Users who provided liquidity in theSTON/USDTpool before January 1 will be protected from impermanent loss until January 31! 🔗Add Liquidity Now🔗 #protection#liquidity DEX | Telegram DEX | Onboarding | Guide | Blog | All Links 🐣X🤖Discord🌐Reddit🌐LinkedIn📹YouTube🪨Join the Club

TONlines – News

@tonlines · Post #7702 · 04.12.2025 г., 10:57

STON.fi: Impermanent Loss Protection for Liquidity Providers #protection#liquidity STON.fi has distributed 6546 STON tokens to liquidity providers in the STON/USDT pool for November, with up to 5.72% impermanent loss offset offered. Users who provided liquidity before December 1 will have protection until December 31, with a monthly budget of $10,000. Source: link @tonlines

TONlines – News

@tonlines · Post #6962 · 29.04.2025 г., 12:37

STON.fi: New Round of Impermanent Loss Protection Starts Soon #protection#liquidity STON.fi reminds liquidity providers that the new cycle of impermanent loss protection for the STON/USDT V2 pool begins on May 1st. Only those joining the pool by then will be eligible for protection. Source: link @tonlines

TONlines – News

@tonlines · Post #6752 · 14.04.2025 г., 11:40

STON.fi Update: IL Protection Sent to Liquidity Providers #protection#liquidity STON.fi has distributed 894 STON to liquidity providers in the STON/USDT v2 pool for March 1-31, offering up to 5.72% impermanent loss offset. With a monthly protection budget of $10,000 and a max offset of $100 per user, auto-crediting ensures no claiming is needed. Source: link @tonlines

BotsGram®

@botsgram_cu · Post #4144 · 25.07.2021 г., 18:22

¿Que puede hacer este bot? @NewUsersMediaLimiterBot Este nuevo bot que limitará el envío de medios a los usuarios que acaban de unirse al grupo durante los primeros 30 minutos, a menos que sean desmantelados manualmente por uno de los administradores, el bot no enviará ningún mensaje cuando el usuario ingrese. Idiomas: italiano inglés (Visto en @botsgram_cu) #grupos#administración#protection

Amazing Geography 🌍

@amazingeo · Post #75 · 19.08.2025 г., 03:12

🌍 Earth's magnetic field acts like a protective shield, deflecting harmful solar wind and cosmic rays. This invisible force helps preserve our atmosphere and supports life on the planet. ✨ #magnetism⚡#protection⚡#atmosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Egountchi Behanzin Officiel

@egountchibehanzinOfficiel · Post #6426 · 04.06.2024 г., 21:36

Souveraineté Alimentaire : Les dirigeants de l’AES doivent mettre un terme à l'accord de libre-échange et de coopération, par le biais duquel les États de la région ouest-africaine s'engagent à libéraliser progressivement leurs marchés au profit des importations en provenance d'Europe. Il est essentiel de prioriser le renforcement des moyens et du soutien en faveur de nos agriculteurs locaux, plutôt que de continuer à inonder notre continent avec des denrées alimentaires européennes de qualité souvent médiocre, entraînant ainsi l'apparition de nouvelles maladies tropicales. #souverainetéalimentaire#Afrique#Protection @egountchibehanzinTV

🇺🇿Oliy maktabda magistrlik dissertatsiyalari himoyasi bo‘lib o‘tdi 🔈 Joriy yilning 10\11-iyun kunlari Biznes va tadbirkorlik oliy maktabida 70411302 – Biznesni boshqarish (MBA) hamda 70411301 – Kichik biznes va xususiy tadbirkorlik (Biznes innovatsiyalar va tadbirkorlik) magistratura mutaxassisliklari tinglovchilari uchun Yakuniy davlat attestatsiyasi doirasida magistrlik dissertatsiyalari himoyasi bo‘lib o‘tdi. 🔼 Jami 23 nafar tinglovchi, jumladan Biznesni boshqarish (MBA) mutaxassisligi bo‘yicha 10 nafar, Kichik biznes va xususiy tadbirkorlik mutaxassisligi bo‘yicha 13 nafar tinglovchilar magistrlik dissertatsiyalarini muvaffaqiyatli himoya qilishdi. 👨‍🎓 📔 Magistrlik dissertatsiyalari O‘zbekiston Respublikasi Prezidenti huzuridagi Davlat boshqaruv akademiyasi kafedra mudiri, professor, Yakuniy davlat attestatsiyasi komissiyasi raisi D.Raximova hamda komissiya a’zolari tomonidan baholandi. Dissertatsiyalarni himoya qilish jarayoni ilmiy mubohasa yo‘sinida va yuqori talabchanlik bilan o‘tkazildi. 🌀Batafsil #GraduateSchool#Protection#Dissertation#Work 🌐Web-site | ✅Telegram | ✅Facebook | 🌐Instagram

IT Events RU

@iteventsru · Post #302 · 20.03.2018 г., 07:13

🔥 Сегодня 🔥 Вебинар PETYA, МАЙНИНГ, UEBA 📅 20 марта / 11:00 — 12:30 (время МСК) / онлайн 💵 Бесплатно 📝 Регистрация тут: https://goo.gl/1HJ68T Как не повторить ошибок 2017-го и войти в 2018 год во всеоружии, заранее знать основные угрозы и как с ними бороться, на практических примерах расскажет руководитель экспертного отдела «Гарда Технологии» Роман Жуков. 🔗 Программа: https://goo.gl/1HJ68T #security#cybersecurity#protection#онлайн

GitHub Trends

@githubtrending · Post #14697 · 11.05.2025 г., 12:00

#go#attacks_prevention#detection#linux#protection#security CrowdSec is an open-source security solution that helps protect servers from malicious IP addresses. It uses a community-driven approach, where users share information about threats they've faced, creating a shared blocklist to prevent attacks. CrowdSec's Security Engine can detect bad behaviors by analyzing logs and HTTP requests, and it supports multiple platforms. This system is fast, easy to use, and designed for modern infrastructures, making it a powerful tool for securing your systems against various threats. By using CrowdSec, you benefit from collective protection and can focus on real security issues. https://github.com/crowdsecurity/crowdsec

BotsGram®

@botsgram_cu · Post #3383 · 12.01.2021 г., 23:43

@littleGuardianBot Qué puede hacer este bot? LittleGuardian fue creado como un bot para apoyar los esfuerzos de los administradores del grupo Telegram mientras luchaba con comportamientos antisociales y varios ataques contra los grupos o miembros del grupo. Idioma: Inglés (visto en @BotsGram_cu) #antispam, #protection, #management, #groups, #filter, #welcome

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40767 · 09.03.2026 г., 07:03

Some Buddhists serve as soldiers even though Buddhism teaches non-violence. Soldiers can protect people, and Buddhism considers the intention behind actions. Actions that reduce suffering can be acceptable according to Buddhist ethics. Concepts like karma and skillful action are important. International humanitarian rules guide soldiers to act carefully. Being a Buddhist does not always mean being completely against war. Martial arts like Kung Fu also connect to Buddhism. They teach discipline, self-control, mindfulness, and protecting others. The goal is training the mind and body, not just fighting. 🕉️⚔️🥋 [Read more] @googlefactss #Buddhism#Ethics#Soldiers#NonViolence#Karma#Protection#SkillfulAction#KungFu#MartialArts#Mindfulness

12
ПретходнаСтраница 1 од 2Следна