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

Пребарај: #ivanovka

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

@druschbaFm_en · Post #52910 · 06.04.2025 г., 08:02

⚡️ 🇷🇺 🇺🇦📆 Weekly Ukraine War Roundup⚡️ 🗣 The Past Week saw continued global turbulence. The spotlight was on Trump’s introduction of sweeping protective tariffs, signalling a move towards super-protectionism. The era of globalism and idealistic notions of 'international division of labour' is fading, , giving way to intensifying trade wars. Washington aims to bring real industrial production back to the #US, streamline spending, and balance trade, particularly with #China. #EU officials voiced concern, but antiwar protests in cities like #Rome, with slogans like 'We need hospitals, not missiles,' better reflect public sentiment. Meanwhile, #Europe’s elite exploits the 'War with Russia' narrative to serve arms lobbies and divert funds from social programmes. The #US also saw protests, mainly driven by the societal split after years of liberal-fascist propaganda from Biden’s camp and its allies. 🇷🇺 In Diplomacy, the arrival of Dmitriev, envoy of the Supreme, in the #US was notable. His talks focused less on peace in #Ukraine and more on the economic benefits of working with us, compared to the costly, unconditional arms deliveries to Kiev. 🔸 Such Meetings are often spun at home as signs of a 'coming end to the war' which is misleading. Unquestioning belief in this narrative has weakened logistical support for the front and sparked rumours among troops about an imminent ceasefire. This undermines morale among fighters and officers, who see it as premature compromise. ⚔️ On the Fronts, while the RFAF maintain strategic initiative, the AFU is carrying out a defensive operation to slow our advance along the Line of Contact. 🔴 In the Invasion Zone, the AFU still hold #Kursk border settlements, while the RFAF fight deeper into #Sumy region. Battles continue at #Popovka and #Demidovka in #Belgorod region, with the AFU reinforcing across the border. Signals indicate they retain reserves for further provocations. In #Bryansk region, officials finally acknowledged daily AFU shelling of civilians, though some incidents go unreported, frustrating locals and raising doubts about regional control. 🔴 On the #Svatovo Front, north of #Kupyansk, the RFAF expand their bridgehead on the Oskol’s right bank. Southward, intense fighting continues. On the #Liman axis, control expands from #Katerinovka to #Ivanovka. 🔴 At #ChasovYar, fighting with little movement. Near #Konstantinovka, we have engaged in battles at #Andreyevka. After weeks of combat in #Toretsk, we shifted southward, taking #Panteleymonovka and #Aleksandropol, fierce clashes rage in #Tarasovka and at #ZelenoyePole. 🔴 Around #Pokrovsk, momentum has shifted, Russian troops now advancing in #Lysovka. 🔴 In #Komar Direction, clashes continue south of #Razliv, at #Vesyoloye and #VolnoyePole. 🔴 On the #Zaporozhye Front, Russian forces took #Lobkovoye after gains at #Shcherbaki and #Stepovoye. Reportedly renewed action at #Kamenskoye. In #Kherson region, mutual strikes, and the RF Aerospace Forces increased FAB use this week. 💥 A recent AFU Strike on a key fibre-optic plant highlighted weaknesses in our air defences. Command inertia, underuse of anti drone tools, poor coordination, and lack of accountability among senior officers still lead to avoidable damage, despite most UAVs being downed, often over towns. Low pay and unfair compensation remain concerns among air defence crews. ❇️ In Summary, any 'societal relaxation' amid continued heavy fighting and Kiev’s consistent disregard for agreements, while the #US keeps supplying arms and intelligence to the AFU, looks naive. Mocking the AFU or potential adversaries has already cost Russia dearly, leading to the war now entering its 4th year. 📌 Notes: A Russian view; in supplement: In #Toretsk itself, the RFAF also advanced. In #Basovka the battle has shiftet to its southern part (Sumy).🗺👆 🗺 Map CC;📋Source: 2M 🕰As of 6 Apr 2025; 07:22 GMT+3 📃5 Apr;#sum 📱 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