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

Резултати

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

Пребарај: #oilsupply

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

@CryptoM · Post #64527 · 09.04.2026 г., 06:14

🚀 Japan Considers Additional Oil Reserve Release Amid Strait of Hormuz Uncertainty Japan is contemplating the release of an additional 20 days' worth of oil reserves as early as May. According to NS3.AI, this decision comes amid ongoing uncertainties surrounding the reopening of the Strait of Hormuz. Japan's heavy reliance on the Middle East for approximately 95% of its oil supply underscores the significance of this move. Since March 16, Japan has already released around 50 days of reserves and still maintains a reserve sufficient for 230 days. #Japan#oilreserves#StraitofHormuz#oilsupply#MiddleEast#energymarket#globaluncertainty

Crypto M - Crypto News

@CryptoM · Post #65358 · 13.04.2026 г., 02:12

🚀 South Korea's Central Bank Nominee Highlights Inflation Concerns Due to Middle East Conflict South Korea's nominee for the central bank governor, Shin Hyun-song, has identified inflation pressures stemming from the ongoing Middle East conflict as a primary policy priority. According to Jin10, Shin emphasized the need to address these inflationary challenges as part of his strategic focus. The conflict has led to disruptions in global oil supply chains, contributing to rising prices and economic uncertainty. Shin's remarks underscore the importance of monitoring geopolitical developments and their impact on South Korea's economic stability. The nominee's approach suggests a proactive stance in mitigating inflation risks while navigating the complexities of international relations. #SouthKorea#CentralBank#Inflation#MiddleEastConflict#OilSupply#EconomicStability#GeopoliticalImpact#ShinHyunSong#PolicyPriority

Crypto M - Crypto News

@CryptoM · Post #64499 · 09.04.2026 г., 03:50

🚀 Oil Supply Challenges Persist Amid Strait of Hormuz Blockage The ongoing blockage of the Strait of Hormuz continues to impact global oil supply, with countries worldwide facing difficulties in securing adequate resources. Bloomberg posted on X that approximately 1.2 million barrels of oil remain untouched off the coast of Singapore, highlighting the logistical challenges in the current market. The situation underscores the critical role of the Strait of Hormuz in global oil transportation and the broader implications for energy security. As nations grapple with these supply constraints, the focus remains on resolving the blockage to stabilize the market. #OilSupply#StraitOfHormuz#GlobalOilMarket#EnergySecurity#OilTransportation#LogisticalChallenges#OilShortage#MarketStabilization

Crypto M - Crypto News

@CryptoM · Post #64893 · 10.04.2026 г., 07:25

🚀 Oil Prices Rise Ahead of U.S.-Iran Talks, Remain Below $100 per Barrel Oil prices have increased but remain below $100 per barrel as the U.S. and Iran prepare for talks this weekend. According to Odaily, Emmanuel Belostrino, head of global crude oil and geopolitical market data at Kpler, stated that the outcome of the negotiations, particularly the possibility of establishing a viable shipping agreement, is crucial to alleviating the current backlog. During early European trading, both U.S. and Brent crude saw short-term gains, with prices at $99.7 and $97.6 per barrel, respectively. The Strait of Hormuz remains largely frozen, causing supply disruptions and maintaining market tension. Additionally, Iran's attack on Saudi Arabia's main export route, the East-West pipeline, has reduced its daily capacity by approximately 700,000 barrels. #OilPrices#USIranTalks#CrudeOil#BrentCrude#MarketTension#OilSupply#HormuzStrait#SaudiArabia#PipelineAttack#EnergyMarket

Crypto M - Crypto News

@CryptoM · Post #64652 · 09.04.2026 г., 12:36

🚀 White House Predicts Gasoline Price Drop with Hormuz Strait Opening The White House National Economic Council Director, Kevin Hassett, has indicated that gasoline prices are expected to decrease swiftly once the Strait of Hormuz is reopened. According to Odaily, Hassett mentioned that discussions have been held with allies to ensure a stable supply of U.S. oil. Additionally, consultations regarding the purchase of oil and natural gas have been conducted with allied nations. #WhiteHouse#GasolinePrices#HormuzStrait#OilSupply#USEconomy#EnergyPolicy#NaturalGas#KevinHassett#GlobalTrade#OilMarket

Crypto M - Crypto News

@CryptoM · Post #64627 · 09.04.2026 г., 11:57

🚀 European Financial Institutions Predict Short-Term Stability in Oil Prices Amid Middle East Tensions Several European financial institutions released reports on the 8th, forecasting that international oil prices are unlikely to return to pre-conflict levels between the U.S., Israel, and Iran in the short term. According to Odaily, the market should focus on the passage through the Strait of Hormuz and the restoration of infrastructure in the Middle East region. ING Group noted that the news of a two-week ceasefire agreement between the U.S. and Iran has somewhat alleviated concerns about long-term disruptions in oil supply, causing international oil prices to fall below $100 per barrel. The future trajectory of oil prices will depend on whether a lasting agreement can be reached in negotiations and if shipping levels through the strait can return to normal. It is expected that the market will continue to experience volatility during the negotiation period. UBS Group stated that it remains unclear when and to what extent shipping through the strait will resume, as some tankers will need time to re-route. If passage through the strait is blocked again, energy prices could quickly rebound. Additionally, even under optimistic scenarios, the repair of energy infrastructure and the resumption of production could take weeks or even months. Therefore, energy prices are unlikely to fall back to pre-conflict levels in the short term. #OilPrices#MiddleEastTensions#EuropeanFinancialInstitutions#StraitOfHormuz#EnergyMarket#OilSupply#MarketVolatility#CeasefireAgreement#InfrastructureRestoration#ShortTermStability

Crypto M - Crypto News

@CryptoM · Post #65355 · 13.04.2026 г., 02:09

🚀 JGBs Decline Amid Inflation Concerns Following U.S.-Iran Peace Talks Collapse Japanese Government Bonds (JGBs) experienced a decline as renewed inflation concerns emerged after the failure of peace talks between the United States and Iran. Wall Street Journal (Markets) posted on X that the breakdown in negotiations has heightened geopolitical tensions, contributing to market volatility. The unsuccessful talks have led to increased uncertainty in the global markets, with investors worried about potential disruptions in oil supply and subsequent inflationary pressures. This has prompted a sell-off in JGBs as investors seek safer assets. Analysts suggest that the geopolitical instability could lead to further fluctuations in bond markets, as traders adjust their portfolios in response to the evolving situation. The impact of these developments on the broader financial markets remains to be seen, with attention now focused on potential diplomatic efforts to resolve the tensions. #JGBs#InflationConcerns#USIranTalks#PeaceTalksCollapse#GeopoliticalTensions#MarketVolatility#OilSupply#BondMarkets#FinancialMarkets#Investors#MarketFluctuations