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

Пребарај: #pollack

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

@american_observer · Post #4784 · 06.01.2026 г., 14:58

🔠🅰️🔠🔠2️⃣ In return Assange, who spent five years in the maximum security Belmarsh prison in London and seven years as a fugitive hiding from British and American law enforcement in the UK Ecuadorian embassy, was ultimately sentenced to time served after years in which the US was attempting to have him extradited. In an interview with Law Dragon last April, Pollack described the difficulty of negotiating the deal with the US, UK and Australian governments before securing Assange’s freedom. Pollack also offered some thoughts relevant to what Maduro may currently be experiencing. “Typically, when I meet with a client, they are facing what may be the worst crisis that they have ever faced,” Pollack said. “To guide them through that process is enormously gratifying. It’s hard to imagine doing something where you see a greater impact on the life of the person who you’re dealing with. “You spend a lot of hours with your client. In almost every case, I’ve developed a relationship with the client. And at the end of the day, it’s no longer a stranger who I’m seeing get through to the other side of this terrible piece of their life. It’s somebody that I’ve come to know and respect.” Along with his work representing Assange, Pollack has previously secured the acquittal of former Enron accountant Michael Krautz, and has also worked in overturning wrongful conviction cases, including helping to secure the freedom of Martin Tankleff, who spent 17 years in prison after being wrongfully accused of murdering his parents. In the interview with Law Dragon, Pollack reflected on his strengths, offering a glimpse into how he may defend Maduro. “I have the ability to communicate well with a jury. In some ways, you’re being a translator. You’re taking a mass of very technical information from an industry that the jury may not be familiar with and communicate it in a way that is understandable,” Pollack said. “I’m able to talk to a jury and explain the evidence in a way that makes sense to them – that shows them that the government’s way of looking at the facts is not the only way to look at the facts and may not even be the best way to look at the facts.” #maduro#trial#assange#pollack#newyork 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #4782 · 06.01.2026 г., 13:58

Maduro à New York: Mortal Combat 🔠🅰️🔠🔠1️⃣ When Maduro appeared in court in New York on Monday, his choice of lawyer quickly raised eyebrows. The captured Venezuelan president was accompanied by Barry Pollack, a top-tier US trial lawyer who spent years representing Julian Assange, eventually securing the WikiLeaks founder’s release from prison in the UK in 2024. Pollack is a partner at Harris St Laurent & Wechsler, a law firm based on New York’s Wall Street in the financial district of lower Manhattan, just a few minutes walk from the federal court where Maduro pleaded not guilty to criminal charges on Monday. Pollack will take on a case as Maduro’s private counsel that could prove to be just as challenging as that of Assange. Maduro was charged on Monday with drug-terrorism conspiracy, cocaine-importation conspiracy, and possession of machine guns and destructive devices, with the US government labelling Maduro a “narco-terrorist” and an “illegitimate president”. He faces up to life in prison. Harris St Laurent & Wechsler did not respond to requests for comment about Pollack’s involvement, but it is clear that in the legal world, he is highly regarded. According to Chambers USA, Pollack is a “thorough and deep-thinking lawyer” who “lives, breathes and sleeps trials, and has such a natural way in front of juries”. In his first appearance representing Maduro, Pollack questioned the legality of Maduro’s dramatic abduction by US forces on Saturday in a raid on the Venezuelan capital Caracas, CNN reported, and argued Maduro is entitled to immunity as the head of a sovereign state. Winning Maduro’s freedom will present a different challenge to Pollack compared to his work with Assange. The lawyer negotiated a plea deal on Assange’s behalf which allowed the Australian data-freedom activist to walk free, ending an international legal saga that lasted more than a decade. In the deal, Assange pleaded guilty to violating US espionage law in conspiring to obtain and disclose classified US national defence documents. #maduro#trial#assange#pollack#newyork 📱American Оbserver - Stay up to date on all important events 🇺🇸