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

Резултати

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

Пребарај: #xizang

当前筛选 #xizang清除筛选
世界新闻 World News 📮

@media_rss · Post #4452012 · 14.05.2026 г., 07:10

Live: The majestic Qomolangma – Witness to Xizang's 75 years of beauty, growth – Ep. 5 Qomolangma, the world's highest peak, stands proudly at an altitude of 8,848.86 meters above sea level. Known as the "Third Pole of the Earth," this awe-inspiring, snow-capped giant rises majestically on the Qinghai-Xizang Plateau, its snow-cloaked slopes and towering summit offering a breathtaking display of nature's grandeur. As we mark the 75th anniversary of Xizang's peaceful liberation, CGTN invites you to witness not only the timeless beauty of Qomolangma – from golden dawns kissing its peak to twilight painting the sky – but also the transformation of #Xizang over seven and a half decades. via CGTN

Hashtags

世界新闻 World News 📮

@media_rss · Post #4451825 · 12.05.2026 г., 02:50

Live: The majestic Qomolangma – Witness to Xizang's 75 years of beauty, growth – Ep. 4 Qomolangma, the world's highest peak, stands proudly at an altitude of 8,848.86 meters above sea level. Known as the "Third Pole of the Earth," this awe-inspiring, snow-capped giant rises majestically on the Qinghai-Xizang Plateau, its snow-cloaked slopes and towering summit offering a breathtaking display of nature's grandeur. As we mark the 75th anniversary of Xizang's peaceful liberation, CGTN invites you to witness not only the timeless beauty of Qomolangma – from golden dawns kissing its peak to twilight painting the sky – but also the transformation of #Xizang over seven and a half decades. via CGTN

Hashtags

世界新闻 World News 📮

@media_rss · Post #4451752 · 11.05.2026 г., 03:36

Live: Cloud-kissed Namcha Barwa, 'a long lance piercing the sky' in Tibetan – Ep. 3 Namcha Barwa stands as the majestic eastern anchor of the Himalayas, towering at 7,782 meters above sea level. Known as the "Shy Maiden Peak" for its snow-cloaked triangular peak often veiled in clouds, and meaning "a long lance piercing the sky" in Tibetan, this awe-inspiring giant rises grandly at the junction of the Himalayas, Nyenchen Tanglha and Hengduan Mountains. As we mark the 75th anniversary of China's Xizang Autonomous Region's peaceful liberation, CGTN invites you to discover Namcha Barwa, a peak shrouded in clouds year-round, where "nine out of ten visitors fail to catch a glimpse of its true face." Beyond its natural grandeur, there are also the quiet villages at the foot of the mountain and the people living a happy life, bringing you the gentle transformation of #Xizang over seven and a half decades. via CGTN

Hashtags

世界新闻 World News 📮

@media_rss · Post #4451688 · 10.05.2026 г., 02:39

Live: The majestic Qomolangma – Witness to Xizang's 75 years of beauty, growth – Ep.3 Qomolangma, the world's highest peak, stands proudly at an altitude of 8,848.86 meters above sea level. Known as the "Third Pole of the Earth," this awe-inspiring, snow-capped giant rises majestically on the Qinghai-Xizang Plateau, its snow-cloaked slopes and towering summit offering a breathtaking display of nature's grandeur. As we mark the 75th anniversary of Xizang's peaceful liberation, CGTN invites you to witness not only the timeless beauty of Qomolangma – from golden dawns kissing its peak to twilight painting the sky – but also the transformation of #Xizang over seven and a half decades. via CGTN

Hashtags

世界新闻 World News 📮

@media_rss · Post #4451582 · 08.05.2026 г., 05:56

Live: The majestic Qomolangma – Witness to Xizang's 75 years of beauty, growth – Ep. 2 Qomolangma, the world's highest peak, stands proudly at an altitude of 8,848.86 meters above sea level. Known as the "Third Pole of the Earth," this awe-inspiring, snow-capped giant rises majestically on the Qinghai-Xizang Plateau, its snow-cloaked slopes and towering summit offering a breathtaking display of nature's grandeur. As we mark the 75th anniversary of Xizang's peaceful liberation, CGTN invites you to witness not only the timeless beauty of Qomolangma – from golden dawns kissing its peak to twilight painting the sky – but also the transformation of #Xizang over seven and a half decades. via CGTN

Hashtags

世界新闻 World News 📮

@media_rss · Post #4451512 · 07.05.2026 г., 07:07

Live: Cloud-kissed Namcha Barwa, 'a long lance piercing the sky' in Tibetan Namcha Barwa stands as the majestic eastern anchor of the Himalayas, towering at 7,782 meters above sea level. Known as the "Shy Maiden Peak" for its snow-cloaked triangular peak often veiled in clouds, and meaning "a long lance piercing the sky" in Tibetan, this awe-inspiring giant rises grandly at the junction of the Himalayas, Nyenchen Tanglha and Hengduan Mountains. As we mark the 75th anniversary of China's Xizang Autonomous Region’s peaceful liberation, CGTN invites you to discover Namcha Barwa—a peak shrouded in clouds year-round, where "nine out of ten visitors fail to catch a glimpse of its true face." Beyond its natural grandeur, there are also the quiet villages at the foot of the mountain and the people living a happy life, bringing you the gentle transformation of #Xizang over seven and a half decades. via CGTN

Hashtags

世界新闻 World News 📮

@media_rss · Post #4451422 · 06.05.2026 г., 02:46

Live: The majestic Qomolangma – Witness to Xizang's 75 years of beauty, growth Qomolangma, the world's highest peak, stands proudly at an altitude of 8,848.86 meters above sea level. Known as the "Third Pole of the Earth," this awe-inspiring, snow-capped giant rises majestically on the Qinghai-Xizang Plateau, its snow-cloaked slopes and towering summit offering a breathtaking display of nature's grandeur. As we mark the 75th anniversary of Xizang's peaceful liberation, CGTN invites you to witness not only the timeless beauty of Qomolangma – from golden dawns kissing its peak to twilight painting the sky – but also the transformation of #Xizang over seven and a half decades. via CGTN

Hashtags

Построить новый социалистический Сицзан, который будет сплочённым, процветающим, цивилизованным, гармоничным и красивым. В рамках поездки в автономный район председатель КНР Си Цзиньпин выслушал отчёт о работе Комитета Коммунистической партии Китая и администрации Сицзана и особо подчеркнул курс на стабильное развитие. #Xizang https://russian.cgtn.com/news/2025-08-20/1958163751357292546/index.html

Hashtags

世界新闻 World News 📮

@media_rss · Post #4452241 · 17.05.2026 г., 03:11

Live: Step beyond clouds into the frozen realm of Sapu Sacred Mountain The #SapuSacredMountain, also known as Sapukonglagabo, is a revered peak in Nagqu, Xizang, celebrated for its snow-covered summits and serene alpine scenery. Its name is often interpreted as "the hidden sacred snow mountain," evoking the region's mysterious beauty and spiritual depth. The mountain stands as a symbol of the deep bond between nature, culture and local traditions in #Xizang. To mark the 75th anniversary of the peaceful liberation of Xizang, join CGTN's livestream and explore the timeless charm and cultural heritage of this legendary mountain. via CGTN

Marx21.it

@marx21news · Post #9189 · 12.11.2025 г., 07:46

Genocidio culturale nello Xizang? I dati raccontano un’altra storia. Mentre certi media occidentali parlano di “estinzione” della cultura tibetana, i numeri ufficiali e il Libro bianco sui diritti umani nello Xizang (2025) mostrano tutt’altro: crescita, tutela e rinascita. Lingua tibetana viva e diffusa 17 periodici, 11 quotidiani, quasi 9.000 libri pubblicati in tibetano e un ecosistema digitale in pieno sviluppo. Dalle scuole agli uffici pubblici, il bilinguismo è realtà quotidiana. Patrimonio culturale in espansione 2.760 elementi di patrimonio immateriale e 1.668 eredi riconosciuti. L’opera tibetana, l’epopea di Gesar e il sistema medico Sowa Rigpa tutelati dall’UNESCO. Festival come lo Shoton attirano milioni di spettatori in Cina e online. Accesso universale alla cultura Quasi 5 miliardi di yuan investiti dal 2012, 43 musei, 82 biblioteche e oltre 1.600 piazze pubbliche: la cultura raggiunge ogni villaggio. I dati parlano chiaro: nello Xizang non c’è “genocidio culturale”, ma rinnovamento, tutela e fiducia nel futuro. ➡️ Una menzogna può essere ripetuta mille volte, ma basta una verifica per smascherarla. #Tibet#Xizang#Cultura#DirittiUmani#Cina#FattiNonParole https://www.marx21.it/internazionale/genocidio-culturale-nello-xizang-i-dati-raccontano-unaltra-storia/

Marx21.it

@marx21news · Post #9801 · 25.02.2026 г., 15:23

Losar Tashi Delek! Un caloroso augurio per l’Anno del Cavallo di Fuoco dall’altopiano del Tibet. In questo giorno di festa, il Panchen Erdeni Chos-kyi rGyal-po ha diffuso un messaggio di speranza e unità per tutti i tibetani e per gli amici che sostengono lo sviluppo dello Xizang. Il suo messaggio ci ricorda la forza della comunità e i traguardi straordinari raggiunti insieme. Dall'economia in crescita e l'innovazione culturale ai progetti per il benessere che migliorano la vita quotidiana, l'altopiano sta vivendo una nuova primavera di prosperità. Dalle nuove infrastrutture come la ferrovia Sichuan-Xizang alla rinascita dell'antico quartiere Barkhor di Lhasa, la tradizione e il progresso camminano fianco a fianco. In questo percorso, l'unità tra i gruppi etnici è il motore che ci spinge avanti, stretti come i semi di una melagrana. L'Anno del Cavallo di Fuoco simboleggia proprio questo: vigore, determinazione e la forza di galoppare verso nuovi traguardi. Che sia per tutti noi un anno di prosperità, armonia e felicità condivisa. Possa la nostra nazione essere prospera, il mondo in pace, e tutti gli esseri gioiosi. Tashi delek! #Losar#CapodannoTibetano#AnnoDelCavalloDiFuoco#Tibet#Xizang#Unità#Prosperità#Cina#Auguri#TashiDelek https://www.marx21.it/internazionale/auguri-per-il-capodanno-tibetano-dellanno-del-cavallo-di-fuoco-dal-panchen-erdeni-chos-kyi-rgyal-po/