Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML.
Из плюсов такого подхода стоит отметить вот что:
🔸 готовый, повсеместно используемый и поддерживаемый формат
🔸 простой и понятный файл, удобочитаемый для человека
🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек
Но есть и минусы
🔹 затраты времени при записи файла (кодирование данных в нужный формат строки)
🔹 затраты времени при чтении файла (декодирование данных в Python объекты)
🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...)
🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда)
🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные
Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи.
Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳.
🔸 очень быстрая запись
🔸 чтение значительно быстрей чем JSON, YAML итд
🔸 размер файла значительно меньше, так как нет разметки
🔸 можно записывать данные по мере поступления не загружая всё в память
🔸 можно извлечь любую часть данных независимо
Из минусов
🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата)
🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию.
🔹 не так-то просто создать такой файл без специальной библиотеки
В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии.
(Это не означает что нельзя записать данные разного типа, просто это будет не так удобно)
Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого
f15d cd29 a564 4578 ...
09e2 9bc4 a696 1253 ...
84e9 4de1 3b23 c24a ...
2534 5161 28e0 709d ...
...
Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла.
К чему это я? Читайте в следующем посте...
#tricks#basic
💳💸 O‘zbekistonda Google Pay va Apple Pay ishga tushishi mumkin!
🇺🇿 Prezident Shavkat MirziyoyevAQShning yirik kompaniyalari, investitsiya fondlari va moliya institutlari vakillari bilan uchrashuvda ushbu to‘lov tizimlarini mamlakatimizda joriy etish masalasini muhokama qildi.
💳 Agar bu qaror qabul qilinsa, O‘zbekiston foydalanuvchilari uchun xalqaro raqamli to‘lovlar yanada qulay va tezkor bo‘ladi.
➡️#applepay#googlepay | Birinchi raqamli IT-Blog
💸Top Fintech Apps Worldwide for October 2019 by Downloads
#GooglePay (Tez) was the most downloaded fintech app worldwide for October 2019 with close to 17 million installs, which represented a 24% increase from October 2018. The country with the most installs of the app during this period was India🇮🇳 at 99% of its total downloads.
#PhonePe was the second most installed fintech app worldwide last month with close to six million installs, which represented a 23% increase from October 2018. The country with the largest number of PhonePe installs was also India🇮🇳 at 99%.
🎁 Download Cash App using this link or this code WFSDXPP and get a £5 reward!
🦅@PerspectiveIX via SensorTower.
🤝Support PerspectiveIX.
☕️Starbucks’s mobile payments system is so popular than Apple’s or Google’s in🇺🇸
By the end of this year, a quarter of U.S. smartphone users — 55 million people — over the age of 14 will make an in-store mobile payment. More than 40 percent of those people will have done so through Starbucks’s mobile payments app, according to new data from research firm eMarketer.
The Starbucks app, which launched before the other three top payments apps — #ApplePay, #GooglePay and #SamsungPay — has long been the most successful payments app. It’s likely going to maintain that lead over the next few years.
🚀@PerspectiveIX
📖 Read more at t.me/iXNews/25746
💸Leading Payment Methods Used in 2018
A credit card stored automatically on a computer is the main form of online payment in the U.S, according to a survey on Mobile Banking conducted by Ipsos and ING. #Paypal came in second place with about 1 in 5 respondents citing the online payment as their preferred form of online payment.
#AmazonPay, #GooglePay, and #ApplePay were some of the less common forms of online payment for respondents interviewed by Ipsos and ING.
🚀@PerspectiveIX via Statista.
💳 Tonhub non-custodial wallet launched a Visa debit card
Tonhub has launched a Visa debit card, allowing users to make payments directly from their $TON or $USDT balances. Available for European ID holders, the card offers minimal fees (1.5% per transaction) and supports global payments, including SEPA, SWIFT, Apple Pay, and Google Pay.
Tonhub plans to expand access to CIS, Latin America, and the Middle East by 2025 and integrate with wallets like TrustWallet. With accounts managed via smart contracts on the TON blockchain, users retain full control over their funds.
Learn more at Tonhub’s website.
#TON#SWIFT#ApplePay#Web3#GooglePay#Tonhub#USDT
🚀 Binance to Introduce USDS Across Multiple Services
According to the announcement from Binance, the platform is set to integrate USDS (USDS) into several of its services, including Binance Simple Earn, "Buy Crypto," Binance Convert, Binance Margin, and VIP Loan. The rollout is scheduled to commence on 2026-04-09 at 08:00 (UTC), when USDS Flexible Products and Locked Products will be available for subscription on Binance Simple Earn.
In addition to the Simple Earn integration, users will have the option to purchase USDS using VISA, MasterCard, Google Pay, and Apple Pay, or trade it with their account balances on the "Buy Crypto" page. This feature will be accessible within one hour of USDS being listed on Binance Spot. Furthermore, Binance Convert will allow users to trade USDS against BTC, USDT, and other tokens without incurring any fees, also within one hour of its listing.
For those interested in margin trading, Binance Margin will introduce USDS as a new borrowable asset on both Cross and Isolated Margin. The trading pairs USDS/USDT, BTC/USDS, and ETH/USDS will be available on Cross Margin starting at 2026-04-09 08:00 (UTC). Similarly, these pairs will be accessible on Portfolio Margin at the same time. Additionally, USDS will be listed as a borrowable coin on VIP Loan shortly after its spot listing.
Binance advises users to exercise caution, as newly listed tokens can exhibit significant volatility. It is recommended that traders implement robust risk management strategies. For the latest information on marginable assets, users are encouraged to consult the Margin Data section. This integration marks a significant expansion of USDS's availability across Binance's diverse range of financial services.
#Binance#USDS#BinanceSimpleEarn#BuyCrypto#BinanceConvert#BinanceMargin#VIPLoan#CryptoTrading#MarginTrading#SpotListing#BTC#ETH#USDT#CrossMargin#IsolatedMargin#PortfolioMargin#VISA#MasterCard#GooglePay#ApplePay#RiskManagement#CryptoVolatility#FinancialServices#CryptoAssets