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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #239 · 3 мај

Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML. Из плюсов такого подхода стоит отметить вот что: 🔸 готовый, повсеместно используемый и поддерживаемый формат 🔸 простой и понятный файл, удобочитаемый для человека 🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек Но есть и минусы 🔹 затраты времени при записи файла (кодирование данных в нужный формат строки) 🔹 затраты времени при чтении файла (декодирование данных в Python объекты) 🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...) 🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда) 🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи. Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳. 🔸 очень быстрая запись 🔸 чтение значительно быстрей чем JSON, YAML итд 🔸 размер файла значительно меньше, так как нет разметки 🔸 можно записывать данные по мере поступления не загружая всё в память 🔸 можно извлечь любую часть данных независимо Из минусов 🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата) 🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию. 🔹 не так-то просто создать такой файл без специальной библиотеки В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии. (Это не означает что нельзя записать данные разного типа, просто это будет не так удобно) Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого f15d cd29 a564 4578 ... 09e2 9bc4 a696 1253 ... 84e9 4de1 3b23 c24a ... 2534 5161 28e0 709d ... ... Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла. К чему это я? Читайте в следующем посте... #tricks#basic

Резултати

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

Пребарај: #november2022

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

@topco · Post #20 · 28.12.2022 г., 08:38

DeFi: key November headlines: - Multiple exchanges and lenders suspended withdrawals following the turmoil surrounding FTX: crypto lenders Genesis (source), SALT (source), BlockFi (source), exchange AAX (source) - Aave and Compound froze market and capped loans to mitigate risks after an attempted short squeeze that happened in November (source) - Value locked in DeFi is at its lowest point since March 2021: TVL has dropped to $43 billion losing more than $22 billion in 36 days - Solana saw more than $700M in value wiped out after FTX collapse: lending and borrowing platform Solend took the biggest hit both in percentage and value terms, losing $250 million (89%) of its value (source) - Ether staking yields are at ATH: since the Merge the yields jumped up to 25% (source) - Yahoo Finance released a new industry report: DeFi is expected to reach $125.1 billion by 2028, rising at 42.8% CAGR (source) - JPMorgan executes first DeFi trade on a public blockchain: Polygon and modified Aave were used to issue a tokenized Singapore Dollar (TSD) deposit and trade it for the Japanese Yen (source) #DeFi#November2022#trends

The Open Platform

@topco · Post #24 · 30.12.2022 г., 09:04

Metaverse: November headlines: - Meta is laying 11,000 employees or 13% of its workforce after its aggressive hiring during the pandemic to maintain its momentum on Metaverse, meanwhile Metaverse remains a fuzzy concept and MAU targets are not met - Meta had expected 500,000 active monthly users on its VR platform, Horizon Worlds (which is accessed by VR headsets), by the end of this year; but the current figure is fewer than 200,000 (source) - Animoca Brands announces $2 billion Metaverse fund, the fund's focus "will be everything on digital property rights" (source) - The tiny island nation of Tuvalu recently announced that it would be the first country to fully replicate itself as a virtual reproduction in the metaverse (source) - Deloitte’s new report, titled “The Metaverse in Asia: Strategies for Accelerating Economic Impact,” examined the potential influence of the metaverse on 12 Asian economies: the metaverse’s contribution to gross domestic product in Asia could be between $800 billion and $1.4 trillion per year (1.3% to 2.4% of overall GDP) by 2035, according to Deloitte (source) - Yahoo Finance releases a new industry report: the metaverse market size to grow by $677.98 billion between 2021 and 2026, however, the growth momentum is expected to decelerate at a CAGR of 33.26% (source) #metaverse#November2022#trends

The Open Platform

@topco · Post #22 · 29.12.2022 г., 09:04

Crypto Payments: November headlines: - Binance CEO proposes Binance Pay for Twitter payments: Binance has plunged $500 million into Elon Musk’s takeover of social media platform Twitter, with a view to giving crypto a “seat at the table” (source) - Dogecoin jumped 22% in a week amid Twitter payments speculation (source) - Ramp Network, a U.K.-based startup offering payment infrastructure to connect crypto and traditional finance, raised $70M: the round was co-led by UAE wealth fund Mubadala Capital and Korelya Capital (source) - Crypto payments with USDC are now available on Apple Pay: Circle, the issuer of the USDC stablecoin, added support for Apple Pay (AAPL) to help to boost the use of the coin by allowing crypto businesses to accept the payment method (source) -Gate.io launches its crypto payment product Gate Pay (source) - Revolut embraces crypto: Revolut launched a feature that lets customers make purchases using crypto on their Revolut card (source) #paymentsolutions#November2022#trends

The Open Platform

@topco · Post #23 · 29.12.2022 г., 15:04

Web3 Creator Economy: November headlines: - Meta’s Instagram plans NFT minting: Instagram will soon have NFT creation and trading tools built in, but in-app purchases will be "subject to applicable app store fees" (source) - Former Meta and Pinterest executive joins Sequoia-backed Decentralized Social (DeSo) as COO to scale the business - DeSo is a new layer-1 blockchain built from the ground up to decentralize social media with a mission of reimagining the creator economy (source) - Nike will let people design and sell sneakers for the metaverse, previously Nike created a metaverse called .Swoosh, a Web3-enabled platform where people will be able to buy its virtual products, which acts as a marketplace (source) - Pearpop, a marketplace for social collaborations, raised $18M at a $300M valuation - Pearpop allows creators to buy collaborations with other creators or celebrities and currently has more than 200,000 users on the platform (source) #creatoreconomy#November2022#trends

The Open Platform

@topco · Post #21 · 28.12.2022 г., 15:04

Wallets: November headlines: - Twitter may possibly be working on it own crypto wallet (source), while some sources claim that the work on crypto wallet was halted (source) - As of November 2022, Reddit users opened 2.5 million crypto wallets following the launch of NFT marketplace (source) - Trust Wallet token soared 47% in value after Binance CEO tweeted about the importance of self-custody and prompted users to use the Trust wallet. Other self-custody wallet provider tokens also rallied, including SafePal (SFP), which increased by 27% in value (source) - Cold wallets moon after FTX collapse: Ledger saw its highest askes week in November, Trezor also reported a similar surge in demand (source) - JPMorgan registered trademark for crypto wallet: “J.P. Morgan Wallet” will see the legacy bank offer crypto and bitcoin services to its existing pool of customers (source) - Yahoo Finance released a new industry report: crypto wallet market size was valued at $6127.2 million in 2021 and is expected to expand at a CAGR of 30.78% reaching $30659.33 million by 2027 (source) #wallets#November2022#trends