TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What Python automation scripts do you reuse frequently at work?

10 pointsby jimmyechanover 1 year ago
Wondering if there are any automation scripts that people frequently run at work and what the scripts do.<p>Did you write the scripts to automate your own tasks or for your org&#x2F;teams&#x27; operations?<p>How often do you run them?

4 comments

randjoeover 1 year ago
With python, it&#x27;s more about simplifying the entire process (a.k.a. making it pythonic). In my experience, it tends to be a wrapping mechanism around some binary or api so it&#x27;s hard to pin point &quot;an exact script everyone runs&quot;. Some are clean up scripts that clear out caches manually (until a fix can be pushed), others (like this one <a href="https:&#x2F;&#x2F;gitlab.com&#x2F;sunset-crew&#x2F;nextrelease" rel="nofollow">https:&#x2F;&#x2F;gitlab.com&#x2F;sunset-crew&#x2F;nextrelease</a>) wrap git so you don&#x27;t need to remember all the things associated with pushing a release and&#x2F;or tag. Ansible, though it&#x27;s made in python it&#x27;s kinda it&#x27;s own langauge, might be a good place to look if you want scripts that are generic enough for everyone to use. I&#x27;ve written for teams and myself.
评论 #39119917 未加载
nicbouover 1 year ago
Python is my default language, so... everything.<p>The static site generator on which my websites are built is Python. The linters for those websites&#x27; content? Also Python. The UI tests for those websites? Playwright and Python. The code to rebuild the production site when new changes are pushed? Python.<p>I have a script to start my projects. It puts me in the right directory, sets up the environment, launches the IDE, etc.<p>I have a lot of small one-time scripts to export, transform and import data.<p>Basically, if it&#x27;s more than a few lines of bash, I&#x27;ll use Python. It&#x27;s a wonderful language.
评论 #39121683 未加载
paulcoleover 1 year ago
When we hire a few new people I start a new round of Coffee Chat Bingo.<p>My python script takes all our employee headshots and makes everybody a unique bingo card (obviously excluding their own headshot). Then they bring their bingo card to our virtual weekly Coffee Chats and get to mark off somebody else who is there.<p>First person to get a row wins a small prize (coffee gift card) and then we usually have a second place as well (submarine shape gets a sub sandwich gift card) — after that enthusiasm starts to fall off. Helps the new people to get to meet more people than they would if there wasn’t a gameified incentive.
YaBaover 1 year ago
I&#x27;m lazy as f... so, I automate everything that I can. Mostly in Python, others with bash&#x2F;powershell, even SQL, no matter if I&#x27;m at work or my homelab.<p>Not only to make specific tasks, but also, to remove the burden in some of them, why ssh&#x2F;rdp to a server to execute something if we can quickly create a script and run it with a click?<p>At home? domotics, remembering to close the blinds or turn off apliances? no thanks, HA takes care of it with schedules and conditions. Leaving home and remembering to turn on the alarm? no thanks, geolocation + condition, if away for more than 5 minutes, assume that I left and close everything, shut down stuff, turn on the alarm, start the vacuum and get a notification on the mobile.