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

Резултати

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

Пребарај: #patterns

当前筛选 #patterns清除筛选
🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #116 · 05.10.2020 г., 19:21

📈Bullish Pattern - BULLISH ENGULFING A. How to recognice it? • There must be a preceding downtrend. • A shorter red candle followed by a longer green candle. • The green candle opens lower and closes higher than the red candle, completely engulfing it. B. What is the psychology behind? • The red candle implies the control of the bears following a prolonged downtrend. • In next session, the market opens below the low of the red candle, suggesting continuation of the bearish forces. • The bears then lose momentum, the bulls take charge and lead the price up during the session, and eventually manage to close above the high of the red candle. • The bulls have now fully overridden the bears. C. How do we trade it? • Look for the Bullish Engulfing at the bottom of a downtrend. • Wait for the next candle to close above the high of the green candle to confirm the existence of bullish force. • Open a long position upon confirmation. • Place a stop-loss below the low of the green candle. #patterns

Hashtags

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #161 · 18.10.2020 г., 15:56

📉 Bearish Pattern - Tweezer Tops. A. How to recognise it? • There must be a preceding uptrend. • A green candle followed by red candle. • Both candles have the same high. B. What is the psychology behind? • The candles in both sessions form the same high, suggesting that the market refuses to go above that price level. Once the price touches the ceiling, in retreats. That price level may be viewed as a short-term resistance. • The closing price of the red candle shies away from the high further than the green candle does. It shows that bearish forces are getting stronger. C. How do we trade it? • Look for the Tweezer Top at the top of an uptrend. • Wait for the next candle to close below the low of the two candles to confirm the existence of bearish force. • Open a short position upon confirmation. • Place a stop-loss above the high of the two candles. #patterns#fibonacciacademy

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #156 · 16.10.2020 г., 18:56

📉 Bearish Pattern - Three Black Crows. A. How to recognise it? • There must be a preceding uptrend. • There consecutive long red candles observed. • The second and third candle opens within the body of the preceding one but closes lower than the preceding one. B. What is the psychology behind? • The first long red candle signals that the bulls are exhausted after the prolonged uptrend and the bears start to take over. The bears continue the slump with the subsequent two candles closing lower. C. How do we trade it? • Look for the Three Black Crows at the top of an uptrend. • Wait for the fourth candle to close below the low of the third candle to confirm the reversal. • Open a short position upon confirmation. • Place a stop-loss above the high of the first red candle. #patterns#fibonacciacademy

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #131 · 08.10.2020 г., 19:16

📉Bearish Pattern - Gravestone Doji A. How to recognise It? • There must be a preceding uptrend. • It looks like an inverted T letter. • The opening, lowest and closing price are same. • It has no real body but a long upper shadow. B. What is the psychology behind? • When the market opens, the bulls push the price all the way up, resulting in a long upper shadow. • The bears fight strongly and eventually manage to drag the price back down to the opening level. • The longer the upper shadow, the more effective the bearish signal. It tells us that the bears are strong enough to conquer the bulls who once drove the price so high. C. How do we trade it? • Look for the Gravestone Doji at the top of an uptrend. • Wait for the next candle to close below the low of the Gravestone Doji to confirm the existence of bearish force. • Open a short position upon confirmation. • Place a stop-loss above the high of the Gravestone Doji. #patterns#fibonacciacademy @fibonaccisyndicate

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #124 · 06.10.2020 г., 18:26

📈 Bullish pattern - Tweezer bottom. A. How to recognise it? • There must be a preceding downtrend. • A red candle followed by a green candle. • Both candles have the same low. B. What is the psychology behind? • The candles in both sessions form the same low, suggesting that the market refuses to go below that price level. Once the price touches the floor, it bounces back. That price level may be viewed as a short-term support. • The closing price of the green candle shies away from the low further than the red candle does. It shows that the bullish forces are getting stronger. C. How do we trade it? • Look for the Tweezer Bottom at the bottom of a downtrend. • Wait for the next candle to close above the high of the two candles to confirm the existence of bullish force. • Open a long position upon confirmation. • Place a stop-loss below the low of the two candles. #patterns#fibonacciacademy

Interesting Planet 🌍

@interesting_planet_facts · Post #1265 · 31.01.2026 г., 22:11

🌎 In the Namib Desert, strange circular patches called “fairy circles” appear in the grass, forming patterns seen from the air. Scientists suspect termites or plant competition cause these barren rings, which can measure 2 to 15 meters wide and last for decades. ✨ #desert⚡#phenomena⚡#patterns 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #565 · 15.08.2025 г., 16:22

🌎 The Namib Desert is home to the world’s oldest living desert fairy circles—mysterious bare patches of earth surrounded by rings of grass. Scientists believe termites create these strange patterns by eating plant roots underground, shaping the desert’s landscape for centuries. ✨ #Namibia⚡#patterns⚡#termites 👉subscribe Interesting Planet

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #142 · 11.10.2020 г., 18:04

📉Bearish Pattern - Dark Cloud Cover. A. How to recognise it? • There must be a preceding uptrend. • A green candle followed by a red candle. • The red candle opens with a gap-up and closes at 50% or below of the real body of green candle. B. What is the psychology behind? • The green candle implies the control of the bulls following a prolonged uptrend. • In next session, the market opens above the high of the green candle, suggesting continuation of the bullish forces. • The bulls then lose momentum, the bears conquer and send the price down during the session, and eventually manage to wipe out 50% gains or more from the previous session. C. How do we trade it? • Look for the Dark Cloud Cover at the top of an uptrend. • Wait for the next candle to close below the low of the red candle to confirm the existence of bearish force. • Open a short position upon confirmation. • Place a stop-loss above the high of the red candle. #patterns#fibonacciacademy#trading

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #128 · 07.10.2020 г., 16:05

📈Bullish Pattern - Three White Soldiers. A. How to recognise it? • There must be a preceding downtrend. • Three consecutive long green candles observed. • The second and third candle opens within the body of the preceding one but closes higher than the preceding one. B. What is the psychology behind? •The first long green candle signals that the bears are exhausted after the prolonged downtrend and the bulls start to take over. The bulls continue the rally with the subsequent two candles closing higher. C. How do we trade it? • Look for the Three White Soldiers at the bottom of a downtrend. •Wait for the fourth candle to close above the high of the third candle to confirm the reversal. • Open a long position upon confirmation. • Place a stop-loss below the low of the first green candle. #patterns #fibonacciacademy #bullish @fibonaccisyndicate.

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #137 · 09.10.2020 г., 22:12

​​📉 Bearish Pattern - Shooting Star. How to recognise it? • There must be a preceding uptrend. • It looks like a flying meteor carrying a long tail. • The closing price is below or near the opening price, forming a tiny body. • The real body could be green or red. • It has no or little lower shadow. • The upper shadow is at least twice of the length of the real body. What is the psychology behind? • Similarly to Gravestone Doji, when the market opens, the bulls continuously push the price up during the session, resulting in a long upper shadow. • The bears fight strongly and conquer the bulls by dragging the price below or near the opening level, forming a little square body. • The longer the upper shadow, the more effective the bearish signal. It tells us that the bears are strong enough to conquer the bulls who once drove the price so high. How do we trade it? • Look for the Shooting Star at the top of an uptrend. • Wait for the next candle to close below the low of the Shooting Star to confirm the existence of bearish force. • Open a short position upon confirmation. • Place a stop-loss above the high of the Shooting Star. #patterns#fibonacciacademy#cryptocurrency

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