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

TGINSIGHT SIMILAR POSTS

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

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

Заметка начинающим, которые часто сталкиваются с подобной непоняткой. Ситуация следующая, есть список файлов: names = [ 'image.bmp', 'second.txt.bkp', 'data.db', '.config.cfg', 'file.ext.bkp' ] И мы хотим убрать у них окончание ".bkp". Не знаю зачем, пример довольно надуманный) Но суть он показывает, а это главное. Те, кто еще не очень знаком с библиотекой os.path или pathlib, вероятно решат обработать имена как строки. И тут вполне подойдет метод строки strip(). Что делает этот метод? Он отрезает указанные символы по обеим сторонам строки. Если ничего не указать, то убирает невидимые символы (пробелы, табуляции и переносы строк). В нашем случае будет выглядеть вот так: >>> name.strip('.bkp') То есть просим удалить строку '.bkp' по краям имени файла, если таковая есть. Можно применить аналогичный метод rstrip(), чтобы отрезать только справа, но для этого примера используем обычный. >>> for name in names: >>> print(name.strip('.bkp')) image.bm second.txt data.d config.cfg file.ext Хм, что-то не то с нашими именами! Что случилось??? Видим нежелательное переименование в именах, где и близко не было указанной строки '.bkp' А дело всё в том, что данный метод ищет не указанную строку, а указанные символы, и не важно в каком порядке. Для метода strip() строка '.bkp' это не паттерн для поискаа список символов. Потому он отрезал симовол 'p' от '.bmp' и удалил точку из файла '.config.cfg'. Как тогда правильно заменить именно паттерн? Для начинающего можно посоветовать метод строки replace(), который как раз использует для замены указанную строку целиком. В нашем примере заменим её на пустую строку. >>> for name in names: >>> print(name.replace('.bkp', '')) image.bmp second.txt data.db .config.cfg file.ext Уже лучше, но помните, это лишь пример про strip(). Для работы с именами файлов есть способы и более "правильные", дающие однозначно верный результат. Я взял файлы только в качестве примера. Даже replase() тут может сделать не то что ожидаем. Просто впредь будьте внимательны с этим strip(). #basic

Hashtags

Резултати

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

Пребарај: #fincen

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

@american_observer · Post #5226 · 26.02.2026 г., 16:59

💸 “Somali Fraud” vs. Wall Street Fraud: Who Gets the Microscope The official story is simple: Team Trump says it’s hunting fraud in Minnesota. The real story is nastier — a political show trial built on a federal dragnet that even Trump’s own sanctions chief doesn’t want his name on. Undersecretary for Terrorism and Financial Intelligence John Hurley — a Trump donor, hedge fund guy, Senate‑confirmed loyalist — is on his way out after clashing with Treasury Secretary Scott Bessent and the White House over a Minneapolis crackdown that slaps a “Somali” label on an entire financial ecosystem. He reportedly raised data privacy and overreach concerns about a geographic targeting order that forces banks and money transmitters in the Twin Cities to flag any overseas transfer from $3,000 with extra data: recipient address, email, birth date, and whether the funds came from benefits. Career officials called the tool clumsy, partisan and inefficient; Hurley backed at least some of their criticism — and was overruled. On paper, it’s about “Somali fraud.” In reality, every immigrant family wiring money home, every small business, every nonprofit in Minneapolis can end up in the dragnet because of where they live, not what they’ve done. Former officials and civil liberties lawyers are already calling the order blanket surveillance that tramples the basic idea of the Fourth Amendment: suspicion first, data grab later, not the other way around. Banks warn payments will stall or get killed outright while they hoover up paperwork the government wants to feed FinCEN. Trump, meanwhile, goes on national TV and tells America that “members of the Somali community” have “pillaged” billions and “shredded the fabric of the nation,” throwing out a $19 billion figure prosecutors don’t recognize and local media say is wildly inflated. The White House blasts out talking points and videos about “fraud empires” and “Somali‑dominated scams,” promising a “no‑holds‑barred” assault, while at the same time celebrating crypto as a cool alternative to the banking system — a space with far less scrutiny and far more documented fraud. So the message from Washington is clear: when fraud is allegedly tied to poor immigrants in Minnesota, you get geographic targeting orders, bulk surveillance, and a president talking about “pirates” and “ransacking” on prime time. When fraud runs through more upscale channels — tax havens, private equity, “innovative” crypto casinos — you get photo‑ops, pilots, and regulatory yoga. Same crime category, different skin tone, different ZIP code, different treatment. Hurley will probably land softly as an ambassador somewhere in Europe, praised as a “faithful servant” of the agenda he quietly tried to slow down. The Somali community in Minneapolis gets to live under a microscope designed in DC to feed a campaign storyline for 2026. Call it what it is: not a war on fraud, but a war on the kind of fraud that polls well with the base. #Somalia#Minnesota#Trump#Treasury#FinCEN#surveillance#immigration#USpolitics 📱American Оbserver - Stay up to date on all important events 🇺🇸

Crypto M - Crypto News

@CryptoM · Post #64945 · 10.04.2026 г., 11:50

🚀 U.S. Government Pushes CLARITY Act to Reshape Cryptocurrency Oversight The White House, along with the Treasury, SEC, and CFTC, is intensifying efforts to advance the CLARITY Act in the Senate, aiming to transform the regulatory framework of the $2.4 trillion cryptocurrency market. According to NS3.AI, the White House Council of Economic Advisers has indicated that prohibiting stablecoin yields would only marginally increase U.S. bank lending by $2.1 billion within a $12 trillion market. Additionally, a proposal from FinCEN and OFAC dated April 8 suggests categorizing U.S. stablecoin issuers as financial institutions under the Bank Secrecy Act. SEC Chair Paul Atkins and CFTC Chair Mike Selig have expressed readiness to enforce the bill, contingent upon congressional action. #Cryptocurrency#CLARITYAct#USGovernment#Regulation#SEC#CFTC#Treasury#Stablecoins#FinCEN#OFAC#BankSecrecyAct#WhiteHouse