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

Резултати

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

Пребарај: #altusdt

当前筛选 #altusdt清除筛选
Mexc Crypto Signals Pumps Trading Kucoin

@mexc_signals_pumps_trading · Post #2025 · 25.12.2025 г., 14:06

#ALTUSDT UPDATE: #ALT is currently trading around $0.01175. It has already broken out of the Downtrend channel pattern and is looking bullish. So, according to the pattern, we can see bullish momentum, and the price can go towards the upper resistance zone. Keep an eye on it and stay tuned for further updates

Hashtags

GG-Shøt. Indicator & Signals

@doublegtrading · Post #8089 · 13.01.2026 г., 14:21

📩#ALTUSDT 30m | Mid-Term 📈Long Entry Zone: 0.01309-0.01276 🎯 - Strategy Accuracy: 91.41% Last 5 signals: 85.71% Last 10 signals: 83.33% Last 20 signals: 90.91% ⏳ - Signal details: Target 1: 0.01329 Target 2: 0.01348 Target 3: 0.01368 Target 4: 0.01427 _____ 🧲Trend-Line: 0.01276 ❌Stop-Loss: 0.01256 💡After reaching the first target you can put the rest of the position to breakeven #ID20000036126

Propheta Indicator Signals

@propheta_indicator · Post #22918 · 16.10.2025 г., 20:36

Now that's trading 👆🔥🔥🔥 Reached 9th TP on our #ALTUSDT trade! 🔥🔥🔥 $202 in profits with a 5% entry and a $1000 deposit! VIPs getting filthy rich by the day ☺️🤑🤑ACCESS TO MANUAL TRADING for 70usdt/month 👉 Get dozens of signals like these daily! Subscribe now >>> t.me/ProphetaAdmin_bot Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #passiveincome#trading#autotrading

Propheta Indicator Signals

@propheta_indicator · Post #22909 · 13.10.2025 г., 18:07

👍 This is why we're here! #ALTUSDT reached 9th TP! Signal from our VIP HTL channel! With a 5% entry and a $1000 deposit, you could've earned $207! That's why we call it the "Money Printer" 💴💷💵ACCESS TO MANUAL TRADING for 70usdt/month ⚡️Speed up your trading with Propheta AI Signals: real-time precision signals, elite-level automation, and Cornix integration — the future of trading is now! GET THE ACCESS TO AI SIGNALS Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #buycrypto#autotrading#cryptonews

Propheta Indicator Signals

@propheta_indicator · Post #22984 · 02.11.2025 г., 06:09

👍 This is why we're here! #ALTUSDT has reached 9th TP in the VIP HTL signals channel!👍 With a 5% entry and a $1000 deposit, you could've earned $204! That's why we call it the "Money Printer" 💴💷💵ACCESS TO MANUAL TRADING for 70usdt/month 👉 We ain't just showing our results, we can show you the results of our VIP subscribers as well! Check them out: @propheta_reviews Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #autotrading#CryptoSignal#trading

Propheta Indicator Signals

@propheta_indicator · Post #23148 · 03.12.2025 г., 00:18

Now that's trading 👆🔥🔥🔥 Reached 9th TP on our #ALTUSDT trade! 🔥🔥🔥 🤑 All this profit could have been yours! 🔥ACCESS TO MANUAL TRADING for 70usdt/month 💸Turn time into cash with Propheta AI Signals: pinpoint entries and exits, AI-powered automation, and perfect Cornix compatibility — your automated win streak! GET THE ACCESS TO AI SIGNALS Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #trading#bitcoinnews#tradingindicator

Propheta Indicator Signals

@propheta_indicator · Post #23075 · 19.11.2025 г., 18:05

Oops, we did it again 🤣 #ALTUSDT has just reached 9th TP in the VIP HTL channel!!!👍 Feels good to be a Propheta VIP, man... 🏖ACCESS TO MANUAL TRADING for 70usdt/month 💪Rule the market with Propheta AI Signals: ultra-sharp alerts, full-on process automation, and a killer Cornix synergy — your fast track to max profits! GET THE ACCESS TO AI SIGNALS Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #CryptoSignal#eth#AItrade

Propheta Indicator Signals

@propheta_indicator · Post #23080 · 20.11.2025 г., 15:44

#ALTUSDT reached 9th TP in under 7 hours! Signal from our VIP HTL channel! Easy $204 with a 5% entry and a $1000 deposit! ACCESS TO MANUAL TRADING for 70usdt/month 👉 Multiplying deposits every day! Not convinced? Contact us for a free trial - @propheta_help Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptoexchange#btc#passiveincome

Propheta Indicator Signals

@propheta_indicator · Post #23119 · 28.11.2025 г., 19:56

👆 Propheta living up to its name yet again 🔮 #ALTUSDT has achieved 9th TP in our VIP HTL channel! With a 5% entry and a $1000 deposit, you could've earned $204! ACCESS TO MANUAL TRADING for 70usdt/month ⚡️Speed up your trading with Propheta AI Signals: real-time precision signals, elite-level automation, and Cornix integration — the future of trading is now! GET THE ACCESS TO AI SIGNALS Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #autotrading#buyeth#cryptoexchange

Propheta Indicator Signals

@propheta_indicator · Post #23136 · 01.12.2025 г., 00:13

Oops, we did it again 🤣 Reached 9th TP on our #ALTUSDT trade! 🔥🔥🔥 Using a 5% entry you could've earned $208 with a $1000 deposit Every day we're on fire! 🔥🔥🔥ACCESS TO MANUAL TRADING for 70usdt/month 🏆Flex your skills with Propheta AI Analyzer: smart AI analysis flips the market upside down, fast tweaks fit any style, and it’s your wingman for snagging top-tier trades! GET THE ACCESS Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptotrading#cryptocurrency#signals