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

Резултати

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

Пребарај: #medicare

当前筛选 #medicare清除筛选
Senator Ted Cruz

@SenTedCruz · Post #1269 · 24.06.2021 г., 15:25

🔻 RT @60PlusAssoc: 60 Plus President @sanuzis said, “On behalf of more than five million senior citizen supporters we applaud Sen @tedcruz for introducing S. 275, the Retirement Freedom Act that will allow individuals to choose to opt out of the #Medicare part A benefit." https://t.co/YU2i7whWK8 June 24, 2021 at 07:52PM via Twitter @SenTedCruz

Hashtags

Trump's Ear

@trumpsear_tg · Post #2334 · 02.04.2026 г., 18:03

Donald Trump bragged that the U.S. is spending so much money on his war in Iran it has no funds to pay for daycare or healthcare. 💰⚔️ The 79-year-old president made the boast during a typically rambling speech while hosting an Easter lunch at the White House on Wednesday. 🦅🍽 “The United States can’t take care of daycare. That has to be up to a state,” Trump said. “We’re a big country. We have 50 states. We have all these other people, we’re fighting wars. We can’t take care of daycare. You’ve got to let a state take care of daycare, and they should pay for it too.” 🏛💼 “Medicaid, Medicare, all these individual things. They can do it on a state basis. You can’t do it on a federal [level]. We have to take care of one thing: military protection—we have to guard the country. But all these little things, all these little scams that have taken place, you have to let states take care of them.” 🎖🛡 #Trump#Medicare 👂More on Trump's Ear ⚠️

Venture Village Wall 🦄

@venturevillagewall · Post #3480 · 19.12.2024 г., 13:57

Summed AI Secures $500K Funding Summed AI has raised $500K in funding to enhance its AI-driven platform that streamlines Medicare sales calls. The innovative technology allows users to access Medicare plan benefit details 90% faster, improving client enrollment and retention processes. For more information, visit Summed AI. #Funding#AI#Medicare#Healthcare

America 🇺🇸 News & Politics

@America · Post #10611 · 06.05.2026 г., 14:14

🏥💸20 MILLION AMERICANS HIT BY HEALTHCARE "SUBSIDY CLIFF" — PREMIUMS DOUBLE OVERNIGHT 🔹 Congress failed to extend enhanced ACA subsidies expiring Dec 31 — families face 100%+ premium hikes starting January 2026 📈 🔹 Medicare Part B premiums jump $17.90/month to $202.90, eating away entire 2.8% Social Security COLA increase 💰 🔹 Social Security taxable earnings cap rises to $184,500 from $176,100 — higher earners pay more into system 📊 🔹 New senior tax deductions passed but millions may drop coverage entirely due to affordability crisis 🚨 Congress left 20 million hanging while pharma lobbies got their wins 😡🔥 #Healthcare#Medicare @america

BadVolf

@badvolfnews · Post #1000 · 29.09.2023 г., 20:56

💥 Social Security and Medicare on the brink of disaster! 💔😢 Trust funds rapidly depleting, retirees in jeopardy 😱 Benefit cuts looming, up to 23% reduction! 💔💸 Healthcare access at risk, hospitals facing delays! 🏥😷 Presidential candidates must address this crisis! 🗳️🤔 Bipartisan solutions needed, time is running out! ⏰🤝 Fiscal commission proposed for comprehensive action! 💪💼 Let's save these vital programs for future generations! 🙏🌍 #SocialSecurity#Medicare#RetirementCrisis#BipartisanSolutions https://www.foxbusiness.com/politics/social-security-trust-fund-path-insolvency Subscribe to @BadVolfNews

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9465 · 03.11.2025 г., 03:27

#The_Barron's 🇺🇸📕[PDF]⬇️ 3 #November2025 #Weekly_Magazines For learning, for free(dom). @backupofmagazines Barron’s says Boeing is back, as new leadership tackles years of crises. A warning on “crypto-treasury” firms shows #Bitcoin risk. #Meta’s AI buildout has flaws, while funds that track #Buffett surge. Don’t count out the #Jobs market; the classic 60/40 portfolio is hot again. Features span medical devices, housing-broker disruption, dividend diversification, and mortgage #REITs. Global angles include Gulf states’ #AI push and Argentina’s reform shot. Columns debate #Fed signals, tech overspending, and Musk’s trillion-dollar gambit, plus strategies to lower #Taxes and a key #Medicare to-do for retirees. #Stocks#Markets#Investing#Boeing#Economy#ETFs