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

Резултати

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

Пребарај: #fibonacciacademy

当前筛选 #fibonacciacademy清除筛选
🗺 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

🗺 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

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #122 · 06.10.2020 г., 15:59

📈Bullish Pattern - PIERCING A. How to recognise it? • There must be a preceding downtrend. • A red candle followed by a green candle. • The green candle opens with a gap-down and closes at 50% or above of the real body of red candle. 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 conquer and lead the price up during the session, and eventually manage to cover 50% losses or more from the previous session. C. How do we trade it? • Look for the Piercing 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#bullish#trading#fibonacciacademy @fibonaccisyndicate

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #114 · 05.10.2020 г., 16:23

​​​​📈Bullish Pattern - HAMMER🔨 A. How to recognise it? • There must be a preceding downtrend • It looks like a square lollipop with a long stick. • The closing price is above or near the opening price, forming a tiny body. • The real body could be green or red. It has no or little upper shadow. • The lower shadow is at least twice of the length of the real body. B. What is the psychology behind? • Similarly to Dragonfly Doji, when the market opens, the bears continuously drag the price down during the session, resulting in a long lower shadow. • The bulls fight strongly and conquer the bears by pushing the price above or near the opening level, forming a little square body. • The longer the lower shadow, the more effective the bullish signal. It tells us that the bulls are strong enough to conquer the bears who once dragged the price so low. C. How do we trade it? • Look for the Hammer at the bottom of a downtrend. • Wait for the next candle to close above the high of the Hammer to confirm the existence of bullish force. • Open a long position upon confirmation. • Place a stop-loss below the low of the Hammer. #patterns#bullish#trading#fibonacciacademy @fibonaccisyndicate

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #110 · 05.10.2020 г., 00:20

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

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #112 · 05.10.2020 г., 16:01

​​What is a Japanese Candlestick? • A tool to depict the price movement during the given time period. What is a Japanese Candlestick Pattern (JCP)? · A candlestick graphic that is formed by the movement of market price and contains strong predictive power of short-term market direction. How is a Japanese Candlestick formed? • By using the opening price, closing price, highest price and lowest price of the given time period. What are the two types of candlestick? • Bullish candle and Bearish candle. Bullish candle is formed when the closing price is above the opening price. Bearish candle is formed when the closing price is below the opening price. How to interpret a bullish and a bearish candle? • A bullish candle indicates buying pressure while a bearish candle selling pressure. What is the difference between a long and a short candle? · A long candle signifies high market volatility and a short candle low market volatility. What are the advantages of JCPS? • Contain unprocessed and raw data about the market sentiment. • Provide unique insights on the relationship between the buyers and sellers. • Give early signals of potential market turns. #patterns#fibonacciacademy#trading#cryptocurrency @fibonaccisyndicate

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #108 · 04.10.2020 г., 23:58

📈PATTERNS📉 Let's take a look on each pattern, how we can recognize them and how to work with them. There are bulls and bears in the market, and in order to understand which pattern we need to work with, we need to find these patterns on the chart (1H +) and work with them. 📈Bullish patterns: - Dragonfly Doji - Hammer - Bullish Engulfing - Piercing - Tweezer Bottom - Three White Soldiers - Morning Star 📉Bearish patterns: - Gravestone Doji - Shooting Star - Bearish Endulfing - Dark Cloud Cover - Tweezer Top - Three Black Crows - Evening Star #pattern#fibonacciacademy#bullish#trading