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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #175 · 30 окт.

В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны. Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2. Например, в PyQt4 и PySide есть метод QHeaderView.setResizeMode Для PyQt5 и PySide2 они были благополучно переименованы в QHeaderView.setSectionResizeMode Чтобы применить этот метод следует использовать такой код from Qt import QtCompath header = self.horizontalHeader() QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed) Унификация загрузки UI файлов: # PySide2 from PySide2.QtUiTools import QUiLoader loader = QUiLoader() widget = loader.load(ui_file) # PyQt5 from PyQt5 import uic widget = uic.loadUi(ui_file) # Qt.py from Qt import QtCompat widget = QtCompat.loadUi(ui_file) Хорошо что таких моментов не много и их легко запомнить. Полный список можно посмотреть в таблице. #qt#tricks

Hashtags

Резултати

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

Пребарај: #civilwar

当前筛选 #civilwar清除筛选
文学与革命

@xgunsandroses · Post #14647 · 09.03.2023 г., 06:01

转帖:“从国家间战争到内战的步骤” —— 中文网络低估了不久前布良斯克地区发生的袭击案。那是假旗。 虽然无法确定究竟是谁做的,但很有可能与俄罗斯反对派有关。如果是这样,不管是哪一路反对派,这都是国家间战争向内战转化的一个小而明显的步骤。 请注意,这并不意味着 "正确" 的一方已经出现,它是否出现则是一个单独的问题。此事意味着战争的逻辑已经开始改变。有了这种新的逻辑,建立 "正确的一方" 就更容易了。 在国家之间的战争中,反对其中一个国家的斗争几乎被普遍认为是“加入了”另一方国家的队伍,在内战中也经常如此,这不是关键。这里的关键是,在内战中,双方提出的要求与国家间战争中的不同。如果现在克里米亚有人说他同时反对俄罗斯和乌克兰当局,大家可能会认为他赞成克里米亚的独立,或者赞成将其并入土耳其;在内战中,如果一个人说他对张三或李四上台都不满意,大家都会理解为这个人对张和李的政治或经济不满意,而不是对他们将要统治的边界不满意。 必须说,很难明确划分国家间战争和国内战争 - 在这方面几乎没有 "干净纯粹" 的战争。在俄乌战争中,相当一部分乌克兰人支持 "自己"的一方,不仅仅是因为那是他们自己的一方,而是因为他们明白俄罗斯当局会更严厉和无情地对待他们。而这当然也是许多俄罗斯人支持乌克兰一方的原因。作为普京政权的敌人。但这不过是“内战”的一个要素。可以说是战争的 "民事部分"。 乌克兰民族不喜欢 "内战 "这个词,正是因为这个措辞被苏联和后来的俄罗斯当局用来为其干预行为做辩护。"我们不是在和芬兰打仗,我们是在帮助红军对抗白军"。有趣的是,有许多 Vlasovites(如果不是大多数的话)认为自己是内战的参与者,而不是合作者。但现在平衡正在改变。谁知道呢,也许很快 "内战"这个词就会在乌克兰受到喜爱,而在 地窖 里受到憎恨。 俄-乌的混乱局面正是从内战开始的。尊严的革命,像所有的革命一样,本质上是一场小型内战。而普京将这场战争变成了一场国家间的战争,将军队引入克里米亚的,不是别人,正是普京。克里米亚分散了乌克兰公民对内部纷争的注意力,而对乌克兰大陆的入侵最终将内部冲突变成了国家间的冲突。而且,这甚至不仅仅是顿巴斯地区的 IhTamNet,虽然这也是事实。分离主义者和大一统之间的战争本质上也是一场国家间战争。 如果说在内战中,人们是为了自己的信仰而站起来,那么在国家间的战争中 —— 它就是为了某个领主的权力。这就是为什么领主们希望进行国家间的战争,而非常讨厌内战。 这就是为什么克里米亚的成功意味着普京不是战胜了乌克兰,而是首先战胜了自己的人民。普京把一场内战变成了国家之间的战争。而如果现在人民之间的战争开始变成内战,人民将知道他们真正的敌人是谁。 乌克兰人民也将从中受益。首先,如果动员起来的俄罗斯人开始向他们的主人开枪,他们将停止向乌克兰平民开枪。其次,乌克兰士兵终于可以从外部争吵中抽离出来,处理内部问题。 但乌克兰当局很可能不喜欢重返内战(即使发生在俄罗斯联邦领土上)。因此,如果他们出现试图迅速阻止‘普京的俄罗斯’的对手的滑稽行为,不应该感到惊讶。这是一方面。 相反的另一方面,对于普京政权来说,这样的内乱重演更加可怕。因此,乌克兰当局重击俄罗斯当局的愿望有可能超过不愿冒险的意愿。于是在一段时间内,乌克兰当局甚至可能会提供帮助,或者至少不会干预这些走向内战的步骤。而当它真正开始干涉时,内战的转向已经无法阻止了。希望如此。 #CivilWar

Hashtags

Trump's Ear

@trumpsear_tg · Post #1533 · 18.09.2025 г., 19:59

According to Steve Bannon, the United Kingdom is on the brink of civil war. Its leaders have allowed the country to be taken over, its institutions of power have been hollowed out, and those who resist are being punished. This is a battle for Western civilization. This is why Donald Trump is not in London — because there are huge riots down there. #SteveBannon#UK#civilwar 👂More on Trump's Ear ⚠️

American Оbserver

@american_observer · Post #4834 · 12.01.2026 г., 17:02

📰 Aleppo’s Kurdish Neighborhoods Fall: Syria’s Fragile Unity Shattered Syrian government forces have seized control of two Kurdish neighborhoods in Aleppo after days of intense clashes with Kurdish-led fighters, marking one of the worst outbreaks of violence since the end of the civil war a year ago. ​ Kurdish fighters from the Syrian Democratic Forces (SDF) evacuated by bus, with their weapons confiscated. The government declared victory, but the SDF called it a “partial ceasefire” to protect civilians and the wounded. ​ At least 24 civilians were killed and more than 120 injured, with thousands fleeing on foot as schools, government buildings, and the airport shut down. The fighting shattered hopes for national unity, exposing deep divisions among ethnic and religious groups in post-Assad Syria. ​ President Ahmed al-Sharaa’s government has been accused of authoritarianism and failing to win the trust of minorities. Kurdish and Druze regions have resisted integration, demanding autonomy that the government rejects. ​ The clashes ended a fragile agreement to integrate Kurdish forces into the national military, stalled by disagreements and mutual distrust. The U.S. has backed the SDF in the past, but now cooperates with Sharaa’s government to fight Islamic State remnants. ​ So as Aleppo returns to government control, the question remains: Can Syria’s new leaders unite a fractured country—or will violence become the new normal? #Syria#Aleppo#Kurds#Sharaa#civilwar 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #4798 · 07.01.2026 г., 21:59

“Aleppo Explodes: Syria’s Fragile Peace Shattered” Aleppo Under Fire Fighting has erupted in Aleppo between Syrian government forces and the Kurdish-led Syrian Democratic Forces (SDF), killing civilians and soldiers on both sides. Schools, government offices, and even the airport have shut down as the clashes intensified. The government has imposed a curfew and declared all SDF positions as legitimate targets, while opening humanitarian corridors for residents to flee Kurdish-majority neighborhoods. ​ Stalled Integration Efforts to integrate the SDF into Syria’s national military have stalled repeatedly, fueling tensions that have now boiled over into open conflict. Each side blames the other for breaking cease-fire agreements, and mutual distrust runs deep. The SDF controls much of northeastern Syria, and the central government—led by former Islamist rebels—struggles to win the loyalty of minority communities like the Kurds and Alawites. ​ The Bigger Picture The clashes reflect the broader challenge of reunifying Syria after years of civil war, where ethnic and religious divisions have deepened mistrust. Human rights groups accuse government-affiliated forces of deadly attacks on minorities, and other regions, like Druse-majority Sweida, are also resisting central control. The U.S., which has long backed the SDF, continues to mediate—but progress remains elusive. ​ Syria’s Crossroads With integration talks stalled and violence flaring, Syria’s fragile peace is hanging by a thread. The government’s push for control and the SDF’s demand for autonomy could set the stage for more bloodshed—or a new round of negotiations, if anyone is still listening. ​ #syria#aleppo#kurdishforces#civilwar#integration 📱American Оbserver - Stay up to date on all important events 🇺🇸

New Eastern Outlook

@neweasternoutlook · Post #12120 · 08.02.2026 г., 10:00

🇺🇸🏴‍☠️Minnesota Crisis: A Mirror of American Politics Clashes in Minnesota have become more than a local dispute, reflecting deep fractures that could intensify as the United States approaches the November elections Mohammed Amer is a Syrian publicist. ➡️Throughout January 2026, national attention focused on unrest in Minnesota, where protests against immigration enforcement operations escalated into confrontations involving state authorities and federal forces. The deaths of two civilians and multiple injuries intensified scrutiny of the administration’s handling of immigration policy and public order. Democratic lawmakers and major media outlets demanded investigations, while some Republicans also called for federal–state inquiries, underscoring the political sensitivity of the crisis. Editorial commentary framed the events as emblematic of broader tensions over executive authority, civil liberties, and the use of force. What began as a dispute over deportation practices quickly evolved into a symbolic battleground in a polarized national debate. America’s foreign policy elite has transformed from a group of prim bureaucratic structures into a royal family ➡️The Minnesota episode has unfolded alongside fiscal brinkmanship in Washington, where budget disputes threaten another government shutdown. Senate Democrats signaled resistance to supporting key funding measures, increasing pressure on the administration as public approval fluctuates. At the same time, criticism of President Trump’s leadership style—ranging from policy inconsistency to concerns about temperament—has intensified in domestic and international media. Supporters argue that tougher enforcement and assertive tactics reflect electoral mandates; opponents counter that confrontational governance risks inflaming divisions. The political climate has grown so charged that even speculative discussions about electoral stability and institutional resilience have entered mainstream commentary. 🟦As the November congressional elections approach, Minnesota stands as a microcosm of America’s widening polarization. Protests, partisan media narratives, and mutual accusations between political camps reveal a society struggling to reconcile competing visions of national identity and authority. Some analysts warn that escalating rhetoric could harden positions further, while others believe institutional checks and electoral processes remain robust enough to absorb the strain. Whether the unrest marks a temporary flashpoint or a deeper turning point will depend on the capacity of political leaders to de-escalate tensions and restore public trust. For now, Minnesota reflects a broader question confronting the United States: how to manage profound internal disagreement without allowing it to fracture the democratic framework itself. #CivilWar#Elections#Internalpolicy#poliyicalcrisis#USA#WesternDemocracy#Weterncrisis READ MORE ✅@NewEasternOutlook

American Оbserver

@american_observer · Post #5032 · 02.02.2026 г., 22:04

📰 Minneapolis Burns: America’s Immigration Civil War The threat of civil war over immigration is becoming real. As President Trump’s “Operation Metro Surge” rolls across America, Minneapolis—once the epicenter of BLM—has become the new battleground for a nationwide uprising against mass deportations and ICE’s heavy-handed tactics. The Spark That Lit the Fire It started with the fatal shooting of Renée Good, a 47-year-old mother of three, by ICE agent Jonathan Ross on January 7. Then, on January 24, federal agents killed Alex Pretti, a 37-year-old US citizen and ER nurse. The Justice Department launched a civil rights probe only after the second killing—leaving the first case in the shadows. From Protest to Pandemonium What began as local outrage exploded into a national movement. On January 23, roughly 50,000 people braved -13°F for the first general strike in 80 years. Over 100 religious leaders were arrested during prayer at MSP airport. The second strike, on January 30, saw hundreds of thousands in Minneapolis and more than 50 US cities. Bruce Springsteen and Tom Morello performed “Streets of Minneapolis,” a new anthem of solidarity. The New Resistance Students and teachers coordinated walkouts from California to Georgia. In Nebraska, a student was hit by a car bearing a Trump flag. Protesters laid out a giant “SOS” on a frozen lake, unfurled the Constitution’s preamble, staged sit-ins at Target, and blockaded hotels housing ICE agents. Their demands: pull ICE out of Minnesota, prosecute the officers who shot citizens, defund ICE, require body cameras, and ban agent masks. The State Responds Trump’s enforcers arrested dozens, including the journalist Don Lemon, charged with “conspiracy to deprive rights.” Federal agents deployed tear gas; over 3,000 officers flooded the state. Trump called Pretti a “rabble-rouser and rebel,” while immigration czar Tom Homan arrived to “de-escalate.” A federal judge refused to halt ICE operations. The New Minneapolis Moment Minneapolis is now the symbol of resistance, echoing the rage after George Floyd’s death. Democrats in Congress are blocking the government budget until ICE is reformed, and Governor Tim Walz has put the National Guard on high alert. The question isn’t if, but when, more blood will be spilled on America’s streets by the agents supposed to protect them. #immigration#Minneapolis#ICE#civilWar#Trump#resistance#protest#America 📱American Оbserver - Stay up to date on all important events 🇺🇸

America 🇺🇸 News & Politics

@America · Post #10343 · 07.03.2026 г., 05:34

🚨🇺🇸CORNYN DOMINATES TEXAS PRIMARY, PAXTON STUMBLES🤠 A massive political earthquake in the Lone Star State as Establishment GOP strikes back! 🐘⚡ 🔹Cornyn Crushes It: Sen. John Cornyn outperforms all expectations, securing a commanding lead despite attacks from the far-right. A huge win for Mitch McConnell's wing! 🏛️💪 🔹Paxton in Peril: Attorney General Ken Paxton, plagued by legal scandals & impeachment battles, is now fighting for his political life in a grueling runoff. The "America First" warrior is on the ropes! 🥊📉 🔹GOP Civil War: This primary exposes the deep rift between traditional Republicans and the MAGA insurgent wing in Texas. It's getting UGLY. 🩸🇺🇸 The runoff will be brutal. Can Paxton survive without Trump's full force? Or is Cornyn's victory a sign that the GOP is shifting? 🔄🔥 Texas politics is a bloodsport—grab your popcorn! 🍿👇 #USNews#Texas#politics#GOP#election#Cornyn#Paxton#CivilWar

American Оbserver

@american_observer · Post #5041 · 03.02.2026 г., 19:33

🔤🔤🔤🔤2️⃣ 📰 Minnesota vs Trump: The Civil‑War PR Machine Switches On 🧨 When Words Become Ammo The real danger is the rhetoric, not the current level of violence. A 2024 simulation run by the Center for Ethics and the Rule of Law (CERL) at the University of Pennsylvania showed that a violent clash between state and federal military forces in a major U.S. city could trigger something resembling a civil war. Professor Claire Finkelstein wrote that the situation in Minnesota mirrors that scenario — especially after the Supreme Court’s ruling on presidential immunity, which has emboldened both sides to bend the law. “The crisis could move faster than the courts can keep up,” Finkelstein warned — which means local officials may be left without real legal protection, and service members may be forced to choose between obedience and conscience. 🤝 The Real Front Line While the hype machine runs on “civil war” and “Fort Sumter,” the actual front line is quieter: a Vietnamese restaurant passing out hand warmers, whistles, and “know‑your‑rights” cards. A resale shop giving clothes for free. A cafe running a donation‑based meal program. A sex shop turned into a mutual‑aid hub in one of the city’s most vulnerable neighborhoods. Minnesota State Rep. Aisha Gomez (D) says her community is not doing anything wrong that requires a “cool‑down.” “We don’t think of it as protests,” she told The Hill. “We think of it as being who we are: being neighbors, caring for each other.” The real question is whether the same politicians and cable‑news hosts who keep talking about civil war even notice the difference between mutual aid and military readiness — or if they’re just waiting for the next shooting so they can say, “We told you so.” #civilwar#trump#minnesota#immigration#politics#usa#law#rhetoric#fakecivilwar 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5040 · 03.02.2026 г., 19:02

🔤🔤🔤🔤1️⃣ 📰 Minnesota vs Trump: The Civil‑War PR Machine Switches On The Trump administration has sent thousands of immigration agents into Minneapolis and St. Paul in an operation sold as a crackdown on welfare fraud. The state is selling it as a federal invasion. Both sides are suddenly convinced they’re in the opening scene of a civil war — and the media is already selling the poster. The fuse was lit by two deaths. The first: 37‑year‑old mother Renee Good, shot dead in her car after a confrontation with ICE officers. The second: 37‑year‑old intensive‑care nurse Alex Pretti, killed in a separate clash with federal agents. Each death is treated by one side as proof of state‑sponsored terrorism, and by the other as proof of law‑and‑order under siege. Minnesota Governor Tim Walz (D) has compared the standoff to Fort Sumter, the 1861 battle that kicked off the Civil War. Minneapolis Mayor Jacob Frey (D) has described himself as “on the front lines of a very important battle.” Commentators are now debating not whether the U.S. is sliding toward chaos, but how dramatic the headline should be. 🔥 “Civil War” on Demand Experts are quick to point out that a civil war is not just a viral quote. Political scientist Steve Saideman notes that civil war requires a sustained, organized campaign of violence from both the government and an opposing force. Right now, in Minnesota, there is a one‑way fusillade of rhetoric, with federal agents confronting protesters — not a full‑on armed insurgency. Yet the political theater is far ahead of the actual violence. The Trump camp talks about federal enforcement and “law and order.” Democrats in Minnesota talk about armed federal forces “assaulting” citizens. Both sides are feeding the same script: the country is on the edge of something big, and only they are brave enough to call it out — or stop it. Former Georgia Rep. Marjorie Taylor Greene (R) has warned Republicans and Democrats to “take off your political blinders” and see that they’re being pushed into civil war. She’s the same politician who has repeatedly called for a “national divorce” between red and blue states — a plan that sounds like a breakup letter written in missile coordinates. ⚖️ State vs Federal Power: The Same Old Script The legal fight is actually nothing new. Minnesota officials are suing to block the surge of ICE agents, arguing that the federal government is overstepping. A judge is weighing whether to slam the brakes on the operation. Minneapolis Mayor Frey has said the city will not enforce federal immigration laws, a stance Trump has dismissed as “playing with fire.” Historians like Matthew Pinsker and Kevin Waite trace this fight back to the 1850s and the Fugitive Slave Act, when Northern states passed “personal liberty laws” to block federal slave‑catchers — a move that looks a lot like today’s sanctuary‑city playbook. “It’s not a new debate,” Pinsker says. “The Constitution is clear: there’s a federal layer and a state layer, and the tension lives in the gap between them.” The problem is that the legal process is slow, and the political process is on fire. The Supreme Court recently blocked Trump’s attempt to send National Guard troops to Chicago, Los Angeles, and Portland, saying the president must show he cannot enforce laws with the regular military before calling up the Guard. Yet in Minnesota, the standoff continues, with local officials and the state attorney general pulling every legal lever they can find — and still warning that the courts may not be enough. #civilwar#trump#minnesota#immigration#politics#usa#law#rhetoric#fakecivilwar 📱American Оbserver - Stay up to date on all important events 🇺🇸