Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
Europe's Final AI Act: Key Provisions Unveiled Analysed
Hello everyone! William Fry law summarized the final AI Act draft. The legislation outlines prohibited AI practices, including manipulation for behavior distortion, exploiting vulnerabilities, and unauthorized biometric categorization. Notably, AI systems posing minimal risks won't be deemed high-risk if specific criteria are met.
General-purpose AI models must comply with obligations like documentation maintenance and cooperation with authorities. The Act mandates disclosure of deep fakes, unless legally authorized or part of artistic works. Providers must watermark AI-generated content for transparency, ensuring effective marking and compatibility with technical standards.
#AIACT#EURegulation#AI
🇳🇱Netherlands Issues Practical Guidance on EU AI Act Compliance
The Dutch Ministry of Economic Affairs has released a detailed report outlining how organizations can comply with the EU AI Act. The document clarifies requirements for general-purpose AI models, high-risk AI systems, and the safeguards needed to ensure data protection and transparency.
By breaking down obligations across risk categories, the guidance aims to help companies navigate the EU AI Act’s technical and legal standards more effectively, ensuring that deployment of AI systems aligns with both regulatory and ethical expectations.
#EUAIAct#AIlaw#EUregulation
EU Countries Unanimously Approve AI Act Advancement
Hello everyone! Representatives from European Union member states have unanimously voted to advance the Artificial Intelligence Act, marking a crucial step in shaping the governance of AI within the region and globally.
The approval by the Council of the EU's Committee of Permanent Representatives (COREPER) removes significant obstacles, despite prior reservations from countries like France, Austria, Germany, and Italy.
The next phase involves the European Parliament, with two key committees set to vote on February 13. The full plenary vote is anticipated on either April 10 or 11, with widespread opposition not expected.
Once adopted, the AI Act will come into force 20 days after publication in the official journal, introducing regulations for various AI systems. The European Commission will take a lead role in implementing the Act, including establishing an AI Office.
#EUAIAct#ArtificialIntelligence#AIGovernance#EURegulation
🇪🇺📖Algorithmic Management in the EU: A Structural Shift in Labor Governance
The European Commission’s Directorate-General for Employment has released a study on algorithmic management (AM), offering the most comprehensive analysis to date of how digital systems are transforming workforce governance. Covering everything from recruitment and task allocation to performance evaluation and contract termination, the study shows that around 25% of EU enterprises — especially large private companies — are already using AM tools, with adoption expected to rise by 3–6% annually over the next decade.
This multi-year research project, developed with input from social partners, academics, and industry leaders, highlights both operational efficiencies and significant legal and ethical challenges. Among them: threats to worker privacy, diminished autonomy, lack of transparency, and deskilling. While current EU legislation — including GDPR and anti-discrimination directives — offers partial coverage, the study identifies critical regulatory gaps. As algorithmic oversight becomes embedded in everyday management, the findings make one thing clear: governance must evolve just as fast as the technology it aims to regulate.
#AIandLaw#EURegulation#DigitalGovernance
🚢ЕС утвердил первый немецкий судоремонтный завод в списке разрешённых для конвенционной утилизации.
Европейская комиссия приняла 15-ю редакцию European List of Ship Recycling Facilities, включив в неё первую верфь в Германии (г. Эмден).
Список также продлевает аккредитацию четырёх верфей в Дании, Эстонии, Литве и Испании, а также одной площадки в Турции. Одновременно три предприятия исключены: финская верфь не продлила разрешение, площадка в Северной Ирландии не предоставила требуемые данные, а одна турецкая верфь признана несоответствующей требованиям EU Ship Recycling Regulation (в части защиты береговой линии).
Включение в список позволяет предприятиям утилизировать крупнотоннажные суда под флагом стран ЕС при соблюдении строгих экологических, трудовых и стандартов безопасности. Обновлённый перечень включает 41 площадку: 30 в Европе (ЕС, Норвегия, Великобритания), 10 в Турции и 1 в США.
Для судоходной отрасли решение усиливает роль регулируемой утилизации и поддерживает развитие циркулярной экономики, включая переработку стали и вторичных материалов.
Напомним, что с 31 декабря 2018 года суда под флагом ЕС обязаны проходить утилизацию только на площадках из Европейского списка. При этом европейские судовладельцы контролируют около 30% мирового флота по дедвейту.
📌European Commission — исполнительный орган Европейского союза, созданный в 1958 году, отвечает за разработку и реализацию законодательства ЕС. Финансируется из общего бюджета Европейского союза.
#ShipRecycling#EURegulation#CircularEconomy#MaritimePolicy#Sustainability
Experts Examine AI Office's Key Role in EU Regulation
Hello, dear subscribers! Hadrien Pouget, Associate Fellow at the Carnegie Endowment for International Peace, and Johann Laux, British Academy Postdoctoral Fellow at the University of Oxford, have written an insightful article highlighting the pivotal role of the AI Office within the EU's regulatory framework, especially in the context of implementing the AI Act.
The authors propose a three-fold strategy for the AI Office:
1️⃣ Developing Harmonized Standards: They recommend that the AI Office actively contributes to enhancing the specificity of AI regulations over time. This involves aiding in the determination of normative decisions for consideration and offering insights when normative judgments need to be made.
2️⃣ Amending the AI Act: The AI Office should monitor and navigate the intricate interplay between the AI Act and other laws. Moreover, it should maintain independence while providing recommendations for delegated acts and amendments.
3️⃣ Handling Legal Matters: In court proceedings, the AI Office plays a vital role in identifying gaps in the protection of fundamental rights. It offers insights into distinguishing predictable harms from unpredictable ones by meticulously examining technological evidence.
The AI Office is envisioned as a central agency instrumental in ensuring the ethical and effective implementation of AI regulations.
#AIRegulation#AIStandards#AIAct#EURegulation#AIOffice#FundamentalRights