Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
#Celsius Network further deposited 34.09M $MATIC ($25.7M) to #Binance in the past 10 hours.
In the past 2 days, Celsius Network has deposited 56.8M $MATIC ($44.5M) to Binance at $0.784 on average.
For more updates on Celsius Network, follow @spotonchain now and turn on your 🔔 at: https://platform.spotonchain.ai/en/entity/102
#Celsius Network returned to deposit 8,091 $ETH ($24.45M) to #Coinbase at ~$3,022 9hrs ago.
Notably, this is Celsius’ largest ETH deposit in the past 3 months. Previously, between Nov-13-23 and Jan-31-24, Celsius Network transferred 847,626 $ETH (~$1.90B) to FalconX, Coinbase, OKX, and Paxos, allegedly for some OTC deals.
Follow @spotonchain and visit the #Celsius Network at https://platform.spotonchain.ai/en/platform/entity/102?tokens=ETH&min_amount=9
In the past 2 days, #Celsius further deposited 67,500 $ETH ($156.5M) to #Coinbase Prime.
Overall, Celsius Network has moved 847,626 $ETH (~$1.90B) to CEX since November 13, 2023. Some of these ETH tokens might have been absorbed by whales via an alleged OTC deal.
Today, Celsius announced the distribution of over $3 billion in crypto and fiat to creditors has begun!
👉 Entity: https://platform.spotonchain.ai/en/platform/entity/102
#Celsius Network deposited 25.75M $MATIC ($21.26M) to CEX at $0.826 on avg in the past 8 hours:
• 22.73M $MATIC ($18.79M) to #Binance
• 3.02M $MATIC ($2.47M) to #Crypto.com
Currently, Celsius Network still holds 34.09M $MATIC ($27.56M) in the address.
To know when they move out $MATIC again, follow @spotonchain and turn on your 🔔 at: https://platform.spotonchain.ai/en/entity/102
🚨🚨#Celsius Network deposited 11,300 $ETH ($24.9M) to #Coinbase and #FalconX ~5hrs ago, as the $ETH price recovers.
Notably, in the past 4 days, Celsius Network has further deposited 48,200 $ETH ($108M, avg price: $2,240) to Coinbase and FalconX.
👉 More details: https://platform.spotonchain.ai/en/signal-details/celsius-network-deposited-eth-to-falconx-and-coinbase-13503
Two institutions #Celsius and #FTX moved out a total of $59.06M in 6 assets to CEX in the past 8 hours!
1. Celsius further moved 22,500 $ETH ($50.78M) to #Coinbase at $2,257 ~8 hours ago.
➡️ Now, Celsius only holds around 39,969 $ETH ($90.9M) in address 0xdb3.
👉 More details here
2. FTX and Alameda Research moved out $8.28M in 6 assets, including $ETH, $OKB, $MTL, $PROM, $YFII, and $CREAM in the past 2 hours.
➡️ Overall, FTX and Alameda Research have moved out $707M worth of 91 tokens since October 24, 2023.
👉 More details here
Want to be updated with latest whale movements? Follow @spotonchain and visit us via https://platform.spotonchain.ai/en
🚨🚨 Note that both #FTX and #Celsius Network transferred $ETH out in the past hour:
1. #FTX 0xe39 transferred 1,500 $ETH ($3.09M) to Wintermute Trading:
- The FTX and Alameda addresses also moved out 7.64M MATIC ($5.74M), which may be deposited to exchanges soon.
👉 More details: https://platform.spotonchain.ai/signal-details/ftx-and-alameda-research-moved-eth-and-matic-out-8514
2. Celsius Network further transferred 5,000 $ETH ($10.3M) to middle addresses:
- In total, Celsius Network has transferred out 15,167 $ETH ($31.1M) in the past 15 days, after the price rose. Among them, 10,167 $ETH ($20.8M) have been deposited to #FalconX at an average price of $2,051.
👉 More details: https://platform.spotonchain.ai/signal-details/celsius-network-may-further-deposit-eth-to-exchange-soon-8504
✅ Check out the full signals and set alerts for the FTX, Alameda, and Celsius Network with us now!
🚢Celsius усиливает СПГ-флот новым заказом на верфи Samsung Heavy.
Датская Celsius Tankers (часть Celsius Shipping) связана с новым заказом на два СПГ-танкера вместимостью по 180 000 куб. м на верфи Samsung Heavy Industries.
Контракт оценивается примерно в $514 млн, с поставкой до сентября 2028 года.
Сделка продолжает серию заказов компании и расширяет её портфель СПГ-судов, который уже насчитывает около 24 единиц (в эксплуатации и на стадии строительства).
С операционной точки зрения, компания усиливает позиции в сегменте СПГ (LNG) на фоне устойчивого спроса на газ и долгосрочных контрактов, обеспечивающих загрузку флота.
Для рынка это подтверждает высокий интерес к СПГ-новострою и ограниченность слотов на корейских верфях, что поддерживает стоимость судов.
📌Celsius Shipping ApS — основана в Дании, частная судоходная компания, специализируется на СПГ-перевозках; принадлежит предпринимателю Кристоферу Бисгаарду (Christoffer Bisgaard).
#LNG#Shipping#Tankers#Shipbuilding#Celsius
🚨 As predicted, #Celsius Network further deposited 9,600 $ETH ($19.5M) to #Coinbase and #OKX via address 0xc45 ~3hrs ago.
In total, Celsius Network has deposited 19,160 $ETH ($40.31M) to #FalconX, #Coinbase and #OKX at an average price of $2,040 in the past 16 days.
Currently, Celsius Network still allegedly holds around 59,581 $ETH ($121M) across multiple addresses.
👉 More details: https://platform.spotonchain.ai/signal-details/celsius-network-further-deposited-eth-to-exchanges-8736
🚨 Both #FTX and #Celsius transferred out $ETH after the $ETH price crossed $2,300 again today!
1. #Celsius Network deposited 7,500 $ETH ($17.4M) to #FalconX ~ 8hrs ago.
- Total deposited amount in past 7 days: 25,000 $ETH ($57M).
2. #FTX moved 1,593 $ETH ($3.66M) to address 0xCeF ~55 mins ago.
- Address 0xCeF currently holds 2,244 $ETH ($5.16M) and may deposit $ETH to #Coinbase soon.
👉 More details: https://platform.spotonchain.ai/en/token?name=ETH
🚨🚨 Institutions and whale are depositing $ETH to exchanges!
1. #Alameda (#FTX) and #Celsius Network deposited a total of 17,603 $ETH ($39.5M) to #Coinbase in the past 11 hours.
- Among them, 9,603 $ETH ($21.6M) were deposited to the exchange around the recent local peak!
2. Smart whale 0xebf returned after 5 months of inactivity and deposited 6,000 $ETH ($13.5M) to #Binance just now.
- Currently, the whale still holds 6,127 $ETH ($13.8M) and has an estimated total profit of $17M (+69.5%) from $ETH, of which $10.7M has been realized!
👉 More details: https://platform.spotonchain.ai/en/token?name=ETH