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

Резултати

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

Пребарај: #scammers

当前筛选 #scammers清除筛选
TONlines – News

@tonlines · Post #6994 · 30.04.2025 г., 16:58

⚡️JetTon Alerts: Beware of Scammers! #JetTon#scammers JetTon Games RU warns users about impostors pretending to be JetTon employees. These scammers falsely promise benefits such as doubling deposits and providing platform access for a fee. JetTon emphasizes that official employees never reach out first and access to their services is free. Source: link @tonlines

☎️ Phoneword

@Morgan · Post #309 · 02.10.2023 г., 05:06

💠Important to detect #Scammers When you open the profile, keep your finger on the small photo, like Telegram x, the pictures of the side will be shown with the upload date. One of the most important things to identify a fraudster is the upload date of his photos. If you see 10 photos uploaded in a day or two, you know that the new account is a scammer. Because the fraudster can't scam a one-year account and then get blocked with 4 reports... This is a simple and very important way to detect scammers. 💠#Scammer 7⃣2⃣2⃣6⃣6⃣3⃣7⃣ 👇 🌐en.wikipedia.org/wiki/Phoneword 📡@Phoneword

TONlines – News

@tonlines · Post #7167 · 12.05.2025 г., 10:57

Tonnel Network Warns Against Buying B-Day Candle #scammers#B-DayCandle Tonnel Network advises against purchasing the B-Day Candle, as issues are escalating daily. Previously, scammers have exploited refund methods, making it crucial for buyers to remain cautious. Source: link @tonlines

Hashtags

International News

@intnewsagency · Post #9385 · 26.04.2026 г., 15:36

Beware of Scammers Posing as Moscow Clinic Staff The Moscow Department of Health warns about scammers calling as clinic employees, asking for passport details, SNILS, and SMS codes. Officials emphasize that clinic staff never request such information. Sharing these details can lead to hacking of your Gosuslugi account. Stay vigilant and never disclose personal data to strangers. #Moscow#Scammers#Health#Safety The main news of Russia and the world ishere.

Venture Village Wall 🦄

@venturevillagewall · Post #3853 · 12.01.2025 г., 04:00

Whale Alerts and Hacked Accounts Update A study by Presto Research shows that large exchange deposits have weak predictive power for price declines, while VC and MM deposits offer slightly better, yet still limited, effectiveness as trading signals. In related news, Foresight Ventures’ X account was hacked, spreading fake AI crypto news, following a similar incident with Litecoin’s account promoting fraudulent tokens. Additionally, the newly launched AICC has reached a market cap of over $130 million, but faces scrutiny over its lack of transparency. Also, Morpho markets have capped positions eligible for migration with deprecated rewards for old markets. Presto ResearchAICC DashboardUsual Update #WhaleAlerts#Crypto#AI#Litecoin#ForesightVentures#AICC#MarketCap#TradingSignals#MorphoMarkets#Security#Hacking#Transparency#DeFi#MM#VC#Blockchain#DAOs#Scammers#Influencers