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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #32 · 7 фев.

Скорее всего уже слышали, что складывать строки через + это плохая практика. Падение производительности, и всё такое. Без лишних слов, давайте измерять: from timeit import timeit def t1(): # складываем 10 строк через + из переменной t = 'text' for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t2(): # склеиваем список строк через метод join arr = ['text'] * 10 for _ in range(1000): s = ''.join(arr) def t3(): # складываем через + но не из переменной а непосредственно инлайн объекты for _ in range(1000): s = 'text' + 'text' + 'text' + ... # всего 10 раз Теперь каждую строку склейки запустим по 10М раз >>> timeit(t1, number=10000) 0.21951690399964718 >>> timeit(t2, number=10000) 1.4978306379998685 >>> timeit(t3, number=10000) 0.2213820789993406 Хм, а нам говорили что через "+" это плохо и медленно ))) 😁 Тут стоит учитывать, что речь идёт о склейке множества длинных строк. Давайте изменим условия: def t4(): t = 'text'*100 for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t5(): arr = ['text'*100] * 10 for _ in range(1000): s = ''.join(arr) def t6(): for _ in range(1000): s = 'text'*100 + 'text'*100 + ... # всего 10 раз >>> timeit(t4, number=10000) 12.795130728000004 >>> timeit(t5, number=10000) 2.642637542999182 >>> timeit(t6, number=10000) 0.2184546610005782 Вот, уже другой разговор, сразу видна разница, в среднем в 6 раз. Но погодите, почему последний тест t6() по скорости такой же как и t3()? Ведь строки теперь в 100 раз длиннее! Это вопросы оптимизации кода, какие простые изменения ускоряют или замедляют выполнение программы. Мы столкнулись с примером обхода обращения к переменной. Например, именно так работает директива #define в С++, во время компиляции подставляя значение переменной вместо ссылки на неё. В Python это тоже работает, но часто ли вы сможете встретить такой способ работы со строками? К сожалению, способ почти только теоретический. В целом, тесты показали то, что мы хотели. Делаем выводы самостоятельно. Полный листинг 🌍 #tricks

Резултати

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

Пребарај: #irs

当前筛选 #irs清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #3860 · 13.01.2025 г., 01:00

Congressman Proposes IRS Abolishment Bill US Congressman Buddy Carter has introduced a bill to abolish the IRS, aiming to repeal all income, payroll, estate, and gift taxes. This radical tax reform could have significant implications for taxpayers. Bitcoin price surges to $95,000. #US#IRS#Taxes#Bitcoin#Crypto

Venture Village Wall 🦄

@venturevillagewall · Post #3735 · 28.12.2024 г., 10:00

New IRS Rules for DeFi Brokers Announced The IRS has implemented new rules requiring DeFi brokers to report income from crypto transactions, similar to traditional financial institutions. Market participants will need to collect user transaction data and file Form 1099 starting January 1, 2027. These changes have sparked criticism, with legal experts arguing that the IRS is overstepping its authority. Some believe the incoming Congress might overturn these regulations. Read more: Forklog #US#taxes#DeFi#Crypto#IRS

素材大全

@scdq1 · Post #85981 · 09.01.2026 г., 08:16

#税务#交税#IRS 我的税务顾问打电话告诉我,再过几天2025年Q4(第四季度)的税务要截止了,所以,我登录了我的IRS。补齐了我的税款,2025年总交税金额$38,600。和我预想中的差不多,我以为应该在$50,000。看来我的税务顾问为我省下了不少钱,我应该想想该怎么奖励她😄😁 PS:⚠️下方日期注意一下⚠️ 上方姓名最好也注意一下 交的是预估税 (Estimated Tax Payments)。 什么是预估税? 这通常是为那些没有通过工资自动扣缴(Withholding)的收入所支付的税款。 适用人群: 通常是自雇人士、自由职业者、有大量投资收益(如股票、分红)、租金收入,或者通过工资预扣的税额不足的人。 你也可以说是想起来要税务结算了,结算时间是2026年1月15号

素材大全

@scdq1 · Post #85975 · 09.01.2026 г., 08:16

#税务#交税#IRS 我的税务顾问打电话告诉我,再过几天2025年Q4(第四季度)的税务要截止了,所以,我登录了我的IRS。补齐了我的税款,2025年总交税金额$38,600。和我预想中的差不多,我以为应该在$50,000。看来我的税务顾问为我省下了不少钱,我应该想想该怎么奖励她😄😁 PS:⚠️下方日期注意一下⚠️ 上方姓名最好也注意一下 交的是预估税 (Estimated Tax Payments)。 什么是预估税? 这通常是为那些没有通过工资自动扣缴(Withholding)的收入所支付的税款。 适用人群: 通常是自雇人士、自由职业者、有大量投资收益(如股票、分红)、租金收入,或者通过工资预扣的税额不足的人。 你也可以说是想起来要税务结算了,结算时间是2026年1月15号

Venture Village Wall 🦄

@venturevillagewall · Post #3970 · 24.01.2025 г., 13:00

MicroStrategy Faces Major Tax Implications Starting in 2026, MicroStrategy could incur significant tax liabilities due to new IRS legislation (CAMT); a 15% tax applies to large corporations with annual revenues over $1 billion. MicroStrategy holds $47 billion in assets and has a paper profit of $18 billion. Without an IRS exemption, their Bitcoin strategy could severely impact their balance sheet. For more details, visit ForkLog. #IRS#Tax#MicroStrategy#Bitcoin#Assets#Finance#Crypto#Taxation#Investments#Market VC

Venture Village Wall 🦄

@venturevillagewall · Post #3742 · 29.12.2024 г., 04:00

Major ETH Whale Makes Big Transfers A whale from the Ethereum Genesis Block moves 3,370 ETH ($11.37M) to Kraken and has transferred a total of 48,687 ETH this year, averaging $3,528 per ETH. Remaining balance is 7,594 ETH ($25.72M). Read more. Galaxy Digital's Alex Thorn warns that if the IRS classifies DeFi front-ends as brokers, the DeFi sector may need to comply, restrict US users, or forgo upgrades and profits. Read more. Hyperliquid reports over $1M in daily revenue for the past week. Read more. New proposal includes $USTB, a tokenized fund of U.S. Treasury Bills, as reserves for frxUSD. Read more. #ETH#DeFi#IRS#Crypto#Blockchain#Finance#US#Treasury#Revenue#Investment#Whale#Ethereum#FrxUSD#USTB

Venture Village Wall 🦄

@venturevillagewall · Post #3746 · 29.12.2024 г., 19:00

Traders Gain From Whale Monitoring Insights A new Telegram channel tracks whales and market movements, offering crucial analysis for traders. It focuses on whale wallets, coin charts, and Twitter activity for comprehensive market insights. Recent analysis highlights whale activities, crucial for strategic trading. For more details, visit the channel: Telegram Channel In other news: - Crypto market missed Christmas rally. - Mining bans announced in some Russian regions. - Trump expands 'crypto administration'. - Do Kwon to be extradited to the US. - Community raises concerns over hackers targeting Hyperliquid. Read more at ForkLog: ForkLog Digest #Crypto#Whales#Trading#DeFi#Analysis#MarketMovements#FinTech#IRS#Texas#Blockchain#Trump#Mining#Hackers#Telegram#MMO#Valhalla#NewsDigest#Tech#Finance#Investment