Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
#pronunciation
@fluencyinenglish
❇️Top consonant mistakes of Farsi speakers
@fluencyinenglish
1. Say D instead of a hard TH (sounds like day instead of they)
2. Say T instead of a soft� TH (sounds like tin instead of thin)
@fluencyinenglish
3. Say V instead of W (sounds like vine instead of wine)
4. Do not use voicing at the end of words (sounds like cap instead of cab)
5. Do not use sounds at the end of words (sounds like flow instead of float)
@fluencyinenglish
6. Say a sound before consonant blends (sounds like eschool instead of school)
7. Roll R’s (sounds like rrrrrrrrrright instead of right)
@fluencyinenglish
Heist - [Hi-est] - [HIGH-ist]
Because of that famous series Money Heist on Netflix often we use the word heist in our conversation. Sadly most of us make a mistake to pronounce it. Here is the CORRECT pronunciation of the word "HEIST". [American accent]
#pronunciation
😳The words миллион [mi-li-on] (million) and миллиард [mi-li-ard] (billion) can now be pronounced as [мильон]=[mil'-yon] and [мильярд]=[mil'-yard].
🔻These two permissible variants have been approved by the Vinogradov Russian Language Institute of the Russian Academy of Sciences.
🔻The changes are documented in the dictionary on the institute's website.
🔻They also apply to derived words, including from миллионный [mi-li-on-nyj] to [мильонный]=[mil'onnyy] (the millionth), and миллиардный [mi-li-ard-nyj] to [мильярдный]=[mil'-yard-nyj].
🔻Previously, the institute's experts stated that the stress in the word звонит [zva-nit] (he/she rings/calls) would shift to the first syllable.
▶️More details about Звонит
What is this world coming to...
#news
#pronunciation
😎RCR | Support | Boost
😅Stay strong, comrades! These are not the most difficult words to be pronounced in Russian.
• Одна тысяча километров
[ad-na ty-si-cha ki-la-met-raf]
One thousand kilometers
🔻A colloquial variant:
• Одна тыща километров
[ad-na ty-shcha ki-la-met-raf]
🎧🗣👇
😉Would you dare to pronounce this in the comments?
#pronunciation
#learnRussian
😎RCR | Support | Boost
Не река, а мечта логопеда!
Not a river, but a speech therapist's dream word!
❤️🔥And do you know that learning is always about overcoming yourself through misunderstanding, difficulties, and mistakes? It's very challenging, but it's precisely this that yields the best results.
Therefore, when I see such complex words or tasks, I always feel happy for my students - they have a chance to overcome themselves and grow in their own eyes (and in mine too!).
🤩OK, comrades, it's a challenge!
❗️Can you pronounce this?
• река Хольненгпухырьёхан
[ri-ka khol'-nen-gpu-khy-r'yo-khan]
📎This river is located in
Khanty-Mansi Autonomous Okrug, in Tyumen Oblast, Russia.
#linguistic_joke
#pronunciation
😎RCR | Support | Boost
Listen to the audio and choose the correct spelling for this famous sauce:
A) Worchestershire sauce
B) Wosterchire sauce
C) Worstershire sauce
D) Worcestershire sauce
Follow 🌎@languagetrivia for more interesting questions
#pronunciation#spelling
Stress changes meaning — but you have to hear it to notice it 👂
Some English words look the same as nouns and verbs,
but the stress moves — and it sounds very different.
Watch these short videos to actually hear it:
📹https://youtu.be/Hh1PlngNt2Q?t=64
📹https://www.youtube.com/watch?v=7q8yk896pnc
Listening is the only way you’ll spot the difference.
Try saying these aloud after you watch 🎤
#EnglishLearning#Pronunciation#RealEnglish
Since there's a heated debate in ourgroup chat (@RCRussian2) about the longest Russian words, I'm adding fuel to the fire, comrades! 🔥
⬇️Here are some of the most famously long words:
🔢Превысокомногорассмотрительствующий (35 letters)
[pre-vy-so-ka-mno-ga-ras-smat-ri-tyel'-stvoo-yoo-schiy] His/Her Exceedingly-Many-Looking-Into-Things Excellency (An archaic, excessively obsequious title)
🔻Record: Listed in the Guinness World Records in 2003.
🔢Сельскохозяйственно-машиностроительный (37 letters)
[sel'-ska-ha-zyay-stvin-na-ma-shi-na-stra-i-tyel'-nyj]
Pertaining to agricultural machine construction.
🔻Record: The longest hyphenated adjective.
🔢Автоэлектростеклоподъёмники (27 letters)
[av-ta-i-lek-tra-sti-kla-pad-yom-ni-ki]
Auto-electric window lifts
🔢Человеконенавистничество (24 letters)
[chi-la-ve-ka-ni-na-vi-sni-chi-stva]
Misanthropy (hatred of humankind)
🔢 Who dares to risk their sanity and try to pronounce this wonderful verb?
• Переосвидетельствоваться
(24 letters)
[pi-ri-a-svi-de-til'-stva-va-tsa]
To be re-examined (officially, e.g., by a medical board).
🎧🗣👇
Who will dare to pronounce these words?
#russian_language
#longest_words
#learn_russian
#pronunciation
😎RCR | Support | Boost
در IELTS Speaking، خصوصاً Part 3، نمره شما بر اساس مهارت زبانی (Fluency & Coherence, Lexical Resource, Grammatical Range & Accuracy, Pronunciation) داده میشود، نه میزان اطلاعات عمومی یا صحت factual.
✅ راهکارهای عملی
1. از تردید کردن نترسید و صادق باشید
جملاتی مثل:
“I’m not an expert in this field, but I think…”
“I don’t know much about this, although it seems that…”
به شما اجازه میدهد بدون توقف ادامه دهید.
2. استفاده از speculation یا حدس منطقی
وقتی نمیدانید، میتوانید با حدس منطقی نظر بدهید:
“It might be because…”
“Perhaps this will lead to…”
3. مثال شخصی یا تجربه روزمره بیاورید
“From my own experience…” یا “In my city/school…”
حتی اگر اطلاعات عمومی کم باشد، مثال شخصی به طولانیتر شدن پاسخ و انسجام کمک میکند.
4. تمرکز روی انسجام و روانی صحبت
از ضمیرها و ربطدهندهها (this, that, these, however, on the other hand) استفاده کنید تا جملهها به هم وصل شوند.
5. استفاده از واژگان پیشرفته و ساختارهای گرامری متنوع
به جای تکیه روی اطلاعات، از واژگان دقیق و اصطلاحات متداول آیلتس استفاده کنید:
“plays a pivotal role”
“poses a significant challenge”
“from my perspective”
🔹 نمونه پاسخ با speculation
Q: Do you think governments should invest more in renewable energy?
> “I’m not fully aware of all the policies, but I think governments should invest more in renewable energy. It might help reduce pollution and create new jobs. For example, building more solar farms could provide electricity for many households. Although I don’t know all the details, it seems like a positive step for the future.”
#IELTS#IELTSSpeaking#SpeakingTips#Hedging#Speculation#Fluency#Coherence#LexicalResource#Band8#آیلتس#Part3#EnglishSpeaking#LanguageTips#AdvancedEnglish#Pronunciation