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

Резултати

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

Пребарај: #globaltrends

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

@CryptoM · Post #64981 · 10.04.2026 г., 12:48

🚀 Economist Win Thin Reflects on Global CPI Trends Economist Win Thin has observed that, in retrospect, the Consumer Price Index (CPI) data for March in most countries worldwide was slightly below expectations, with the exception of the United States. According to Jin10, many other countries are increasing fuel subsidies to alleviate the impact on consumers. However, Thin warns that this approach may lead to significant fiscal burdens, making it unsustainable in the long term. #Economist#CPI#GlobalTrends#FuelSubsidies#FiscalBurden#Inflation

EdgeMarket.AI 📣

@edgemarketai · Post #7987 · 09.02.2026 г., 19:28

🌍 One question. Global consequences. Will Russia and Ukraine reach a ceasefire by March 31, 2026? Diplomacy, pressure, fatigue — or escalation? Drop your take 👇 https://edgemarket.ai/bnb/social-media/Russia%20x%20Ukraine%20ceasefire%20by%20March%2031,%202026/statistics/69830479ff612403d86bf273 #Geopolitics#Ceasefire#WorldNews#GlobalTrends#ConflictAnalysis#FutureEvent

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9653 · 03.12.2025 г., 08:21

#The_Fortune🇺🇸📕[PDF]⬇️ #December2025 #January2026 #Monthly_Magazines For learning, for free(dom). @backupofmagazines Global coverage this week tracks how rising tech power reshapes markets and geopolitics as China accelerates drug manufacturing, automation and green innovation with implications for global supply chains amid growing #Geopolitics tension. U.S. markets confront an expanding #AI boom, from Anthropic’s trust-first model to questions around Nvidia’s dominance, while investors chase new strategies in an increasingly volatile #MarketWatch environment. Culture and consumer shifts surface in Roblox’s evolution, the booming beauty sector and wellness travel trends. Meanwhile climate action, urban sustainability and energy transitions intensify worldwide under mounting #ClimateCrisis pressure, defining a rapidly changing global landscape shaped by #GlobalTrends.

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9618 · 26.11.2025 г., 02:12

#The_Barron's 🇺🇸📕[PDF]⬇️ 24 #November2025 #Weekly_Magazines For learning, for free(dom). @backupofmagazines Europe’s renewed market momentum anchors this Barron’s issue, where analysts see brighter days ahead amid rising profits and shifting geopolitics—an outlook shaped by #MarketWatch forces and #GlobalTrends. Nvidia’s strong guidance fuels confidence in the #AI boom, even as investors navigate #Volatility across equities and buffer ETFs. Caution rises around India’s IPO wave, reinforcing a broader #RiskManagement mindset. With bond vigilantes returning and central-bank uncertainty growing, the magazine highlights why disciplined strategy remains essential in today’s #Finance landscape.

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9561 · 17.11.2025 г., 03:17

#The_Science🇺🇸📕[PDF]⬇️ 13 #November2025 #Weekly_Magazines For learning, for free(dom). @backupofmagazines This issue dives into breakthroughs reshaping biology and energy as researchers confront rising geopolitical limits. From #AI-driven epigenetics to #SyntheticBiology advances, the issue tracks how innovation pushes ahead despite tensions over China-US research ties. New micro-robots navigating the bloodstream and faster-charging batteries highlight a surge in #DeepTech momentum. Climate resilience, #PandemicPreparedness, and EU chemical reforms underscore global policy stakes. Studies on dog domestication, brown dwarfs, and marine recovery after extinction broaden the scientific lens. A reminder that #ScienceMatters even as politics shift—innovation continues to define our shared future. #TechNews#GlobalTrends#ResearchUpdates

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9463 · 03.11.2025 г., 03:27

#The_National_Geographic🇺🇸📕[PDF]⬇️ #November2025 #Monthly_Magazines For learning, for free(dom). @backupofmagazines This issue tours big frontiers: a colossal #NuclearFusion tokamak in France promises star power on Earth; botanists curate the world’s deadliest garden; a teenage Sherpa resets who belongs on alpine peaks; macro art peers through a bug’s eye; new science reframes adult #ADHD; crested gibbons show robotlike dances; wildfire imagery from the #SierraNevada; archaeologists ink themselves to decode ancient tattoos; and medics test human hibernation for deep-space care. Essential reading for explorers and pragmatists alike. #NationalGeographic#Climate#Energy#Biodiversity#Wildfire#Photography#Neuroscience#Space#Innovation#Science#Sustainability#Tokamak#Fusion amid accelerating #AI research and #GlobalTrends, shaping tomorrow’s decisions.