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

Пребарај: #alquds

当前筛选 #alquds清除筛选
Resistance News Network

@palestineresist · Post #93240 · 05.04.2026 г., 19:09

IOF soldiers were documented brutally assaulting a young man near Qalandia camp, north of #AlQuds. Zionist soldiers took turns severely beating the individual during the attack.

Hashtags

RNN Archive

@rnn_archive · Post #446 · 02.07.2023 г., 17:30

Today marks the somber ninth anniversary of the martyrdom of Mohammed Abu Khdeir at the hands of zionist settlers. 16-year-old Mohammed was kidnapped by a horde of settlers in #AlQuds on July 2nd, 2014, one of the early days of Ramadan. As he was preparing his pre-fast meal before the break of dawn, a group of settlers grabbed him and drove away. Mohammed was subsequently tortured, beaten with tools and forced to drink gasoline. The final act of violence perpetrated against him is as sickening as it is infuriating: doused with gasoline, Mohammed was set on fire. The depravity of zionism knows no bounds. Mohammed's case is one of countless crimes perpetrated against our people from the moment that the first settler stepped onto our land. It is a crime emblematic of the essence of zionism itself, in its racism, sadism, and hatred. Glory to our martyrs, and may they all be avenged.

Hashtags

Resistance News Network Backup

@RNN_Backup · Post #64431 · 25.10.2024 г., 09:44

🚨 Footage documents zionist soldiers targeting and shooting children yesterday in the town of Biddu, northwest of #AlQuds. Following the wounding of the child, the IOF abducted him. The barbaric crimes of the occupation carried out against children, women, men, and the elderly are escalating in the occupied West Bank and the #Gaza Strip, accompanied by a deafening silence from the international community and their refusal to hold the occupation accountable for their ongoing crimes.

Hashtags

Resistance News Network Backup

@RNN_Backup · Post #64453 · 25.10.2024 г., 10:01

🚨 13-year-old Iyad Ashraf Da'is from #AlQuds was released today from occupation prisons after 7 month of detention with the marks of zionist torture and medical negligence against the prisoners clear on his body. Iyad suffers from severe scabies due to the deliberate inhumane measures taken by the occupation administration against the prisoners as part of collective revenge against them. He was also sentenced to house arrest and his ankle was fitted with an electronic bracelet and was banned from Al-Quds to Taybeh. Iyad was arrested on March 27 from his home in Shu'fat, occupied #AlQuds. #FreeThemAll

Resistance News Network Backup

@RNN_Backup · Post #62684 · 12.10.2024 г., 21:24

🚨 The IOF and armed settlers conducted a series of aggressions across the West Bank today: Armed settlers attacked farmers in the village of Al-Mughayyir in #Ramallah and prevented them from harvesting olives. (media 1,2) Settlers also cut down olive trees in the village of Yasuf, east of #Salfit (media 3,4). The IOF invaded the town of Beita, south of #Nablus, where confrontations erupted between resistance youth and the zionist forces. (media 5,6,7). The IOF fired live bullets heavily at Palestinian homes at the entrance of Al-Arroub refugee camp, north of #AlKhalil. (media 8,9) The IOF invaded Shufat refugee camp in #AlQuds. (media 10)