Posts

Showing posts from June, 2022

Dearpygui resizable table

Resizable table using main window resize as redraw trigger. Create an item_resize_handler that calls the table redraw, and bind the main window to it. import dearpygui.dearpygui as dpg import random import string DEBUG = 1 def generate_entries():     entries = []     for x in range(1, 10):         entry = {}         for y in ["A", "B", "C", "D", "E"]:             entry[y] = "".join(random.SystemRandom().choices(string.ascii_uppercase, k=6))         entries.append(entry)     return entries def draw_entry_table(parent, entries):     if dpg.does_item_exist("entry_table"):         dpg.delete_item("entry_table", children_only=False)        table = dpg.add_table(         tag="entry_table",         header_row=True,         parent=parent,         resizable=True,         borders_outerH=True,         borders_innerH=True,         borders_outerV=True,         delay_search=True,         policy=dpg.mvTable_Sizi

Local package cache setup

 Opensuse: uses squid. /etc/sysconfig/proxy PROXY_ENABLED="yes" HTTP_PROXY="http://192.168.1.118:3128/" Ubuntu: uses apt-cacher-ng. /etc/apt/apt.conf.d/02proxy Acquire::http { Proxy "http://fileserv:3142"; }; Arch: uses nginx. /etc/pacman.d/mirrorlist Server = http://fileserv:8080/archlinux/$repo/os/$arch

Python environment

asdf python poetry python3 -m pip install --user pipx python3 -m pipx ensurepath pipx install black pipx install mypy pipx install flake8

Platformio Config

[env:nodemcuv2_client] platform = espressif8266 board = nodemcuv2 framework = arduino upload_port = COM11 monitor_port = COM11 monitor_speed = 115200 build_flags = -D CLIENT -save-temps=obj -fverbose-asm  ;-D L_DEBUG [env:nodemcuv2_server] platform = espressif8266 board = nodemcuv2 framework = arduino upload_port = COM8 monitor_port = COM8 monitor_speed = 115200 build_flags = -D SERVER  ;-D L_DEBUG