Live data from Hacker News

Ask HN: What is the most amazing python script you ever wrote to save your time?

news.ycombinator.com

11–16 of 16 posts

Re: Ask HN: What is the most amazing python script you ever wrote to save your time?

#11
I wrote a script generated Java dto objects by filling in templates. Essentially the same stuff lombok gives for free. But this was a Big Dumb Corp on an ancient version of java. And due to their requirement had to have nearly the same dtos in five different areas of the code. Saved me carpal tunnel typing all that bs.

Re: Ask HN: What is the most amazing python script you ever wrote to save your time?

#12
post #3

I wrote a script that allows me to acquire videos from a very popular video providing site (YOU mighT have Used it BEfore) from channels on said site, and converts them into mp3's, tags them with metadata from eyed3 and then adds them to my music library for use when I DJ over the weekends. This script has saved me possibly more than 4 hours a week of manually hunting down music, plus if I need to get a specifically…

[deleted]

Re: Ask HN: What is the most amazing python script you ever wrote to save your time?

#14
post #3

I wrote a script that allows me to acquire videos from a very popular video providing site (YOU mighT have Used it BEfore) from channels on said site, and converts them into mp3's, tags them with metadata from eyed3 and then adds them to my music library for use when I DJ over the weekends. This script has saved me possibly more than 4 hours a week of manually hunting down music, plus if I need to get a specifically…

A rebel just for kicks.

Re: Ask HN: What is the most amazing python script you ever wrote to save your time?

#15
I have data-collection systems that bring in readings around a solar power plant. It all comes in as CSV files. So I use Python to collect that data and archive the data with files named by the day's data, at midnight. Then another Python program collects all the archived files from each system and brings it into another hard-drive-based system where all the files named by the same date are collected together. It then runs gnuplot for .png representations of each, and then calls Imagemagick to make montages for each day which include data from each kind of sensor. Love Python.

Re: Ask HN: What is the most amazing python script you ever wrote to save your time?

#16
Many moons ago, when I was young and working as a lowly IT service monkey, the client (a huge corporation) decided to migrate from their prehistoric, image-deployed Win95 setup to a centrally managed WinXP setup. This went about as terribly as you can expect and we ended up with a long checklist of things that needed fixing manually, on each of the 1200 computers we were responsible for.

So I stayed an hour or two longer every couple days and each time picked one task from the checklist and wrote a Python script that would do that job for me (such as making sure some .INI file were having the right settings, or some registry settings were set, or some installer was run).

Soon enough, the script was doing enough of my work so that my time could be spent working on the script instead of mindnumbingly editing the same INI file over and over again, and eventually the script did everything. I shared it with my colleagues and soon the 40-point checklist was reduced to: 1. Run the script.

It also provided me with excellent job security and a route into later software development jobs :)

Post reply on HN