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 слични објави

Пребарај: #december2022

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

@topco · Post #27 · 04.01.2023 г., 09:04

DeFi: December headlines - Solana DeFi is down 98% from $10.17 Billion: the sharp decline has been majorly linked with the FTX demise as SBF, FTX’s former CEO, now termed the biggest fraudster in history, strongly backed Solana’s native token, SOL (source) - Uniswap overtakes Solana and becomes 16th top crypto: market data shows that Uniswap’s market cap stands at $3.875 billion. It is 5.36% higher than solana’s current market cap of $3.678 billion (source) - Solana DeFi exchange Raydium hacked for over $2 million (source) - 6 quadrillion tokens were hacked on DeFi protocol Ankr, which is speculated to be an inside job (source) - SushiSwap proposes 'immediate' action to support its treasury: SushiSwap is facing a significant deficit in its treasury that threatens its long-term operational viability, to address this, lead developer Jared Gray proposed setting Kanpai, a fee-diversion protocol, to 100% of fees diverted to the Treasury multisig for one year, or until new token distribution and reward schemes are implemented (source) - T3rn raises $6.5 million for bridge-free multi-chain interoperability - t3rn is currently working on developing an expressive protocol for making generalizable function calls across multiple chains that will allow for the composition of multi-step transactions across several chains with a single call, which is not possible with bridges (source) - DeFi protocol perennial launches, announces $12M in funding - Perennial is a decentralized-finance (DeFi) platform used to trade derivatives (source) #DeFi#December2022#trends

The Open Platform

@topco · Post #33 · 11.01.2023 г., 09:04

Metaverse: December headlines - BlackRock unveils metaverse and global SRI ETFs - Qontigo selects the top 10% of companies with High Quality Patents (HQP) in technologies ranging from 3D image modelling, avatars, blockchain, graphic processing units (GPU), non-fungible tokens (NFT) and virtual, augmented and extended reality, based on EconSight data (source) - Metaverse-first blockchain Lamina1 launches rolling fund for Web3 builders to provide them with a capital-raising tool for their open metaverse ventures and to offer investors a chance to get in on projects at the ground level (source) - South Korea’s wild plan to dominate the metaverse - the South Korean government has an ambitious $44.6 billion plan called the “Digital New Deal”, including $171.6 million earmarked to help South Korea become ranked No. 5 among the most metaverse-adopted countries in the world by 2026 — up from its current place at No. 12 (source) - Alibaba's E-Commerce Platform Braces For Its Metaverse Debut - Taobao conducted final tests before making its first metaverse live-streaming product, which will likely launch online around the upcoming New Year's shopping extravaganza (source) - Metaverse experience to sway real-world travel choices in 2023 - a survey participated by 24,179 respondents across 32 countries reveal that nearly half, or 43% of the respondents, intend to use virtual reality to inspire their choices (source) - Warner Music Group Furthers Metaverse Push With Digital Fashion Startup DressX - Warner and DressX want everyone to have a “meta-closet” full of digital wearables (source) #metaverse#December2022#trends

The Open Platform

@topco · Post #31 · 09.01.2023 г., 09:04

Crypto Payments: December headlines - Stripe debuts fiat-to-crypto payment offering for Web3 businesses - the widget allows customers to more easily use crypto to engage with businesses and content creators across the world (source) - Crypto.com receives license as a payment institution in Brazil, the company is the first crypto exchange to become a licensed payments institution in the South American country (source) - Visa released a technical paper in which it explored the possibility of developing an automatic payment system for self-custodial wallets on Ethereum (source) - South African digital-only bank launches crypto payments gateway - Be Mobile Africa has reportedly launched a crypto payment gateway that allows merchants to convert digital currency payments to fiat currency to "help small businesses preserve wealth in unfavourable economic conditions” (source) - Crypto Refills Labs releases a report on consumer adoption on crypto payments - according to report, cryptoshoppers are less worried about transaction fees, more interested in stablecoins and spend crypto more frequently (source) #paymentsolutions#December2022#trends

The Open Platform

@topco · Post #32 · 10.01.2023 г., 09:04

Web3 Creator Economy: December headlines - Impact Venture Capital invests in $8 million seed round for Web3 startup Virtualness - Virtualness is a mobile-first platform designed to help creators and brands navigate the complex world of Web3 (source) - Animoca Brands and its subsidiary TinyTap, the platform for user-generated educational games, announced that the second series of teacher-authored Publisher NFTs will be auctioned on OpenSea starting at 19:00 (EST) on 15 December, the firm’s recently introduced Publisher NFTs leverage Web3 technologies and community to improve earning opportunities for educators, create new earning and promotional options for co-publishers, and empower the community to directly support the growth of learning (source) - Web3 Game project Magic Fantasy has completed $3 M private round investment - Magic Fantasy is a strategic card game, which enables players to co-share the rewards of the game through winning in PvP season and will release the creation power of equipment, gameplay, etc, so as to motivate the players become creators (source) - Revel raises $7.8M to become the Instagram and Robinhood of NFT platforms - Revel is a cross between a social network and a marketplace meant to be a simple trading platform that’s gamified, allowing individuals to mint photos and videos as collectibles (source) #creatoreconomy#December2022#trends

The Open Platform

@topco · Post #30 · 06.01.2023 г., 09:04

Wallets: December headlines: - Crypto wallet BitKeep loses $8 million in ongoing hack - Bitkeep points to malicious APK packages (source) - Anonymous crypto wallet moves $80 million worth of Bitcoin onto Coinbase - cryptocurrency transfers from wallets to exchanges is typically a bearish signal (source) - Senator Warren introduces new crypto bill targeting self-custody wallets, the bill would expand KYC requirements for crypto network participants, is descibed by critics as “opportunistic” and “unconstitutional” (source) - Huobi releases a report on crypto wallet usage, highlights that crypto wallets users grew to 85 million in 2022 (6% increase) (source) - SafePal integrates support for TON - SafePal users will now be able to store and send the native $TON token within their hardware and software wallets. Additionally, it will be possible to directly interact with the Decentralized Applications (DApps) that currently exist on the TON blockchain (source) #wallets#December2022#trends