tag:blogger.com,1999:blog-25774563777235889292026-03-12T07:57:04.876-07:00python-catalinPython tutorials with source code, examples, guides, and tips and tricks for Windows and Linux development.Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]Blogger838125tag:blogger.com,1999:blog-2577456377723588929.post-20981246419876275682026-03-12T07:57:00.000-07:002026-03-12T07:57:04.838-07:00Python Qt6 : schemdraw - 001.Today, simple example with PyQt6 and schemdraw : # -*- coding: utf-8 -*- import sys import schemdraw import schemdraw.elements as elm from PyQt6.QtWidgets import QApplication, QWidget, QLabel, QPushButton, QVBoxLayout, QScrollArea from PyQt6.QtGui import QPixmap def draw_bistabil_grid(state): """ state = 0 -> switch spre R3, LED1 aprins state = 1 -> switch spre R4, LED2 aprins ""Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-40111627860157284732026-03-12T07:21:00.000-07:002026-03-12T07:21:00.443-07:00News : Major new features of the 3.15 series, compared to 3.14Python 3.15 is still in development. This release, 3.15.0a7, is the seventh of eight planned alpha releases. ...The JIT compiler has been significantly upgraded, with 3-4% geometric mean performance improvement on x86-64 Linux over the standard interpreter, and 7-8% speedup on AArch64 macOS over the tail-calling interpreter See the official blog website . Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-60328179748977291142026-03-11T08:02:00.000-07:002026-03-11T08:02:34.170-07:00Python Qt6 : testing with PyQt and llama3.1:8b.Today, I tested the ollama with pyqt6 and works great: Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-37358035108219020372026-03-07T06:51:00.000-08:002026-03-07T06:51:39.693-08:00Python 3.13.0 : schemdraw high-quality electrical circuit schematic.Schemdraw is a Python package for producing high-quality electrical circuit schematic diagrams. Circuit elements are added, one at a time, similar to how you might draw them by hand, using Python methods. This is the install step with pip tool: pip install schemdraw WARNING: Ignoring invalid distribution ~adquery-ocp (C:\Python313_64bit\Lib\site-packages) Collecting schemdraw Downloading Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-64315059408720965902026-03-03T11:41:06.115-08:002026-03-03T11:41:42.810-08:00Python 3.13.0 : webcam Falticeni - processing HLS .m3u8 video stream.Python can process data from an HLS (.m3u8) video stream, such as the one used on the Fălticeni webcam page (which loads the stream through index.m3u8). Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-75349048183566412352026-03-02T09:01:00.000-08:002026-03-02T09:01:10.478-08:00Python 3.13.0 : the manim python module - part 002.The last tutorial was on this post. The manim packege can be install with pip tool: pip install manim ... Successfully installed audioop-lts-0.2.2 av-16.1.0 cloup-3.0.8 glcontext-3.0.0 isosurfaces-0.1.2 manim-0.20.1 manimpango-0.6.1 mapbox-earcut-2.0.0 moderngl-5.12.0 moderngl-window-3.1.1 pycairo-1.29.0 pydub-0.25.1 pyglet-2.1.13 pyglm-2.8.3 screeninfo-0.8.1 skia-pathops-0.9.2 srt-3.5.3 The lastCătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-7932075027626446602026-02-28T09:08:00.000-08:002026-02-28T09:08:31.899-08:00Python 3.13.0 : simple script for update all python packages.Simple script for update all python packages: import subprocess import sys import datetime log_file = "upgrade_log.txt" def log(msg): with open(log_file, "a", encoding="utf-8") as f: f.write(msg + "\n") print(msg) def get_installed_packages(): result = subprocess.run( [sys.executable, "-m", "pip", "list", "--format=freeze"], capture_output=True, textCătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-66488134152009608862026-02-25T08:52:00.000-08:002026-02-25T08:56:14.138-08:00Python 3.13.0 : build123d the BREP for 2D and 3D CAD.build123d is a Python-based, parametric boundary representation (BREP) modeling framework for 2D and 3D CAD. Built on the Open Cascade geometric kernel, it provides a clean, fully Pythonic interface for creating precise models suitable for 3D printing, CNC machining, laser cutting, and other manufacturing processes. You can find more about this project on the GitHub repo. python -m pip install Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-82663769033404123892026-02-15T12:24:00.000-08:002026-02-15T12:25:06.655-08:00News : PySimpleGUI planned shutdownThe PySimpleGUI project’s planned shutdown was first announced in February 2025. At that time, we committed to supporting our Commercial customers through the end of 2025. PySimpleGUI 5 remained a very stable product throughout the year, with no significant issues reported. Now that we’ve reached the end of that support period, the project is entering its final stage. During January 2026, the Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-72826779077942559912026-02-15T12:15:00.000-08:002026-02-15T12:15:19.548-08:00Tools : Pickcode online I.D.E.Pickcode is an online IDE, similar to Trinket. With a free account, you can create unlimited projects in Python, Java, and HTML/CSS/JS. With our paid Pickcode Classroom plan, teachers can create lessons, set up classes and assignments, and view student work in real time. Pickcode Classroom costs $500/teacher plus $10/student per year. We are considering options for adding a lower-priced plan Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-46614617373913713892026-02-15T12:03:00.000-08:002026-02-15T12:03:28.584-08:00News : Trinket will be shutting down in early August 2026.We are deeply grateful for your support over the years. Trinket has been used by millions of learners and educators, and it has been an honor to be part of your coding journey. We're truly sorry for any disruption this may cause. If you have questions, please reach out to us at [email protected]. If you have an annual subscription, you'll continue to have full access until the end of your current Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-14613241771435681822026-02-14T13:56:00.000-08:002026-02-14T14:06:15.981-08:00Python Qt6 : using the py3Dmol .NOTE : hacker provider ... : Simple example with the py3Dmol: import os import sys from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout from PyQt6.QtWebEngineWidgets import QWebEngineView from PyQt6.QtCore import QUrl import py3Dmol SEROTONIN_SMILES = "C1=CC2=C(C=C1)C(=CN2)CCN" def generate_html(smiles): view = py3Dmol.view(width=800, height=600) view.addModel(smiles, "Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-50718597574607983792026-02-11T06:48:00.000-08:002026-02-11T06:48:59.200-08:00Python Qt6 : remove files by size.After the vendor hacker changed my file sizes to 0kb and 1kb, only from the folders on my laptop and backup on the backup hdd, for the development project with the game I was working on with artificial intelligence. I created a script in Python to see if he left anything in the folders and subfolders. Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-90103212327100791122026-02-10T07:31:00.000-08:002026-02-10T07:31:30.272-08:00Python Qt6 : one simple markdown editor.Today, I tested my simple Markdown editor. I used artificial intelligence. This project is a custom Markdown editor built with PyQt6. It provides a two‑panel interface where the user writes Markdown on the right side and sees a live HTML preview on the left side. The goal is to offer a simple and efficient workflow similar to GitHub’s Markdown rendering. Main Features Two‑panel layout The Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-75989518430666832962026-02-09T10:53:00.000-08:002026-02-09T10:53:08.785-08:00Python 3.13.0 : New Feature: Interactive History Search.If you are using the new Python 3.13 REPL, you might have noticed a new prompt when pressing certain keys. This is the upgraded interactive shell that now supports built-in history searching. What is f-search and r-search? These features allow you to search through every command you have previously typed without using the arrow keys. How to trigger it: - Press Ctrl + R to initiate a Reverse Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-31248952678198634922026-01-28T05:32:00.000-08:002026-01-28T05:34:13.631-08:00Python 3.13.0 : Motion extraction from video with python programming.... based on this video - Motion Extraction with python source code. 1. Temporal DisplacementLet V(t) represent the video frame at the current time t.A secondary reference frame is generated at time t + Δt, where Δt is the defined time delay (shift).2. Absolute Difference CalculationFor every pixel coordinate (x, y), the algorithm calculates the absolute difference between the two Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-73612062381823054812026-01-26T06:28:00.000-08:002026-01-26T06:28:35.420-08:00News : examples with rich python package.Python's Rich package is a tool kit that helps you generate beautifully formatted and highlighted text in the console. Let's see some examples: Run the source code with these args --demo and --dashboard: import time import sys import logging import argparse import msvcrt # Windows keyboard input from rich.console import Console from rich.table import Table from rich.panel import Panel from Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-22734736639355813932026-01-25T05:00:00.000-08:002026-01-28T05:43:42.877-08:00Python 3.13.0 : ... build full-stack web applications entirely in Python with reflex.NOTE : Yesterday I tested this framework and it blocked my python running and I couldn't display the result. Interesting about this framework is that you can also program your backend running. The static motion is green because is not used with RGB colors. Reflex is a library to build full-stack web apps in pure Python. Reflex is a Python library designed to build full-stack web applications Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-63627971507245435182026-01-24T07:51:00.000-08:002026-01-24T07:51:43.989-08:00Python Qt6 : tasks with libraries.io Today, I tested the libraries.io API to see what's new and what differences exist on the web and on my local installation and to be able to update the installed packages. Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-83121116627045114662026-01-21T04:50:00.000-08:002026-01-21T04:50:24.906-08:00Python Qt6 : testing CatBoost with loto 6/49 numbers.CatBoost is a high-performance library for gradient boosting on decision trees, developed by Yandex and used for various tasks. It supports categorical features, GPU version, improved See the official webpage. python -m pip install catboost Collecting catboost ... Installing collected packages: narwhals, plotly, catboost Successfully installed catboost-1.2.8 narwhals-2.15.0 plotly-6.5.2 The Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-6182634890610194902026-01-20T06:26:00.000-08:002026-01-20T06:26:55.615-08:00News : Intro to Gemini 2.0 Flash by google. Gemini 2.0 Flash is a new multimodal generative ai model from the Gemini family developed by Google DeepMind. It is available through the Gemini API in Vertex AI and Vertex AI Studio. The documentation online can be found on this official webpage. See one example on this colab notebook. Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-3315390851455890672026-01-18T02:45:00.000-08:002026-01-18T02:45:39.464-08:00Python 3.13.0 : Use image with ollama models Moondream and BakLLaVA.Today, I tested with one big image 1366 x 768 px, with ollama on my laptop, only 16Gb RAM, Intel video card. This script demonstrates how to send the same image to two different multimodal AI models (Moondream and BakLLaVA) using the Ollama API. It loads an image, encodes it in Base64 for Windows compatibility, sends it to both models, and prints their separate outputs so you can compare how eachCătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-9710798819825805602026-01-17T03:17:00.000-08:002026-01-17T03:17:42.905-08:00Python Qt6 : ... simple validity of media files .Today I tested the validity of media files and their display in a table with pyqt6, it is a simple example of functionality testing and can be applied to any type of file. Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-50289688690022667542026-01-11T15:34:00.000-08:002026-01-11T15:34:27.109-08:00Python Qt6 : test from PNG to SVG with potrace ...Tests from two days ago with conversion from PNG format to SVG format with the python potrace package ...Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]tag:blogger.com,1999:blog-2577456377723588929.post-1066178783919044412026-01-10T19:30:00.000-08:002026-01-10T19:30:28.033-08:00Python313 : testing the potracer python package.Pure Python Port of Potrace. This is a python port of Peter Selinger's Potrace (based on 1.16 code). Today, I install the python package with pip tool: pip install potracer[cli] Collecting potracer[cli] ... Successfully installed potrace-cli-0.0.4 potracer-0.0.4 The dir command show me all of these : dir(potrace) ['BezierSegment', 'Bitmap', 'COS179', 'CornerSegment', 'Curve', 'INFTY', 'Optional'Cătălin George Feștilăhttp://www.blogger.com/profile/10800322932529698711[email protected]