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

Резултати

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

Пребарај: #druze

当前筛选 #druze清除筛选
Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #4158 · 13.03.2025 г., 21:37

Sources from the #Druze community in #Syria have indicated that a delegation of approximately 100 prominent Druze figures is preparing to visit the occupied Golan Heights this Friday. During the visit, the delegation is expected to meet with Sheikh Mowafaq Tarif, the spiritual leader of the Druze in #Israel, along with other key figures from the community. They are also scheduled to visit a religious site in the region. According to Reuters, this visit is seen as the latest sign of strengthening ties between Israel and the Druze community, particularly in the wake of the ceasefire in Lebanon and the political shifts in Syria following the ousting of former President Bashar al-Assad. As of now, Israel’s Foreign Ministry has not issued an official confirmation regarding the visit.

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #4166 · 15.03.2025 г., 15:54

The leader of the #Druze community in #Syria, Sheikh Hikmat al-Hijri, declared on Thursday that there is "no harmony or agreement with the authorities in #Damascus" while remaining silent of rapproachment with #Israel. Although he Druze religious authorities in Sweida have rejected any rapprochement with the Israeli occupation, Druze figures visited the occupied Golan this week for the first time in 50 years, despite a religious prohibition issued by the clerics of the Syrian village of Hadar against those participating in the visit. Sheikh Hikmat al-Hijri did not taken a clear stance but stated that he "will move in a direction that serves the interests of the Druze community."

Eva Karene Bartlett

@EvaKarene_Bartlett · Post #29190 · 01.01.2026 г., 14:33

"Syria Al-Julani regime released kidnapped Druze kids after months of detention The Jolani regime has released two Druze brothers, Yanal Bashar al-Haddad (15) and Qais Bashar al-Haddad (13), who had been detained at Adra Prison in #Damascus since their arrest during the attack on #Suwayda on July 15, 2025. Its worth noting that terriost regime kidnapped and killed a lot of Druze and Alawites kids and women (see links on X post) ❗️ Note that the terrorist regime refuse to hold accountable the militants who committed massacres against the #Alawites or #Druze, and label them as “mojahdin” =jihadists, because fighting against “infidel” minorities is considered a heroic act in their eyes." https://x.com/SyJusticeArc/status/2006461460713488503

#Syria🇸🇾: #Druze militias posing with captured "General Security Service" (former #HTS) vehicles in Tal Hadid, west of #Sweida (#Suwayda). Some of the Druze fighters can be seen with a #Hungary-made 🇭🇺 AK-63D rifle, Soviet AKS-74U carbine and PG-7VM Anti-Tank rocket. https://x.com/war_noir/status/1951991045517877364

Moscow Photographer

@moscowphotog · Post #1489 · 08.03.2025 г., 13:48

"A new massacre against the #Alawites in the city of #Latakia, in the #Dattour neighborhood, al-Mazar junction. I beg all segments of the Syrian people, especially the #Druze, #Kurds, and any remaining members of the #Sunni community who still have a little humanity left in their hearts, to take to the streets in protest to stop these massacres against the innocent. These #massacres are not from yesterday, they are happening today, and as of moments ago, they are still being carried out by Syrian members of Hay’at Tahrir al-Sham #HTS, wearing their official uniforms. Please, save those who remain." https://t.me/CoastSyrian24/771

Eva Karene Bartlett

@EvaKarene_Bartlett · Post #30120 · 22.03.2026 г., 13:28

Systematic Attacks on Religious Minorities' Shrines and Places of Worship in Syria W #Hama: An extremist terrorist group has destroyed a religious shrine belonging to the #Alawite community, known as “Sheikh Muhammad al-Maghribi,” located in the village of #Asila in Masyaf, in the Ghab Plain in the rural countryside of Hama Governorate, yesterday 21 March 2026. #Alawite: It is worth noting that attacks on Alawite religious shrines began following the fall of the regime, reaching their peak during the #massacres carried out against Alawites on the Syrian coast by al-Jolani’s forces. Incidents of assault on Alawite shrines have continued repeatedly, to the point where barely a month passes without an incident involving the bombing, desecration, or burning of shrines across various Alawite regions. #Druze: Similarly, shrines belonging to the Druze community were subjected to comparable attacks, including vandalism, arson, and bombings, during the massacres of July 2025 in #Suwayda, carried out by the forces of al-Jolani’s terrorist regime. #Christians: A church in #Damascus was also bombed in June 2025, in addition to attacks on churches in #Homs and the rural Homs region in the #alQusayr area. The massacres that took place in As-#Suwayda likewise saw the burning and destruction of three churches.