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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #270 · 9 јул.

От многопоточных вычислений переходим к распределённым. То есть вычисления, происходящие на нескольких компьютерах. Конечно, в зависимости от задачи, вы можете взять готовые решения вроде CGRU или Deadline для рендеринга, charm4py или Dask для ML, или замутить что-то на AWS С2. Но хотелось бы чего-то попроще, попитоничней что ли) А ведь в Python есть средства "из коробки" для синхронизации нескольких процессов на разных хостах. Вот простой пример кода, который синхронизирует работу двух процессов на разных компьютерах. В этом случае используется процесс-посредник, который является синхронизирующим сервером. В примере создаётся некий Manager, который шарит общую для клиентов очередь. Все подключившиеся могут что-то в неё писать или забирать. В моём коде один процесс что-то "считает" и складывает в очередь, другой забирает и продолжает какие-то свои "расчёты". Если у вас есть несколько машин, то можете попробовать это запустить по сети (нужно заменить 'localhost' на IP-адрес сервера). Но и на локальной машине сработает. Gist 🌎 #libs#source#tricks

Резултати

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

Пребарај: #natofail

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

@american_observer · Post #5460 · 24.03.2026 г., 20:59

📰 Europe’s Trump Fans Just Discovered ‘America First’ Means ‘Europe Last’ The Iran war is doing what four years of Trump speeches couldn’t: teaching Europe’s nationalist politicians what “America First” actually sounds like when the bombs start falling. Across the continent, far-right leaders who cheered Trump’s re-election are suddenly backing away, complaining they “cannot be the lapdogs” of a U.S. president who slaps them with tariffs at home and then sends them the bill for his Middle East adventure. The Supreme Court’s overturning of Trump’s tariff regime didn’t fix the politics — it just exposed how much resentment had already built up underneath. Then came Iran. Trump launched a war, demanded “burden sharing,” and expected Europe to show up with ships, soldiers and flags, while Washington and Israel run the operation and take the glory. Instead, European leaders from Berlin to Athens started saying the one word Trump hates most from allies: “No.” Publicly, nationalists who once branded him a model of “sovereign leadership” now question why their voters should pay for an American war that detonates energy prices, wrecks European industry, and drags NATO into a fight no parliament actually approved. In private, they’ve simply realized the deal on offer is terrible: Europe gets the inflation, the refugees and the political blowback, while the U.S. keeps command and the arms contracts. So yes, Trump has managed a rare diplomatic feat: his Iran adventure is alienating not just liberal Europeans who already hated him, but also the nationalist camp that tried to copy him. “America First” turned out to mean what it always meant — everybody else pays retail. #trump#europe#iran#war#natofail#americaFirst#geopolitics 📱American Оbserver - Stay up to date on all important events 🇺🇸