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

Резултати

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

Пребарај: #tanzania

当前筛选 #tanzania清除筛选
Voyage.Travel.Tourism

@VOYAGE · Post #1402 · 26.04.2025 г., 12:14

🌴💖Zanzibar – the pearl of Tanzania and one of the best beach destinations in the Indian Ocean 📏 📏 📏 📏 📏 📏 📏 📏 #Tanzania🇹🇿@voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1189 · 08.12.2024 г., 13:14

Zanzibar – The Jewel of Tanzania and one of the best beach destinations in the Indian Ocean. 🌴💖 📏 📏 📏 📏 📏 📏 📏 📏 #Tanzania🇹🇿 @voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1079 · 31.08.2024 г., 12:14

🗺Tanzania🇹🇿 Zanzibar is Africa's Maldives, a place on the map with dozens of breathtakingly beautiful beaches! Pristine white sand, turquoise Indian Ocean waters, gentle sunshine, and fewer crowds make it an ideal vacation spot. #Tanzania @voyage

Hashtags

RTDocumentary

@rtdocumentary · Post #215 · 16.09.2021 г., 11:45

Crawling up Kilimanjaro with no legs #video#Tanzania When Aleksandr was born with no legs and deformed fingers, his mother abandoned him. He grew up in an orphanage for kids with disabilities in a remote Russian town. However, Aleksandr has always aimed high and dreamed big. Aleksandr got lucky and was selected to take part in a US humanitarian project. At the age of 15, he walked on his new prostheses for the first time in his life. His temporary foster parents couldn’t let him go and adopted Aleksandr. To inspire kids with disabilities, Aleksandr and his friends from the orphanage took on the challenge to climb Africa’s highest mountain Mount Kilimanjaro at 5,895 metres. RT Documentary witnessed their incredible feat and made a film - https://youtu.be/v2Sz3k9gKp8 For now, Aleksandr lives and studies in Boston, USA, and has climbed Kilimanjaro for a second time! Follow: https://t.me/rtdocumentary

ጠቅላይ ሚኒስትር ዐቢይ አሕመድ (ዶ/ር) ከታንዛኒያ ዩናይትድ ሪፐብሊክ ፕሬዝዳንት ጋር ተወያዩ ******************* ጠቅላይ ሚኒስትር ዐቢይ አሕመድ (ዶ/ር) ከታንዛኒያ ዩናይትድ ሪፐብሊክ ፕሬዝዳንት ሳሚያ ሱሉህ ሀሰን ጋር ተወያይተዋል፡፡ ጠቅላይ ሚኒስትሩ በማህበራዊ ትስሰር ገጻቸው ባጋሩት መልእክት፤ ከታንዛኒያ ዩናይትድ ሪፐብሊክ ፕሬዝዳንት ሳሚያ ሱሉህ ሀሰን ጋር የሁለትዮሽ ግንኙነትን በሚያጠናክሩ አስቻይ ጉዳዮች ላይ ውይይት አድርገናል ብለዋል:: #EthiopianBroadcastingCorporation#Ebcdotstream#Ethiopia#PMAbiy#Tanzania#Diplomacy

RTDocumentary

@rtdocumentary · Post #770 · 15.05.2022 г., 18:02

‘Isaac is a very fast and intelligent rat. He is good at concentrating on finding TNT.’ In Tanzania, giant hamster rats are trained to be professional bomb disposal experts. They work in minefields in former hotspots. The rodents can easily smell carefully camouflaged explosive devices thanks to their excellent sense of smell. Do you want to see how a bomb-sniffing rat is trained? Then, watch the clip and film Isaac: The Story of a Little Giant. #Tanzania#minefields Follow: https://t.me/rtdocumentary

AREA

@area_eng · Post #115 · 22.06.2025 г., 14:03

Russia and Tanzania are developing cooperation in nuclear energy During the negotiations at SPIEF-2025, Russian Energy Minister Sergei Tsivilev and Tanzanian Deputy Prime Minister and Minister of Energy Biteko Doto Mashaka discussed the prospects for joint work in the energy sector. The Tanzanian side presented an ambitious five-year energy development program, which provides for a gradual increase in electricity supply to the population from current levels to 75%, and in the future - up to 100% coverage. Particular attention in the strategy is paid to the development of renewable energy sources and the study of the possibilities of peaceful nuclear energy. "Our president set the task that it is impossible to build technological sovereignty in one separate country. It must be built together with friendly countries. And the Republic of Tanzania is precisely our friendly country. Therefore, we are ready to share our technologies," Sergei Tsivilev emphasized. The Russian side proposed a comprehensive approach to cooperation. It includes the possible construction of low-power nuclear power plants, training of personnel in Russian universities, conducting technical and economic research, as well as implementing joint projects in non-energy areas - medicine and agriculture. This dialogue has become a logical continuation of previously reached agreements. In April 2025, Rosatom and the Ministry of Energy of Tanzania signed a memorandum on cooperation in the field of non-energy application of nuclear technologies. New negotiations expand the scope of interaction, opening up prospects for the implementation of large-scale energy projects. Experts note that Russian-Tanzanian cooperation in the nuclear sector can become a key factor in the implementation of the energy strategy of the African country. It will provide its population with stable and environmentally friendly energy sources, and will also create a basis for the technological development of a number of related sectors of the economy. #AREA#Africa#Russia#Tanzania#energy

RTDocumentary

@rtdocumentary · Post #749 · 12.05.2022 г., 15:00

'My father needed cows, not me'. These are the words of 13-year-old Kristina from Tanzania. Her father sold her to an older man to get a cow. The tradition is still widespread in Tanzania. Families live in poverty and find it difficult to feed themselves. So for a 13-year–old bride, her parents receive a rich dowry - almost a herd of cows. But the Tanzanian government is cracking down on this custom. Watch Kristina’s heartbreaking story. You can learn more about this tradition in ourfilm Bride Trade. #Tanzania#traditions#bridetrade Follow: https://t.me/rtdocumentary

123•••56
ПретходнаСтраница 1 од 6Следна