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

Резултати

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

Пребарај: #zatoka

当前筛选 #zatoka清除筛选
DruschbaFM - English

@druschbaFm_en · Post #52374 · 21.03.2025 г., 08:06

⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 21 March⚡️ 🔴#Sumy Direction: 🔴In #Sudzha Sector, to the west near #Zhuravka the RFAF are around 2 km deep in Ukrainian lands. The village itself, is ca. 50% under Russian control. 🟡#Basovka, to the southeast, is about 70% seized. 🟡#Novenkoye, further north, is Russian controlled. The AFU have abandoned the settlement. 🟡 The border zone to the east is grey zone. 🟡#Rubanshchina in #Kursk region, is Russian controlled. 🟡#Gogolevka to its east is still under AFU control. 🟡 Southeast of #Gogolevka, the RFAF expanded their zone of control. The wedge is also north #Melovoy, the control of which is unclear (AFU or Grey Zone). 🟡#Oleshnyaremains safe under AFU control. 🟡#Guyevo is likely still AFU controlled, the RFAF expanded their zone and have advanced close to its northern edge. 🟡#Gornal remains safe under AFU control. 📌 As a Result, there no cauldron for now. UAV and artillery are working on both sides. In fact, the AFU losses are far higher than the RFAF's, which is well documented by objective evidence. This, due to the AFU Command's decision to hold the remaining villages at any costs. 🔴 In #KrasnayaYaruga Sector, south of #Sudhza in Russian #Belgorod region, the AFU assaults continue with focus on #Demidovka, where AFU infantry could entrench at its southern edge. Shooting battles have been reported. According to unconfirmed reports, the village ruins are still Russian controlled. 🟡#Grafovka to its southeast remains under firm Russian control. 🟡#Prilesye also further south. 🗺 All on Map 1 📌 The AFU Command, following significant losses of tanks and armoured vehicles, has changed its tactics. Attacks are now only carried out by infantry groups with drone and artillery support. 🔴 In #Kharkov Direction and at #Svatovo Front, there are no major changes. 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, no changes. 🔴In #Toretsk Sector, northeast of the city, the reported RFAF advance towards #Ozeryanovka has been confirmed by footage. 🟡 At #Druzhba, the RFAF expanded the zone of control north of the village by around 600m. 🟡 In #Toretsk, the RFAF had tactical successes. 🔴#Pokrovsk Direction: 🔴 On the right Flank, the AFU counterattack and managed to push back Russian units in the area of ​​the 'Malinovskaya junction.' 🟡#Tarasovka has been entered by Russian assault groups, which managed to expand the control zone in the village by 400m. 🗺 Map 2 🎬 Video 🟡 In #Yelizavetovka, there are heavy counterbattles. 🔴 South of the City, contrary to earlier reports, #Shevchenko village is still embattled. Russian troops expanded their zone of control. 🗺 Map 3 🔴 On the left Flank, heavy fighting without significant changes. 🔴#Komar Direction: 🔴In #Konstantinopol Sector, the battles incl. for #Konstantinopol itself continue, no major changes. 🔴 In #Komar Sector, heavy fighting continues. According to field reports, the Russian troops have entered the southern outskirts of #Vesyoloye. 🔴#Zaporozhye Direction: 🔴In the #Orekhov Section, bloody battles for #Shcherbaki and #MalyeShcherbaki, as well as on the approaches to #Lobkovoye continue. 🔴 In #Kherson Direction, the AFU struck civil targets. 💥#OldRussia: 🔵In #Kursk Region, the AFU struck and destroyed the 'Sudzha Gas Transmission System,' through which gas from #Russia was supplied to the #EU. In #Rostov region, a UAV attack was repelled at night. In the #DPR, 1 civilian was killed and 4 wounded by AFU attacks on civilian targets. 💥#RestUkraine: 🔵 In #Odessa Region, several Geranium UAV hits have been reported, incl. at the 'Telekart-Pribor Plant' in #Odessa. Explosions occurred also in #Zatoka, #Kiev, #Poltava, #Zaporozhye, and #Cherkassy regions. 🎞 Video Source 🗺 Maps @olegtsarov; @creamy_caprice 📋 Sources: CC; Tsarov; ⚡️2M; 🇺🇦Fiend;😼Kotenok 🕰As of 21 Mar 2025; 06:42 GMT+3;📃20 Mar 📱 Join GLOBAL DEPTH to boost your TG Feed 💬Join Military Chat for Comments & Discussions 🇺🇦On Ukraine Observer you will find your daily independent Ukraine War Battle Update