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

Резултати

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

Пребарај: #awareness

当前筛选 #awareness清除筛选
Compliance Hub Association

@hub_compliance · Post #292 · 27.03.2024 г., 19:23

Наш член Compliance Hub - Рустам Ахметов в рамках образовательной сессии C5+1 Youth Council и American University of Central Asia поделиться с молодыми экспертами полезной информацией по теме "Finances for Youth". #compliance#awareness

EKOLOG.UZ| ENG

@ekologuzenglish · Post #12108 · 28.03.2026 г., 10:01

#GreenSchool #awareness Ismoiljon Qosimov, one of the active members of the “Green School” Council of the Fergana region under the Ecological Public Association, organized an awareness event in the meeting hall of the Youth Affairs Agency. During the event, special attention was paid to improving environmental culture, protecting the environment, and widely promoting “green” initiatives among young people. Participants were provided with detailed information about environmental issues, their solutions, and the responsibility of every individual in this regard. Around 50 participants actively took part in the meeting, sharing their opinions and suggestions on the topic. ☘️Read the latest environmental news on the @ekologuz page. Follow us and send your suggestions and wishes via @eklguz_bot Instagram | Facebook | Twitter | Sayt | Youtube.

Reuters: World

@reutersworldchannel · Post #149259 · 12.10.2021 г., 16:52

Stigma-fighting breast cancer van hits Gaza streets Health activists have launched a campaign to raise awareness and fight the stigma associated with breast cancer in Gaza. #News#Reuters#Gaza#breastcancer#awareness Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40866 · 27.03.2026 г., 19:33

Albinism: a genetic condition that reduces or stops the body's melanin production, the pigment that gives color to skin, hair, & eyes. Albino people often have very light skin, hair, and eye color. It can also affect vision, causing problems like poor sight and light sensitivity. Most people with albinism have blue, hazel, green, or light brown eyes, depending on the amount of melanin pigmentation. Some may appear to have red or violet eyes since the lack of melanin allows underlying blood vessels to show. Their skin is more sensitive to the sun, they burn easily and have a higher risk of skin damage. Albinism is present from birth and is inherited through genes. Most have normal health and lifespan with proper care. But many face social challenges like persecution, stigma, and discrimination in different parts of the world. 🧬☀️👁️ [Read more1] [Read more2] [Read more3] [Read more4] @googlefactss #Albinism#Genetics#Awareness#Inclusion If you have ideas or feedback contact us: @Googlefactss_Feedback_bot

MessageInABottle

@mib_messageinabottle · Post #6885 · 22.05.2024 г., 22:12

🇺🇸🇮🇱🇵🇸Lara Friedman on the #Antisemitism#Awareness#Act that is currently being passed, which will enshrine the #IHRA definition and examples into law. "This is an effort to define antisemitism to not only include criticism of #Israel, but to use this as a weapon against #Palestinian rights activism". @MostMoralArmy

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40704 · 26.02.2026 г., 06:00

Adults in some countries like for example Belgium and the Netherlands are in organ donor registers. Many do not actively choose, so they are listed as “no objection.” Around half are donors. Some actively say yes, some say no. Young adults often take no active choice and are donors by default. Fun fact, there is no age limit for organ donation. The oldest donor was 95 years old. 🫀📝🌍 [Read more 1] [Read more 2] [Related poll] @googlefactss #OrganDonation#Health#DonorRegister#MedicalFacts#Awareness#YouthHealth