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

Пребарај: #kolodezi

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

@druschbaFm_en · Post #52135 · 16.03.2025 г., 08:07

⚡️ 🇷🇺 🇺🇦📆 Weekly Ukraine War Roundup⚡️ 🕊 The Negotiation Process is being deliberately prolonged. Kiev refuses to halt mobilisation and is preparing new provocations, while the #EU pushes Zelensky forward at the expense of Europe's national interests. #Russia, recognising that a proposed 30-day ceasefire would allow the AFU to recover and fortify, is explaining to the #US why such a move is futile. 🗓 This Week's Key political Outcome has been the rapid advance of the Russian Army in the #Kursk region, the liberation of #Sudzha City, and battles in the Ukrainian #Sumy region. 🇷🇺 Russian military Successes precisely strengthen their negotiating position, as emphasised by the Supreme Commander, President Putin, during a meeting at the command post in #Kursk region. Overall, #Russia seeks a long-term, stable peace, not short-term satisfaction of Trump’s ambitions. Conversations with frontline soldiers, who have fought in the hardest sectors since the war began, confirm the Russian Army's readiness to push forward until the full objectives of the Special Military Operation are achieved. 🇺🇦 Kiev’s Position has notably shifted significantly. Initially, it demanded a return to the '1991 borders,' then to the 'Prewar Borders,' and now Zelensky is prepared to freeze the conflict along the current frontline. This is unacceptable to #Russia within its new constitutional borders. Moreover, any pause in fighting benefits the retreating side. 🇺🇸 The United States, meanwhile, has resumed providing intelligence and military-technical aid to #Ukraine, while European bureaucrats fuel war hysteria and prepare for direct conflict with #Russia. This is seen in #Poland and #Germany expanding their armed forces (including territorial defence and universal military training) and in military production ramp-ups, generating huge profits for arms manufacturers. ⚔️ On the Front, Russian success in the #Kursk region sets the stage for further advances in the #Sumy direction. The AFU had anticipated this and prepared defensive lines. 🔴 In #Belgorod Region, the AFU continue daily strikes on civilians using artillery and drones. 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, reports indicate AFU counteractions against the Russian bridgeheads on the right bank of the Oskol River. 🔴 In #Liman Sector, Russian forces remain active near #Kolodezi and #Yampolovka. 🔴 In #Seversk Sector, Russian troops are advancing with heavy fighting from #Belogorovka towards #Grigorovka. 🔴 ChasovYar Direction: 🔴 In #Toretsk Sector, the AFU continue deploying personnel and equipment in the city itself, with battles ongoing for the urban agglomeration. 🔴 In #Pokrovsk Direction, north of #Vozdvizhenka, fighting is underway near #Tarasovka, where the AFU has built strong defensive positions. Near the city, positional battles continued throughout the week, but by the end of the week, Russian forces regained the initiative. 🔴 In #Komar Direction, northwest of the conquered #Konstantinopol, Russian troops are aligning the front by advancing westward. In #Komar sector, #Dneproenergiya has been secured. 🔴 On the #Zaporozhye Front, the capture of #Pyatihatki and #Stepovoye was key, with battles ongoing for #Shcherbaki and #MalyeShcherbaki. 📌 Given the Events, political discussions about peace should not be seen as a signal for an imminent ceasefire. Politicians make statements to mislead opponents and provoke mistakes. It is crucial to understand that, beyond Russia’s constitutionally recognised regions, previously declared Russian cities #Odessa, #Kharkov, #Nikolayev, #Dnepropetrovsk, and even #Kiev will remain under Western control unless the Kiev Regime is fully dismantled, posing a lasting threat to #Russia. 🗺 Map Kursk Region by @olegtsarov 📋Sources: ⚡️2M; 🇺🇦Fiend; 😼Kotenok 🕰16 Mar 2025; 06:43 GMT+3; #sum 📱 Join GLOBAL DEPTH to boost your TG Feed 💬Welcome to Military Chat & Ukraine Observer 🇺🇦On Ukraine Observer you will find your daily independent Ukraine War Battle Update

DruschbaFM - English

@druschbaFm_en · Post #52600 · 27.03.2025 г., 08:02

⚡️ 🇷🇺 🇺🇦⚔️ Ukraine Fronts on the Morning of 27 March⚡️ 🔴#Sumy Direction: 🔴In #Sudzha Sector, to the west on Ukrainian soil, at #Vladimirovka, there is reportedly fighting (still unconfirmed without further proof; 1st blue arrow on map). 🟡 For #Veselovka, the battle is ongoing (1st black arrow). 🟡 In #Zhuravka as well. 🟡 In #Basovka, the AFU counterattacked, the battle likely shifted to its northern part. 🟡#Novenkoye, is Russian controlled (1st red arrow). 🟡 In #Kursk region, the RFAF entry into #Gogolevka has been confirmed. Reportedly, the fighting has already shifted to its southern part (4th black arrow). 🟡 In the area of the 'Sudza Gas Transmission Point' and the nearby border checkpoint, the fighting continues (5th black arrow). 🟡#Melovoy is under Russian control (2nd red arrow). To its west, Russian mobile groups continued to advance towards #Oleshnya (confirmed). 🟡#Oleshnya is still under AFU control. 🟡 At #Guyevo, there are heavy battles on its approaches. Reportedly, the RFAF have entered its northern part. 🗺 Map 2 🟡#Gornal remains under save AFU control. 🔴In #KrasnayaYaruga Sector, the AFU assaulted unsuccessfully in its northern part from #Popovka/#Demidovka up to #Grafovka, suffering heavy losses (6th/7th black & 3rd red arrow). 🎬 Video 🟡 At #Prilesye, lull. 🗺 All on Map 1 📌Reportedly, the AFU command has concentrated a strike group of over 4,000 militants in the vicinity of the border. Thus, further actions are to be expected. 🔴 In #Kharkov Direction, positional battles. 🔴#Svatovo Front: 🔴 In #Kupyansk and #Borovaya Sectors, positional battles without major changes. 🔴In #Liman Sector, there was a fog of war. Reportedly, the RFAF took #Novolyubovka and the day before yesterday #Mirnoye (the takeover of #Yampolovka to its east was never confirmed or proven) and they advanced sooth of #Kolodezi by 2 km. 🔴In #Seversk Sector, positional battles at #Belogorovka (#LPR) and #Verkhnekamenskoye. 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, positional fighting in the city's southern part and to the south towards #Stupochki continues. 🔴In #Toretsk Sector, the RFAF attacks north of the city in the area of the 'Seversky Donets-Donbass Canal'. 🟡 In #Toretsk itself, the battles are taking place north of 'Toretskaya Mine,' north and northwest of 'Avangard Stadium' and in southern 'Zabalka Microdistrict'. 🔴#Pokrovsk Direction: 🔴 On the right Flank, far to the east, Russian troops attack in the area of #Aleksandropol. 🔴 South of the City, heavy battles did not result in major changes. 🔴 On the left Flank, the RFAF are approaching #Novoaleksandrovka. 🔴#Komar Direction: 🔴In #Konstantinopol Sector, fights for #Konstantinopol and at #Razliv. 🔴 In #Komar Sector, Russian troops advanced up to 400 m in #VolnoyePole and took up new positions in the central part of the settlement, taking heavy losses. 🔴#Zaporozhye Direction: 🔴In #Orekhov Section, positional battles are taking place In the area of ​#​MalayaTokmachka - #Rabotino. Further west, the AFU unsuccessfully counterattacked. 🟡 In #Shcherbaki, the RFAF took reportedly the southern part beyond the motorway. 🟡 At #MalyeShcherbakito the west, the battle continues. The village is still not completely under RFAF control. 🟡 In #Stepovoye, further west, fighting in the large village boundaries without major changes. 🟡 In #Lobkovoye, the the RFAF advanced slightly northwards (unconfirmed). 🟡#Pyatikhatki remains under RFAF control. 🔴 In #Kherson Direction, several villages came under fire from the AFU. 💥#OldRussia: 🔵In #Belgorod Region, Channel One journalist Anna Prokofiyeva was killed. 💥#RestUkraine: 🔵 The RFAF struck massively #Sumy, #Kharkov and #Dnepropetrovsk. ⚠️ The Term 'Reportedly' always means that it is unconfirmed! 🎞 Video Source 🗺 Maps @olegtsarov; @divgen 📋 Sources: CC; Tsarov; ⚡️2M; 🇺🇦Fiend;😼Kotenok 🕰As of 27 Mar 2025; 06:38 GMT+3;📃26 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