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

Пребарај: #emercom

当前筛选 #emercom清除筛选
Russian Mission to ASEAN

@aseanrussia · Post #1574 · 15.04.2025 г., 09:00

On April 15, the Russian Emergencies Ministry (#EMERCOM) 🇷🇺 have delivered another batch of humanitarian aid to Myanmar 🇲🇲. The IL-76 aircraft delivered over 30 tons of supplies that included canned goods, cereals, sugar and medicine. @mchs_official

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1565 · 10.04.2025 г., 05:10

On April 9, two IL-76 aircrafts of the Russian Emergencies Ministry (#EMERCOM) 🇷🇺 have delivered additional 59 tons of humanitarian aid to Myanmar 🇲🇲. Russian rescuers handed over mobile power stations, tents and blankets, as well as basic necessities to the region affected by the devastating earthquake.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1556 · 07.04.2025 г., 07:41

📸 Footage of unloading the two IL-76 aircrafts of the Russian Emergencies Ministry (#EMERCOM) with humanitarian aid for Myanmar 🇲🇲. Aircrafts transported more than 68 tons of essential disaster relief supplies to the affected region - food, over 30 diesel generators, 150 tents and basic necessities. Three more special flights with a hundred tons of humanitarian aid are expected to arrive in the near future. @mchs_official

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1552 · 03.04.2025 г., 16:04

♥️ Locals of Mandalay 🇲🇲 thank Russian rescuers for their work A dozen local residents came to the field camp to see specialists from the Russian Ministry of Civil Defense, Emergencies and Disaster Relief (#EMERCOM). ⭕ Little residents of Mandalay prepared gifts for Russian rescuers. 🙏 In turn, the chief of staff of the joint detachment of the Russian Emergencies Ministry Dmitry Umanets addressed the audience: "We came to help you, and I will convey warm words of gratitude and gifts to the rescuers." ⭕ More than 260 specialists from the Ministry of Civil Defense, Emergencies and Disaster Relief of the Russian Federation (#EMERCOM) 🇷🇺 are eliminating the consequences of the disaster in Myanmar 🇲🇲: rescuers, dog handlers, psychologists and doctors. @mchs_official

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1551 · 03.04.2025 г., 15:19

The total area of more than 62 thousand m² affected by the earthquake has been examined by the Ministry of Civil Defense, Emergencies and Disaster Relief of the Russian Federation (#EMERCOM) 🇷🇺 rescue teams since the beginning of the search and rescue operations in Myanmar 🇲🇲. Russian rescuers immediately leave for the areas where people may still be trapped under rubble. The EMERCOM's rescue dogs are able to investigate thousands of m² of affected territory daily.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1545 · 01.04.2025 г., 14:32

The airmobile hospital of the Ministry of Civil Defense, Emergencies and Disaster Relief of the Russian Federation 🇷🇺 (#EMERCOM) has begun working in full in the central part of the city of Mandalay 🇲🇲, an area hit by the earthquake. Over 20 doctors are providing medical assistance to those in need. Therapeutic, surgical and intensive care units have received the first patients. The hospital will operate around the clock. The psychologists are also taking part in the mission. 🚑 The airmobile hospital is capable of operating autonomously for at least 14 days while receiving up to 200 patients a day. Meanwhile, its in-patient facility has 50 beds. The hospital has the necessary equipment for even the most complex surgeries.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1541 · 01.04.2025 г., 14:03

❗❗❗ The Ministry of Civil Defense, Emergencies and Disaster Relief of the Russian Federation 🇷🇺 (#EMERCOM) has formed the largest group of rescuers to provide assistance to the population of Myanmar. A total of 264 Russian rescuers are currently involved in eliminating the consequences of the strongest earthquake in Myanmar. @mchs_official

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1539 · 01.04.2025 г., 13:11

❗❗❗ An additional group of rescuers from the Ministry of Civil Defense, Emergencies and Disaster Relief of the Russian Federation 🇷🇺 (#EMERCOM) arrived in Myanmar on 31 March. Russian specialists are sent to the most affected areas, where previously arrived experts are already working. The group is equipped with the necessary gear, equipment and tools. @mchs_official

Hashtags

خانه روسی در تهران

@Rossotrudnichestvo_in_Iran · Post #864 · 21.09.2024 г., 07:57

Russia delivered 35 tons of humanitarian aid to Vietnam A cargo plane of the Russian Ministry of Emergency Situations delivered humanitarian aid to Vietnam on behalf of the President of the Russian Federation Vladimir V. Putin. 35 tons of cargo, which included food products, a mobile power plant and tents, will be transferred to the Vietnamese people affected by typhoon Yagi, which struck Southeast Asia last week. The event was implemented with the support of Rossotrudnichestvo and the "Russia is with you" project, which tells foreign citizens about the activities of the Russian Federation in the field of international development assistance. #Rossotrudnichestvo#RussianHouse#IDA#EMERCOM @rs_tehran

International News

@intnewsagency · Post #8833 · 23.03.2026 г., 12:02

Fire at Fuel Warehouse in Rostov Region Contained In Myasnikovsky District, Rostov Region, firefighters extinguished an open fire at a fuel storage warehouse in Krym village. The blaze covered 3,000 sq. meters, damaging several buildings. Thankfully, no casualties were reported. Emergency teams quickly contained the fire, preventing further spread. “The fire is contained, full extinguishing efforts continue,” said the regional Ministry of Emergency Situations. #RostovRegion#Fire#FuelStorage#EMERCOM The main news of Russia and the world ishere.

International News

@intnewsagency · Post #9027 · 29.03.2026 г., 14:20

Fire in Zhukovsky Apartment Building: Over 2,200 sq.m. Affected A fire broke out in a residential building in Zhukovsky, Moscow region, causing partial roof collapse. The blaze has been contained over an area exceeding 2,200 square meters, the Emergency Ministry reported. The cause remains unknown as specialists work on-site. District head Andronik Pak emphasized the importance of a swift investigation. #Zhukovsky#fire#EMERCOM#Moscow#emergency The main news of Russia and the world ishere.