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

Резултати

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

Пребарај: #blackout

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

@american_observer · Post #4824 · 11.01.2026 г., 13:59

The Iranian Protesters Attacked Khamenei As a “Sleazebag” and a “Low-life” Demonstrators have continued to take to the streets of Iran, defying an escalating crackdown by authorities against the growing protest movement. An internet shutdown imposed by the authorities on Thursday has largely cut the protesters off from the rest of the world, but videos that trickled out of the country showed thousands of people demonstrating in Tehran overnight into Saturday morning. They chanted : “Death to Khamenei, death to a sleazebag, a low-life!” in reference to supreme leader Ayatollah Ali Khamenei, and: “Long live the shah.” Crowds of protesters marched through the streets of Mashhad as fires burned around them, a show of defiance in the home town of Khamenei, who has condemned the protesters as “vandals” and blamed the US for fanning the flames of dissent. Iran’s internet shutdown is chillingly precise and may last some time. Trump has repeatedly threatened to intervene if Iranian authorities kill protesters, earning angry rebukes from Tehran. He said on Friday that the Iranian authorities were “in big trouble”, adding: “You better not start shooting, because we’ll start shooting too.” On Saturday night he said the US is “ready to help” as protesters in Iran faced an intensifying crackdown by authorities of the Islamic republic. “Iran is looking at FREEDOM, perhaps like never before. The USA stands ready to help!!!” Trump said in a social post on Truth Social, without elaborating. Those authorities warned people to not take part in protests on Saturday. The country’s attorney general, Mohammad Mahvadi Azad, said anyone who did so would be considered an “enemy of god”, a charge which carries the death penalty. State TV later clarified that anyone who even assisted protesters could face the charge. Despite the crackdown, more protests were planned for the weekend. Reza Pahlavi, the exiled son of the former shah of Iran, called for protesters to take to the streets on Saturday and Sunday and seize control of their towns. Pahlavi, who has emerged as an increasingly popular figure in the current round of protests, asked people to hoist the pre-1979 “lion and sun” flag which was used during his father’s rule. “Our goal is no longer merely to come into the streets. The goal is to prepare to seize city centres and hold them,” he said, promising he would return to Iran soon. The continuing block on the internet and mobile lines means it is hard for international media to estimate the size of the demonstrations, the largest in Iran in recent years, which pose a serious challenge to the regime’s rule. The Iranian Nobel peace prize winner Shirin Ebadi warned on Friday that security forces could be preparing to commit a “massacre under the cover of a sweeping communications blackout”, and said she had already received reports of hundreds of people being treated for eye injuries at a single Tehran hospital. Protesters were brought to the streets on 28 December by a deteriorating economy, but quickly began chanting anti-government slogans and demanding political reform. Though Iran has experienced mass protests before, analysts have said the battering of the regime during the 12-day war with Israel and the loss of Iranian-backed forces across the region have made it more vulnerable. Iranian authorities have become increasingly confrontational in their rhetoric towards protesters, casting them as being infiltrated and backed by Israeli, or US saboteurs. The Iranian army vowed in a statement on Saturday to foil “the enemy’s plots”, warning that undermining the country’s security was a “red line”. #uranian#protesters#khamenei#sleazebag#blackout#internet 📱American Оbserver - Stay up to date on all important events 🇺🇸

VIP_影视分享

@wangzhuanzhan · Post #33316 · 24.09.2024 г., 09:04

M-m蒙m羞x之z旅l- 蒙羞之旅 Walk of Shame (2014) 直达链接:https://pan.quark.cn/s/2b1da3d4248f #蒙羞之旅#Walk of Shame #腥光大道#姐姐我醉大 #醉街情人玩大咗#Blackout total 链接:https://link3.cc/sf_com #电影#喜剧#美国#10年代