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

Резултати

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

Пребарај: #insidertrading

当前筛选 #insidertrading清除筛选
Trump's Ear

@trumpsear_tg · Post #2410 · 24.04.2026 г., 18:03

🇺🇸US soldier arrested for betting on Maduro’s capture — won over $400 000💰 A U.S. Army Special Forces master sergeant, Gannon Ken Van Dyke, has been arrested and charged after allegedly using classified military information to place bets on an online prediction market and win more than $400 000 based on the outcome of a covert operation that captured Venezuelan president Nicolás Maduro. Van Dyke, who was involved in Operation Absolute Resolve — the U.S. military mission that led to Maduro’s capture on January 3 — reportedly placed about 13 bets on the platform Polymarket, wagering that Maduro would be removed from power. Prosecutors say he used nonpublic knowledge of the operation to make strategic trades that paid off once the raid became public. Federal authorities have indicted him on multiple counts, including unlawful use of confidential information for personal gain, commodities fraud, wire fraud, and illegal use of classified data. Van Dyke allegedly tried to conceal his identity and the proceeds by using foreign cryptocurrency accounts and requesting deletion of his Polymarket account after the operation was announced. Officials and lawmakers have condemned the case as a serious breach of trust and a form of insider trading in prediction markets, highlighting concerns about the misuse of secret information for profit. #Military#DOJ#InsiderTrading 👂More on Trump's Ear ⚠️

Quiver Quantitative | 𝕏 You can track Cantor Fitzgerald's stock portfolio on Quiver: https://www.quiverquant.com/institutions/CANTOR%20FITZGERALD,%20L.%20P./ ~ ₿izFeed#⃣:#stockmarketdata#stockmarketnews#insidertrading

Quiver Quantitative | 𝕏 BREAKING: Cantor Fitzgerald, run by the children of Commerce Secretary Howard Lutnick, just filed a portfolio update. They bought up huge amounts of Bitcoin, Trump Media stock, and stock in the Chinese company Alibaba. Full portfolio below. ~ ₿izFeed#⃣:#stockmarketdata#stockmarketnews#insidertrading

‌Quiver Quantitative | 𝕏 BREAKING: Michael Burry, of "The Big Short" fame, just filed a portfolio update. He added: - UnitedHealth, $UNH - Lululemon, $LULU - Bruker, $BRKR - Regeneron, $REGN - MercadoLibre, $MELI Track his full portfolio on Quiver. ~ ₿izFeed#⃣:#stockmarketdata#stockmarketnews#insidertrading

‌Quiver Quantitative | 𝕏 BREAKING: Warren Buffet just filed a portfolio update. He added: - UnitedHealth, $UNH - Nucor, $NUE - Lennar, $LEN - DR Horton, $DHI - Lamar, $LAMR - Allegion, $ALLE Track his full portfolio on Quiver. ~ ₿izFeed#⃣:#stockmarketdata#stockmarketnews#insidertrading

‌Quiver Quantitative | 𝕏 BREAKING: We just received new data on Senator Dave McCormick's portfolio. He has up to $5M in Bitcoin, $IBIT. He also has to $1M in Ethereum, $ETHW. McCormick sits on the Senate Subcommittee on Digital Assets. Full portfolio up on Quiver. ~ ₿izFeed#⃣:#stockmarketdata#stockmarketnews#insidertrading

123•••56
ПретходнаСтраница 1 од 6Следна