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

Резултати

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

Пребарај: #qatar

当前筛选 #qatar清除筛选
Dan Kovalik

@danielmkovalik · Post #2784 · 10.09.2025 г., 12:15

Israel bombs #Qatar with the blessing of the U.S., further eroding the rule of law in the world and destroying any credibility they have left.

Hashtags

IHMA | Dilfuza Ruzmetova

@IHMA_matbuotkotibi · Post #671 · 07.11.2025 г., 09:38

Dohada O'zbekiston pavilyoni⚡️ “O’zbekiston” telekanali “Jarayon” 18:00 06.11.2025 #QATAR Rasmiy sahifalarimiz🌐 Telegram | Instagram | O'zTV1 Insta |O'zTV1 TG | UTube | O'zTV1FB | UzRadio103.1

Hashtags

White House Watch

@Whitehousewatch · Post #17042 · 14.01.2026 г., 15:30

#Qatar, #Iran: Il Dipartimento della Guerra ha cominciato a ritirare alcune truppe e alcuni asset dalla base al-Udeid in Qatar come precauzione in vista di una decisione di Donald Trump di colpire o meno l'Iran. La base in questione viene utilizzata per ospitare bombardieri, aerei di rifornimento, jet da combattimento, aerei per la sorveglianza e droni. Lo stesso era stato fatto a giugno pirma che gli Stati Uniti colpissero l'Iran.

Hashtags

Islamic World News

@iswnews_en · Post #18548 · 11.04.2026 г., 12:02

🇮🇷/🇺🇸Based on unofficial news from Islamabad, Iran's red lines in negotiations with the US include the following: 1- The Strait of Hormuz must be under Iran's control. 2- Payment of compensation for war damages. 3- Release of Iran's frozen assets. 4- Any ceasefire must be implemented sustainably and genuinely on all relevant fronts. ‼️ Additionally, negotiations will begin after Iranian officials meet with Pakistani Prime Minister Shehbaz Sharif to discuss US violations of the ceasefire terms, at the forefront of which are the release of Iran's frozen funds in Qatar and a ceasefire in Lebanon. These two issues have been set as preconditions for the start of the talks. #Iran#Qatar

Hashtags

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3057 · 16.08.2024 г., 14:40

Do not believe a single word that comes out of the meeting of the genocide enablers in #Qatar Only believe what comes out of the mouth of the resistance in #Gaza That is the only side I trust...and that side is not even present in Qatar.

Hashtags

Islamic World News

@iswnews_en · Post #18016 · 01.04.2026 г., 01:19

🇮🇷/🇺🇸🇶🇦🚢💥The United Kingdom Maritime Trade Operations (UKMTO) has reported an incident 17 nautical miles north of Doha. The security officer reported that a tanker was struck by an unknown projectile, causing damage to the hull above the waterline. The crew is reported safe. 📊 Since the start of the war, Iranian armed forces have struck at least 24 violating vessels in the waters of the Persian Gulf, the Strait of Hormuz, and the Gulf of Oman. These attacks have been carried out using suicide naval drones, suicide drones, cruise missiles, anti‑ship ballistic missiles, armed speedboat assaults, and other means. #Iran#US#Qatar

Islamic World News

@iswnews_en · Post #17450 · 20.03.2026 г., 00:58

🇮🇷/🇺🇸🇶🇦‼️Repairing the damage to the Ras Laffan gas complex will take 5 years! 🔹State-owned QatarEnergy, which operates the Ras Laffan gas complex, told Reuters that the damage inflicted on "two units" of the LNG facility, developed through a joint investment with the American company ExxonMobil, will require three to five years to repair. ➡️ The company added that this incident will reduce its annual revenue by $20 billion and force it to cancel long-term contracts with Italy, Belgium, Korea, and China. ✍️ As the Qataris themselves have acknowledged, Iran's "limited strike" on a "small section" of the Ras Laffan facilities has been this damaging. This reality once again emphasizes that any extensive Iranian attack on these facilities and other similar oil and gas installations in the region could lead to a huge and irreparable catastrophe in the history of human energy! Therefore, the U.S., Europe, and the Persian Gulf states have clearly received Iran's powerful and unequivocal message, and it is unlikely they will make any further mistakes from now on. Of course, the malice of the Zionist regime remains ever-present, but if this mistake is repeated, there will be no way back left for anyone! #Iran#US#Qatar

123•••1011
ПретходнаСтраница 1 од 11Следна