TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #76 · 27 апр.

Ранее я делал серию постов про битовые операторы. Вот вам ещё один наглядный пример как это используется в Python в модуле re. Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки. pattern = re.compile(r"(\w+)+") words = pattern.search(text, re.DOTALL) А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как. pattern.search(text, re.DOTALL | re.VERBOSE) А теперь смотрим исходники, что находится в этих атрибутах? Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево. >>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]: >>> print(bin(n)) 0b1 0b10 0b100 0b1000 0b10000 0b100000 0b1000000 0b10000000 0b100000000 Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули: 000000001 000000010 000000100 000001000 000010000 000100000 001000000 010000000 100000000 Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45 В общем, это пример применения побитовых операций в самом Python. Теперь вы знаете Python еще немного лучше) #tricks#regex#libs

Резултати

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

Пребарај: #may2023

当前筛选 #may2023清除筛选
The Open Platform

@topco · Post #62 · 06.06.2023 г., 09:02

DeFi: May headlines - Curve Finance Deploys Decentralized Stablecoin on Ethereum - crvUSD is an over-collateralized stablecoin backed by assets like USDC, Ethereum, liquid staking derivatives like Frax’s sfrxETH, and liquidity provision tokens of stablecoin pools (source) - Cardano DeFi Total Value Locked Hits 400M ADA Milestone - in US Dollar terms, DeFi activities on Cardano had grown consistently since the start of the year when the TVL was just around $50 million (source) - Tenet, LayerZero partner to drive cross-chain liquid staking adoption - Tenet’s network allows users to create projects and tokens which will now be integrated with LayerZero technology. The interoperability opens up users to the broader DeFi ecosystem across a variety of smart contract blockchains (source) - DeFi space braces for possible increase in DAI savings rate from 1% to 3.3% - MakerDAO’s proposal to raise the DSR follows a series of rate hikes imposed by the U.S (source) - Uniswap to Launch on Polkadot via Moonbeam Parachain - the decision follows a near-unanimous governance vote first championed by Blockchain at Berkeley, a student educational group linked to UC Berkeley, and brought back to life by Blockchain at Michigan, another educational organization (source) - DeFi Project Bancor Hit With Lawsuit Over Impermanent Loss Protection Promises - investors claim promises fell short, adding that Bancor’s DAO was centralized and its liquidity pools operated as unregistered securities (source) #DeFi#May2023#trends

The Open Platform

@topco · Post #66 · 12.06.2023 г., 09:02

Metaverse: May headlines - Alibaba Cloud Builds Metaverse Launchpad on Avalanche named Cloudverse, the launchpad is designed to provide an end-to-end platform for companies to customize and maintain their metaverse spaces (source) - Top metaverse property investments suffer massive losses - Report: Popular metaverse properties, such as Otherdeeds, The Sandbox, Decentraland, Somnium and Voxels, have all depreciated in value over the past year (source) - Chinese city releases policy draft for metaverse industry development - the policies include a series of cash benefits to attract metaverse-related companies to set up shop in the city (source) - BuzzAR and Cypher Capital team up for Metaverse project - the partnership will allow the companies to leverage proprietary generative AI technologies on its Metaport (source) #metaverse#trends#May2023

The Open Platform

@topco · Post #64 · 08.06.2023 г., 09:01

Crypto Payment Solutions: May headlines - Ethereum: Payment Giant Visa Deploys First Paymaster Smart Contract on ETH Testnet - on March 1, 2023, ERC-4337 was rolled out to the Ethereum mainnet, adding the ability for smart contracts to transact on behalf of the user (source) - Tether and Strike have partnered to make USDT easily available for transactions via Strike's payment platform, the payment app is in expansion mode and has announced the move of its headquarters out of the United States (source) - Stripe Rolls Out New Fiat-to-Crypto Onramp To Make Digital Asset Purchases More Convenient - Web3 companies can now direct their US-based customers to the link without the need for any access code (source) - Transak Raises $20M - the startup offers on- and off-ramps that could make it easier for new users to interact with Web3 project (source) - Argentina Bans Payment Apps From Offering Bitcoin to Customers - the central bank said Thursday that payment platforms cannot offer crypto trading services to their customers (source) #trends#May2023#paymentsolutions

The Open Platform

@topco · Post #63 · 07.06.2023 г., 09:02

Wallets: May headlines - Ledger Crypto Wallet Under Fire Over Seed Phrase Recovery Service - in a nutshell, it’s an ID-based key recovery service that backs up users’ seed phrases. To use the service, users must provide a passport or national identity card to confirm their identity. While this service requires users to opt-in and pay a $9.99 monthly fee, some are concerned that this could even pose a security risk for those who don't opt in (source). - PayPal Ventures Leads $52M Round for Crypto Firm Magic - the startup offers non-custodial wallet infrastructure for an enterprise client list that includes Macy’s and Mattel (source) - Decentralized Wallet Developer Odsy Network Raises $7.5M at $250M Valuation - the funding round was led by Blockchange Ventures and included participation from Rubik Ventures, Node Capital and FalconX among others (source) - Openfort Raises $3 Million for 'Frictionless' Web3 Gaming Wallet - Openfort is building infrastructure for game developers and aims to reduce the number of times gamers have to engage with the blockchain (source) - Crypto Storage Firm Qredo's Revamped Self-Custody Wallet Goes Live - The New Qredo remains aimed at the institutional crypto market, but now it's low-cost and open to anyone, says COO Josh Goodbody (source) #trends#wallet#May2023