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

Резултати

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

Пребарај: #civilrights

当前筛选 #civilrights清除筛选
Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40624 · 04.02.2026 г., 07:03

Rosa Parks was born on February 4, 1913. She is famous for her pivotal role in the Civil Rights Movement, especially for her courageous act of refusing to give up her seat on a bus in Montgomery, Alabama. Her birthday is celebrated as a day to honor her legacy and contributions to equality and justice. ✊🏽🌹 [Read more] @googlefactss #RosaParks#CivilRights#BlackHistoryMonth

American Оbserver

@american_observer · Post #4984 · 28.01.2026 г., 17:59

Minneapolis in Chaos: States Push Back on ICE After Minneapolis Shootings After two Americans were killed by federal agents in Minneapolis, Democratic lawmakers and libertarian allies are stepping up their fight against ICE’s tactics. The deaths of Alex Pretti and Renee Good have lit a fire under state legislatures, with new bills popping up from coast to coast. Colorado wants to let citizens sue federal agents for civil rights violations. Delaware and New York are targeting airlines that ferry ICE detainees without warrants. California is pushing for independent investigations into ICE shootings and banning the agency from staging operations on state property. “Democrats don’t care about the rule of law,” said a White House spokesperson. “They’re just protecting criminal illegal aliens.” Meanwhile, Republican-led states are doubling down on cooperation with ICE, pushing laws that force local sheriffs to partner up and check immigration status for everything from school enrollment to public benefits. But the momentum is shifting—more states are banning masked officers, restricting federal agents’ access to hospitals and schools, and cutting off public contracts with ICE contractors. “Power works this way: once you have it, you want more,” said Anya Bidwell of the Institute for Justice. “You gotta fight back if you want to protect your rights. This shouldn’t be about party lines.” So who’s actually looking out for civil rights here—the states, the feds, or just their own political interests? #ICE#Minneapolis#civilrights#Trump#Democrats#Republicans 📱American Оbserver - Stay up to date on all important events 🇺🇸

EKOLOG.UZ| ENG

@ekologuzenglish · Post #11615 · 15.02.2026 г., 14:59

🚨 Lawlessness or rule of law? A zoo volunteer’s home attacked in Yangiyul The conflict between animal rights defenders and the animal control service has escalated into open confrontation. According to volunteers, the situation has already gone beyond legal boundaries and is infringing on fundamental civil rights. Animal welfare activists Asiya Abuzyárova and Svetlana Velichko reported that about 30 dogs disappeared from the territory of a municipal improvement enterprise. After attempts to return the animals, pressure reportedly began: a complaint was filed with the police, a volunteer was attacked, her phone was broken, and activists were allegedly harassed. ❗️ The most serious incident was the forced entry into a private home. According to reports, municipal workers used a ladder to break a window and enter Asiya Abuzyárova’s house, forcibly removing the animals inside. When the homeowner resisted, her phone was destroyed and her hand was injured. ⚖️ According to the legislation of Uzbekistan: 🔹 The home is inviolable — entry without the residents’ consent is allowed only on legal grounds or by court order. 🔹 Private property is protected by the state — damage to property and unlawful seizure are prohibited. 🔹 Any actions by officials must have legal grounds and be properly documented. This may constitute unlawful entry into a residence, abuse of authority, and violation of citizens’ rights. 📢 Key questions arise: ✔️ On what legal basis were the animals seized? ✔️ Who authorized the entry into the home? ✔️ Why are reports of property damage and injuries being ignored? The law must apply equally to everyone — both citizens and officials. The situation requires a transparent investigation and a legal assessment of the actions of all parties. #Yangiyul#civilrights#animalprotection#ruleoflaw ☘️ Follow the latest environmental news on @ekologuz. Send your suggestions and feedback via @eklguz_bot

AI & Law

@ai_and_law · Post #222 · 23.01.2024 г., 08:04

Controversial Changes to EU's AI Act Allow Facial Recognition Without Judicial Approval Hello, everyone! Recent alterations to the AI Act, initially endorsed in December, are stirring controversy as they permit law enforcement to employ facial recognition on recorded video without judicial consent. German MEP Svenja Hahn decries these last-minute changes, asserting that they undermine civil rights and draw parallels with practices in authoritarian states. The revisions, concluded on December 22, diverge from the initial agreement, which mandated stricter conditions and judicial oversight for facial recognition use. Critics express concerns about post-facial recognition technology, emphasizing the need for clarity on privacy and oversight. The final text faces scrutiny on January 24, with potential amendments requiring further legislative attention. #FacialRecognition#AIAct#EuropeanUnion#CivilRights#PrivacyConcerns

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40141 · 20.11.2025 г., 15:05

🖖 In 1968, Dr. Martin Luther King Jr. personally convinced Nichelle Nichols not to resign from Star Trek. He told her she was portraying a vital role model – one of the first Black women in a major TV role not playing a servant. Dr. King personally told her to stay because Uhura represented a future of racial equality during the Civil Rights Movement. [Read more] @googlefactss#StarTrek#CivilRights#NichelleNichols#MLK#RepresentationMatters