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

Резултати

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

Пребарај: #bolivia

当前筛选 #bolivia清除筛选
Communia

@communia · Post #37152 · 05.10.2023 г., 17:44

#Bolivia. Lucha interna en el MAS acaba con la expulsión del Presidente Arce, el vice David Choquehuanca y 28 altos cargos más... y la re-entronización de Evo Morales https://www.perfil.com/noticias/internacional/el-mas-expulsa-al-presidente-luis-arce-y-propone-a-evo-morales-como-candidato-unico.phtml

Hashtags

Canal Huelga🚩

@huelga · Post #20635 · 13.01.2024 г., 10:44

#Bolivia Huelga de trabajadores de la maternidad de Percy Boland, Santa Cruz. https://www.reduno.com.bo/noticias/anuncian-paro-de-24-horas-con-movilizaciones-en-la-maternidad-por-hacinamiento-y-falta-de-items-202411291440

Hashtags

🇮🇱Bolivia ha caído, Israel se posiciona en Latinoamérica Tel Aviv y La Paz están restableciendo oficialmente relaciones diplomáticas completas, otra gran victoria para el bloque emergente de los Acuerdos de Isaac. Bolivia primero cortó lazos con Israel en 2009 y nuevamente en 2014. Una breve restauración se produjo en 2019 bajo el Gobierno interino de derecha de Jeanine Áñez, alineando a Bolivia nuevamente con Israel y EEUU. Pero en 2020, después de que el Movimiento al Socialismo (MAS) volviera al poder, las relaciones colapsaron una vez más. Tras los ataques del 7 de octubre, Bolivia cortó todos los lazos con Israel y más tarde se unió al caso de genocidio de la Corte Internacional de Justicia (CIJ) de Sudáfrica contra Israel en 2024. El mes pasado, el centrista Rodrigo Paz Pereira se convirtió en el nuevo presidente de Bolivia. Bajo su liderazgo, La Paz ahora está cambiando de rumbo y renovando relaciones diplomáticas completas con Israel. Y mientras el país se somete a Israel, el expresidente Luis Arce es puesto bajo arresto. Este es el mismo patrón que Latinoamérica ha visto repetidamente, un giro geopolítico hacia Washington y Tel Aviv seguido casi inmediatamente por enjuiciamientos contra el anterior liderazgo de izquierda. Este es el resultado de conflictos sin sentido entre aliados ideológicos en Bolivia y ahora difícilmente la derecha soltará tan fácil el poder nuevamente. En cuanto a Israel, esta es otra señal de que el marco de los Acuerdos de Isaac se está expandiendo. #bolivia ——— Únete a la lucha por la verdad en 📱Telegram 📱YouTube 📱X (Twitter)

Hashtags

POPULAR FRONT

@popularxfront · Post #6274 · 16.05.2026 г., 17:34

🇧🇴#Bolivia: Clashes broke out between miner unions, protest groups, and law enforcement in La Paz as demonstrators called for the resignation of President Rodrigo Paz amid the country’s worsening economic and fuel crisis. Protesters confronted police while attempting to enter Plaza Murillo, Bolivia’s central government square, throwing what appeared to be dynamite sticks during the clashes. Meanwhile, roadblocks and demonstrations have continued across several parts of the country, including in El Alto, with regional reports describing a deteriorating security situation as authorities attempt to restore circulation. (via @correodelsurcom on X & Reuters)

Hashtags

POPULAR FRONT

@popularxfront · Post #6062 · 27.04.2026 г., 07:44

🇧🇴#Bolivia: Footage shows the Mobile Police Unit for Rural Areas (UMOPAR) of the Bolivian Police seizing a shipment of drugs that was set to be transported by plane at the Villa Tunari airstrip in the Chapare province. A brief exchange of gunfire erupted between the police and the suspected drug traffickers, after which several bags of cocaine, weapons, and the aircraft itself were seized. (via @submundooriginal)

Hashtags

International Geographic

@internationalgeographic · Post #5704 · 23.05.2025 г., 12:54

Andes Mountains, #Bolivia The Uyuni salt marsh (Spanish: Salar de Uyuni) is a dried—up salt lake. Thanks to the development of tourism in the Uyuni salt marsh, local residents began to build hotels from salt blocks in which they can stay overnight. It is noteworthy that beds made of salt blocks keep warm very well, and it is very hot on them at night. Everything is built from salt — chairs, tables, beds, walls, floors.

Hashtags

Bolivia Mágica

@BoliviaMagica · Post #443 · 30.01.2019 г., 12:04

Bolivia, país suramericano que posee diferentes geografías y variados paisajes, muchas naciones y étnias; rico en historia, impresionante en cultura y tradiciones ancestrales. ¡Eso es magia! Bolivia corazón de Suramérica. #bolivia t.me/BoliviaMagica

Hashtags

RTDocumentary

@rtdocumentary · Post #688 · 01.05.2022 г., 14:00

#Bolivia#video May 1 is a Labor Day. The holiday is celebrated in Russia and many other countries, such as Bolivia, where even children have to work. So they’re torn between helping their parents and school. See their stories in the video, and the entire documentary film Undermined: Bolivia’s child workers. Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #665 · 27.04.2022 г., 14:13

#video#Bolivia Bolivia has unusual battles – women dressed in heavy, multi-layered skirts fight each other. They’re known as Cholitas, and they pride themselves on looking their best in the ring. Outside the ring, they’re regular women: wives, mothers, business owners and even schoolgirls. But fighting is another social empowerment of indigenous women. Watch our the video to learn why women take part in such fights. Watch more Bolivian Cholita fighting in the full film The Good, the Bad and the Loco. Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #558 · 28.03.2022 г., 15:00

#video#Bolivia Salar de Uyuni is the world’s largest salt flat. It covers 11,000 square kilometres. Locals call it ‘God’s Mirror’. When salt was in great demand, it was essential. But now the situation has changed. In the late 1980s, vast lithium reserves were found at the salt flat, some of the biggest in the world. Lithium sometimes referred to as ‘21st-century oil,’ is an essential raw material needed to manufacture batteries. But unfortunately, lithium extraction pollutes the atmosphere and seriously disrupts the ecosystem. Still, saleros continue their work even risking their health because salt has become their whole life — they earn their living extracting it, making art pieces of it and even building salt houses. You can watch the full documentary on @documentaryplanet Follow: https://t.me/rtdocumentary

ПретходнаСтраница 1 од 4Следна