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

Резултати

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

Пребарај: #phenomenon

当前筛选 #phenomenon清除筛选
Language Trivia 🤔

@languagetrivia · Post #552 · 29.12.2024 г., 17:13

🧠 Do you know how, if you repeat a word or phrase over and over again or stare at it for a long time, it starts to lose its meaning and sound like gibberish or just a random set of letters? 🔍 What is this phenomenon called? A. 🗣️ Phonetic Decay B. 🔁 Semantic Satiation C. 📚 Lexical Overload D. 🎧 Auditory Fatigue @languagetrivia#phenomenon

Hashtags

Language Trivia 🤔

@languagetrivia · Post #547 · 27.12.2024 г., 12:17

🧠 The Stroop Effect Challenge! 👉 Instructions: 1) Read out loud the name of the colors in the top half of the image. 2) Now, in the bottom half say the color of the text, not the word itself. (E.g. for the first word of the bottom part you need to say “green”, because this is the color in which the word is written) This is called the Stroop Effect – a psychological phenomenon where your brain struggles to process conflicting information. Your brain wants to read the word (e.g. "Purple"), but the task is to say the color of the text (e.g. "Green"). This mismatch causes a slight mental slowdown as your brain processes the conflict. Did your brain glitch? Yes 🤯| No 😎 Subscribe to Language Trivia || #experiment#phenomenon

Interesting Planet 🌍

@interesting_planet_facts · Post #389 · 22.07.2025 г., 20:22

🌎 The “singing” sands of select deserts produce eerie musical tones when walked on or disturbed. This haunting sound comes from millions of perfectly sized sand grains rubbing together and vibrating in harmony—nature’s own desert orchestra! ✨ #geology⚡#sound⚡#phenomenon 👉subscribe Interesting Planet

Interesting Planet 🌍

@interesting_planet_facts · Post #1056 · 20.11.2025 г., 18:11

🌎 Glowing tides known as bioluminescent bays light up in places like Puerto Rico. Microorganisms called dinoflagellates produce blue-green light when stirred by waves or movement. The brightest, Mosquito Bay, can host up to 700,000 glowing organisms in just one liter of water. ✨ #bioluminescence⚡#ocean⚡#phenomenon 👉subscribe Interesting Planet 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #170 · 03.09.2025 г., 20:12

🌍 Sometimes, sunlight shining through millions of tiny ice crystals in high clouds creates halos—glowing circles or arcs—around the Sun or Moon, a beautiful effect of atmospheric optics. ✨ #atmosphere⚡#light⚡#phenomenon⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Universe Mysteries 🪐

@cosmomyst · Post #142 · 16.08.2025 г., 16:11

🪐 In the galaxy NGC 660, astronomers have discovered a rare and bizarre "polar ring"—a huge ring of gas and stars wrapping around the galaxy at a right angle to its main disk. These unusual rings may form after galactic collisions, twisting the cosmic structure into a shape unlike any other in the universe. ✨ #phenomenon⚡#galaxies⚡#collisions⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Interesting Planet 🌍

@interesting_planet_facts · Post #550 · 13.08.2025 г., 00:22

🌎 A rare natural phenomenon, “ball lightning” appears as glowing orbs during storms, sometimes rolling along the ground or bursting in mid-air. Its true cause is still being unraveled by physicists, adding mystery to thunderstorm science. ✨ #weather⚡#phenomenon⚡#electricity 👉subscribe Interesting Planet

Language Trivia 🤔

@languagetrivia · Post #518 · 20.12.2024 г., 12:13

🧪 Experiment time! Which of these shapes would you associate with the word 'Bouba,' and which with 'Kiki'? 👀 Check the first comment under the poll below for details about this experiment and what it reveals about human perception! @languagetrivia#experiment#fact#phenomenon

@Veronica_ecovibes

@veronica_ecovibes · Post #1830 · 09.10.2025 г., 12:38

⠀ Девчонки! Вчера радости моей не было предела! Сейчас расскажу… ⠀ Я так старалась, преодолевая себя, участвовала в беговом челлендже в приложении #бегаешькакдевчонка ⠀ На второй день челленджа я поняла, что в тройку лидеров точно не зайду. Девчонки быстро вырвались вперед…Тогда я нацелилась войти хотя бы в десятку лидеров. Это был спортивный интерес! Азарт мной руководил) ⠀ В итоге я заняла 16 место из 1468 участниц!🔥Представляете?! Ну огонь же! ⠀ Так рада, что взяла такую планку! А вчера получила письмо от организаторов, что я победила в беговом челлендже! Представляете?! То есть, помимо первых трёх призовых, ещё было 9 победителей, я в том числе! (получу небольшой подарок от брендов #Hitrospletenia X #Phenomenon ) ⠀ Вчера я радовалась, как ребенок, потому что прошла небольшой путь преодоления: каждое утро, в течение челленджа я бегала по 5 км в любую погоду, днём и вечером активно ходила, гуляла, чтобы шаги росли) В итоге 16 место из 1468 участниц! ⠀ Интересно посмотреть результаты в целом за октябрь! Поделюсь с вами! В общем, горжусь собой!

Interesting Planet 🌍

@interesting_planet_facts · Post #741 · 13.09.2025 г., 16:22

🌎 The Morning Glory cloud is a rare, enormous roll-shaped cloud that can stretch over 1,000 kilometers across northern Australia. It forms when humid air, sea breezes, and temperature inversions combine during specific conditions—glider pilots seek it for its powerful updrafts. ✨ #phenomenon⚡#meteorology⚡#Australia 👉subscribe Interesting Planet ​

Language Trivia 🤔

@languagetrivia · Post #525 · 21.12.2024 г., 17:12

“Paris in the the spring.” Did you notice the extra “the”? If not, don’t worry – it’s a common perception error! 🔍Why does this happen? The second “the” is often skipped because of how our eyes move while reading. Our brains prioritize speed and smoothness, filling in the blanks as we read. When your eyes jump from “Paris” to “spring”, the brain might overlook the extra “the” in between. 📝 This illusion shows how our minds sometimes trade accuracy for efficiency. [Source] Did you catch the repetition right away 🤓, or did it take a second glance to spot it 🙈? @languagetrivia#illusion#phenomenon#experiment

Universe Mysteries 🪐

@cosmomyst · Post #188 · 25.08.2025 г., 16:11

🪐 In the galaxy PKS 2014-55, astronomers have discovered a cosmic oddity known as an "X-shaped radio galaxy." This galaxy's energetic jets of particles, powered by a supermassive black hole, create two pairs of huge lobes that form a striking X pattern, suggesting a sudden flip in the black hole's rotation or direction—one of the rarest shapes found among radio galaxies. ✨ #phenomenon⚡#radiogalaxy⚡#jets⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

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