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

Резултати

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

Пребарај: #otradnoye

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

@druschbaFm_en · Post #52752 · 01.04.2025 г., 07:57

⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 1 April⚡️ 🔴 In #Chernigov Direction, the AFU has reportedly already crossed the Russian border of the #Bryansk region many times. Locals point to periodic incursions towards several villages. 🔴#Sumy Direction: 🔴In #Sudzha Sector, to the west on Ukrainian soil, the situation based on confirmed information and evidence is as follows: 🟡#Vladimirovka- AFU; {1st blue↗️}; 🟡#Vodolagi - AFU; 🟡#Uspenovka in Russia - contested {1st black↘️}; 🟡#Veselovka - contested {2nd black↖️}; 🟡#Belovody - AFU; 🟡 In #Zhuravka, fights in the central part; 🟡 In #Basovka, the RFAF assaults the eastern part. 🟡#Novenkoye - RFAF {1st red⬆️}. 🟡 In #Kursk region, reportedly, Russian troops have repelled an assault on the 'Border Checkpoint' {2nd red↙️}; the AFU have reinforced the battle area around #Oleshnya {4th blue⬅️}. 🟡 In #Guyevo, the RFAF have reportedly extended their control zone {5th black⬇️}. 🟡#Gornal remains AFU controlled. 🔴In #KrasnayaYaruga Sector, reportedly positional battles are taking place in #Popovka {6th black↙️}. 🟡 In #Demidovka, the AFU have advanced in the central part and in the area of ​​the farm in the village's eastern part. 🗺 Map 2 🟡 At #Grafovka and #Prilesye, lull. 🗺 All on Map 1 🔴#Kharkov Direction: 🔴In #Liptsy Section, positional battles. 🔴 In #Volchansk Section, as well in the city itself. 🔴#Svatovo Front: 🔴 In #Kupyansk and #Borovaya Sectors, reportedly slight tactical successes for the RFAF without major changes. 🔴In #Liman Sector, fighting south of #Katerinovka and east of #Novoye in the north. 🔴In #Seversk Sector, west of #Belogorovka, Russian troops reportedly approached #Grigorovka. 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, the battles continues. 🔴In #Toretsk Sector, fighting in the city and to the west for #Shcherbinovka and #Leonidovka continued. 🔴#Pokrovsk Direction: 🔴 On the right Flank, far to the east, fighting continues at #Valentinovka and in the area of #Panteleymonovka (towards #Toretsk northwards). To the west, urban battles in #Tarasovka. 🔴 South of the City, reportedly Russian advance in #Lysovka. Battles at #Shevchenko and #Peschanoye, and in #Kotlino fighting at the the far southeastern edge. 🔴 On the left Flank, the fighting for #Udachnoye's far southeastern reportedly continued. Otherwise, intense combat is taking place along the entire frontline from #Solenoye southwards. 🔴#Komar Direction: 🔴In #Bogatyr Sector, the battles near #Andreyevka and for #Konstantinopol continue. 🟡 In #Razliv, Russian troops extended the zone of control and raised the flag in the centre of the village. 📌Despite several Russian claims, there is no takeover yet! The village boundaries extend to the west, especially the large buildings with blue roofs are located within them. 🎬 Video 🗺 Map 3 🔴 In #Komar Sector, the RFAF are reportedly attacking towards #Otradnoye and #Komar. 🟡 In #Vesyoloye, the battle for the settlement is ongoing. 🔴#Zaporozhye Direction: 🔴In the #Orekhov Section, south of the city, the AFU positions are reportedly under permanent fire; Russian units are attacking towards #Novoandreyevka. To the west, the fighting especially in the 4 contested villages continues: 🟡#Shcherbaki; 🟡#MalyeShcherbakito the west; 🟡#Stepovoye, further west; 🟡#Lobkovoye; 🟡#Pyatikhatki remains RFAF controlled. 🟡 At #Kamenskoye, in the far west, the RFAF reportedly took one of the AFU's key strongholds. 🔴 In #Kherson Direction, Russian aviation struck Ukrainian positions on the opposite bank, while the AFU targeted villages. 💥 For #OldRussia and #RestUkraine, we have found no reports of new mutual strikes. ⚠️ The Term 'Reportedly' indicates that it is unconfirmed! 🎞 Video Source 🗺 Maps @olegtsarov; @petrenko_iHS@creamy_caprice 📋 Sources: CC; Tsarov; 🇺🇦Fiend;⚡️2M;🐈Cat😼VK 🕰As of 1 Apr 2025; 06:38 GMT+3;📃31 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

DruschbaFM - English

@druschbaFm_en · Post #52668 · 29.03.2025 г., 08:06

⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 29 March⚡️ 🔴#Sumy Direction: 🔴 At #Bryansk Border, mutual strikes. 🔴In #Sudzha Sector, to the west on Ukrainian soil, reportedly the RFAF is about to expand the zone of control on a broad front from #Vladimirovka up to #Basovka: 🟡#Vladimirovka- contested; 🟡#Vodolagi - AFU {2nd blue⬆️}; 🟡#Veselovka - taken by the RFAF {1st black⬆️}; 🟡#Belovody - AFU {3rd blue⬆️}; 🟡#Zhuravka - contested; 🟡#Basovka - contested. 🟡#Novenkoye, RFAF {1st red⬆️}. 🟡 In #Kursk region, reportedly, Russian forces advanced from the 'Border Checkpoint' {3rd red arrow} further south and have entered #Oleshnya 4th blue⬅️}. 🟡#Gogolevka, is reportedly RFAF controlled {2nd red⬇️}. 🟡 In #Guyevo, Russians filmed their presence in the village's north and fights further south {4th black⬅️}. 🎬 Video 1 🟡#Gornal remains under AFU control. 🔴In #KrasnayaYaruga Sector, militants enter #Popovka regularly up to its eastern part under RFAF fire {5th black↙️}. 🗺 Map 2 🟡 In #Demidovka, the AFU controls ca. 50% of the village. 🟡 At #Grafovka, lull. 🟡 At #Prilesye as well. 🗺 All on Map 1 🔴 In #Kharkov Direction, without changes. 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, far north, Russian troops advanced in #Krasnoye1st. RF MoD claims its takeover. Further south, reportedly: 🟡#MalayaShapkovka has been entered; 🟡#Kondrashovka was taken and 🟡#Tischenkovka has been entered. 🔴 In #Borovaya, #Liman and #Seversk Sectors, and... 🔴#ChasovYar Direction, no major changes. 🔴#Pokrovsk Direction: 🔴 On the right Flank, far to the east, battles continue in the #Panteleymonovka area. To the west, for #Tarasovka. 🔴 South of the City, most of #Lysovka is RFAF controlled. 🔴 On the left Flank, the fighting (afore called clearing) continues in #Uspenovka. 🟡 In #Novoaleksandrovka, the battle for the village reportedly goes on. 🟡#Kotlyarovka has been approached by Russian troops. The AFU counterattack. 🟡 At #Bogdanovka, the RFAF advanced to the southern edge of the village. 🔴#Komar Direction: 🔴In #Bogatyr Sector (afore 'Konstantinopol Sector'), the RFAF advanced north of #Andreyevka in westerly direction and closed half of the pocket. Fighting continues to the west of the village (remember, previously the Russians were driven out of positions further west near #Alekseyevka). 🟡 In #Konstantinopol, Russian troops are still trying to regain control over the settlement. The AFU counterattack. 🟡 In #Razliv, the battle has reportedly shifted to the centre. 🟡On #Bogatyr, the RFAF are advancing on a broad front from the south. 🔴 In #Komar Sector, Russian troops move on #Otradnoye, located west of #Bogatyr. To the west, the battle for #Vesyoloye continue. 🔴#Zaporozhye Direction: 🔴In #Orekhov Section, positional fights in the are of​#MalayaTokmachka - #Rabotino area. Further west reportedly: 🟡 In #Shcherbaki, the battle continues with varying success. 🟡 In #MalyeShcherbakito the west, the RFAF try to get full control of the village. 🟡 In #Stepovoye, further west, the clashes continued. 🟡 In #Lobkovoye as well. 🟡#Pyatikhatki remains RFAF controlled. 🔴 In #Kherson Direction, the RFAF shelled AFU positions, the AFU, in turn, villages. 💥#Russia: 🔵 The AFU struck the 'Transmash Plant' in #Donetsk (#DPR); in #Lugansk (#LPR), the 'Industrial Zone'; in #Belgorod region, #Stroitel and several villages; and in #Kursk Region, again the 'Sudhza Gas Metering Station' and finished it off. 🎬 Video 2 💥#RestUkraine: 🔵 The RFAF, in turn, struck targets in the #Kiev, #Vinnitsa, #Zhitomir, #Kharkov, #Sumy, #Nikolayev, #Cherkassy, #Poltava, and #Chernigov regions, as well as in #Dnepropetrovsk. ⚠️ The Term 'Reportedly' indicates that it is unconfirmed! 🎞Vids Source 1; Source 2; 🗺 Maps @olegtsarov; @creamy_caprice 📋 Sources: CC; Tsarov; ⚡️2M; 🇺🇦Fiend;😼Kotenok 🕰As of 29 Mar 2025; 06:44 GMT+3;📃28 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