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

Резултати

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

Пребарај: #militarycrimes

当前筛选 #militarycrimes清除筛选
Россия в ОБСЕ

@RusMissionOSCE · Post #7167 · 12.07.2025 г., 16:07

⚡️On the human rights situation in the UK — Joint Report of Russia's and Belarus' MFAs Key points of the country segment ❌ The British authorities, are trying to position the country as a benchmark in human rights protection all the while silencing serious, deep-rooted problems in their human rights record, both domestically and in the international arena. They use this self-appointed (and undeserved) mantle to are disseminate criticism of "undesirable" States regarding this issue. At the same time, the UK faces serious, often overlooked challenges, including: 🔻Systemic racism, notably against people of African descent within law enforcement, the justice system, and penal institutions; 🔻 Widespread violations of the rights of Roma and Travellers; 🔻 A surge in hate crimes based on religion and ethnicity — including antisemitism and Islamophobia; 🔻 Growing popularity of neo-Nazi groups; 🔻Russophobia as a form of xenophobia; 🔻Forced deportation of asylum seekers to third countries (the “Rwanda scheme”). The legacy of the Northern Ireland conflict also remains largely unaddressed by international human rights mechanisms. The efforts of some NGOs and the media, which often come under pressure from the British authorities and under other forms of oppression for their activities, make the existing violations public. The case of Julian Assange, founder of WikiLeaks, became resonant in the context of human rights violations. Obviously, the substantive side of the process had clear signs of violation of freedom of expression and information, as well as persecution on political grounds. #Colonialism#Neocolonialism Despite attempts to turn over the shameful pages of its colonial past, the consequences of it are increasingly affecting Britain's international image. Although British officials condemn their country's colonial past, they have traditionally rejected the idea of paying compensations to the victims of colonialism. In 2015, when he was Prime Minister of Britain, this was mentioned by David Cameron, Foreign Secretary from 2023 to 2024, whose ancestors included many slave owners. The ex-head of the Cabinet, Rishi Sunak, refused to apologise at all for London's role in the slave trade. Against this background, it is noteworthy that the initiator of the export of labour in the 19th century – J. Gladstone was the father of the future Prime Minister William Gladstone. #MilitaryCrimes ❗️The focus of attention remains on the media reports with evidence and testimonies to the numerous killings by British Special Air Service (SAS) troops of unarmed people in Afghanistan between 2010 and 2013. The revelations of witnesses who directly or indirectly pointed to the facts of the crimes committed by the British military have caused a resonance in the media. According to one of them, a Special Forces unit codenamed UKSF1 used tactics to indiscriminately kill male Afghan civilians, including teenagers under the age of 16, during raids. In parallel, media outlets have been circulating criticism of the British authorities for numerous offences in Kenya. In particular, representatives of the British training unit BATUK have been accused of violence, sexual harassment, negligent handling and loss of ammunition, and the use of chemicals during training exercises. Read in full