Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/bin/env bash | |
# Скрипт по загрузке публичных файлов с Облака mail.ru. Поддерживается докачка. | |
# v1.0.5 от 2022-05-30 | |
# | |
# ЕСЛИ СКРИПТ НЕ РАБОТАЕТ | |
# | |
# 1. Убедитесь, что файл доступен публично. Возможна загрузка только публичных файлов. | |
# 2. Mail.ru время от времени меняет внутрянку, не очень сильно, но требуется адаптация скрипта. | |
# Если скрипт не работает, просьба сделать работающий форк и скинуть ссылку в комментарии. |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
(originally written in 2009 and posted to livejournal! https://jdimpson.livejournal.com/6812.html | |
The last article teaches how to use socat by comparing it first to cat then to netcat. It skimped on socat's UDP-related features, because netcat only implements a subset of them. This article picks up where the last one left off, with respect to UDP. After this article will be one more that discusses advanced socat features. | |
It turns out there are a lot of subleties when dealing with UDP, even before multicast is mixed in. We'll abandon the comparisons to netcat, as we've exceeded what netcat can do. But first a quick reminder of one way socat does UDP. | |
socat as a UDP server on port 11111. | |
socat STDIO UDP-LISTEN:11111 |