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

Резултати

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

Пребарај: #reflection

当前筛选 #reflection清除筛选
Doniyor Olimjonov English | IELTS

@doniyorieltss · Post #1472 · 20.05.2023 г., 01:55

#reflectionon my recent results... For a start, let me just say that I'm more than grateful for another 8.5, not least because it's an improvement over the last one. Yes, I've come so close to securing that elusive Band 9. You know what? I even thought I did. But for me, it's not so much about the score as it is about fun and experience. As much as I may come across as someone chasing after a 9.0, I honestly couldn't care less. Clearly, it is a big milestone and for good reason — very few people understand what it takes to really get there, and I'm fortune enough to be one of them. But I already stopped caring too much about what I now know is nothing but a number — at least I'm trying to do so. In fact, I did not even prepare for this test of mine, which I normally would. I just wanted to see if I was good enough to score a 9.0 on Speaking and 8.0 on Writing; apparently, I am not! In any case, it was all supposed to be fun — something that I did just for the sake of a dopamine hit; a 180-dollar one, in fact. 😅 Seriously, even as I was taking the Speaking test, I could barely suppress the joy that I felt creeping up, because that was the best performance I'd ever put on in my life! There is also a sense of elation at waiting for your results, even more so when you don't know the exact day of the release. And having fun with your friends until 3.00 AM on the occasion of a satisfactory result is a whole nother level! To sum it all up, I would love to achieve what appears to be the greatest feat of IELTS — Band 9.0. However, I shouldn't have to work for it, as it is not priority 'numero uno': the score is supposed to be only a fraction of a lifelong endeavour — at least for me it is! @ieltsulugbeks

Hashtags

Doniyor Olimjonov English | IELTS

@doniyorieltss · Post #1279 · 31.03.2023 г., 18:44

#reflection Lurching from one task to another, I have been finding myself get sucked into the whirlwind of work time and again. That dreadful thing! It's so counterproductive: You want to lead an exemplary lifestyle, and so you work. You think all your troubles will fade away as you take up work. Little do you know, however, more ordeals than ever before are looming on the horizon — starting a new career, unless tapped into, is a surefire way to put a bigger strain on your already deteriorating social life. Instead of lightening your burden, your work just keeps making you all the more miserable, and before you know it, you will be enslaved by what was only supposed to help you. @ieltsulugbeks

Hashtags

Financial Freedom Magazine

@FinancialFreedomMagazine · Post #1067 · 13.12.2021 г., 04:39

THIS WEEK... Instead of a weekly #book challenge, we have a #reflection challenge. Basically, the idea is to use this time of year to intentionally discover and align yourself with the work you’re meant to do in 2022. To help you with this, you can download ⬇️ --The 2021-22 Annual Reflection Template-- It's a structured deep dive into who you are, who you might become, and what you want to create for 2022.

Quiet World 🍁

@QuietWorld · Post #6688 · 11.10.2019 г., 08:30

Men go abroad to wonder at the heights of mountains, at the huge waves of the sea, at the long courses of the rivers, at the vast compass of the ocean, at the circular motions of the stars; and they pass by themselves.., without wondering. – St. Augustine – #solitude#quotes#reflection @quietworld🍃

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