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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #241 · 5 мај

Можно ли в Python создавать бинарные файлы? Конечно можно. Для этого в Python есть следующие инструменты: ▫️ тип данных bytes и bytearray ▫️ открытие файла в режиме wb (write binary) или rb (read binary) ▫️ модуль struct Про модуль struct поговорим в первую очередь. Файл в формате JSON или Yaml внутри себя содержит разметку данных. Всегда можно определить где список начался а где закончился. Где записана строка а где словарь. То есть формат записи данных содержит в себе элементы разметки данных. В binary-файле данные не имеют визуальной разметки. Это просто байты, записанные один за другим. Правила записи и чтения находятся вне файла. Модуль struct как раз и помогает с организацией данных в таком файле с помощью определения форматов записи для разных частей файла. Модуль struct преобразует Python-объекты в массив байт, готовый к записи в файл и имеющий определённый вид. Для этого всегда следует указывать формат преобразования (или, как оно здесь называется - запаковки). Формат нужен для того, чтобы выделить достаточное количество байт для записи конкретного типа объекта. В последствии с помощью того же формата будет производиться чтение. При этом следует помнить что мы говорим о типах языка С а не Python. Именно формат определяет, что записано в конкретном месте файла, число, строка или что-то еще. Вот какие токены формата у нас есть. Помимо этого, первым символом можно указать порядок байтов. На разных системах одни и те же типы данных могут записываться по-разному, поэтому желательно указать конкретный способ из доступных. Если этого не сделать, то используется символ '@', то есть нативный для текущей системы. В строке формата мы пишем в каком порядке и какие типы собираемся преобразовать в байты. Запакуем в байты простое число, токен "i". >>> import struct >>> struct.pack('=i', 10) b'\n\x00\x00\x00' Теперь несколько float, при этом нужно передавать элементы не массивом а последовательностью аргументов. >>> struct.pack('=fff', 1.0, 2.5, 4.1) b'\x00\x00\x80?\x00\x00 @33\x83@' Вместо нескольких токенов можно просто указать нужное количество элементов перед одним токеном, результат будет тот же. >>> struct.pack('=3f', 1.0, 2.5, 4.1) b'\x00\x00\x80?\x00\x00 @33\x83@' Теперь запакуем разные типы >>> data = struct.pack('=fiQ', 1.0, 4, 100500) я запаковал типы float, int и unsigned long long (очень большой int, на 8 байт) b'\x00\x00\x80?\x04\x00\x00...' Распаковка происходит аналогично, но нужно указать тот же формат, который использовался при запаковке. Результат возвращается всегда в виде кортежа. >>> struct.unpack('=fiQ', data) (1.0, 4, 100500) Как видите, ничего страшного! #lib#basic

Hashtags

Резултати

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

Пребарај: #bullish

当前筛选 #bullish清除筛选
Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4796 · 09.09.2024 г., 13:34

Binance, the world's largest cryptocurrency exchange, has achieved a major milestone in Indonesia. The company's subsidiary has successfully obtained a regulatory license from the Indonesian authorities, paving the way for expanded operations and increased legitimacy in the country. #Bullish🔥

Hashtags

Crypto Australia🇭🇲🇭🇲

@CryptoAustralia · Post #15215 · 11.01.2024 г., 06:56

#BTC, did multiple retest back to the zone and kinda have it break and retest. Price already rejecting the zone multiple times, which is sort of #bullish as of now. #ETFs also get approvals, good to see price sustaining over the zone. Well, if #Bitcoin remains silent over this, then we can see a good rally in alts soon. By Crypto Australia

SIGNAL

@finsignal · Post #3660 · 05.11.2024 г., 09:28

⚡️ Sentiment notes a decrease in the number of wallets with a non-zero balance 🪙#BTC, which may mean that some participants will enter the cache before the US elections. The experts of #Sentiment consider this development of the situation to be #bullish for #BTC after the elections are held...

🗺 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.

Daily Channels

@dailychannels · Post #6237 · 27.07.2025 г., 01:00

Channel: BULLISH CRYPTO ( VIP OFFICIAL ) Members: ~2.69K 💢 Username: @officialbullishcrypto Description: At Bullish Crypto Comumnity! You can find tested strategies, powerful tools, and experienced traders to arm you with knowledge. 🏷 Tags: #crypto_fx_trading #crypto#bullish#signals#investment#money https://telegramchannels.me/channels/officialbullishcrypto

NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24383 · 05.05.2026 г., 13:54

【🏦 CeFi|加密交易所 Bullish 以 42 億美元買下證券登錄商 Equiniti、組合代幣化基建】 Bullish(NYSE:BLSH)5/5 宣布以 42 億美元收購英國老牌過戶代理人 Equiniti,組合 18.5 億美元承擔債務 + 23.5 億美元股票對價。Equiniti 為 2,500+ 上市公司、2,000 萬股東提供登錄服務、年處理 5,000 億美元支付。預計 2027 年 1 月交割。 #Bullish#Equiniti#代幣化 📍閱讀全文: https://abmedia.io/bullish-acquires-equiniti-4-2-billion-tokenized-securities-transfer-agent-may-2026

DWF Labs Broadcast

@Dwflabs · Post #113 · 22.12.2022 г., 11:11

Despite the bear market, DWF Labs is choosing to double down on crypto innovations. "I think the key to #innovation in #Web3 is decentralization. Many projects that we are seeing and decided to invest into, are bringing to the table real decentralization value. We have experienced massive #tech acceleration especially during crypto winter or previous bear cycles. That is why we are so #bullish about funding the next wave of #crypto innovation. This year alone, we funded more than 50 projects." - Andrei Grachev (Managing Partner, DWF Labs) Read full interview here.

以太坊区块链新闻| ETH 以太币圈热瓜

@ethereumglobalnews · Post #1417 · 26.11.2025 г., 04:53

🪙JPMorgan: “Crypto is emerging as a tradable macro asset class #Market 📈#Bullish: 主流機構將加密視為宏觀資產=資金配置邏輯更成熟、納入正式投資框架。 交易宏觀資產(Tradable Macro Asset) 等級意味著:與股指、黃金、外匯並列,可吸引更多量化與全球宏觀基金進場。 #虚拟货币#市场观察#区块链#Macro ⚠️ 短線不代表一定上漲,但中長線是明確的結構性看多訊號。 ✅Chat: @Web3NewsInsight 🦂 👇Tip👇讚 或點擊進行💎資源搜索👇

🗺 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

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