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

Резултати

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

Пребарај: #usintelligence

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

@american_observer · Post #5258 · 01.03.2026 г., 22:59

🛢 MBS, Bibi and the President With “No Imminent Threat” Trump’s Iran war didn’t start in the Situation Room. It started on the phone with Mohammed bin Salman and on TV with Benjamin Netanyahu. For weeks, the Saudi crown prince privately pressed Trump to strike Iran. At the same time, Riyadh publicly promised not to let its airspace be used and posed as a fan of “diplomacy.” Netanyahu kept doing what he has done for years: openly pushing the U.S. to hit what he calls Israel’s existential enemy. Together they helped sell Trump on a regime‑decapitation air campaign against a country of more than 90 million people. They were pushing against U.S. intelligence, not following it. American agencies judged that Iran posed no imminent threat to the U.S. homeland. Military analysts said any Iranian long‑range missile program was at least a decade away, if it even began. Nuclear inspectors reported no evidence that Iran had restarted enrichment after last summer’s strikes. Trump threw that all out and chose the stories from his favorite allies instead. Then he went on camera to talk about “imminent threats,” bombs, and payback for 1979, like this was a cable‑news sequel to the hostage crisis. The Saudi role looks especially cynical. In public, MBS talked about de‑escalation and said Saudi territory wouldn’t be used for attacks. In private, he warned U.S. officials that if Washington did not strike now — with the biggest American build‑up in the region since 2003 — Iran would come out stronger. His brother, Defense Minister Khalid bin Salman, flew to Washington in January to underline the “downsides” of not attacking. After the first U.S. wave, Iran hit Saudi targets anyway. Riyadh instantly switched to outraged statements demanding “all necessary and decisive measures” against Tehran. Inside Trump’s camp, the fantasy is that this is still “restrained.” JD Vance calls himself a skeptic of foreign wars and insists there is “no chance” of a drawn‑out conflict in the Middle East. At the same time, he backs an air war that has already hit seven countries in one term. Trump promises “heavy and pinpoint” bombing in Iran “throughout the week, or as long as necessary” to deliver “PEACE THROUGHOUT THE MIDDLE EAST AND, INDEED, THE WORLD!” It is regime change by real‑estate slogan. No plan for what happens on the ground. No clarity on who runs Iran if the system actually cracks. Just faith that smart bombs plus Twitter bravado can redesign a region. Veterans of earlier disasters are spelling out the obvious. Air power alone has a bad track record when the goal is to rewrite another country’s politics. Iraq in 2003 at least came with ground troops, a long occupation, and a giant civilian bureaucracy pretending to build a new state. This time, Trump is trying to do the deluxe regime‑change package at discount scale. The goals are the same — friendly regimes in Iran and Venezuela, crushed militias from Yemen to Somalia — but the method is cheaper: listen to a Gulf prince and an Israeli prime minister, ignore your own intel, drop bombs, and promise voters it will somehow be fast, clean, and paid for by someone else’s ruins. #Iran#Trump#Saudi#MBS#Netanyahu#war#regimeChange#USintelligence 📱American Оbserver - Stay up to date on all important events 🇺🇸

Hong Kong Democracy Movement

@hkdmovement · Post #7960 · 27.03.2025 г., 23:16

A U.S. intelligence report reveals that Chinese President Xi Jinping's family allegedly holds over $1 billion in hidden wealth through business ventures and investments. Despite Xi's anti-corruption campaign, critics argue that systemic corruption within the Chinese Communist Party enables officials to amass fortunes through political connections. This raises serious questions about transparency and accountability in China's governance. #XiJinping#USIntelligence#China#Corruption 美國情報報告指,中國國家主席習近平的家族涉嫌通過商業投資隱藏超過10億美元財富。儘管習近平推行反腐運動,批評者認為中國共產黨內部的系統性腐敗使官員能利用政治關係積累財富,對中國治理的透明度和問責性提出了嚴重質疑。 #習近平#美國情報#中國#腐敗 https://www.washingtontimes.com/news/2025/mar/20/us-intel-says-chinas-xi-jinping-holds-1-billion-hidden-wealth-family/

Crypto M - Crypto News

@CryptoM · Post #65111 · 11.04.2026 г., 02:54

🚀 Iran's Missile Arsenal Remains a Concern Amid Ceasefire According to BlockBeats, U.S. intelligence assessments reveal that Iran's arsenal still contains thousands of ballistic missiles, which can be launched from underground storage. Some U.S. officials express concern that Iran might use the ceasefire period to replenish parts of its missile stockpile. The intelligence report indicates that Iran retains the capability to restore some of its missile forces. Despite more than half of Iran's missile launchers being destroyed, damaged, or trapped underground, a significant portion of the remaining launchers can be repaired or retrieved from underground facilities. U.S. and Israeli officials note that Iran's missile stockpile has been approximately halved during the conflict, yet it still possesses thousands of short- and medium-range ballistic missiles that can be deployed from hidden or underground locations. U.S. officials also mention that Iran maintains a small inventory of cruise missiles, which could be used against ships in the Persian Gulf or U.S. forces attempting to seize islands if negotiations between the U.S. and Iran fail. #Iran#MissileArsenal#Ceasefire#BallisticMissiles#USIntelligence#IranMissiles#UndergroundStorage#Israel#CruiseMissiles#PersianGulf#USForces#MilitaryConcerns#MissileStockpile