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 слични објави

Пребарај: #goldprices

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

@CryptoM · Post #65364 · 13.04.2026 г., 02:43

🚀 PRECIOUS METALS | Gold Prices in Uncertain Range Amid Middle East Tensions Gold prices are currently positioned in the middle of a fluctuating range, with short-term predictions remaining uncertain. According to Jin10, the market is bracing for a potential escalation in Middle East conflicts, which has led to gold prices opening lower during the Asian trading session. Analysts suggest that the price of gold may continue to hover within this range, making it difficult to predict future movements in the short term. #GoldPrices#MiddleEastTensions#PreciousMetals#MarketUncertainty#Gold#TradingSession

Crypto M - Crypto News

@CryptoM · Post #64515 · 09.04.2026 г., 05:30

🚀 PRECIOUS METALS | Chinese Gold Jewelry Prices Drop Significantly Gold jewelry prices in China have seen a notable decline today, according to Jin10. Several brands have reduced their prices by approximately 25 yuan compared to yesterday. The current prices are mostly in the range of 1,445 yuan to 1,450 yuan per gram. #preciousmetals#gold#chinagold#goldprices#jewelryprices#marketnews

Crypto M - Crypto News

@CryptoM · Post #65377 · 13.04.2026 г., 03:06

🚀 PRECIOUS METALS | Chinese Gold Jewelry Prices Remain Stable On April 13, Jin10 reported that the prices of gold jewelry in China have shown little change compared to last Friday. According to Jin10, several brands have maintained their pricing within the range of 1,445 yuan per gram to 1,450 yuan per gram. #preciousmetals#gold#goldjewelry#China#goldprices#stableprices#Jin10

Crypto M - Crypto News

@CryptoM · Post #65321 · 12.04.2026 г., 22:56

🚀 PRECIOUS METALS | Gold Prices Drop 2% Following U.S. Naval Blockade Order Gold prices fell by 2% to approximately $4,650 per ounce after U.S. President Donald Trump ordered a naval blockade of the Strait of Hormuz. According to Jin10, this decision came after peace talks between the U.S. and Iran failed over the weekend in Pakistan, unable to convert a fragile ceasefire into lasting peace following six weeks of conflict in the Middle East. The surge in energy prices has heightened inflation risks, increasing the likelihood that central banks may delay rate cuts or even raise rates. This development poses a bearish factor for non-yielding gold, which typically benefits when borrowing costs are lower. #Gold#PreciousMetals#GoldPrices#USPolitics#NavalBlockade#StraitOfHormuz#Inflation#EnergyPrices#InterestRates#MiddleEastConflict

Crypto M - Crypto News

@CryptoM · Post #64787 · 09.04.2026 г., 23:54

🚀 PRECIOUS METALS | Gold Prices Decline Amid Ongoing Inflation Worries Gold prices have experienced a slight decline as concerns over persistent inflation continue to influence market sentiment. Wall Street Journal (Markets) posted on X that the precious metal's value is being affected by ongoing fears of inflation, which remain a significant factor for investors. The market is closely monitoring economic indicators and central bank policies that could impact inflation rates. As these concerns persist, gold's appeal as a hedge against inflation is being tested, leading to fluctuations in its price. Investors are advised to stay informed about economic developments that may affect the precious metals market. #Gold#PreciousMetals#Inflation#MarketTrends#Investing#EconomicIndicators#CentralBank#FinancialMarkets#HedgeAgainstInflation#GoldPrices

Crypto M - Crypto News

@CryptoM · Post #65396 · 13.04.2026 г., 04:55

🚀 PRECIOUS METALS | Swiss Bank Reacquires Gold Amid Market Recovery Swiss Bank has resumed purchasing gold after previously reducing its holdings due to market downturns triggered by the Iran war. According to Jin10, the bank had significantly cut its gold holdings from about 10% to 3% of its portfolio. Despite the challenges, Swiss Bank maintains a positive long-term outlook for gold and is gradually reintegrating it into client investment portfolios. Since the onset of the conflict, gold prices have dropped sharply due to concerns over higher interest rates and liquidity constraints. The bank's gold holdings have now increased to approximately 6% of its portfolio. Swiss Bank anticipates that gold prices will rise to $6,000 per ounce by the end of this year, driven by structural demand factors such as central bank purchases, fiscal deficit concerns, and geopolitical tensions. #PreciousMetals#Gold#SwissBank#MarketRecovery#Investment#Geopolitics#CentralBank#FiscalDeficit#GoldPrices#PortfolioManagement

Crypto M - Crypto News

@CryptoM · Post #65333 · 13.04.2026 г., 00:13

🚀 PRECIOUS METALS | U.S. Inflation and Fed Rate Cut Expectations Impact Gold Prices On April 13, Jin10 reported that a research note from CITIC Securities highlighted the significant rise in U.S. overall inflation for March, driven by soaring oil prices, while core inflation remained moderate. According to Jin10, CITIC Securities anticipates minimal risk of secondary inflation in the U.S. and suggests that April's CPI may continue to show elevated growth due to compensatory increases in rental inflation. If oil prices decline slowly, U.S. CPI could remain above 3% year-on-year for the rest of the year. CITIC Securities also forecasts a 25 basis point rate cut by the Federal Reserve within the year, which may lead to a weaker U.S. dollar in the near term. This scenario could create liquidity-driven recovery opportunities for gold prices. Additionally, U.S. equities might benefit from improved risk appetite, while U.S. Treasury yields may lack sufficient downward momentum due to economic fundamentals. #PreciousMetals#USInflation#FedRateCut#GoldPrices#CITICSecurities#OilPrices#CoreInflation#CPI#USDollar#USEquities#USTreasuryYields