Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
In Japan, a marketing campaign called 'kokoro no kaze' (a cold of the soul) was used to promote antidepressants, increasing sales sixfold. It falsely suggested depression was simple and temporary like a cold, hiding the true treatment needs. This led to over-medication and potential harm. Now, companies focus on bipolar disorder, risking similar issues. 🚨💊
[Read more]
@googlefactss
#MentalHealth#Japan#Pharmaceuticals#Depression#Bipolar#HealthRisks
🚀 Hong Kong's Innovative Drug Sector Gains Momentum
Hong Kong's innovative drug sector is experiencing a surge, with several companies showing significant gains. According to Jin10, Ascletis Pharma (01672.HK) saw an increase of over 3%, while Hansoh Pharmaceutical (03692.HK) rose by more than 2%. Other companies such as WuXi AppTec (02359.HK) and Sihuan Pharmaceutical (00460.HK) also followed suit with upward trends.
#HongKong#Pharmaceuticals#Biotech#Innovation#StockMarket#Healthcare#DrugDevelopment
$2.16M Fundraising by Umecrine
Umecrine Cognition, a Swedish clinical-stage pharmaceutical firm, has raised $2.16 million to advance its innovative drug development targeting neurological disorders. The funding round took place on December 19, 2024.
#UmecrineCognition#Pharmaceuticals#NeurologicalDisorders#Funding#Healthcare#ClinicalStage#Sweden
Massive Funding Rounds Highlight Emerging Tech
🔍 Recent funding rounds spotlight key players in various industries:
- Zenith Energy: $1.18B for remote off-grid and urban microgrid power solutions. More Info
- Kommunalkredit Austria: $209.71M investment to enhance societal quality of life. More Info
- Hanyang Technology: Secured $200M, focusing on technology development. More Info
- Duetti: $200M to revolutionize music catalog acquisitions from independent artists. More Info
- Peregrine Technologies: $190M aimed at improving public safety management. More Info
- TK Elevator: $166.05M raised to enhance elevator technology. More Info
- Zhipu AI: $137.27M funding for AI development, including high-precision knowledge maps. More Info
- Geneus: $100M dedicated to science and technology advancements. More Info
- Swap: $40M for enhancing ecommerce shipping and tracking. More Info
- Atmosic: $40M for innovative battery-less technology solutions. More Info
- Ocean Yield: $35M for investments in maritime assets. More Info
- Viam: $30M towards AI and automation engineering solutions. More Info
- Coalition: $30M for cybersecurity insurance and services. More Info
- Danking Pharmaceuticals: $20.59M focused on innovative pharmaceutical research. More Info
- IdentifySensors: $20M for biomarker detection technology. More Info
- LlamaIndex: $19M for developing AI knowledge assistants. More Info
- Heidi Health: $16.60M for AI-driven healthcare documentation. More Info
- Prime Intellect: $15M for accessible AI development platforms. More Info
#AI#VC#Energy#Tech#Pharmaceuticals#Ecommerce#Cybersecurity#Music#PublicSafety#Automation#HealthTech
🚀 Germany's Industrial Output Falls Unexpectedly in February
Germany's Federal Statistical Office announced on Thursday that industrial output in February unexpectedly declined, with energy price shocks from Middle Eastern conflicts expected to further suppress production. According to Jin10, industrial output fell by 0.3% month-on-month in February, following a revised flat reading in January. The market had generally anticipated a 0.5% increase for February. The decline in output was primarily driven by decreases in the construction sector, as well as in the electronics, optical products, and pharmaceutical industries. In contrast, the Federal Statistical Office noted that automobile production saw growth after a significant drop in January.
#Germany#IndustrialOutput#Economy#Manufacturing#Construction#Electronics#Pharmaceuticals#Automobile#EnergyPrices#February
$140M Funding for Ottimo Pharma
Ottimo Pharma announces a funding round of $140 million set for December 19, 2024. The company focuses on developing bi-functional medicines aimed at improving the lives of individuals living with cancer.
Learn more
#Funding#OttimoPharma#Cancer#BiFunctionalMedicines#Healthcare#Pharmaceuticals#LifeSciences#Investments#MedicalResearch#Oncology#HealthTech#Biotechnology
PeproMene Bio Secures $11M Round
PeproMene Bio, Inc., a clinical-stage biotech firm based in Irvine, CA, has successfully raised $11 million in funding. The investment round closed on December 18, 2024, focusing on innovative therapies targeting cancers and immune disorders.
More info: PeproMene Bio
#Biotech#Funding#Cancer#ImmuneDisorders#California#ClinicalStage#Therapies#Investment#Healthcare#Innovation#PeproMeneBio#Pharmaceuticals#MedicalResearch#DrugDevelopment
Turn Therapeutics Secures $75M Funding
Turn Therapeutics, specializing in advanced wound and dermatologic care, has raised $75 million in funding. The investment aims to boost their innovative pharmaceutical and medical device offerings using proprietary technology. For more details, visit their website: Turn Therapeutics.
#Funding#Biotech#Healthcare#Pharmaceuticals#MedicalDevices#WoundCare#Dermatology#Investment#Innovation#Technology#TurnTherapeutics#Proprietary#AdvancedCare#Medical#Company#Therapeutics#Research#Development#Startups
$4.07M Funding for PeptiSystems
PeptiSystems secured $4.07M in funding on December 20, 2024. The company develops advanced instruments for solid-phase synthesis in peptide and oligonucleotide therapeutics, catering to both GMP and non-GMP manufacturing. Discover more: PeptiSystems
#Funding#PeptiSystems#Therapeutics#Peptides#Oligonucleotides#GMP#Manufacturing#Synthesis#Biotechnology#Pharmaceuticals#MedicalDevices#FlowthroughColumnTechnology#ProcessDevelopment#LifeSciences