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

Пребарај: #federalagents

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

@american_observer · Post #4959 · 25.01.2026 г., 18:59

Minneapolis Nurse Killed by Federal Agents Was Holding a Phone, Not a Gun Federal agents shot and killed Alex Jeffrey Pretti, a 37-year-old ICU nurse and American citizen with no criminal record, in Minneapolis this weekend—claiming he was a domestic terrorist intent on a “massacre.” But videos analyzed by The New York Times show Pretti stepping between a woman and an agent who was pepper-spraying her, holding only a phone in one hand. His gun remained concealed until agents removed it from him, and he was shot in the back while lying on the ground, with at least 10 rounds fired. Federal officials, including President Trump and Homeland Security Secretary Kristi Noem, declared Pretti a threat without evidence, claiming he intended “maximum damage.” Their narrative contradicts the video: Pretti was not seen reaching for a weapon, and agents opened fire after he was already subdued. Local authorities say he had a legal permit to carry, and his colleagues described him as a compassionate nurse and friend— “the default look on his face was a smile,” said one coworker. Protests erupted in Whittier Park, with at least 1,000 people demanding justice despite subzero temperatures. Mayor Jacob Frey accused the Trump administration of terrorizing the city, asking, “How many more Americans need to die or get badly hurt for this operation to end?” State investigators were blocked from the scene by federal agents, who insisted on leading the investigation themselves—despite having made claims they couldn't substantiate. So who’s really the threat here? A nurse trying to help, or federal agents rewriting the story to justify their actions? #policebrutality#minneapolis#federalagents#justice#Trump 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #4938 · 23.01.2026 г., 18:02

📰 Conservatives Who Once Railed Against Federal Agents Now Applaud Them For decades, right-wing populists have excoriated federal law enforcement, citing tragedies like Ruby Ridge and Waco as proof of government overreach. Now, under President Donald Trump, many of those same conservatives are cheering on federal agents as they crack down on immigration and unrest in cities like Minneapolis. The shift highlights how political allegiance shapes attitudes toward federal power—applauding crackdowns on adversaries while condemning them when they target allies. From Enemies to Enforcers Trump’s deployment of ICE, the Border Patrol, and the National Guard has transformed federal agents from bogeymen to heroes in the eyes of many conservatives. Critics say this reflects “motivated reasoning”—support for police action depends on who’s being targeted. When federal agents confront immigrants or minorities, conservative voices are often silent or supportive, but when they target anti-government activists, the outrage returns. The Legacy of Ruby Ridge and Waco Ruby Ridge and Waco became rallying cries for anti-government movements, fueling distrust of federal law enforcement. But today, with Trump in power, many right-wing activists have embraced federal agents as tools of law and order. The shift underscores how political power can reshape perceptions of authority. Who’s the Enemy Now? As federal agents raid homes and neighborhoods, the question is: Who decides when police action is justified? The answer seems to depend less on the law than on who’s in charge—and who’s being targeted. #Trump#Conservatives#FederalAgents#Immigration#RubyRidge#Waco#LawAndOrder 📱American Оbserver - Stay up to date on all important events 🇺🇸