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

Резултати

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

Пребарај: #mewusdt

当前筛选 #mewusdt清除筛选
Propheta Indicator Signals

@propheta_indicator · Post #23177 · 09.12.2025 г., 15:51

⭐️ Long | Entry: 0.001158 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.001164 TP 2️⃣: 0.00117 TP 3️⃣: 0.001175 TP 4️⃣: 0.001181 TP 5️⃣: 0.001193 TP 6️⃣: 0.001204 TP 7️⃣: 0.001216 TP 8️⃣: 0.001227 TP 9️⃣: 0.001251 ⛔️ Stop loss: 0.0011 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Here's a signal from the VIP HTL channel!

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23168 · 07.12.2025 г., 00:58

⭐️ Long | Entry: 0.001163 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.001169 TP 2️⃣: 0.001175 TP 3️⃣: 0.00118 TP 4️⃣: 0.001186 TP 5️⃣: 0.001198 TP 6️⃣: 0.00121 TP 7️⃣: 0.001221 TP 8️⃣: 0.001233 TP 9️⃣: 0.001256 ⛔️ Stop loss: 0.001105 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Here's a signal from the VIP HTL channel!

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23153 · 04.12.2025 г., 14:35

⭐️ Short | Entry: 0.001149 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.001143 TP 2️⃣: 0.001138 TP 3️⃣: 0.001132 TP 4️⃣: 0.001126 TP 5️⃣: 0.001115 TP 6️⃣: 0.001103 TP 7️⃣: 0.001092 TP 8️⃣: 0.00108 TP 9️⃣: 0.001057 ⛔️ Stop loss: 0.001206 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Check out this VIP HTL Signal! 🔥🔥🔥

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23120 · 29.11.2025 г., 08:31

⭐️ Short | Entry: 0.001192 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.001186 TP 2️⃣: 0.00118 TP 3️⃣: 0.001174 TP 4️⃣: 0.001168 TP 5️⃣: 0.001156 TP 6️⃣: 0.001144 TP 7️⃣: 0.001132 TP 8️⃣: 0.00112 TP 9️⃣: 0.001097 ⛔️ Stop loss: 0.001252 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Check out this VIP HTL Signal! 🔥🔥🔥

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23095 · 24.11.2025 г., 16:27

⭐️ Long | Entry: 0.001164 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.00117 TP 2️⃣: 0.001176 TP 3️⃣: 0.001181 TP 4️⃣: 0.001187 TP 5️⃣: 0.001199 TP 6️⃣: 0.001211 TP 7️⃣: 0.001222 TP 8️⃣: 0.001234 TP 9️⃣: 0.001257 ⛔️ Stop loss: 0.001106 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Check out this VIP HTL Signal! 🔥🔥🔥

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23032 · 08.11.2025 г., 02:45

👍 This is why we're here! #MEWUSDT has achieved 9th TP in 10 hours in our VIP HTL channel! ACCESS TO MANUAL TRADING for 70usdt/month 👉 Did you know that many traders use our performance reports to build their own trading strategy? That's how useful they are! Check them out: @propheta_reports Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptobot#tradingview#buycrypto

Propheta Indicator Signals

@propheta_indicator · Post #23113 · 27.11.2025 г., 02:10

Oops, we did it again 🤣 #MEWUSDT has reached 9th TP in the VIP HTL signals channel!👍 That's why we call it the "Money Printer" 💴💷💵ACCESS TO MANUAL TRADING for 70usdt/month 👉 Love the profits you're seeing, but can't afford the VIP cost? Earn over $40 per one recommendation with zero risk using our referral program! Click the link, then START >>> Referral Program Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #bitcoin#AItrade#trading

Propheta Indicator Signals

@propheta_indicator · Post #23456 · 13.03.2026 г., 10:30

Oops, we did it again 🤣 #MEWUSDT has achieved 9th TP in our VIP PRO channel! 🤑 All this profit could have been yours! 🔥ACCESS TO MANUAL TRADING for 70usdt/month 👉 We ain't only bragging about those profits, we're publishing the most transparent performance reports you can personally audit! Come and see for yourself: @propheta_reports Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #signalchannel#AItrading#btc

Propheta Indicator Signals

@propheta_indicator · Post #23219 · 18.12.2025 г., 20:44

👆 OMG! Would you look at that 👀 #MEWUSDT has reached 9th TP in the VIP HTL signals channel!👍 Easy $203 with a 5% entry and a $1000 deposit! VIPs getting filthy rich by the day ☺️🤑🤑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! #cryptobot#tradingview#indicator

Propheta Indicator Signals

@propheta_indicator · Post #23201 · 15.12.2025 г., 16:46

👆 Propheta living up to its name yet again 🔮 #MEWUSDT reached 9th TP! Signal from our VIP HTL channel! With a 5% entry and a $1000 deposit, you could've earned $203! 🤑 All this profit could have been yours! 🔥ACCESS TO MANUAL TRADING for 70usdt/month 👉 Did you know that many traders use our performance reports to build their own trading strategy? That's how useful they are! Check them out: @propheta_reports Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #indicator#tradingindicator#signalchannel

Propheta Indicator Signals

@propheta_indicator · Post #23191 · 12.12.2025 г., 17:59

👍 This is why we're here! #MEWUSDT has achieved 9th TP in our VIP HTL channel! Easy $205 with a 5% entry and a $1000 deposit! Every day we're on fire! 🔥🔥🔥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! #tradingbot#AItrade#eth

Propheta Indicator Signals

@propheta_indicator · Post #23247 · 28.12.2025 г., 11:38

👆 OMG! Would you look at that 👀 Reached 9th TP on our #MEWUSDT trade! 🔥🔥🔥 You could've earned $204 with a 5% entry and a $1000 deposit! 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! #cryptocurrency#AItrader#signalchannel

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