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

Пребарај: #aisecurity

当前筛选 #aisecurity清除筛选
AI & Law

@ai_and_law · Post #651 · 05.09.2025 г., 07:04

📖LegalPwn: Exploiting AI Guardrails Through Legalese Researchers at security firm Pangea have revealed a new vulnerability in large language models (LLMs) called "LegalPwn". By embedding adversarial instructions in legal documents, attackers can bypass model safeguards and manipulate outputs. During testing, models initially flagged malicious code as dangerous but, after exposure to “legal” text containing hidden instructions, began classifying the same code as harmless — even recommending execution in some cases. Live tests showed "LegalPwn" could bypass AI-driven security tools like Google's gemini-cli, causing models to misclassify malicious scripts and, in one instance, suggest a reverse shell be run on the user’s system. While Anthropic’s Claude, Microsoft’s Phi, and Meta’s Llama Guard resisted the attack, OpenAI’s GPT-4o, Google’s Gemini 2.5, and xAI’s Grok were less successful. Pangea recommends countermeasures like adversarial training, enhanced input validation, and human-in-the-loop oversight to mitigate such risks. #AISecurity#AIEthics

AI & Law

@ai_and_law · Post #648 · 02.09.2025 г., 07:04

📖AI Adoption and the Unseen Cost of Security Breaches A new Infosys survey reveals that 95% of executives worldwide have already faced security incidents linked to enterprise AI tools — with 77% of those incidents causing direct financial losses. These numbers highlight that security is not a theoretical risk but a measurable and recurring reality in the enterprise AI ecosystem. While many companies are moving forward with responsible AI initiatives, executives also voice growing concern about reputational damage tied to external use of these systems. #AISecurity#ResponsibleAI#AIGovernance

AI & Law

@ai_and_law · Post #821 · 06.05.2026 г., 07:04

🇺🇸U.S. Targets Adversarial Distillation of AI Models The United States has issued a memo addressing risks of adversarial distillation of its AI models by foreign actors, with particular concern regarding activities linked to China. The document outlines federal measures aimed at countering unauthorized, industrial-scale extraction of model capabilities. Planned actions include sharing intelligence with U.S. AI companies on foreign distillation attempts, improving coordination within the private sector, and developing joint best practices to detect, mitigate, and respond to such activities. The government also plans to explore mechanisms to hold foreign actors accountable for large-scale distillation campaigns. The memo signals increased federal involvement in protecting AI systems from external exploitation and frames adversarial distillation as a growing issue in international AI competition. #AIRegulation#AISecurity#Geopolitics#AIGovernance#TechPolicy

AI & Law

@ai_and_law · Post #638 · 19.08.2025 г., 07:04

🇫🇷🇩🇪Franco-German Guidance on Zero-Trust LLM Security France’s Agence nationale de la sécurité des systèmes d’information (ANSSI) and Germany’s Federal Office for Information Security (BSI) have jointly issued a paper on applying zero-trust principles to large language models. The document identifies common design vulnerabilities and operational risks in LLM deployment, stressing the need for a security architecture that assumes no implicit trust. The recommendations focus on three key safeguards: ✔️ restricting system access rights to the minimum necessary, ✔️ increasing transparency in algorithmic decision-making, and ✔️ ensuring continuous human oversight. This coordinated stance from two of Europe’s leading cybersecurity authorities signals a growing emphasis on proactive governance of AI systems at the infrastructure level. #AIsecurity#LLM#ZeroTrust#CyberRegulation

AI & Law

@ai_and_law · Post #212 · 12.01.2024 г., 08:04

NIST Issues Urgent Report on Escalating Threat of AI Attacks Hello, dear subscribers! The National Institute of Standards and Technology (NIST) has released a critical report titled "Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations," sounding the alarm on the intensifying threat landscape targeting artificial intelligence systems. In the face of increasingly powerful yet vulnerable AI systems, the report outlines the technique of adversarial machine learning, wherein attackers manipulate AI systems through subtle tactics with potentially catastrophic consequences. The document categorizes these attacks based on attackers' goals, capabilities, and knowledge of the target AI system. Concerns include "data poisoning" and "backdoor attacks," exploiting vulnerabilities in AI system development and deployment. #NIST#AIAttacks#AISecurity#ThreatLandscape#MachineLearning**