TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #239 · 3 мај

Один из самых удобных способов записать данные это использование готовых форматов, такие как 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

Резултати

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

Пребарај: #uscpi

当前筛选 #uscpi清除筛选
Crypto M - Crypto News

@CryptoM · Post #64517 · 09.04.2026 г., 05:38

🚀 U.S. CPI Data to Reflect Impact of Iranian Energy Shock, Analysts Say U.S. CPI data released on Friday is expected to show the first significant impact of the Iranian energy shock, according to analysts at First Citizens Bank. The surge in energy costs is anticipated to accelerate overall inflation. According to Jin10, the bank's head of market and economic research noted that while core inflation remains significantly above target, the Federal Reserve is likely to 'ignore' the energy-driven inflation spike for now. He suggested that this stance reinforces the Fed's long-term position of maintaining current rates, linking potential rate cuts to the normalization of energy prices. #USCPI#IranianEnergyShock#inflation#FederalReserve#energycosts#ratecuts#FirstCitizensBank#economicresearch

Crypto M - Crypto News

@CryptoM · Post #64976 · 10.04.2026 г., 12:39

🚀 U.S. March CPI Rises Sharply Amid Conflict with Iran The U.S. Consumer Price Index (CPI) for March showed a significant increase, driven by soaring gasoline prices due to the ongoing conflict with Iran. According to Jin10, the seasonally adjusted CPI rose by 0.9% month-on-month, marking the largest increase since 2022. Data released on Friday indicated that the CPI climbed 0.9% from February, with the year-on-year growth rate accelerating to 3.3%, the fastest pace since 2024. The U.S. Bureau of Labor Statistics noted that the record surge in gasoline prices contributed nearly three-quarters of the monthly CPI increase. Meanwhile, the core CPI, which excludes food and energy costs, saw a more modest rise of 0.2% month-on-month. #USCPI#MarchCPI#gasolineprices#Iranconflict#consumerpriceindex#economicdata#inflation#BureauofLaborStatistics#coreCPI#economicgrowth

Crypto M - Crypto News

@CryptoM · Post #64570 · 09.04.2026 г., 08:35

🚀 Bitcoin Options Market Shows Limited Concern Ahead of U.S. CPI Release Bitcoin options markets are anticipating minimal movement, with only a 2.5% change expected in either direction around the upcoming U.S. Consumer Price Index (CPI) release on Friday. According to NS3.AI, this indicates limited trader concern regarding the inflation report. TradingView data reveals that the 30-day Bitcoin Volatility Implied Volatility (BVIV) index has decreased to 46.5%, marking its lowest level since January 31. #Bitcoin#OptionsMarket#CPIRelease#InflationReport#BitcoinVolatility#BVIV#NS3AI#TradingView#Cryptocurrency#USCPI#BTC

Crypto M - Crypto News

@CryptoM · Post #64983 · 10.04.2026 г., 12:50

🚀 U.S. CPI Watch: U.S. CPI Jumps 0.9% in March, Highest Since 2022 as Oil Drives Inflation Surge Key TakeawaysU.S. CPI rose 0.9% MoM, largest increase since 2022.Inflation hit 3.3% YoY, fastest pace since 2024.Gasoline accounted for ~75% of the monthly increase.Core CPI (ex-food & energy) slowed to 0.2% MoM.Inflation Surges on Energy ShockLatest data from the U.S. Bureau of Labor Statistics shows a sharp acceleration in inflation for March, with headline CPI rising 0.9% month-on-month.This marks the largest monthly increase since 2022, highlighting the growing impact of energy prices on the broader economy.Gasoline Prices Drive Majority of IncreaseThe surge in inflation was overwhelmingly driven by rising fuel costs linked to geopolitical tensions.Key detail:Gasoline contributed nearly three-quarters (~75%) of the CPI increaseThe spike reflects the ripple effects of higher oil prices amid the Iran conflict, which has tightened global energy supply.Yearly Inflation Accelerates to 3.3%On a yearly basis:CPI rose 3.3% YoY, the fastest pace since 2024This suggests inflation pressures are re-accelerating after a period of relative stabilization.Core Inflation Shows Signs of CoolingDespite the headline surge, underlying inflation remains more contained:Core CPI (excluding food and energy): +0.2% MoMThis indicates that:Price pressures are still largely energy-drivenBroader inflation may not yet be fully entrenchedMarket ImplicationsThe data presents a mixed signal for markets:Bullish for rates / USD:Strong headline inflationReinforces “higher-for-longer” Fed stanceNeutral-to-positive for risk assets (conditionally):Core inflation remains controlledSuggests inflation spike may be temporary if energy stabilizesEnergy vs Core Inflation BattleThe key question going forward is whether energy-driven inflation spills into the broader economy.Markets will closely watch:Wage growth trendsCore inflation trajectoryOil price stabilityIf energy pressures persist, inflation could remain elevated. If not, the spike may prove temporary.For now, the data reinforces a macro environment of elevated uncertainty, with inflation increasingly tied to geopolitical developments. #USCPI#InflationSurge#EnergyShock#GasolinePrices#OilPrices#CoreCPI#GeopoliticalTensions#USInflation#EconomicData#MarketImplications#HigherForLonger#WageGrowth#RiskAssets#OilPriceStability#2024Inflation

Crypto M - Crypto News

@CryptoM · Post #64535 · 09.04.2026 г., 06:35

🚀 U.S. March CPI Expected to Rise Amid Ongoing Iran Conflict The market widely anticipates that the U.S. Consumer Price Index (CPI) for March will increase by 3.4%, surpassing last month's 2.4%, marking the largest year-on-year rise in two years. According to Jin10, during past oil market shocks, the most likely commodities to see price hikes include aviation fuel, steel, aluminum, natural gas, fertilizers, and plastics. Industries reliant on these materials are already feeling the strain. The ongoing Iran conflict, which has lasted several weeks, has shifted concerns from the initial oil price surge to the compounded effects of a prolonged conflict. For many economists, the most alarming aspect is not the immediate issues but the "aftershocks" that may emerge months or even years later. JPMorgan's CEO has referred to inflation as a potential "fly in the ointment" that could undermine stock market returns in 2026. Harvard University professor and former IMF chief economist Ken Rogoff recently discussed an overlooked impact of the war: the increased military spending's effect on the already strained U.S. budget deficit. He noted the risk of soaring bond yields, which could harm the stock market and affect U.S. affordability. Rogoff also mentioned that the current supply disruptions caused by the Iran conflict are sufficient to keep oil prices elevated for a year. #USCPI#inflation#IranConflict#oilprices#aviationfuel#steel#aluminum#naturalgas#fertilizers#plastics#economicimpact#stockmarket#JPMorgan#budgetdeficit#militaryspending#bondyields#HarvardEconomist#supplydisruptions#USaffordability