@mdmbeng · Post #1937 · 20.06.2024 г., 07:31
#薅羊毛#SafePal#硬件钱包 本月底结束! 价值69.99$的SafePal硬件钱包免费领取 支付5U直邮中国! 教程由 ink 撰写 频道:@mdmbeng 投稿:@mdmbeng_Bot
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
Пребарај: #safepal
@mdmbeng · Post #1937 · 20.06.2024 г., 07:31
#薅羊毛#SafePal#硬件钱包 本月底结束! 价值69.99$的SafePal硬件钱包免费领取 支付5U直邮中国! 教程由 ink 撰写 频道:@mdmbeng 投稿:@mdmbeng_Bot
@tonevents_en · Post #1019 · 25.11.2024 г., 13:15
Tangem Core. Reliability. ❤️ ✅ Three similar devices offer a second and third chance to recover your assets in case of accidents or loss. ✅ The #Tangem chip is a product of a collaboration with Samsung Semiconductors, Inc. Its incredible performance and reliability. ✅ The chip is fortified against electromagnetic pulses (EMP), electrostatic discharge (ESD), and X-rays, adhering to the stringent ISO 7816-1 standard for security. ✅ The entire wallet is IP69K certified, offering full dust and water resistance. It functions optimally in temperatures between –25°C and +50°C. ✅Tangem devices have an impressive 25-year replacement warranty, reflecting our confidence in their longevity and durability. ✅ As a monolithic device, no components have a shorter lifespan or are vulnerable to damage or hacking. 🛡When it comes to safeguarding your assets, nothing is more crucial than unwavering reliability.🤜 🛍🛍Easy buy a cold wallet Tangem with a 10% discount promo code: FG7L9X at tangem.com #Safepal#Ledger#Trezor#TON
@tonevents_en · Post #998 · 19.11.2024 г., 07:53
Tangem Core: Security❤️ What's inside? ✅Certified equipment: The highest level of safety among consumer devices — EAL 6+. ✅Firmware tested twice: First in 2018 by the Swiss company Kudelski Security and again in 2023 by the international laboratory Riscure. Both audits confirmed the absence of vulnerabilities and backdoors in the firmware, which cannot be updated. ✅Open Source Software: Fully transparent and available for review on GitHub. ✅Anti-counterfeit protection: When you activate your wallet, the app verifies the secure element, confirming its authenticity with #Tangem. ✅Private Key Security: Private keys are generated inside the chip when the wallet is activated using a hardware random number generator. No one, including Tangem, has access to these keys. ✅Smart Backup: Three hardware devices instead of one, each providing the same high level of security. No unsafe copies required. ✅Absolute privacy: Your private keys cannot be disclosed under any circumstances. ✅User-controlled access: The wallet is protected by your access code and biometric authentication. 🛡This is what absolute safety means! 🛍🛍Easy buy a cold wallet Tangem with a 10% discount promo code: FG7L9X attangem.com #Safepal#Ledger#Trezor#TON
@tonevents_en · Post #754 · 09.08.2024 г., 16:41
OKX DEX — DEX aggregator and cross-chain bridge — now available on Tangem!⚪️ With a new provider — new opportunities: - Over 1,000,000 new exchange pair options. - Over 1,500 new tokens available for swap. - No KYC. The team is improving the versatility and usability of the Tangem app by integrating more and more providers. Update your app and start exchanging crypto right now!🔄 🛍 Buy a cold wallet #Tangem with a 10% discountfrom our channel using the promo code:FG7L9X #safepal#ledger#trezor#ton#okx
@tonevents_en · Post #865 · 22.09.2024 г., 09:52
OKX DEX — DEX aggregator and cross-chain bridge — now available on Tangem Express!⚪️ With the new provider you can enjoy the following features: ↔️Over 1,000,000 new exchange pair options ↔️Over 1,500 new tokens available for swap ↔️KYC/AML not required🔥 Enjoy the ability to easily exchange crypto between different networks via the new OKX DEX directly in the Tangem app. Swap now! 🛍Buy a cold wallet #Tangem with a 10% discount from our channel using the promo code: FG7L9X #Safepal#Ledger#Trezor#TON#OKX#DEX
@tonevents_en · Post #1682 · 11.07.2025 г., 07:38
😇EVAA Updates: New Integrations, Expanded Features & Security Focus 🪙Integration with SafePal EVAA is now available in the TON DeFi Collection section of the SafePal wallet. Through #TON Connect, users can work with basic assets, take and issue loans, as well as use lending in various LP pairs. The team has prepared a detailed text guide on connecting and using the protocol. ☕️Partnership with Swap Coffee The protocol is integrated into the Swap Coffee aggregator. In the #Yield tab, you can now: • track the current APR for EVAA pools; • deposit and withdraw assets; • manage deposits and loans. 🪙Temporary suspension of collateral in $CATI Since Friday, July 11, support for the $CATI token in the ALTs pool has been temporarily disabled due to low liquidity. All active positions are safe and not subject to liquidation; however, opening new collateral in $CATI is currently not allowed. This decision was made to increase the protocol's stability. 🛡Trail of Bits audit completed EVAA successfully passed the final stage of the audit at Trail of Bits. Despite recent criticism of this company's address due to an incident with another project, the #EVAA team emphasizes that reliability and transparency remain its priority. EVAA app | News | Chat | Website #EVAA#SafePal#CATI#Audit#Security#DeFi#Toncoin