← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 198
  1. TL;DR: These notes meander a little.

  2. Some useful symbols.

  3. These steps improve PowerShell by: Adding tabs.

  4. These notes build upon the class based NiceGUI app written about here, and modify it to be async.

  5. A typo of git is just one Hamming distance away from twelve other commands: $ gti commit -m "FIXUP" Command 'gti' not found, did you mean: command 'gtg' from snap getting-things-gnome (0.6) command 'gsi' from deb gambc (4.9.3-1.2) command 'gtf' from deb

  6. In Python, it can be useful to reset a dataclass back to its initial values, but this can be easy to get subtly wrong.

  7. TL;DR: To profile a C program with gprof, build and link with -pg, and ensure that the program terminates cleanly (e.g. handles SIGINT and SIGTERM).

  8. TL;DR: shm_open, which opens shared memory, will fail with fd !

  9. TL;DR: If you try to create a link in Sphinx from MyST Markdown to an HTML file in the _static directory, Sphinx seems to only include the individual file you link to, and places it in the _downloads directory.

  10. Tl;DR: After replacing the capacitors twice during 16+ years of regular use, I am finally getting a new monitor.

  11. You can append to .bashrc using the Ansible blockinfile module.

  12. TL;DR: To run kinit under Ansible, use ktutil to create a ticket.keytab, and then Ansible can authenticate without prompting.

  13. Tl;DR: Use allow-prereleases = true to tell Poetry to consider alpha/beta/dev builds.

  14. TL;DR: To tell if Ansible was invoked by Vagrant, define an is_vagrant flag as false in the playbook, but set it to true using extra_vars in the Vagrantfile.

  15. As we begin 2024, I’ve now been working full time as a Software Engineer for over 10 years1.

  16. The poetry-dynamic-versioning plugin enables configuring Poetry to automatically generate the package version number from your VCS (e.g.

  17. These notes walk step-by-step through setting up Ansible and Vagrant in WSL, so that you can run vagrant up from within WSL to bring up a VirtualBox VM, and use Ansible to provision that VM!

  18. I have a basic Python program which logs to journald.

  19. OpenTelemetry is for collecting telemetry data (metrics, logs and traces), and forwarding them to storage and analysis tools.

  20. I was surprised to find practically nothing online regarding using structlog with journald.

  21. These notes cover how to run a Python Poetry command as a systemd service.

  22. These notes cover how to do the following with journald in Python: Writing to journald Writing custom fields Reading from journald Reading all recent entries Reading custom fields Filtering by the executable Filtering by the systemd service (or “unit”) I’m

  23. Following are steps for installing the official systemd Python package on Python using Poetry, on Ubuntu 22.04: Steps Install dependencies Before installing the Python package, you must install the libsystemd-dev and pkg-config packages for Ubuntu: apt-get

  24. tl;dr: To install the official systemd Python package, use pip install systemd-python, even though python-systemd is the name of the repository on GitHub. systemd-python ✔️ The systemd-python package on PyPI comes from the systemd/python-systemd repository

  25. tl;dr: PlantUML in Sphinx cannot be written in a way that is compatible with both MyST Markdown and the GitLab UI preview.

  26. Following are some quick notes on how to manage using multiple remotes in Git.

  27. Following are some quick notes on how to rename a branch in Git, both remotely and locally.

  28. These notes are about how to perform an offline installation of a Python application using poetry install, not about how to install Poetry itself offline.

  29. Following are some notes on configuring a Brocade FastIron FCX 624S network switch.

  30. In NiceGUI you may start to see a binding propagation warning logged repeatedly if you have lots of binding.

  31. NiceGUI gives lots of examples of using bind_visibility_from to show/hide an element based upon the value of some attribute.

  32. TL;DR: if you get the error can't delete Tcl command when updating a pyplot within NiceGUI, add close=False to ui.pyplot().

  33. At the end of May I returned to the UK from Seattle with just few suitcases.

  34. This is part 2 in a series of notes about how to improve the performance of Django REST framework.

  35. It’s very easy to get up and running with NiceGUI, and the development cycle is fast because it has an auto-reload feature, where the web page automatically updates whenever you save a change to your project’s Python code.

  36. FastAPI is a Python web framework for building APIs.

  37. This is part 1 in a series about how to improve the performance of Django REST framework.

  38. If your NiceGUI application has some sort of state or configuration, it can be useful to provide a way to save and load that state.

  39. The NiceGUI dialog element can be used to create a confirmation popup or modal.

  40. In a NiceGUI application, it can be annoying if the main vertical scrollbar appears and disappears depending upon whether there is more content than fits in the screen.

  41. When attempting to upgrade from Poetry v1.5.1 to v1.6.1 by running poetry self update I got the following error:

  42. isort is a Python package that sorts the order of your imports, and groups them into sections by type.

  43. Git Hooks provide “a way to fire off custom scripts when certain important actions occur”, and are typically stored in .git/hooks within your Git repository.

  44. In Poetry, if you have defined custom sources but have not set a default source, you will get the following warning:

  45. GitLab supports coverage reporting.

  46. In Sphinx, using the MyST extension enables using Markdown (instead of ReStructuredText).

  47. When building a Python package that is stored in git, it can be convenient to automatically generate the package version from the git commit and/or tag.

  48. Poetry contains an undocumented feature which allows running custom code when poetry build is executed.

  49. On a Python project using poetry, when running poetry build I got the error:

  50. I had a device connected via Ethernet to a Windows 10 PC.