Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
Iqtisodiy terminologiya
📈Fiskal siyosat — bu davlat tomonidan iqtisodiyotni boshqarish uchun davlat xarajatlari va soliq stavkalarini tartibga solish choralaridir.
🏢 Фискальная политика — это совокупность мер, принимаемые государством для регулирования расходов и налогов с целью управления экономикой.
#GraduateSchool#FiscalPolicy#Economy
🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube
📈US Defense Budget and Geopolitical Underpriced Risk
Washington's inability to price the Iran war costs amid a $1.5 trillion military budget push is creating significant fiscal uncertainty for bond and equity markets.
🔗Read Full Analysis
🎯 SPECIAL OFFER: 15% OFF
💸 Coupon Code: salenow15%
🚀 Upgrade to premium signals → https://markets.fxpremiere.com/en/signals?utm_source=telegram
📰 Stay ahead — get breaking financial news & analysis at https://markets.fxpremiere.com/en?utm_source=telegram
#DefenseSpending#FiscalPolicy#TreasuryYields
🚀 U.S. Government Budget Deficit Narrows in March
The U.S. government reported a budget deficit of $164 billion in March. According to Jin10, this figure was slightly higher than the anticipated deficit of $156.7 billion but showed a significant improvement from the previous month's deficit of $308 billion. The narrowing of the deficit indicates a positive shift in the government's fiscal position compared to earlier projections.
#USGovernment#BudgetDeficit#FiscalPolicy#Economy#March2026#GovernmentFinance#EconomicUpdate
🚀 Commodities to Outshine Stocks Amid Geopolitical and Economic Turmoil, Says Bank of America Strategist
Bank of America strategist Michael Hartnett has indicated that investors should pivot towards the commodities market in the coming years, as this asset class is poised to benefit from global geopolitical and macroeconomic instability. According to Jin10, the ongoing Middle East conflicts and the race in artificial intelligence have heightened concerns over supply chains. Governments worldwide are striving to curb the soaring prices of energy and other natural resources, which impact industries and consumers, while also ensuring the supply of critical minerals like rare earths, essential for manufacturing and technology.
Hartnett suggests that for the remainder of this decade, commodities will replace stocks as the primary choice for investors seeking to hedge against risks, inflation, and a weakening dollar. This shift is expected as investors move away from equities in favor of commodities, which are anticipated to become the biggest winners in the "buy anything but bonds" trade. The strategist also notes that excessive fiscal expansion could lead to more frequent bear market rallies in government bonds rather than sustained bull markets.
#Commodities#Stocks#Geopolitics#Macroeconomics#Investment#Inflation#Energy#RareEarths#SupplyChain#AI#FiscalPolicy#MarketTrends
🚀 U.S. March Budget Deficit Estimated at $163 Billion
The U.S. Congressional Budget Office (CBO) has announced that the budget deficit for March is projected to reach $163 billion. According to BlockBeats, this estimate reflects ongoing fiscal challenges faced by the United States. The CBO's report highlights the financial pressures impacting the federal budget, as expenditures continue to outpace revenues. This development underscores the importance of addressing the nation's fiscal policies to manage the growing deficit effectively.
#USBudget#BudgetDeficit#FiscalPolicy#CBO#USFinance#FederalBudget#Economy#MarchDeficit#FinancialReport#USGovernment
Best & Worst Crypto Narratives Revealed
In the last month, AI Agents topped the charts with a 67.02% return, while CEX coins gained 42.61%. On the downside, Modularity fell by 30.99%, Memecoins dropped 28.41%, and LRT decreased by 27.74%. Read more here. ✨ Additionally, Hong Kong lawmakers are considering including Bitcoin in fiscal reserves, aiming to stimulate the crypto industry and boost tax revenue. More details can be found here.
#AI#Crypto#CEX#Bitcoin#Investment#FiscalPolicy#CryptocurrencyIndustry#HongKong#Finance#TaxRevenue#MarketAnalysis#Returns#LawPolicy#AIAgents#Modularity#Memecoins#CryptoTrends#Innovation#Funds#TalentAttraction
#The_Critic🇬🇧📕[PDF]⬇️
#November2025
#Monthly_Magazines
For learning, for free(dom).
@backupofmagazines
This issue dissects Britain’s political fatigue in “Follow the Leader,” charting how #Conservatives lost moral and cultural authority. Essays probe #FiscalPolicy fictions, #CultureWar fatigue, and the right’s need for artistic renewal. Features span #Trump diplomacy, Britain’s agricultural crisis, and a nostalgic defense of #Seapower. In culture, Cézanne’s southern light meets reflections on music, literature, and satire. Critics debate #Opera, #Theatre, #Books, and fine whisky—mixing wit with worry. It’s a portrait of a nation in ideological hangover. #UKPolitics#Brexit#Art#Society#ConservativeCollapse#TheCritic#Philosophy