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

Резултати

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

Пребарај: #usda

当前筛选 #usda清除筛选
Addis Standard

@addisstandardeng · Post #21952 · 06.04.2026 г., 12:34

News: #Ethiopia wheat imports to persist as rising prices, tight supply offset production gains A new #USDA report projects that Ethiopia will continue importing about 1.4 million metric tons of #wheat despite increased domestic production, citing tight supply and surging prices. The report also notes that domestic wheat prices have risen sharply, reinforcing reliance on imports even as output grows. Despite the expected growth in wheat production, the report warns that domestic wheat supplies remain tight, forcing millers and traders to increasingly rely on imports. #Russia remains Ethiopia’s largest wheat supplier, accounting for 68 percent of imports, followed by #Ukraine and #Romania. Together, the three countries supplied 93 percent of Ethiopia’s wheat imports, underscoring the country’s continued reliance on Black Sea markets. Prime Minister Abiy Ahmed has repeatedly remarked rejecting wheat import as a defining feature of Ethiopia........ Read more: https://addisstandard.com/?p=56330

Addis Standard

@addisstandardeng · Post #21175 · 24.01.2026 г., 09:23

News: USDA purchases #US wheat to support agricultural development in #Ethiopia and #Kenya The United States Department of Agriculture (#USDA) has purchased 183,700 metric tons of U.S. hard red winter (HRW) wheat to support agricultural development projects in Ethiopia and Kenya, according to the U.S. Wheat Associates (USW). The purchase, made in mid-January by the USDA’s Foreign Agricultural Service (FAS), marks the first U.S. wheat procurements under the Food for Progress program for the 2025 fiscal year. The wheat will be delivered in four cargoes—three from #Houston, #Texas, and one from #Kalama, #Washington—destined for the two #East_African countries. Food for Progress is a U.S. government program that provides agricultural commodities to support food security and development in partner countries. Under the program, donated food commodities are sold locally,.... https://web.facebook.com/AddisstandardEng/posts/pfbid0qv13B87UsJgyuNpxxeB8Be2fj41XGjLZ1aRCDYLc85AGHGZ3hrMK9QRFKRDiQDcal

Crypto M - Crypto News

@CryptoM · Post #64723 · 09.04.2026 г., 16:05

🚀 USDA Maintains Soybean Production Forecast for 2025/2026 The United States Department of Agriculture (USDA) has maintained its forecast for the 2025/2026 soybean production at 4.262 billion bushels, unchanged from its March estimate. According to Jin10, the USDA also projects the ending stocks for the same period to be 350 million bushels, slightly above the market expectation of 349 million bushels, and consistent with the March forecast. Additionally, the USDA anticipates the soybean yield to remain at 53 bushels per acre, the same as the previous month's projection. #USDA#Soybean#Agriculture#Production#Forecast #2025 #2026 #Yield#EndingStocks#USAgri