Hacker News new | ask | show | jobs
by nikkindev 514 days ago
“Lazy self-installing Python scripts with uv”[1] article from Trey Hunner has more details with examples

[1] https://treyhunner.com/2024/12/lazy-self-installing-python-s...

1 comments

  > For example, here’s a script I use to print out 80 zeroes (or a specific number of zeroes) 
Also...

  # Print 80 0's and flush 
  printf %.1s 0{1..80} $'\n'
  # Alternatively
  for i in {1..80}; do echo -n 0; done; echo
For the ffmpeg example is this any different from

  ffmpeg -i in.mp4 -c:v copy -filter:a volumedetect -pass 1 -f null /dev/null &&\
  ffmpeg -i in.mp4 -c:v copy -filter:a "loudnorm" -pass 2 out.mp4
The python seems more complicated tbh
Not in any way relevant to an example of leveraging Python's new inline metadata PEP via uv.
fair enough haha. But I think as others point out, there are some portability issues.