@Eternalanquan · Post #1685 · 18.02.2026 г., 03:48
day1 in mobile security #learn
Hashtags
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
Пребарај: #learn
@Eternalanquan · Post #1685 · 18.02.2026 г., 03:48
day1 in mobile security #learn
Hashtags
@arkibug · Post #442 · 17.05.2022 г., 06:10
A fun and colorful explanation of how DNS works. https://howdns.works english - episode 1🖼 es - de - fr #learn
Hashtags
@djangoproject · Post #545 · 11.01.2018 г., 14:08
https://online.dr-chuck.com/about.php This is the web site of the "University of Dr. Chuck". I teach a number of free/online/open courses based on free and open materials and this site is the course catalog for my free courses. #learn#python
@djangoproject · Post #524 · 17.12.2017 г., 16:42
https://python.swaroopch.com/ A Byte of #Python "A Byte of Python" is a free book on programming using the Python language. It serves as a tutorial or guide to the Python language for a beginner audience. If all you know about computers is how to save text files, then this is the book for you. #learn
@djangoproject · Post #486 · 31.10.2017 г., 19:49
https://intellipaat.com/tutorial/python-tutorial/ This #Python free tutorial is for beginners as an introduction to learn this powerful programming language. #learn
@djangoproject · Post #432 · 07.09.2017 г., 09:30
# In Python 3.4+ you can use # contextlib.suppress() to selectively # ignore specific exceptions: import contextlib with contextlib.suppress(FileNotFoundError): os.remove('somefile.tmp') # This is equivalent to: try: os.remove('somefile.tmp') except FileNotFoundError: pass # contextlib.suppress docstring: # # "Return a context manager that suppresses any # of the specified exceptions if they occur in the body # of a with statement and then resumes execution with # the first statement following the end of # the with statement." #python#learn
@djangoproject · Post #412 · 15.08.2017 г., 05:11
https://intellipaat.com/tutorial/python-tutorial/ Often, programmers fall for Python because of its minimum compilation time and speedier edit-test-debug cycle. Python is a go-programming language that has automated the way programmers code. This is indeed one of the major reasons developers have switched their interest to Python programming language. It helps you write simple scripts at relatively faster rate compared to Java, C, C++ . Get #Python Certification in just 16 Hours GET CERTIFIED #learn
@djangoproject · Post #284 · 31.03.2017 г., 06:53
http://docs.python-guide.org/en/latest/ Greetings, Earthling! Welcome to The Hitchhiker’s Guide to Python. This is a living, breathing guide. If you’d like to contribute, fork us on GitHub! This handcrafted guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis. This guide is opinionated in a way that is almost, but not quite, entirely unlike Python’s official documentation. You won’t find a list of every #Python web framework available here. Rather, you’ll find a nice concise list of highly recommended options. #learn
@djangoproject · Post #190 · 30.10.2016 г., 07:40
http://www.python-course.eu/finite_state_machine.php #learn#python
@tomoko_channel · Post #1700 · 01.05.2026 г., 04:16
5月决定就是: Complete CS146S "The Modern Software Developer" | 在一个月内完成「The Modern Software Developer」课程。 🌟🎉 恭喜恭喜!!! (2026-05-01 传送门) #learn#random_todolist
Hashtags
@tomoko_channel · Post #472 · 12.06.2024 г., 06:07
6月决定就是: Math | 数学基础 | 例如可以每天看一下 3Blue1Brown 的视频 🌟🎉 恭喜恭喜!!! (2024-06-12 传送门) #learn#random_todolist
Hashtags
@TFGames · Post #1714 · 28.12.2023 г., 20:51
#LEARN#BATTLE https://testflight.apple.com/join/zxzIw9a5