TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #205 · 22 јан.

Как работает функция reload()? Эта функция нужна для того, чтобы перезагрузить изменившийся код из py-файла без рестарта интерпретатора. Дело в том, что любой импортированный модуль при повторном импорте не будет перечитывать файл. Функция импорта вернёт уже загруженный в память объект модуля. Чтобы обновить код, нужно либо перезапустить всю программу, либо использовать функцию reload() from importlib import reload reload(my_module) 🔸 Функция reload() принимает в качестве аргумента только объект модуля или пакета. Она не может перезагрузить класс или функцию. Только весь файл целиком! 🔸 Перезагрузка пакета перезагрузит только его файл __init__.py, если он есть. Но не вложенные модули. 🔸Она не может перезагрузить ранее не импортированный модуль. 🔸При вызове функция reload() перечитывает и перекомпилирует код в файле, создавая новые объекты. После создания новых объектов перезаписывается ранее созданный неймспейс этого модуля. Это значит, что если где-то этот модуль импортирован через import и обращение к атрибутам происходит через неймспейс (имя) модуля, то такие атрибуты обновятся. Если какие-либо объекты из этого модуля импортированы через from то они будут ссылаться на старые объекты. Напишем простой модуль # mymodule.py x = 1 Теперь импортируем модуль и отдельно переменную х из модуля >>> import mymodule >>> from mymodule import x >>> print(mymodule.x) 1 >>> print(x) 1 Не перезапуская интерпретатор вносим изменения в модуль # mymodule.py x = 2 Делаем перезагрузку модуля и проверяем х ещё раз >>> reload(mymodule) >>> print(mymodule.x) 2 >>> print(x) 1 То же самое будет если присвоить любой объект переменной (даже словарь или список) Повторный импорт обновляет значение >>> from mymodule import x >>> print(x) 2 🔸Созданные инстансы классов не обновятся после перезагрузки модуля. Их придётся пересоздать. #tricks#basic

Резултати

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

Пребарај: #digitalwarfare

当前筛选 #digitalwarfare清除筛选
Moscow Photographer

@moscowphotog · Post #2359 · 20.11.2025 г., 00:02

#RussiaUpClose#Censorship#DigitalWarfare In this episode of I’ll Tell You What, Eddie Gonzales — former Texas law enforcement officer and co-host of Russia Up Close — exposes the new censorship machine: the Information-Industrial Complex. The truth is simple: If they can censor anyone… they can censor you. Russia Up Close is a show that brings Russians and Westerners into direct, honest conversation. Its goal is to break stereotypes, building a two way bridge between Russia and the West, and offer a grounded, human look at life inside Russia through real voices and real stories. ____ Please Follow Us on Our Platforms: ➡️X: https://x.com/russiaupclose ➡️YouTube: https://www.youtube.com/@ruclose ➡️Telegram: https://t.me/RussiaUpClose ➡️VK: https://vk.com/russiaupclose ➡️RuTube: https://rutube.ru/u/russiaupclose ➡️Yandex: https://dzen.ru/russiaupclose ➡️MAX: https://max.ru/join/fp1u2YfMAlbbS65bgK87EvVKEgD9Z4pjmi71tthNv9o ➡️Our Website: https://www.RussiaUpClose.ru For Advertising Inquiries: [email protected] ____ The Hosts Jozef A. Schutzman - IT Executive and Father of 8 children who moved to Russia from the United States to build a new life for his family and suddenly found himself in the epicenter of a challenging information struggle. He lives in Moscow with his family. He brings a unique cross-cultural perspective, making complex topics accessible to Western audiences. Eddie Gonzales - A Law Enforcement Officer from Texas, also known as the Moscow Photographer, is a respected visual storyteller with deep personal insight into Russian culture. His grounded, straight-talk perspective brings clarity to global political conversations. He believes real understanding comes from honest, unfiltered dialogue between people who rarely get to hear each other directly. ____ Our audience includes Western viewers seeking an honest look at Russia, Russians curious about how their country is seen abroad, and anyone interested in cross-cultural understanding. We invite viewers to join the conversation, challenge assumptions, and become part of a community that values direct dialogue over media filters. ____ Russia Up Close aims to expand into a major media community featuring long-form interviews, weekly segments, field reporting, and community-driven storytelling. Our long-term vision is to become the premier space where Russians and Westerners meet, speak openly, and rebuild understanding. https://youtu.be/h1Re55NRDww

​NO Kings ​🚫👑

@No_king_No_King · Post #166 · 12.04.2026 г., 09:40

WHY IRAN IS USING LEGO VIDEOS... 00 And what the media is saying about it. This isn't random. It's not just "funny animation." It's strategy. Why LEGO-style? Simple visuals = easier to understand globally No language barrier = reaches millions instantly Looks harmless... but carries serious messaging Perfect for Tik Tok, Reels, and viral sharing In short: It turns geopolitics into something people will actually WATCH. This is what analysts call: modern information warfare Where memes, music, and animation = influence. What outlets like CNN are pointing out: Coverage highlights how these videos are part of a larger digital propaganda ecosystem - using Al visuals and storytelling to shape narratives online. They're not targeting just one country... They're targeting global audiences scrolling on their phones. And that's why it works: You're not watching "news" You're watching a story And stories spread faster than facts. Real question: Is this just creative content... or a new kind of influence campaign? Drop your take If you see what's happening Share before everyone catches on #Iran#aiart #digitalwarfare #geopolitics #viralvideo ✈️t.me/No_king_No_King