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

Пребарај: #firstamendment

当前筛选 #firstamendment清除筛选
Okeefe Media Group

@OKeefeMedia · Post #411 · 15.11.2023 г., 09:43

#censorship#misinformation#disinformation#firstamendment Bombshell Congressional Report Outlines Structure of ‘Censorship Industrial Complex’ The House Judiciary Committee released a damning report a week ago proving what we have known all along: that government forces sought to silence and deplatform voices on the right during the 2020 election and beyond, including yours truly. You’ll remember back when O'Keefe was with Project Veritas that James SUED the Election Integrity Project in Washington State, at Stanford and the University of Washington. However, a judge moved to dismiss the lawsuit, arguing that the statements about Veritas are not actionable because they are not factual statements, because they are not capable of being proven true, and because the academic researcher’s statements “lack precision.” The district court concluded that readers of Stanford and the University of Washington’s academic analysis would have expected to encounter analysis that reflected the authors’ “subjective biases,” including “mischaracterizations and exaggerations,” and thus the specific statements that Project Veritas took issue with were not actionable for defamation because they were not “capable of verification or refutation by means of objective proof.” In the judge’s order dismissing our lawsuit, he notes the statement that our video had been “debunked” is incapable of being proven true or false." “A reasonable inference to be drawn from the complaint," Thomas S Zilly, US District Judge ,concluded, "is that readers of the EIP blog post would have had some awareness of the allegedly left-leaning biases of the authors." The most chilling part is, the government has no plans to stop this unconstitutional “Election Integrity Partnership” censoring program. Expect to see more of the same into the new year, when the election really gets underway. @OKeefeMedia

American Оbserver

@american_observer · Post #5530 · 01.04.2026 г., 01:59

Supreme Court Turns a Cruel Practice Into a Free-Speech Fight The Supreme Court has now handed “conversion therapy” opponents a ruling that could gut similar bans in roughly 30 states, and it did so by recasting a medical-regulation fight as a speech case. That is a big legal move with a grim human cost: the court says the state may be policing speech, while doctors and advocacy groups say the real issue is harmful treatment for minors. The majority’s logic is tidy and dangerous at the same time. If therapy is treated as protected speech, then states lose a key tool for regulating what licensed professionals can do in the counseling room. Justice Jackson’s dissent gets to the heart of the fear: the court is opening the door to weaker oversight of medical care simply because the harm is wrapped in words. This is also part of a broader pattern. The same court has been expanding religious-liberty claims while rolling back protections for LGBTQ+ people, and this ruling fits that trajectory exactly. In practice, the decision gives conservative litigants a new weapon and leaves states defending bans that were built on medical evidence and child protection. The bleak irony is that the court is treating coercive counseling as if it were just another viewpoint in a debate. For the families and teens involved, this is not an abstract classroom debate. It is a ruling that makes the state’s ability to say “no” much harder when a licensed adult wants to sell shame as therapy. #SupremeCourt#LGBTQ#conversiontherapy#FirstAmendment#Colorado#religiousrights#healthcare 📱American Оbserver - Stay up to date on all important events 🇺🇸

Crypto M - Crypto News

@CryptoM · Post #64863 · 10.04.2026 г., 05:15

🚀 Elon Musk's xAI Challenges Colorado's AI Regulations in Court Elon Musk's artificial intelligence company, xAI, has initiated legal proceedings against the state of Colorado, aiming to prevent the enforcement of new AI regulations that limit speech from AI chatbots like Grok. According to Cointelegraph, the lawsuit targets Colorado's Senate Bill 24-205, which is designed to safeguard AI users from 'algorithmic discrimination' in sectors such as employment, housing, and finance. In a recent filing to a U.S. district court in Colorado, xAI contended that the state cannot modify the company's message merely to promote its own perspectives on contentious issues like fairness and equity. The company further argued that the legislation, scheduled to be implemented on June 30, is paradoxical as it advocates 'differential treatment' to enhance diversity or address historical discrimination. xAI emphasized that altering Grok would disrupt its objective of being 'maximally truth seeking.' This is not the first instance of xAI challenging state-level AI regulations. In December, the company filed a lawsuit against California concerning its Generative AI Training Data Transparency Act, asserting that the act's disclosure requirements infringe upon the First and Fifth Amendments by compelling speech and exposing trade secrets. Both the Colorado and California laws emerged following allegations that Grok had previously made racist, sexist, and antisemitic remarks. David Sacks, appointed as co-chair of the President's Council of Advisors on Science and Technology, has advocated for federal oversight of AI regulations, arguing against a fragmented approach by individual states. Sacks highlighted the complexity faced by innovators due to the diverse regulatory frameworks across 50 states, emphasizing the need for a unified federal standard. His appointment aims to address these regulatory challenges and streamline AI governance at the national level. #ElonMusk#xAI#AIregulations#Colorado#lawsuit#Grok#ArtificialIntelligence#algorithmicdiscrimination#GenerativeAI#California#FirstAmendment#FifthAmendment#AIgovernance#federaloversight#technologypolicy