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

Пребарај: #novosergeyevka

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

@druschbaFm_en · Post #52784 · 02.04.2025 г., 08:02

⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 2 April⚡️ 🔴#Sumy Direction: 🔴In #Sudzha Sector, to the west on Ukrainian lands, there were no reports on major changes. Thus, the situation is likely as follows: 🟡#Vladimirovka- AFU; {1st blue↗️}; 🟡#Vodolagi - AFU; 🟡 Russian #Uspenovka - contested {1st black↘️}; 🟡#Veselovka - contested; 🟡#Belovody - AFU; 🟡#Zhuravka, contested; 🟡#Basovka, contested. 🟡#Novenkoye - RFAF {1st red⬆️}. 🟡 In #Kursk region, fighting continues north of the AFU controlled #Oleshnya, east of which Russian troops have (confirmed) advanced on the village. For #Guyevo the battle continues, the respective control zone of both parties is disputed. #Gornal is AFU controlled. 🔴In #KrasnayaYaruga Sector, fighting for #Popovka {6th black↙️} and #Demidovka is ongoing. 🗺 All on Map 1 🔴 In #Kharkov Direction, Russian aviation and artillery are reportedly striking the AFU's logistics routes. 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, Russian units advanced west of the Oskol River towards #Kondrashovka, the battle for which has begun. Thus, the Russian claims regarding the village and #MalayaShapkovka to it's northwest, reported on 29 Mar have proven wrong. It has just been reported that Russian units have entered #Kondrashovka's north. 🗺 Map 2 🔴 In #Borovaya Sector, no major changes. 🔴In #Liman Sector, the battle at #Katerinovka and #Novoye continues. 🔴In #Seversk Sector, the most intense clashes are at #Belogorovka's chalk quarry. 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, positional battles without major changes. 🔴In #Toretsk Sector, fighting in the city for the 'Toretskaya Mine' in the north, in the western outskirts and in the southern 'Zabalka Microdistrict' continued, as well as to the west for the villages of #Shcherbinovka and #Leonidovka. 🔴#Pokrovsk Direction: 🔴 On the right Flank, far to the east, the RFAF are still assaulting the southern village edge of #Valentinovka. Fighting continues around the recently taken #Panteleymonovka and for #Tarasovka further west. 🔴 South of the City, ongoing fighting along the frontline, without changes. 🔴 On the left Flank, the situation is dynamic. Reportedly, fierce fighting continues for #Udachnoye and in the #Uspenovka - #Novoaleksandrovka area. The AFU are trying to take #Uspenovka to slow down the Russian advance in #Novoaleksandrovka, the capture of which would enable further advance to #Novosergeyevka. 🟡 South of #Kotlyarovka, there was reportedly a breakthrough, Russian units cut of #Preobrazhenka from #Troitskoye and blocked the approaches to it from #Kotlyarovka. Currently, #Preobrazhenka is being cleared. The battles for #Kotlyarovka and #Bogdanovka continue. 🗺 Map 3 🔴#Komar Direction: 🔴 In #Bogatyr Sector, fighting around #Andreyevka and for #Konstantinopol continues. 🟡 For #Razliv, the RF MoD also claimed the takeover, but failed to provide evidence. The published video did not include the large buildings with blue roofs we mentioned yesterday. 🎬 Video 🔴 In #Komar Sector, at #Vesyoloye, Russian stormtroopers reportedly penetrated the AFU defences. In #VolnoyePole, fierce fighting for control over the settlement continues. 🔴#Zaporozhye Direction: 🔴In the #Orekhov Section, the battles for the 4 contested villages continue. 💥 In the #DPR, an AFU UAV hit City Bus No. 2 in #Gorlovka yesterday morning, wounding 15 civilians. 💥 In #Kherson Direction, the RFAF aviation carried out a massive bombing of the right Dnieper bank. 💥#Russia: 🔵The AFU attacked with UAVs at night. In #Kursk, at least 15 explosions were reported. In #RostovRegion, two apartment buildings in #Taganrog were damaged. 💥#RestUkraine: 🔵 The RFAF struck #Kharkov, #Kramatorsk and #Odessa with UAVs. ⚠️ The Term 'Reportedly' indicates that it is unconfirmed! 🎞 Videos Source 🗺 Maps @olegtsarov; @petrenko_iHS 📋 Sources: CC; Tsarov; 🇺🇦Fiend;⚡️2M;🐈Cat😼VK 🕰As of 2 Apr 2025; 06:53 GMT+3;📃1 Apr 📱 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