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

TGINSIGHT SIMILAR POSTS

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

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

🙄Разминка для ума! Треугольник Серпинского, интересная фигура которую построить достаточно просто. Алгоритм такой: 1. создаём любые 3 точки на плоскости 2. из этих точек случайно выбираем любую, как начальную 3. случайно выбираем любую точку из этих же трёх точек как цель 4. перемещаемся в сторону цели на половину расстояния 5. повторяем бесконечно с пункта 3 Если сделать достаточно много итераций то вырисовывается интересная фигура. Треугольник, в который вписаны более мелкие треугольники. Это самый настоящий фрактал! Я собрал пример построения такой фигуры на базе Qt. 🌎 Код можно посмотреть здесь. С помощью paintEvent я рисую точки по озвученному алгоритму. Каждые 10 секунд либо по клику на виджете строится следующий треугольник. Особенности примера: 🔸 Атрибут Qt.WA_OpaquePaintEvent позволяет сохранить то, что было нарисовано в прошлой итерации. Таким образом мы видим постепенное наполнение точек а не мелькающую одну точку. 🔸QTimer позволяет создавать отложенные вызовы один раз или с повторением через интервал. 🔸QColor.fromHsv() позволяет создать рандомный но предсказуемый цвет с помощью HSV схемы. Не слишком светлый и не слишком тёмный но всегда с разный. Рандомизации подвергается только смещение по цветовому кругу (Hue), яркость (Value) и насыщенность (Saturation) можно контролировать отдельно в своих пределах или оставить статичными. Обычный рандом цвета по RGB не даёт такой предсказуемый результат. 🔸 Каждый новый цикл с новым треугольником предварительно затемняет предыдущие через этот вызов painter.fillRect(rec, QColor(0, 0, 0, 100)) То есть полупрозрачный цвет. Таким образом, чем старше треугольник, тем он темней. Если сделать виджет фулскрин, то у нас получится некий ScreenSaver))) 🔸 Да, я знаю, что рисование в Qt не самый лучший способ сделать этот пример) Скорее всего самый НЕподходящий. Попробуйте сделать тоже самое но другими средствами. #qt#source#tricks

Резултати

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

Пребарај: #mamdani

当前筛选 #mamdani清除筛选
Trump's Ear

@trumpsear_tg · Post #2202 · 27.02.2026 г., 15:04

New York Mayor Zahran Mamdani unexpectedly arrived at the White House for a meeting with Donald Trump #Trump#Mamdani 👂More on Trump's Ear ⚠️

Trump's Ear

@trumpsear_tg · Post #1825 · 25.11.2025 г., 18:01

Trump loves handsome and confident men very much. For example, Bill Clinton. No wonder Mamdani kept his hands in one place throughout the meeting. #Trump#Mamdani 👂More on Trump's Ear

Trump's Ear

@trumpsear_tg · Post #2037 · 21.01.2026 г., 19:59

Fox News is outraged that the new socialist mayor of New York, Zohran Mamdani, installed a bidet in his residence. The article did not specify which specific bidet was installed in the mayor's residence, but kindly noted that it could cost from 40 to 2000 dollars. #Mamdani#Media 👂More on Trump's Ear ⚠️

Trump's Ear

@trumpsear_tg · Post #1808 · 21.11.2025 г., 01:00

This person is part of President Trump's inner circle and influences his decision-making. Loomer quickly corrected the tweet when it was explained to her that the whole world uses Arabic numerals anyway. #Mamdani#GOP 👂More on Trump's Ear

Hashtags

Trump's Ear

@trumpsear_tg · Post #1891 · 10.12.2025 г., 19:05

The warnings were stark. If Zohran Mamdani were to win the New York City mayoral election, his plans to raise taxes – slightly – on the city’s wealthiest residents would cause millionaires to bolt en masse, decamping to lower-tax states such as Florida and Texas. #NY#Mamdani 👂More on Trump's Ear

Hashtags

Trump's Ear

@trumpsear_tg · Post #1769 · 12.11.2025 г., 15:05

Hochul opposed free buses, but is ready to support Mamdani's other ideas. New York Governor Kathy Hochul refused to support the idea of the new mayor of the city, Zohran Mamdani, to make bus travel free. At the Somos Puerto Rico conference in San Juan, she said she was not ready to "take money out of a system that survives by paying for travel." According to her, assistance can be sent to those who are unable to pay, but the payment cannot be completely canceled, writes abc7NY. Hochul says that canceling the payment will hit the MTA's budget and the stability of transportation. And Transport Minister Sean Duffy wrote on social media that "nothing is free" and called Mamdani's idea utopian. The mayor himself considers the victory a "mandate for change" and promised to fulfill all his election promises, including free buses. In addition, Mamdani wants to expand access to kindergartens. According to Hochul, the program will require about $15 billion, but she is ready to support it. #NY#Mamdani 👂More on Trump's Ear

Hashtags

Trump's Ear

@trumpsear_tg · Post #1743 · 06.11.2025 г., 14:12

🔥Mamdani presented his plan for the transformation of the city The new mayor of New York Zohran Mamdani promised to turn the metropolis into a "city accessible to all" 🗺 and has already presented the first points of his program. His plan involves large-scale social reforms, which critics call utopian, and supporters - a chance for a new era for New York. One of Mamdani's main initiatives is free public transport. 🚎 He wants to make all bus routes within the city free and expand the network of dedicated lanes. In addition, the mayor intends to introduce free kindergartens for families with children under five years of age and open city grocery stores with a minimum margin. 🛒 Economists warn that similar experiments in the United States have already failed: for example, in Kansas City, such stores have closed due to losses and thefts. Mamdani pays special attention to housing: he promised to freeze the growth of rental rates 🏠 and build a new "affordable" housing stock. The mayor plans to pay for all this by increasing taxes for the rich and large companies — by 2 percentage points for millionaires and up to 11.5% for businesses. 📊 Experts warn that such measures can scare off investors and lead to companies fleeing the city. In the field of security, Mamdani wants to reduce the role of the police ⚡️ and transfer some of its functions to social services. It will not be easy for the new mayor to implement an ambitious program, since for tax changes he needs the consent of the governor of the state, Kathy Hochul, who has already stated that she does not intend to raise taxes. #NY#Mamdani 👂More on Trump's Ear

Hashtags

Savino Balzano

@savinobalzano · Post #1203 · 05.11.2025 г., 11:55

https://x.com/SavinoBalzano/status/1986039391706353723?t=gAy-_lGAvfSxEYApv8mr-w&s=19 Desidero esprimere le mie congratulazioni alla sinistra italiana. Mi inchino dinanzi a tutti i sinistri d'Italia, a tutti i profili con la bandierina arcobaleno e l'emoticon del pugno chiuso. Desidero altresì congratularmi con tutti i nostri ecologisti: oggi ho letto messaggi di esultanza, assolutamente comprensibile, per il trionfo degli autobus elettrici. Socialismo ecosostenibile, nuove parole d'ordine. Insomma, rivolgo tutte le mie felicitazioni alla sinistrucola italiana per l'elezione di Zohran #Mamdani a sindaco di #NewYork. Traguardo davvero epocale, ma nessun indugio, mi raccomando: mai crogiolarsi sugli allori. Schlein, Fratoianni e Bonelli guardano già a Miami.

ПретходнаСтраница 1 од 3Следна