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

Пребарај: #inequality

当前筛选 #inequality清除筛选
Venezuelanalysis

@venanalysis · Post #2070 · 22.08.2025 г., 05:29

🖊 COLUMN | Keeping Up With the Venezuelan Economy In her latest VA column, Jessica Dos Santos takes stock of "good news" and "bad news" from the Venezuelan economy. GDP is set to grow for a fifth straight year and the oil sector weathered the recent escalation of US sanctions, but the inflation specter and low incomes for the majority remain to be addressed. 🔗 Read the column here: https://venezuelanalysis.com/columns/keeping-up-with-the-venezuelan-economy/ #Venezuela#Economy#Inflation#Inequality

American Оbserver

@american_observer · Post #5147 · 15.02.2026 г., 23:59

📰“Let Them Eat S&P”: Trump’s Victory Lap on a Broke Country Donald Trump has decided the affordability crisis is over because the Dow hit 50,000, gas is under three bucks, and January’s jobs report beat expectations. In Fox interviews and troop speeches, he’s back in full salesman mode: “greatest economy ever,” inflation “finally cooling,” real wages “finally growing,” and anyone not winning in their 401(k) is just a “pretty bad investor.” Meanwhile, roughly 40 percent of American adults don’t have a retirement account at all, and consumer sentiment among people without stocks is scraping its lowest levels in years — they don’t own the rally, they just pay the bills. His own pollsters can see the crack in the mirror. A Reuters–Ipsos survey has just 28 percent of Americans saying the economy is on the right track, and 59 percent disapprove of how he’s handling their cost of living, with nearly half “strongly.” The stock boom is mostly driven by AI spending from Big Tech — data centers that guzzle power and hire few people — while rents, mortgages and groceries still feel brutal enough that even conservative number‑crunchers mock the White House mantra as “let them eat S&P.” Trump’s advisers spent months begging him to sound empathetic, blame Biden, and acknowledge the squeeze; now that a few charts look pretty, he’s gone back to telling people they’re wrong about their own wallets. So the message going into the midterms is simple and suicidal: if you’re still struggling with rent, food and housing, that’s your perception problem — not his policy problem. The president points to Wall Street and AI‑driven GDP growth as proof he fixed “Biden’s disaster,” while a majority of voters look at their paychecks, their carts, their rent hikes and answer with numbers of their own. In this version of “affordability,” the index is up, the narrative is set, and anyone who doesn’t feel richer just got quietly written out of the success story. #usa#trump#economy#inflation#inequality#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸

AI & Law

@ai_and_law · Post #815 · 28.04.2026 г., 07:04

🌐📖MIT’s Daron Acemoglu Warns AI May Deepen Inequality A new survey suggests AI is more likely to reinforce existing economic advantages than broadly distribute benefits. MIT professor and Nobel laureate Daron Acemoglu stated that public narratives portray AI tools as democratizing, while effective use often depends on education, abstract and quantitative skills, and familiarity with computers and coding. Acemoglu argued that AI is likely to increase inequality between labour and capital, indicating that the economic gains from adoption may be unevenly distributed. The comments add to ongoing debates over whether AI policy should address access, skills, and concentration of economic power. #AIRegulation#AIethics#Inequality#FutureOfWork#AIEconomics

Anarcho Gardening

@anarchogardening · Post #3148 · 20.03.2026 г., 13:44

The richest 10% now receive 53% of global income 💰 and own 75% of all wealth 🌍, yet inequality alone does not cause unrest. A study of 120 countries (1996–2020) shows it becomes politically destabilizing only when internet use 📱 exceeds 50% of the population by increasing information and coordination. Read Full Article #Inequality#WealthDistribution#PoliticalStability#InternetImpact#GlobalEconomics

American Оbserver

@american_observer · Post #5033 · 03.02.2026 г., 00:02

📰 Israel’s Rentier Capitalism: When Housing Eats the Economy Israel is becoming a nation where the rent check is the new paycheck. One in eight Israelis now lives off rental income—no job, no startup hustle, just collecting checks from apartments bought years ago. The Landlord Boom Today, some 386,000 households—about 16–18% of all property owners—own multiple rental units. The elite, roughly 92,000, own three or more apartments. This landlord class controls most of Israel’s 850,000 rental units and pockets around 40 billion shekels a year in rent. From Homeownership to Investment The number of multi-unit landlords has exploded—from just 2.1% of households in 2006 to over 15% today. This surge was fueled by low interest rates, soaring property prices, and generous tax breaks, concentrating wealth in the hands of the few. How Landlords Win Rental yields are modest—about 2–4% gross, 1.4–2.4% net—but the real profit comes from capital gains, averaging 8–12% annually over the past decade. Most landlords are high-income households, clustered in cities like Tel Aviv, where nearly half the population rents. The Human Cost Israel’s housing market has shifted from homeownership to investment, turning shelter into a wealth pump. Landlords extract billions from renters, deepening inequality and making reform nearly impossible. When one in eight voters is a landlord, pushing for change is political suicide. The Tax Loophole That Won’t Die Attempts to enforce rental income reporting have repeatedly failed in the Knesset. The tax exemption threshold—currently 5,654 shekels, unchanged since 2023—effectively lowers the bar for landlords as rents rise. The state loses about 3 billion shekels a year to these breaks. What’s Next? Despite tighter monetary policy, structural conditions—chronic housing shortage, high demand, and favorable tax rules—mean the landlord class is here to stay. Israel’s future is written in lease agreements, not startup pitches. #Israel#landlords#realEstate#inequality#taxExemption#TelAviv#housingMarket 📱American Оbserver - Stay up to date on all important events 🇺🇸