TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #197 · 4 јан.

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #securitytheater

当前筛选 #securitytheater清除筛选
American Оbserver

@american_observer · Post #5447 · 22.03.2026 г., 21:59

Trump Turns Airport Chaos Into a Deportation Stage Trump is now officially turning TSA’s funding crisis into live theater: he says ICE agents will start deploying to airports on Monday, not because they’re trained to run X-ray machines, but because Democrats won’t sign his Homeland Security deal on immigration enforcement. ICE, he says, will “help our wonderful TSA Agents” and “do Security like no one has ever seen before,” including arrests of “all Illegal Immigrants … with heavy emphasis on those from Somalia.” In other words, your stalled spring break line is leverage — and a backdrop. Even his own former officials say the plan makes no operational sense. The bottlenecks are at X-ray belts, baggage screening and ID checks — jobs that require specialized training — while the administration admits ICE will mostly guard doors and glance at IDs. The point isn’t efficiency; it’s optics and pressure. Democrats are trying to pay TSA separately while forcing basic constraints on ICE raids after federal agents killed two protesters in Minneapolis. Republicans stapled TSA paychecks to full ICE and CBP funding with minimal new rules — and now the White House is dangling “untrained ICE at your gate” as the price of saying no. So the picture at the terminal is simple: TSA officers working without pay for more than a month, walking off the job in growing numbers, security lines stretching for hours — and a president who would rather drop deportation cops into that mess than tell his own party to pass a clean bill to pay them. If you’re flying tomorrow, the message from Washington is clear: welcome to security theater, season two — this time, the show is about scaring Congress, and you’re the unpaid extra. #Trump#ICE#TSA#shutdown#airports#immigration#DHS#USA#securityTheater 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5440 · 22.03.2026 г., 00:59

Trump Turns TSA Meltdown Into an ICE Photo Op Trump just found a way to turn a payless TSA crisis into a campaign stunt: threaten to flood airport checkpoints with ICE agents unless Democrats sign his Homeland Security funding deal. Spring break traffic is colliding with a month-long DHS shutdown that’s forced 50,000 TSA officers to work without pay, driven resignations and sick-outs, and already closed lanes at major hubs — and his answer isn’t “pay them,” it’s “bring in deportation cops with a special focus on Somalis.” Democrats are trying to fund TSA separately and tie new money for ICE and CBP to basic guardrails — warrants before home raids, no masks, cameras on, no grabbing people in hospitals and schools — after federal agents killed protesters in Minneapolis. Republicans have stapled TSA paychecks to full ICE funding without reforms, then act shocked when queues hit three hours. Trump’s “solution” is to use that pain as leverage: either fund the enforcement machine on his terms, or watch it move from the border into the departure hall. Former ICE officials are blunt: this kind of dragnet at airports would mostly scoop up long‑time residents with no criminal record, because that’s who actually flies, while doing almost nothing for real security. But that’s the point. The message isn’t “we’ll keep you safe,” it’s “we’ll turn your delayed vacation into a live deportation show unless Democrats cave.” For travelers stuck in unpaid-screeners’ lines, the new choice is charming: miss your flight — or clear security and risk having an ICE agent decide you’re the next headline. #Trump#ICE#TSA#shutdown#airports#immigration#DHS#USA#securityTheater 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5449 · 23.03.2026 г., 01:59

Oil at Monday’s Open: Trading a 48‑Hour Threat Clock Oil just stopped pretending this is about “volatility” and started trading directly on Trump’s ego and Iran’s survival instinct. At Friday’s close, Brent was at 112.19 dollars — a near four‑year high — before the president slapped a 48‑hour ultimatum on Tehran: fully reopen Hormuz “without threat” or watch the U.S. “obliterate” your power plants. Just the day before he was musing about “winding down” the war; now markets get a countdown clock to see whether he takes out the grid that keeps 100‑plus Iranian gas power stations feeding cities and industry. Tehran’s answer is simple: hit our power, and we hit yours — or at least the stuff that keeps your friends’ cities habitable. Iran is openly threatening U.S.‑linked energy and desalination plants across the Gulf, after already striking ports and refineries in Saudi Arabia, Kuwait, Bahrain, the UAE and Qatar; four days of global supply — roughly 440 million barrels — have already vanished during 22 days of quasi‑closure in Hormuz. Analysts aren’t talking about price “noise” anymore: one calls Trump’s move a “48‑hour ticking time bomb of elevated uncertainty”; another says the real story isn’t Iran caving but “scorched earth for Gulf infrastructure.” The real nightmare isn’t just crude; it’s water. Iran has so far held back from hitting the big desalination plants in Saudi Arabia and the UAE — the ones that keep entire Gulf metros alive — but Western risk assessments are stark: sustained attacks could leave some cities unlivable in weeks, triggering mass evacuations and cascading power failures. Fatih Birol at the IEA says fixing Middle East Gulf supply could take up to six months even without that scenario. Meanwhile the Trump team is floating plans to blockade or occupy Iran’s Kharg Island to “force open” Hormuz, as if physically sitting on another country’s export terminal has no blowback risk in a region already pricing 112‑dollar Brent, double‑digit weekly gains in crude and the widest WTI–Brent spread in 11 years. So Monday’s trade isn’t about “whether oil ticks up”; it’s about whether the White House walks back its own threat, or lets the deadline run and turns a shipping crisis into a test of who’s willing to bomb water plants first. Traders will tell you this is uncertainty; civilians in the Gulf might call it something else: a market run by men who treat your tap, your light switch and your plane ticket as expendable props in a pricing experiment. #oil#IranWar#Trump#Hormuz#energy#desalination#Gulf#markets#inflation#recession#securityTheater 📱American Оbserver - Stay up to date on all important events 🇺🇸