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

Резултати

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

Пребарај: #arctic

当前筛选 #arctic清除筛选
RTDocumentary

@rtdocumentary · Post #467 · 27.02.2022 г., 10:20

#video#Arctic On the 80th parallel north, there’s not much life. It’s a vast icy desert with the occasional polar bear in the distance. Nevertheless, Russian researchers have been travelling nearly to the top of the world since 1937 to collect data from the Arctic region. They used to land on an old thick ice floe to live and work on it for almost a year. Then, they slowly drifted across the Arctic ocean. But warmer temperatures mean the ice cover is melting rapidly. So expeditions had to be evacuated after the ice gave way under their drifting stations. They’ve come up with the ‘ship and ice’ polar station when researchers work on the ice but can retreat to the safety of a vessel. We joined an expedition aboard the Akademik Tryoshnikov. Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #203 · 06.09.2021 г., 14:00

Have you ever wanted to go to the Arctic? #video#Arctic RT’s Konstantin Rozhkov travelled to the North Pole on a giant Russian nuclear-powered icebreaker to film the fascinating landscapes of one of the most beautiful but one of the riskiest places on our planet. Swimming in the icy waters of the Arctic Ocean and meeting a polar bear are just a few thrilling experiences he had there! However, a journey to the North Pole is not only about fun and beautiful views. It’s also about strong swell, extreme weather conditions, the polar day insomnia, and the complete absence of any communication services. How did Konstantin and his crew deal with their hardships? Watch North Pole: Inside a Russian Nuclear Icebreaker to find out! Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #591 · 09.04.2022 г., 15:05

#photo#Arctic Did you know that at up to three meters, Arctic ice is so thick that ships can’t pass even following an icebreaker? That’s why icebreakers like Taymyr have to pull them with steel tow lines. RT Documentary’s Natalya Kadyrova is on board the Taymyr icebreaker once again. Taymyr is giving her crew a ride to another vessel, Sibir, in the Kara Sea. The captain of Taymyr is Natalya’s old friend. When she first filmed in the Arctic nine years ago, he was chief mate. ‘It’s funny to find yourself again on this charming ship after so many years and so many vessels,’ Natalya says. ‘Not far from the icebreaker are fishermen. Fishing for smelt is underway - they can’t be disturbed. Plus, they’re used to icebreakers. There are many vessels these days. Apparently, there will be more soon.’ For more about the icebreakers in the Arctic, watch our documentary, Seven Seas of Ice. Follow: https://t.me/rtdocumentary

Amazing Geography 🌍

@amazingeo · Post #191 · 07.09.2025 г., 03:12

🌍 The Canadian Arctic Archipelago includes over 36,000 islands, making it one of the most complex island groups on Earth. These remote lands are mostly uninhabited and covered by ice much of the year. ✨ #islands⚡#arctic⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1271 · 03.02.2026 г., 22:11

🌎 Arctic woolly bear caterpillars survive harsh winters by freezing solid, stopping their heart and body fluids. They produce a natural antifreeze called glycerol to avoid ice damage. Some individuals take up to 14 years to mature into moths through repeated freeze-thaw cycles. ✨ #animals⚡#adaptation⚡#arctic 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #456 · 29.07.2025 г., 13:22

🌎 In the icy landscapes of Greenland, musk oxen survive Arctic winters thanks to an incredibly dense undercoat called qiviut, which is eight times warmer than sheep’s wool. This soft fiber insulates these shaggy animals so well that snow won't melt on their backs, even in the harshest cold. ✨ #mammals⚡#adaptation⚡#arctic 👉subscribe Interesting Planet

Interesting Planet 🌍

@interesting_planet_facts · Post #1216 · 12.01.2026 г., 18:11

🌎 In 1845, Sir John Franklin led two ships, HMS Erebus and HMS Terror, to chart the Northwest Passage. All 129 crew vanished. Evidence from later searches, including abandoned camps and preserved bodies, showed the crew faced lead poisoning, starvation, and harsh Arctic conditions. The ships’ wrecks were only rediscovered in 2014 and 2016. ✨ #exploration⚡#arctic⚡#history 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #551 · 13.08.2025 г., 03:22

🌎 Lightning rarely strikes the North Pole, but climate change is making Arctic storms more common. Recent years have seen record-breaking lightning outbreaks near the pole’s icy expanse. ✨ #climate⚡#lightning⚡#arctic 👉subscribe Interesting Planet

Политическая П

@politpe · Post #19563 · 27.12.2025 г., 12:04

Трамп вернулся к теме Гренландии Символично, что и начинался этот и без того насыщенный год с резонансных заявлений американского президента о необходимости присоединения острова к США. И вот на этой неделе Трамп назначил спецпосланника США по Гренландии, тем самым поставив этот вопрос в один ряд с такими внешнеполитическими приоритетами, как Ближний Восток или Украина. Что касается самого спецпосланника, им стал губернатор Луизианы Джефф Лэндри. Недавно ему исполнилось 55, он имеет степень в области экологических наук и бизнеса, а также степень юриста. Его политическая платформа традиционно консервативна, с акцентом на поддержку энергетической отрасли, особенно нефти и газа. Биография Джеффа Лэндри не связана с Арктическим регионом, да и руководит он южным штатом. Но, как известно, кадровую политику Белого дома сегодня определяет личная преданность Трампу. За вихрем информационных поводов, которые в этом году генерировал американский президент, могло показаться, что тема присоединения Гренландии плавно сошла на нет. Но нет. После назначения Лэндри поблагодарил Трампа и подтвердил намерение сделать Гренландию частью Соединенных Штатов. «Речь идет о серьезных планах с американской стороны в отношении Гренландии. Эти планы имеют давние исторические корни. И очевидно, что США будут и дальше на системной основе продвигать свои геостратегические, военно-политические и экономические интересы в Арктике», – говорил нам В.В. Путин на арктическом форуме в Мурманске. Здесь также хотелось бы отметить, что вся история с Гренландией укладывается в логику новой стратегии национальной безопасности США, предполагающей укрепление позиций Штатов в Западном полушарии. #Arctic#Greenland#Trump @semenenkol

Amazing Geography 🌍

@amazingeo · Post #337 · 05.10.2025 г., 20:31

🌍 In 2019, a remote underwater mountain range called the Gakkel Ridge was explored beneath Arctic ice. Scientists found hydrothermal vents in this frigid zone, revealing unknown deep-sea ecosystems. ✨ #exploration⚡#ocean⚡#Arctic⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #611 · 03.02.2026 г., 20:31

🌍 The Lena River in Siberia creates the largest natural river delta in the Arctic, spreading into thousands of channels and wetlands that provide vital nesting grounds for millions of migratory birds. ✨ #rivers⚡#wetlands⚡#Arctic⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #119 · 26.08.2025 г., 09:12

🌍 The Svalbard Archipelago, north of mainland Norway, is the northernmost year-round inhabited place on Earth. It’s so remote that polar bears outnumber people here during much of the year. ✨ #archipelago⚡#islands⚡#Arctic⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

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