@digitalgentop · Post #69 · 22.05.2024 г., 05:45
⚡️🇺🇸🇨🇳⚡️President Joe Biden blocks Chinese-backed cryptocurrency mining firm from owning land near a Wyoming nuclear missile base. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
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
Пребарај: #bitcoincommunity
@digitalgentop · Post #69 · 22.05.2024 г., 05:45
⚡️🇺🇸🇨🇳⚡️President Joe Biden blocks Chinese-backed cryptocurrency mining firm from owning land near a Wyoming nuclear missile base. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #68 · 22.05.2024 г., 05:32
⚡️💥CFTC issues order against crypto prime brokerage firm "Falcon Labs" for illegally providing 🇺🇸 U.S. customers access to digital asset derivatives trading platforms #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #67 · 22.05.2024 г., 05:16
☄️🥇🕯Some MtGox lenders stated that the official website form has recently been updated, including the expected number of tokens to be withdrawn (BTC BCH Yen) and payment status. Mt Gox is expected to distribute its assets of 142,000 BTC, 143,000 BCH and 69 billion yen to creditors by October 31, 2024. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #66 · 22.05.2024 г., 04:44
⚡️👀💵A Dutch court found Tornado Cash developer Alexey Pertsev guilty of laundering $1.2 billion - he was involved in 36 illegal transactions, one of which was related to the hacking of the Ronin blockchain bridge of the Axie Infinity game in 2022. Lawyers have two weeks to file an appeal. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #65 · 22.05.2024 г., 04:31
☄️🇦🇪 Tether is expanding in the UAE — a partnership agreement has been signed with RAK DAO. The cooperation is aimed at introducing blockchain technologies, crypto-payments and developing educational initiatives in Ras al-Khaimah (UAE). RAK DAO is the first free economic zone focused on crypto companies. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #64 · 22.05.2024 г., 04:01
⚡️✨GameStop $GME and AMC Entertainment $AMC short sellers have lost over 💵5 billion in the last 2 days. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #63 · 22.05.2024 г., 03:44
⚡️“The growing national debt and excessive spending by the US government could lead to financial disaster as early as 2025,” - the former head of the World Bank.🌐🕯 #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #62 · 22.05.2024 г., 03:41
👀⚡️Arkham analysts have identified the wallets of celebrities with more than 1 million Twitter followers who have invested in cryptocurrency : 1️⃣ Donald Trump owns the largest crypto portfolio, estimated at approximately 💵7 million . 2️⃣ Justin Bieber holds 💵450,000 worth of digital assets - 146 ETH and 12,136 APE, as well as several NFTs 🔵 3️⃣ Brazilian football player Neymar keeps about 💵55,000 in crypto . 4️⃣ Actors Jimmy Fallon and Kevin Hart hold $112,000 and 💵39,800 in crypto, respectively. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #61 · 22.05.2024 г., 03:30
☄️🇩🇪 Question for 💸75,000 in the German version “Who wants to become a millionaire?” 💰The first country in the world to accept Bitcoin as legal tender? #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #60 · 22.05.2024 г., 03:15
⚡️🇸🇻 El Salvador mines 474 Bitcoin worth 💵29 million using its volcano-fueled geothermal power plant. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #59 · 22.05.2024 г., 03:02
⚡️🔖Consensys introduced Smart Transactions - a feature for Metamask users. Transactions will be confidential until confirmed online, and bots will not be able to read them or send their own with advantage. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #58 · 22.05.2024 г., 02:46
☄️🔵Bloomberg's chief ETF analyst Eric Balchunas believes that based on the behavior, the SEC considers ETH a security, and that the likelihood of approval of a spot ETH-ETF is now almost zero. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity