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

Резултати

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

Пребарај: #mlx

当前筛选 #mlx清除筛选
GitHub Trends

@githubtrending · Post #15143 · 14.09.2025 г., 12:00

#python#llms#mlx MLX LM is a Python tool that helps you run and fine-tune large language models (LLMs) efficiently on Apple Silicon Macs. It connects easily to thousands of models on Hugging Face, supports model quantization to save memory, and allows distributed training. You can generate text or chat with models via simple commands or Python code. It also offers features like prompt caching and memory optimization for handling long texts, making it faster and less resource-heavy. This means you can run powerful AI models locally on your Mac without needing expensive cloud services, saving cost and improving speed. https://github.com/ml-explore/mlx-lm

GitHub Trends

@githubtrending · Post #14655 · 01.05.2025 г., 13:30

#typescript#electron#llama#llms#lora#mlx#rlhf#transformers Transformer Lab is a free, open-source tool that lets you easily work with large language models on your own computer, offering one-click downloads for popular models like Llama3 and Mistral, fine-tuning across different hardware (including Apple Silicon and GPUs), and features like chatting, training, and evaluating models through a simple interface—saving you from complex setups like CUDA or Python version issues[1][2][5]. https://github.com/transformerlab/transformerlab-app

GitHub Trends

@githubtrending · Post #15614 · 13.04.2026 г., 11:30

#typescript#ai#cuda#mlx#qwen3_tts#qwen3_tts_ui#voice_ai#voice_clone#whisper Voicebox is a free, open-source voice synthesis studio that lets you clone voices, generate speech in 23 languages, and apply audio effects—all running privately on your computer. You can create realistic voice clones from just seconds of audio, use five different text-to-speech engines for different needs, add effects like reverb and pitch shift, and build multi-voice projects with a timeline editor. The key benefit is complete privacy: your voice data and AI models never leave your machine, unlike cloud-based alternatives. It also includes an API for building voice-powered applications and works across Mac, Windows, and Linux with GPU acceleration support. https://github.com/jamiepine/voicebox

GitHub Trends

@githubtrending · Post #14684 · 08.05.2025 г., 12:00

#python#apple_silicon#audio_processing#mlx#multimodal#speech_recognition#speech_synthesis#speech_to_text#text_to_speech#transformers MLX-Audio is a powerful tool for converting text into speech and speech into new audio. It works well on Apple Silicon devices, like M-series chips, making it fast and efficient. You can choose from different languages and voices, and even adjust how fast the speech is. It also includes a web interface where you can see audio in 3D and play your own files. This tool is helpful for making audiobooks, interactive media, and personal projects because it's easy to use and provides high-quality audio quickly. https://github.com/Blaizzy/mlx-audio

GitHub Trends

@githubtrending · Post #15600 · 04.04.2026 г., 11:30

#python#apple_silicon#florence2#idefics#llava#llm#local_ai#mlx#molmo#paligemma#pixtral#vision_framework#vision_language_model#vision_transformer MLX-VLM lets you run, chat with, and fine-tune Vision Language Models (VLMs) plus audio/video models on your Mac using MLX—install easily with `pip install -U mlx-vlm`. Use CLI for quick text/image/audio generation (e.g., `mlx_vlm.generate --model ... --image photo.jpg`), Gradio UI for chats, Python scripts, or a FastAPI server with OpenAI-compatible endpoints supporting multi-images/videos. Features like TurboQuant cut KV cache memory by 76%, and LoRA/QLoRA fine-tuning works on consumer hardware. You benefit by experimenting with powerful multimodal AI locally—fast, memory-efficient, no cloud costs, perfect for Mac users tweaking models affordably. https://github.com/Blaizzy/mlx-vlm