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

Резултати

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

Пребарај: #spotonchain

当前筛选 #spotonchain清除筛选
SpotOnChain | Announcement

@spotonchain · Post #448 · 09.10.2023 г., 02:53

🚨 Five fresh addresses jointly accumulated a massive amount of 46.816M $STORJ (currently worth $23.9M), or 11% of the total supply, from Binance and OKX over the past month. ➡️ Notably, the $STORJ price has surged by more than 106% during the period. All five addresses still hold their $STORJ. ✅ Set alert for $STORJ on our #SpotOnChain platform now and observe their next moves for your long/short position! 👉 More details: https://platform.spotonchain.ai/signal-details/five-fresh-addresses-accumulated-a-massive-amount-of-storj-1000 👉 Fresh $STORJ whales entity: https://platform.spotonchain.ai/entity/1224 👉 Need the beta code? Join our Discord to get one: https://discord.com/invite/Xh7cReej7n

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #429 · 02.10.2023 г., 02:05

🚨 Whales are leaving the plummeting $MKR for the newly pumped $ETH! ✅ By using the filter and sort functions on #SpotOnChain platform, we uncovered 2 whales jointly swapped 1,343 $MKR for 1,158 $ETH ($1.99M) over the past 3 hours: 1. Whale 0x432 swapped 807 $MKR for 690.6 $ETH at $1,479 per $MKR on avg ($1.19M) ~2hrs ago 2. Whale 0x6ce swapped 536.125 $MKR for 467.31 $ETH at $1,492 per $MKR on avg ($800K) ~3hrs ago 👉 More details: https://platform.spotonchain.ai/signal-details/two-whales-swapped-mkr-for-eth-637 👉 If you have any questions, feel free to discuss in our discord group: https://discord.com/invite/Xh7cReej7n

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #407 · 21.09.2023 г., 02:08

🔥🔥$IMX price is up 33% in the past hour, and you can predict it in advance with #SpotOnChain!🔥🔥 👉https://platform.spotonchain.ai/token?name=IMX 1. From CEX and DEX NetFlow #SpotOnChain shows the real-time CEX and DEX netflow, and it is easy to see the negative flow picked up 4 hours ago. It suggests that whales were accumulating $IMX. 2. Smart Money Moves Arrington Capital seems to know something beforehand, they added LP 16 hours ago. They also moved millions of $IMX from their wallet 0x876 to 0x694 via a middle wallet 0xba3 days ago. 3. Beforehand Alert System Our users received all signals before the pump with our smart alert system. More details at: https://x.com/spotonchain/status/1704676366371979340?s=20 If you need the invitation code, please join our Discord community at https://discord.com/invite/Xh7cReej7n

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #406 · 20.09.2023 г., 16:41

🔥🔥$CYBER token is now integrated into #SpotOnChain🔥🔥 👉https://platform.spotonchain.ai/token?name=CYBER Discover how our tool can help you predict the trends of $CYBER: 1. CYBER On-Chain Overview We observe a significant negative netflow from both CEX and DEX, indicating that whales are accumulating CYBER, withdrawing tokens from exchanges, and driving the price up (🔼 11%). 2. Top First-Time Purchases Another signal available on #SpotOnChain is first-time purchases. Fresh wallets show a healthy flow, with our AI bot detecting two major whales accumulating $CYBER before the pump. 3. Smart Alerts, Visualization, and More: With our integration, utilize smart alerts to stay updated on essential on-chain $CYBER signals and explore any wallet using our visualization function. More details at: https://x.com/spotonchain/status/1704535096261492950?s=20 If you need the invitation code, please join our Discord community at https://discord.com/invite/Xh7cReej7n

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #524 · 06.11.2023 г., 02:45

🚨 IOSG Ventures just transferred 1,542 $ETH ($2.9M), 3.95M $1INCH ($1.31M) and 352K $UNI ($1.69M) #Binance. ⚠️ IOSG Ventures still holds 120K $ILV ($7.8M), 19.5M $GEL ($5.56M), 1.74M $MATIC ($1.22M) and more! ✅ Set alerts for IOSG Ventures on #SpotOnChain now so as not to miss important transactions. 👉 More details: https://platform.spotonchain.ai/entity/159

SpotOnChain | Announcement

@spotonchain · Post #581 · 03.12.2023 г., 02:23

🚨 $DYDX ranks 4th in #SpotOnChain's Smart Money Outflow, with a large flow to CEX from whales. Notably, three whales deposited 4.08M $DYDX ($13.9M) to exchanges in the last 12 hours: 1. Whale 0xb0d (likely Amber Group) deposited 2.37M $DYDX ($8.04M, avg price: $3.39) to #Binance ~3hrs ago. - The whale deposited 9.2M $DYDX ($29.8M, avg price: $3.24) to #Binance since the unlock on Dec 1. - Current holding: 3.26M $DYDX ($11.27M), which may be deposited to Binance soon. 2. Whale 0x01a deposited 1.2M $DYDX ($4.09M) to #Kraken at $3.41 ~4hrs ago. - Estimated profit: $274K (+7.19%) in just 2 days. - Current holding: 2.81M $DYDX ($9.71M). 3. CMS Holdings moved 516,023 $DYDX ($1.73M) to #Binance deposit address ~11hrs ago. - Estimated realized profit: $2.66M if selling now. - The VC no longer holds $DYDX on the Ethereum chain. 👉 More details: https://platform.spotonchain.ai/signal-details/whales-deposited-dydx-amid-the-market-rally-9197

SpotOnChain | Announcement

@spotonchain · Post #532 · 09.11.2023 г., 06:12

🚨 $BTC price rose above $36K again today! Note that #US Goverment still holds a large amount of 194,695 $BTC ($7.14B). - Their $BTC value just increased by $208M after the $BTC pumped by 3%+ in the past 24 hours. - They last allegedly sold 8.2K $BTC ($248M) via #Coinbase during the pump last Jul (3 months ago) when the price was ~$30.2K ✅ Set alerts for the US Government entity on #SpotOnChain platform now to stay updated of their next movements! 👉 Entity: https://platform.spotonchain.ai/entity/188

SpotOnChain | Announcement

@spotonchain · Post #965 · 14.08.2024 г., 07:44

🎁🎁 Unlock Big Rewards with Spot On Sentiment, the first on-chain game on Telegram! Introducing Spot On Sentiment, the game where you share on-chain insights and earn rewards with just a swipe. 👉 Free to play 👉 Earn points and seize the $SOCAI airdrop 👉 Get real-time updates on on-chain signals 🎮 Play now and seize the rewards: https://t.me/socai_bot/sentiment?startapp=9b48fc9c0cb2 #spotonchain#SOCAI

SpotOnChain | Announcement

@spotonchain · Post #534 · 10.11.2023 г., 02:05

🎉🎉 FTX debtors may have 391M$ more thanks to $FTT recent pump! ➡️ $FTT surged by 117% due to a potential reboot of FTX crypto exchange ➡️ FTX and Alameda addresses hold ~267M $FTT (76% of the total supply) ➡️ Their $FTT value has jumped from $334M to $726M. As of now, the addresses have yet to move any $FTT out in the recent sell-off. 🔔 Want to be informed of an $FTT activity from FTX and Alameda ASAP? Set alerts for the below entities on SpotOnChain platform now: • FTX entity: https://platform.spotonchain.ai/platform/entity/354 • Alameda entity: https://platform.spotonchain.ai/platform/entity/79 #spotonchain#ftx#alameda

SpotOnChain | Announcement

@spotonchain · Post #427 · 30.09.2023 г., 17:19

🔥🔥DWF Labs started accumulating meme coins #PEPE and #FLOKI ➡️ 121M $PEPE ($100) was withdrawn from Binance to the DWF Labs address an hour ago. Is it a fake signal or a test transaction from the team? ➡️ received 15.8B $FLOKI (~$300K) from Floki dev and deposited them to Binance 8 hours ago Details can be tracked at https://platform.spotonchain.ai/entity/122 Using #spotonchain to set alerts for the DWF Lab transactions and never miss the signals. Spot on chain: spot opportunities, unlock insights.

SpotOnChain | Announcement

@spotonchain · Post #1062 · 31.12.2024 г., 15:34

🎉 Hello, 2025, from SpotOnChain! Thank you for an incredible 2024. Big things are coming this year, including the launch of our AI-powered trading agent and the highly anticipated $SOCAI token. 🚀 Here’s to redefining your crypto journey together in 2025! 🥂 #OnChain#SpotOnChain#SOCAI

SpotOnChain | Announcement

@spotonchain · Post #588 · 07.12.2023 г., 02:25

🚨 $BLUR price is down by ~8% in the past 24 hours. We noticed that #Wintermute and #MandalaCapital deposited 5.61M $BLUR ($2.83M) to #OKX in the past 14 hours. 1. Wintermute Trading deposited 2.85M $BLUR ($1.44M, price: $0.51) ~ 14hrs ago. 2. Mandala Capital unstaked and deposited 2.76M $BLUR ($1.39M, price: $0.5) ~ 7hrs ago, realizing a slight estimated loss of $77K (-5.21%) from $BLUR. ⚠️ Moreover, #SpotOnChain shows real-time CEX netflow. It is easy to see many strong positive spikes in the past 24 hours, indicating that more whales were also depositing $BLUR away! 👉 More details: https://platform.spotonchain.ai/signal-details/two-institutions-moved-blur-to-okx-10353