noweb
noweb in org-mode print ("first-block") print ("first-block") print("second-block")
org-agenda
A built-in agenda for emacs org-mode. Backlinks org-mode
perfect-number
What is perfect number? In number theory, a perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. For instance, 6 has divisors 1, 2 and 3 (excluding itself), and 1 + 2 + 3 = 6, so 6 is a perfect number. The next perfect number is 28, since 1 + 2 + 4 + 7 + 14 = 28....
python
Example python scripts archlinux packages import subprocess def packages_list(): """Yay packages list""" packages = subprocess.run(["yay", "-Qu"], capture_output=True, text=True) if packages.stdout: return packages.stdout else: return "all packages updated!" return packages_list() get the wireless interface import subprocess import re def get_wlan_iface(): """Get the wireless interface name.""" interfaces = subprocess.run( ["ip", "link", "show"], capture_output=True, text=True ) pattern = r"(^\d+:\s+)(wl.+):" for iface in interfaces.stdout.splitlines(): if re.search(pattern, iface): match = re.search(pattern, iface) assert match is not None return match....