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

Резултати

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

Пребарај: #ecoawareness

当前筛选 #ecoawareness清除筛选
Green University CA | Official

@centralasian_greenuniversity · Post #515 · 11.12.2025 г., 10:55

🏔️International Mountain Day 🗓Today, we celebrate International Mountain Day — a reminder of the incredible role mountains play in our lives. They provide fresh water, protect unique ecosystems, and inspire millions around the world. 🌱Let’s raise awareness, appreciate nature, and work together to preserve these powerful landscapes for future generations. #InternationalMountainDay#SustainableFuture#GreenUniversity#YouthForNature#EcoAwareness ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube

EKOLOG.UZ| ENG

@ekologuzenglish · Post #11781 · 03.03.2026 г., 15:05

🌿 March 3 – World Wildlife Day 🌿 Today we celebrate World Wildlife Day, raising awareness about the importance of protecting wildlife and preserving biodiversity. 🌏 On December 20, 2013, the United Nations officially declared March 3 as World Wildlife Day. This year also marks the 40th anniversary of the 1973 Convention on International Trade in Endangered Species of Wild Fauna and Flora (CITES). Wildlife has ecological, genetic, social, economic, scientific, cultural, and aesthetic value. That’s why people often seek the peace of wild nature away from noisy cities. 🌲🦉 Our great scholars emphasized respecting nature and maintaining balance: Muḥammad Muso Khorezmi: “Know that if the eyes of the river weep, sorrow will fall upon it.” Abu Nasr Farabi: insights on human body, nutrition, and diseases. Abu Rayhan Beruni: studies on plants and animals, their biological traits and economic importance. Avicenna (Ibn Sina): advice on health, hygiene, diet, and natural remedies. ❗️ Human impact on wildlife: 1️⃣ Deforestation and habitat loss – ~10 million hectares of forest are lost globally each year. 2️⃣ Extinction of species – over 1 million animal and plant species are at risk. 3️⃣ Air, water, and soil pollution – over 50% of coral reefs degraded; 75% of the Earth’s land affected by climate change and human activity. 4️⃣ Illegal wildlife hunting and trade – threatens more than 2,200 species. Each of us is responsible for protecting nature, avoiding pollution, and passing it on intact to future generations! 💚🌿 #WorldWildlifeDay#ProtectNature#Biodiversity#WildlifeConservation#EcoAwareness

Green University CA | Official

@centralasian_greenuniversity · Post #910 · 16.03.2026 г., 11:32

Green University Hosts Meeting with School Students ⏺As part of the republican stage of the nationwide competition “Do You Know Environmental Laws?”, Green University hosted a meeting with school students from across Uzbekistan. 🗣During the visit, the students met with the Rector of Green University, Dr. Bakhtiyor Pulatov, and other university representatives. The Rector introduced the students to the university’s activities and educational programs, and highlighted the growing importance of environmental protection and climate action. 🟢The meeting served as an important platform for students to exchange ideas and deepen their understanding of environmental responsibility. #GreenUniversity#YouthForEnvironment#EcoAwareness#Uzbekistan2030 ___________________ Green University maktab o‘quvchilari bilan uchrashuv o‘tkazdi ⏺“Siz ekologiyaga oid qonunlarni bilasizmi?” respublika ko‘rik-tanlovining respublika bosqichi doirasida Green University O‘zbekistonning turli hududlaridan kelgan maktab o‘quvchilari bilan uchrashuv o‘tkazdi. 🗣Tashrif davomida o‘quvchilar Green University rektori, professor Baxtiyor Po‘latov hamda universitet vakillari bilan uchrashdilar. Rektor o‘quvchilarga universitet faoliyati va ta’lim dasturlari haqida ma’lumot berib, bugungi kunda atrof-muhitni muhofaza qilish va iqlim o‘zgarishiga qarshi kurashish masalalarining tobora ortib borayotgan ahamiyati haqida so‘z yuritdi. 🟢Uchrashuv o‘quvchilar uchun fikr almashish, ekologik masalalar bo‘yicha bilimlarini kengaytirish hamda ekologik mas’uliyatni yanada mustahkamlash uchun muhim platforma bo‘lib xizmat qildi. #GreenUniversity#EkologikTa’lim #YoshlarVaEkologiya#Uzbekistan2030 ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube