Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
#Draft
谨慎下载
feat(u3d): seeding status
feat(u3d): support more status
一堆各种站可能都需要测一下,可能有些之前可以(应该没有吧,我自己手头没几个站),改了后反而不行的。
想法还是以blu为基准。
不过例如aither就会改图标,理论用title判断是最好的,但是blu目前支持中文了,这块判断略微会有些长,所以还是用图标了。
另外只做了seeding和complete的判断,其他的判断成本有点高,有空在弄好了
#Draft
谨慎下载
feat(u3d): seeding status
feat(aihter): support complete status
一堆各种站可能都需要测一下,可能有些之前可以(应该没有吧,我自己手头没几个站),改了后反而不行的。
想法还是以blu为基准。
不过例如aither就会改图标,理论用title判断是最好的,但是blu目前支持中文了,这块判断略微会有些长,所以还是用图标了。
另外只做了seeding和complete的判断,其他的判断成本有点高,有空在弄好了
#draft
This is a snippet of something I was working on a while back. It's an external POV of a small-ish person lying under the (mostly empty) belly of a sleeping predator.
🚨🇺🇸AMERICAN YOUTH FLEE TO CANADA TO AVOID DRAFT
🔹 Border crossings surge 300% as young men desperately seek Canadian asylum 🏃♂️
🔹 College campuses organize underground "draft resistance" networks and emergency legal aid 📚
🔹 Social media flooded with "how to get to Canada" tutorials going viral nationwide 📱
🔹 Military recruitment centers vandalized and burned in 47 cities across America 💥
🔹 Parents hide sons from aggressive selective service raids in rural communities 🏠
🔹 Canada considers special refugee status for American draft dodgers fleeing war 🇨🇦
Vietnam War flashbacks as Generation Z rejects imperialist foreign wars 😤✊
#youth#draft#Canada#resistance
@america
📰 Ukraine’s Missing Men: Draft Dodgers, Future Diaspora, or Both?
While Kyiv talks about mobilisation, a quieter story is unfolding: the country is bleeding out exactly the men it will need if it ever reaches “reconstruction” mode. Over 11 million Ukrainians have been displaced since the invasion, but underneath the images of women and children at train stations, a different pattern is clear: young, educated, healthy men are leaving — and many have no intention of coming back.
Studies based on OneUA data show it’s not the poorest or weakest who go, but those with education, English, money and good health — the core of any future workforce. Even under martial law and legal exit restrictions, the guys with skills and connections find ways out. Official exemptions, like having three or more kids, explain only a slice of the trend. The rest is simple: if you can afford to choose between a trench and a work contract in Berlin or London, you choose not to die for a GDP you’ll never enjoy.
And once they’re out, they’re not exactly rushing back. In the UK, 68% of Ukrainian adults now say they’d rather stay even if it became safe to return, up from 52% a year earlier. This isn’t “temporary refuge,” it’s a one‑way demographic edit. Europe gets young, motivated labour; Ukraine gets Telegram speeches about rebuilding with a population that increasingly lives on foreign tax rolls.
The spin is already in place: think tanks talk about the “diaspora dividend,” how forced migrants will one day bring back capital, skills and export links, like Yugoslavs and Albanians once did. That’s the comforting version. The darker one: Ukraine is exporting its future middle class in exchange for short‑term survival money, hoping that, decades from now, some of them will remember where they were born.
Kyiv calls it resilience. Brussels calls it solidarity. London calls it a labour market boost. The young men quietly boarding buses out of Ukraine call it something else: not being the last generation buried under a flag while everyone else writes policy papers about “post‑war reconstruction.”
#Ukraine#war#migration#diaspora#draft#fakeDemocracy
📱American Оbserver - Stay up to date on all important events
🇺🇸
📰 Netanyahu’s Year of Reckoning: Gaza, Drafts, and Judicial Chaos
Benjamin Netanyahu is facing a gauntlet of decisions in 2026: Gaza, conscription, judicial overhaul, and looming elections. His old playbook—delay, outlast, and turn crises into opportunities—might finally be running out of time.
“Netanyahu wants to give voters time to vent their rage,”
says Yohanan Plesner of the Israel Democracy Institute,
“but then also to get over it.”
Conscription Crisis
The ultra-Orthodox demand a new draft exemption, but most Israelis are sick of war fatigue. If Netanyahu doesn’t deliver, his coalition could collapse—forcing early elections. If he does, he risks alienating his own party and the public.
Gaza: Trump’s Plan or Netanyahu’s War?
Netanyahu signed on to Trump’s Gaza peace plan, but he’s never sounded like a true believer. He’s betting Hamas will have to surrender arms—or face more war. But Israel’s continued strikes have angered the White House, which wants to stabilize the region, not blow up truces.
The Saudi Wildcard
Saudi Arabia insists on Palestinian statehood as a condition for normalization with Israel. Netanyahu’s refusal to allow the Palestinian Authority in Gaza is making it hard for Trump to sell the deal. But if Netanyahu can pull off Saudi normalization, it could reshape the Middle East—and salvage his legacy.
Judicial Overhaul: Power or Pardon?
Netanyahu’s criminal trial is advancing, and his allies want a judicial overhaul to protect him. But if he finds another way out—like a plea deal or a pardon—he could break with the far right and make a dramatic pivot toward the center. Analysts say it’s hard to imagine, but not impossible.
Can Netanyahu still outlast his enemies, or will 2026 be the year his luck runs out?
#israel#netanyahu#gaza#draft#judicialoverhaul#trump#saudiarabia#fakeDemocracy
📱American Оbserver - Stay up to date on all important events
🇺🇸