Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
Dear Colleagues, I am thrilled to announce that I have successfully passed the AI Governance Professional certification exam from the International Association of Privacy Professionals (AIGP/IAPP).
This comprehensive exam covered a wide range of topics, from the technological foundations of AI systems and their lifecycles to the ethical, risk management, and legal considerations surrounding the development and deployment of AI systems.
I am committed to continuing my learning in this area and sharing news and valuable resources with you.
#IAPP#AIGP
AIGP 2025 Update: Streamlining AI Governance Certification for Real-World Impact
The IAPP has unveiled the latest version of its AIGP Body of Knowledge (BoK), effective for exams through February 2, 2025, offering a clearer, more flexible, and practical approach to AI governance certification. Simplified to four domains, the update places new emphasis on foundational principles, ensuring that certification aligns with the most relevant and influential legal frameworks worldwide.
This streamlined version is highly practical, designed to address the current responsibilities AI governance professionals encounter, not merely theoretical questions. Furthermore, Domains III and IV now separate the roles of developers and deployers, a crucial distinction reflecting how laws and standards are evolving in the field.
By balancing legal and technical insights, the new AIGP BoK solidifies its standing as the essential credential for those committed to responsible AI governance.
#AIGP#AIGovernance#LegalTech#ResponsibleAI#IAPP
IAPP Releases Comprehensive Report on AI Governance in Practice
The International Association of Privacy Professionals (IAPP) has released a new report on AI Governance in Practice, providing key insights into the evolving field of AI governance.
The report offers a foundational overview of AI, detailing its development and essential terminology. This approach allows anyone to grasp the basics and advance in the field. It includes a thorough inventory of AI risks, particularly data-centric ones, and offers practical strategies for managing them. Additionally, the report cites leading resources, including laws, regulations, and frameworks like the NIST AI RMF, providing a strong basis for deeper exploration.
Moreover, the report highlights various industry examples to contextualize theoretical concepts. For those preparing for the AI governance exam, the report aligns well with the AIGP Body of Knowledge and covers numerous topics likely to be tested.
#AI#AIGovernance#DataPrivacy#IAPP#AIGP
ISO Releases Free AI Governance Standard
The International Organization for Standardization (ISO), a prominent NGO known for creating industry standards, has made the important ISO/IEC 22989 standard publicly available for free. This standard addresses a wide range of AI governance topics, providing valuable guidelines for the responsible development and deployment of AI technologies.
ISO/IEC 22989 covers essential aspects of AI governance, including ethical considerations, risk management, and compliance requirements. It provides standardized concepts and terminology to help stakeholders understand and adopt AI technology effectively. This document is designed for a wide audience, including both experts and non-practitioners, offering insights into AI’s interdisciplinary nature, which encompasses computer science, data science, natural sciences, humanities, mathematics, and social sciences.
By making this standard freely accessible, ISO aims to promote the widespread adoption of responsible AI practices, ensuring that AI systems are trustworthy, robust, resilient, reliable, accurate, safe, secure, and private.
You can find ISO/IEC 22989 and other publicly avalable standards here.
#ISO#AIGovernance#AIGP#AI#Ethics#AICompliance#Technology#Innovation