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

Резултати

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

Пребарај: #qnt

当前筛选 #qnt清除筛选
Pro Analysis

@proanalysistrader · Post #28395 · 17.01.2025 г., 14:54

#QNT/USDT analysis : #QNT is currently in a correction phase. Price is expected to decline further and test the previous swing high support level before continuing its bullish momentum. It’s advisable to wait for the price to retest the previously respected zone for a short entry, as the price is anticipated to decline and test lower levels. TF : 1D Entry : $126 Target : $81 SL : $156

Hashtags

Pro Analysis

@proanalysistrader · Post #27982 · 03.10.2024 г., 14:55

#QNT/USDT analysis : #QNT is currently in a downtrend, trading below the 200 EMA. The price is likely to retrace and test the resistance zone before continuing its bearish momentum. The current swing low is expected to be tested. TF : 1H Entry : $70.4 Target : $66.5 SL : $72.5

Hashtags

American Crypto©

@americancryptotrading · Post #27432 · 08.11.2025 г., 10:12

🇺🇸#QNT/USDT is currently trading within the symmetricaltriangle formation on the weekly chart💁‍♂️ Breakout soon🚀 American Crypto©

Hashtags

Binance crypto champions

@binancecryptochampions · Post #2531 · 22.07.2025 г., 13:11

✴️Free signal-Futures ✴️ ⚡️⚡️#QNT/USDT⚡️⚡️ Exchanges: Binance Futures, Bybit USDT Signal Type: Regular (Long) Leverage: Cross (20x) Margin: 2.0% Entry Targets: 1) 128.80 2) 131.50 Take-Profit Targets: 1) 133 2) 135 3) 141 Stop Targets: 1) 127.60 🍁 Published by: @Trading_exp🍁 Join_vip: @Crypto_Futures_Spot_Payment_bot

Hashtags

Crypto

@signal_bitcoins · Post #2433 · 20.01.2024 г., 10:40

#QNT broken down the trendline on 12H Time frame,we expect another dump after pullback,more correction incoming..👀 ❄️@signals_bitcoin_crypto❄️ ❄️@Shadow_support0o❄️

Hashtags

Crypto

@signal_bitcoins · Post #1498 · 17.09.2023 г., 18:16

📊#QNT price break below the $97 major support area. The last hope is the $90 support level; if the price breaks below this, we see a heavy selloff. Price needs to reclaim the $100 level to gain some positive movement. It is better to wait for some time to open new trades.⌛️ ❄️@signals_bitcoin_crypto❄️ ❄️@Shadow_support0o❄️

Hashtags

Mexc Crypto Signals Pumps Trading Kucoin

@mexc_signals_pumps_trading · Post #974 · 20.04.2024 г., 16:53

#QNT/USDT UPDATE: #QNT is now trading around 106$. #QNT is moving inside a symmetrical triangle on 4hr time frame. So the Possible scenarios are If the price pumps up and breaks out of the triangle, we can see bullish momentum in it. Otherwise If the price dumps and breaks down of the triangle, we can see bearish momentum in it. Stay tuned with us for further updates✔️

Hashtags

12
ПретходнаСтраница 1 од 2Следна