Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
#ALTS MARKET CAP ANALYSIS
The ALTS market cap is consolidating within a falling wedge pattern and is currently rebounding from the support trendline. The 21MA is acting as a resistance barrier near the wedge’s upper boundary.
A strong breakout above both the 21MA and the wedge resistance trendline would confirm a bullish trend. Conversely, a breakdown below the support trendline would invalidate the pattern.
#ALTS MARKET CAP ANALYSIS
The ALTS market cap is breaking out of the horizontal supply zone of the ascending triangle pattern, with the Ichimoku Cloud providing strong support beneath the pattern.
A confirmed breakout would signal bullish continuation and open the path toward a new all-time high, potentially triggering a strong rally across the altcoin market.
#ALTS MARKET CAP ANALYSIS
The ALTS market cap is consolidating within a falling wedge pattern and is currently rebounding from the support trendline. The 21MA is acting as a resistance barrier near the wedge’s upper boundary.
A strong breakout above both the 21MA and the wedge resistance trendline would confirm a bullish trend. Conversely, a breakdown below the support trendline would invalidate the pattern.
#ALTS MARKET CAP ANALYSIS
The ALTS market cap is consolidating within a falling wedge pattern and is currently rebounding from the support trendline. The 21MA is acting as a resistance barrier near the wedge’s upper boundary.
A strong breakout above both the 21MA and the wedge resistance trendline would confirm a bullish trend. Conversely, a breakdown below the support trendline would invalidate the pattern.
#ALTS MARKET CAP ANALYSIS
The ALTS market cap is breaking out of the horizontal supply zone of the ascending triangle pattern, with the Ichimoku Cloud providing strong support beneath the pattern.
A confirmed breakout would signal bullish continuation and open the path toward a new all-time high, potentially triggering a strong rally across the altcoin market.
#ALTS MARKET CAP ANALYSIS
The ALTS market cap is breaking out of the horizontal supply zone of the ascending triangle pattern, with the Ichimoku Cloud providing strong support beneath the pattern.
A confirmed breakout would signal bullish continuation and open the path toward a new all-time high, potentially triggering a strong rally across the altcoin market.
#ALTS MARKET CAP ANALYSIS
The ALTS market cap has broken out of the ascending triangle with strong volume, marking a new ATH.
It is now retesting the pattern, with the Ichimoku cloud acting as solid support.
A successful retest could trigger a powerful bullish rally across the ALTS market.
#ALTS MARKET CAP ANALYSIS
The ALTS market cap is experiencing a significant rebound from the support trendline of the descending channel, signaling potential bullish momentum. This rebound is currently facing resistance from the Ichimoku cloud, which is acting as a barrier.
However, the 200-day Moving Average is providing strong support, further indicating a bullish trend.
A decisive breakout above both the Ichimoku cloud and the descending channel would likely trigger a robust bullish rally in the ALTS market, suggesting substantial upward movement and positive investor sentiment.
#ALTS MARKET CAP ANALYSIS
The alts market cap is currently retesting above the symmetrical triangle pattern. The 100-day moving average is providing strong support, and the Ichimoku cloud indicates a bullish trend.
An upward move is anticipated as long as the alts market cap remains above the triangle. The only bearish scenario would be a sustained breakdown of the Ichimoku cloud.
#ALTS MARKET CAP ANALYSIS
The Alts market cap has broken out of the symmetrical triangle and is currently retesting above it. The Ichimoku cloud is also providing support.
A successful retest above the triangle would confirm a bullish trend, while a failed retest could indicate further movement within the triangle.
This gives me the Covid Crash (March 2020) vibes actually 🤔
If you remember back in October I said that Middle East was a ticking bomb that could trigger a Black Swan event at any moment, so it's not a surprise for me.
📎Now what about the markets: I don't think the reaction will be as dramatic as in March 2020 but stay away from leverage. If you have some stables - slowly DCA #Alts.
I'm on spot and not worried at all. We'll get through it all
💰#ALTS MARKET CAP is currently forming a descending triangle pattern. It is trading within the Ichimoku cloud and below the 50-day moving average (MA), indicating a state of indecision.✅
💬A breakout above the MA 50 would confirm a bullish trend, whereas a rejection would suggest a retest of the horizontal support level.
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️