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

Резултати

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

Пребарај: #mv

当前筛选 #mv清除筛选
Pensive|

@PensivePost · Post #5625 · 30.01.2022 г., 13:38

It wasn't intentional! We both knew! You started everything You made me to feel the best in me You made me to understand what true love is You made me to know even affection like this exists You made me to realize all bonds doesn’t need a name You made me to change myself completely… Yeah! It was you behind this beautiful bond but I don’t blame that it’s all your fault now… We’ve been together in many things either be it sad or happiness, victory or failure, emotions or emptiness we stood with each other… You know what!? This is what I have imagined all these years but now I understand that only I needed you in all such situations whereas you never really wanted me by your side. I thought you will feel good when I’m with you; you will need me at the end of the day to share your day; you will search for me when you are not doing well; and lot more that can’t be bundled up in words but you have also made me to realize that you never really wanted me to be by your side… And now all I am doing is to search myself, the true self which have been lost long back in the chaos of loving you blindly… I know what I was, how I was, who I was, before meeting you but now I don’t have even myself with me! It’s all you that I have within me but I don’t blame that it’s all your fault. I know the way you loved me, you cared me, you admired me but all my question is Where’s that person who made me smile without any reason even at odd hours of day? Where’s that person who made me trust them without any need? Where’s that person who made me feel as the most important one? I have expressed my feelings in all possible ways I could and even said you directly but then you ask me again “what should I do?” You know how painful it is to hear such question after letting myself to someone who is close to me than myself… I have understood your situations many times even you knew it pretty well And now I am tired of being the one who understand others and I need to be understood sometimes… I’ve waited for you a lot of times which doesn’t hurt more than you asking “did I ask you to wait?!” what kind of reaction is that to someone who is extremely crazy about you. And I know you don’t need me the way you needed me! Even you know this but you don’t accept it openly. All I did was to love you unconditionally the way you loved me during our starting days… is it this easy for you to change like a totally different person ? Even now I am trying my best to be supportive to you wherein you don’t even have the courtesy to think about my feelings… so when you come to me again after all your issues being sorted out you will not find the one true soul that loved… each time you do this again and again just because I cant leave you. I am losing myself more than the normal and hating myself terribly for not being able to hate you! I do everything for you and react to you only for your behavior, always remember to think a little before you speak… And there are lot more to say but even my words got glued to you and I find it difficult to put it together. This is all my side of the story! if you think the way I portrayed you wrong in here… then tell me your part… at least that may create a reason to talk. #review #mv

Hashtags

~ cosmosy ~ of the world ~

@cosmosy_tg · Post #3606 · 24.04.2026 г., 17:16

⨳ 23.04.26 ⨳ Релиз Lyric Video на песню «Chance ~ 好きだっていう前に ~» Смотреть Lyric Video на YouTube-канале cosmosy: https://youtu.be/w9p37ELUxO4?si=mF4Z6FWXgMATclg8 #mv@cosmosy#cosmosy

Hashtags

~ cosmosy ~ of the world ~

@cosmosy_tg · Post #3282 · 13.04.2026 г., 15:50

⨳ 13.04.26 ⨳ Релиз клипа на песню «Silence ~ body & soul ~»: Смотреть видеоклип на YouTube-канале cosmosy: https://youtu.be/2mUjLyyZOW0?si=Hk5KJZwg_rB5QfpN #mv@cosmosy#cosmosy

Hashtags

~ cosmosy ~ of the world ~

@cosmosy_tg · Post #3251 · 13.04.2026 г., 09:34

⨳ 12.04.26 ⨳ Релиз Lyric Video на песню «Chance ~ 사랑이라 말하기 전에 ~» Смотреть Lyric Video на YouTube-канале cosmosy: https://youtu.be/5hM7UL9bPtI?si=hYdY_59UZCOCgRgR #mv@cosmosy#cosmosy

Hashtags

~ cosmosy ~ of the world ~

@cosmosy_tg · Post #3028 · 31.03.2026 г., 09:36

⨳ 31.03.26 ⨳ Релиз perfomance-видео на песню «Silence ~ body & soul ~»: «Готовы? Мотор 🎬 🔗youtu.be/VOSAeU-qNr4 🫨 Зажигай всем телом и душой! — Релиз клипа: 13 апреля 2026 💿 Заказать альбом „~ of the world ~“ в онлайн-магазинах: linktr.ee/cosmosy » #mv@cosmosy#cosmosy

Hashtags

~ cosmosy ~ of the world ~

@cosmosy_tg · Post #2686 · 24.03.2026 г., 16:32

⨳ 24.03.26 ⨳ Релиз клипа на новый сингл «Chance ~ 사랑이라 말하기 전에 ~» Смотреть клип на YouTube-канале cosmosy «cosmosy — первые, кто открыл любовь за пределами вероятности 🎧Слушать песню „Chance“ 💿Предзаказ второго мини-альбома „~ of the world ~“ » #mv@cosmosy#cosmosy

Hashtags

~ cosmosy ~ of the world ~

@cosmosy_tg · Post #2562 · 20.03.2026 г., 10:04

⨳ 20.03.26 ⨳ Релиз perfomance-видео на песню «Chance ~ 사랑이라 말하기 전에 ~»: «[Official Performance] cosmosy "Chance ~ 사랑이라 말하기 전에 ~" |🖤 Switch ON 🔗https://youtu.be/DiS9MZV2ZuI В полной темноте они нашли свет и переписали все правила любви 📺 Релиз клипа: 26.03.24 🎧 Слушать новую песню: https://cosmosy.sng.to/chance » #mv@cosmosy#cosmosy

Hashtags

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