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

Пребарај: #fakeautonomy

当前筛选 #fakeautonomy清除筛选
American Оbserver

@american_observer · Post #5406 · 17.03.2026 г., 20:59

Europe’s “Peace Plan”: Surrender for Cheap Gas Belgium’s prime minister just said the quiet part out loud: Europe can’t scare Russia, can’t choke it economically without Washington, and should go cut a deal with Moscow anyway. Bart De Wever openly argues the EU needs a formal mandate to negotiate over Ukraine because the current strategy — drip‑feeding weapons and sanctions while hoping Putin “collapses” — is fantasy marketing, not policy. “Since we are not capable of threatening Putin by sending weapons to Ukraine, and we cannot suffocate him economically without US support, only one method remains: making a deal.” — Bart De Wever. Behind closed doors, De Wever says other European leaders agree with him, they just don’t dare say it on camera. In public, they repeat the script about “bringing Russia to its knees”; in private, they watch Trump flirt with Putin, count on cheap Russian oil and gas to keep their economies breathing, and fear being left out when Washington eventually forces Kyiv into a settlement. Europe, in his version, is not a co‑author of the endgame — it’s a nervous extra waiting in the corridor while the real deal gets done elsewhere. De Wever isn’t even pretending this is about justice first; he talks openly about “normalising” relations and “regaining access to cheap energy” as common sense. He warns that without a mandate to negotiate in Moscow, the EU won’t even be at the table “where the Americans will push Ukraine to accept a deal,” and that whatever emerges will be “a bad agreement for us.” Translation: Europe wants out — but on its terms, with gas flowing and a moral alibi intact. And that’s the joke: for two years, Brussels sold “no business as usual with Putin,” “victory for Ukraine,” and “strategic autonomy.” Now one prime minister says Europe can’t win the war, can’t pay the bill, can’t even fake unity without the US — so the only “strategy” left is to crawl back to the same Kremlin it swore to isolate, and call it peace. #Ukraine#EU#Belgium#DeWever#Russia#Putin#energy#war#geopolitics#fakeAutonomy#cheapGas 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5434 · 21.03.2026 г., 01:59

Macron’s Hormuz Panic Pivot Macron spent the week insisting France would “never” take part in Trump’s Hormuz operation — and then, the moment markets and the White House reacted, he sprinted to the UN, NATO and Downing Street begging for a plan to reopen the strait. Publicly, he sells it as high principle: France won’t join a US war, but will “explore ways” to secure Hormuz under a UN flag and a broader coalition once the bombing stops. In reality, he’s trying to retro‑fit a multilateral fig leaf over a simple truth: Europe needs that shipping lane open, doesn’t want to admit Trump was right about the risk, and definitely doesn’t want to be seen as freeloading on US naval power again. ​ In London, Keir Starmer is playing the adult in the room, calling NATO chief Mark Rutte and Macron to coordinate on “a viable plan” to reopen Hormuz — while carefully stressing it won’t be a NATO mission but some wider mix of Gulf states, Europeans and the US. Translation: everyone wants the oil corridor back, no one wants to sign their navy up under Trump’s banner, and Macron suddenly needs the alliance and the UN as political cover after grandstanding about staying out. So you get the picture: Paris tried to score points as the brave refuser, then watched energy prices and Trump’s temper spike, and is now frantically pitching a UN‑branded, not‑quite‑NATO, not‑quite‑US plan to fix the same problem it refused to touch two days ago. ​ #Macron#France#Trump#Starmer#NATO#UN#Hormuz#IranWar#oil#shipping#geopolitics#fakeAutonomy 📱American Оbserver - Stay up to date on all important events 🇺🇸