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

Резултати

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

Пребарај: #ireland

当前筛选 #ireland清除筛选
POPULAR FRONT

@popularxfront · Post #6122 · 01.05.2026 г., 18:26

🇮🇪#Ireland: A 66-year-old man has been arrested and charged after a car bomb exploded outside a police station in Dunmurry, west Belfast, last Saturday. The perpetrator allegedly hijacked a delivery driver’s car and forced him to drive it to the location, where a gas cylinder had been placed inside and later detonated remotely. While some sources report he has been charged with attempted murder, others say he is also facing terrorism-related offences. Police believe the attack may be linked to the dissident republican group known as the New IRA. (via The Guardian, BBC & birminghammail)

Hashtags

POPULAR FRONT

@popularxfront · Post #6034 · 25.04.2026 г., 23:42

🇮🇪#Ireland: A suspected car bomb has exploded outside a police station in Dunmurry, Northern Ireland. Regional reports, including those from the Belfast Telegraph, state that the vehicle had been hijacked before being driven next to the police station, where it subsequently exploded. Police have cordoned off streets in the Kingsway area and are treating the situation as a “security incident.” No further details have been released at this time. (via Belfast Telegraph & @spicebag32; 📹 via @NiResponsevids on X)

Hashtags

POPULAR FRONT

@popularxfront · Post #5867 · 11.04.2026 г., 19:02

🇮🇪#Ireland: A man armed with a hammer breached security at Shannon Airport and climbed onto an American C-130 aircraft earlier today. Once on top of the plane, he attempted to damage it with the hammer. The man, who is in his 40s, was quickly arrested. No motive has been released, and his identity has not been disclosed.

Hashtags

POPULAR FRONT

@popularxfront · Post #5864 · 11.04.2026 г., 15:07

🇮🇪#Ireland: Up to 100 Gardaí were deployed to the Whitegate refinery, where protests have entered their fourth day amid rising fuel prices linked to the US and Israeli war against Iran. Footage shows Irish police forcibly attempting to remove trucks and tractors blocking the roads, with violent scenes breaking out. Officers can be seen kicking and stomping on farmers. Meanwhile, other videos appear to show protesters as young as 14 being pepper-sprayed by Gardaí.

Hashtags

POPULAR FRONT

@popularxfront · Post #5837 · 09.04.2026 г., 12:30

🇮🇪#Ireland: The Irish Army is set to be deployed across the country to remove heavy & agricultural vehicles blocking fuel depots, as protests over fuel prices enter their third day. Slow-moving convoys are targeting these sites over increasing fuel prices caused by the US and Israeli war against Iran. Police are now treating these actions as “blockades", with Gardaí (Irish police) reportedly requesting the assistance of the Irish army. In a statement, the Irish Minister for Justice said that once the army is deployed, people should not complain about any damage caused during the removal. (via CNN & limerickleader)

Hashtags

POPULAR FRONT

@popularxfront · Post #4697 · 24.01.2026 г., 11:11

🇮🇪#Ireland: ONH members fired a volley of shots in the Currynerin area of Derry last week. A 31-year-old man was arrested in connection with the event (though later released on bail) and a vehicle was seized. The PSNI have promised to increase ‘reassurance patrols as well as house-to-house enquiries and vehicle checkpoints in response. Repost via @spicebag32

Hashtags

POPULAR FRONT

@popularxfront · Post #4036 · 02.12.2025 г., 09:58

🇮🇪#Ireland: A new Irish militant group calling itself the "New Republican Movement" has announced its formation. In a video, where all members are armed, a masked man lists several motivations for creating the group, mostly focusing on mass immigration. They threaten Irish politicians with "immediate action", claiming to have their addresses. (via @real_eire on X)

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1298 · 10.02.2025 г., 13:14

📍Ireland’s architectural heritage – a journey back to the 19th century🇮🇪 📏 📏 📏 📏 📏 📏 📏 📏 🌟With its stunning castles, ancient ruins, and charming Victorian buildings, Ireland offers a glimpse into the past, where history and beauty come together in every stone. 📏 📏 📏 📏 📏 📏 📏 📏 #Ireland🇮🇪@voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1200 · 19.12.2024 г., 13:14

📍Ireland’s architectural heritage – a journey back to the 19th century🇮🇪 📏 📏 📏 📏 📏 📏 📏 📏 🌟With its stunning castles, ancient ruins, and charming Victorian buildings, Ireland offers a glimpse into the past, where history and beauty come together in every stone. 📏 📏 📏 📏 📏 📏 📏 📏 #Ireland🇮🇪 @voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #761 · 17.02.2024 г., 13:04

Ireland, Rock of Cashel 🇮🇪 The Rock of Cashel is one of the most visited landmarks in Ireland, also known as St. Patrick's Rock. It is also referred to as the Rock of Kings. ⛰ 🏰 Located in the ancient Celtic cathedral in County Tipperary, Ireland. The castle, built in the 4th century, was the royal residence of the provinces of southern Ireland; after 100 years, St. Patrick settled there. After Cromwell's army attacked, the castle complex became a symbol of the resilience and courage of the Irish people. The castle grounds still preserve residential buildings, structures for agricultural purposes, and the ruins of the cathedral. #Ireland @voyage

Hashtags

ПретходнаСтраница 1 од 4Следна