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

Резултати

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

Пребарај: #egypt

当前筛选 #egypt清除筛选

The death sentence of the leader of the Egyptian Muslim Brotherhood was issued A court in #Egypt has issued a death sentence for Muslim Brotherhood leader Mohammad Badie and three of its senior members. In 2012, the Egyptian people succeeded in overthrowing the dictatorial government of Egypt by giving thousands of martyrs. But after coming to power, Muhammad Morsi, like Hosni Mubarak, started his relations with America and Israel. A year later, the Egyptian people's revolution was overthrown by an Israeli coup and the Sunni Muslim Brotherhood was massacred. Perhaps Arabs and Turks will understand hundreds of years later that the cost of resistance against the West is lower than compromise. https://t.me/YediotNewsChat

Hashtags

International Geographic

@internationalgeographic · Post #5447 · 23.02.2025 г., 14:52

#Egypt, Temples of Abu Simbel 🇪🇬 The temples of Abu Simbel are the most famous in all Egypt after the Pyramids of the Giza dedicated to Ramses II and his wife.

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1538 · 22.08.2025 г., 12:14

🐠 When you dive into the Red Sea reef, the world fades away. You enter a vibrant, magical realm of corals and fish. 📏 📏 📏 📏 📏 📏 📏 📏 #Egypt | @voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1368 · 25.03.2025 г., 13:14

⭐️ One of the most beautiful spots in Sharm El Sheikh – Farsha Cafe 📏 📏 📏 📏 📏 📏 📏 📏 ✅Here, you fully experience the Egyptian vibe and immerse yourself in the atmosphere of an Eastern fairy tale. 📏 📏 📏 📏 📏 📏 📏 📏 #Egypt🇪🇬@voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1286 · 04.02.2025 г., 13:14

🐠 When you dive into the Red Sea reef, the world fades away. You enter a vibrant, magical realm of corals and fish. 📏 📏 📏 📏 📏 📏 📏 📏 #Egypt🇪🇬@voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1083 · 03.09.2024 г., 12:14

🗺Egypt 🇪🇬 The "City of the Dead" in the Minya Province is a necropolis over 2,500 years old. Archaeologists have discovered tombs in this area belonging to the priests of Thoth, the ancient god of the moon and wisdom. Minya Province is also home to the ancient cemetery of Zawiyet el-Mayyitin ("Edge of the Dead"), the world's largest burial site where the deceased were laid to rest since the time of the ancient Egyptian pharaohs. #Egypt @voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #915 · 03.05.2024 г., 12:05

📍 Egypt, Sharm El-Sheikh, Al-Sahaba Mosque 🇪🇬 The second largest mosque in Sharm El-Sheikh, but undoubtedly the most beautiful. Additionally, it is one of the newest mosques in Egypt—opened in March 2017, it was constructed between 2011 and 2017. The mosque was designed by Egyptian architect Fouad Tawfik Hafez—free of charge. 🕌 Built on a 3,000 square meter area with two minarets reaching 81 meters high, the mosque's roof rises to 36 meters. It can accommodate about 3,000 visitors. 🙌🏗 The most fascinating aspect is its unique architectural style, fundamentally Ottoman but with vivid Fatimid elegance, modern features, and Maghrebi touches. It's a sight worth seeing. #Egypt @voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #856 · 14.04.2024 г., 12:04

📍 Egypt, Tomb of Ramses VI in Luxor 🇪🇬 The tomb of Pharaoh Ramses VI was created in the 12th century BCE. It is one of the most well-preserved tombs in the Theban necropolis, famous for its illustrations to the "Book of Caves," which tells about the most secret areas of the other world, as well as astronomical images. ⚰️ The ceiling of the burial chamber is covered with two huge figures of Nut – the goddess of our sky, and Naunet – the goddess of the sky of the other world. The passage leading to the burial chamber of the Egyptian king Ramses VI is carved at a depth of more than 90 meters in the mountain rock. ⛰ #Egypt @voyage

Hashtags

RTDocumentary

@rtdocumentary · Post #146 · 01.08.2021 г., 10:00

Russian ‘Baby Yoga’ 👶🏻 #video#Egypt Russian PE instructor Lena Fokina has come up with an unorthodox way of making babies strong and resilient, but her method makes a lot of people cringe. Elena grasps the little tykes by their wrists and feet and spins and flips them over and around her head like they were rag dolls. Lena teaches her bizarre ‘baby yoga’ to parents who want to discover their babies’ natural abilities, but some critics say her innovation is actually baby abuse. Videos of the PE teacher spinning newborns and dipping their heads in the sea have been removed from social media and petitions have appeared on the web calling for Lena’s methods to be banned. What do you think? Is it baby yoga or baby abuse? Follow: https://t.me/rtdocumentary

Hashtags

RTDocumentary

@rtdocumentary · Post #132 · 20.07.2021 г., 10:00

Egypt’s Garbage City #video#Egypt Meet the Zabbaleen, Cairo’s traditional garbage collectors. Generations of Zabbaleen have been recycling Cairo’s trash for more than half a century. They are so good at it that they recycle up to 85% of the capital’s waste. To give you some perspective, a whopping 20 million people live in the Greater Cairo area. Imagine how much waste they produce every day! Zabbaleen’s garbage industry is an organized network of tens of thousands of people, each playing their own part. They gather, transport, and sort the rubbish. Even pigs play an important role, as they are fed the organic food waste. The Zabbaleen garbage collectors are largely independent from the rest of Cairo and live by their own rules. For example, the Zabbaleen never collect waste from a colleague’s turf. They have their unofficial mayor, shops, cafes, shishas, and schools. Follow: https://t.me/rtdocumentary

Hashtags

123•••1011
ПретходнаСтраница 1 од 11Следна