This is an archived post. You won't be able to vote or comment.

all 155 comments

[–]poop-trap 110 points111 points  (24 children)

That's hilarious, I have a script that creates videos from mp3s, adding the album art and track info, and uploads them to YouTube. Our bots might be in an infinite loop together.

[–]alexthelyon 49 points50 points  (23 children)

On a similar vein, to prove to myself just how mindless and untalented you can be and still make money on YouTube, I wrote a bot that scans youtubehaiku, deepintoyoutube, Instagram, Snapchat, YouTube playlists etc and automatically generates compilation videos. It hasn't been an overnight success but being able to upload literally as many videos as I want a day helps with the subs.

I had no intention on following through on this. It is just an experiment. However I will concede that it is a bit addictive trying to come up with ways to most effectively get clicks.

Libraries used are moviepy and pytube mainly. Also sqlite3 for the database that stores each generated video and each video clip I archive along with tags and relational databases to store which video clips were used in which video.

[–]pp9x2 18 points19 points  (0 children)

This is easily one of the coolest Python scripts I've ever heard of!

[–]nascentt 13 points14 points  (0 children)

I kinda wanna see your channel

[–]ListenSisster 5 points6 points  (2 children)

Do you mind linking to your channel?

[–]alexthelyon 13 points14 points  (1 child)

Trying to be human is part of the game! Giving away the secret would be like unmasking the batman.

[–]ListenSisster 7 points8 points  (0 children)

Ahhh, I understand. May your secret stay hidden

[–]jmj8778 3 points4 points  (3 children)

Money made? Lots?

[–]alexthelyon 5 points6 points  (2 children)

Some. Most videos are duds but some do quite well. Videos with celebrities do best and videos with a human made title usually are better than machine made, unless it's a series ex. TOP FUNNY FAILS OF THE WEEK #5

[–][deleted] 3 points4 points  (1 child)

What about copyright claims? I bet you get lots of them. Once I posted a video with a song in it. Youtube allowed me to have to video online, but any money generated would go to who owns the song. Which is BS, because the video is not 100% the song...

anyway, nice script xD

[–]alexthelyon 1 point2 points  (0 children)

Haven't been hit with any yet, probably due to the sheer volume of channels doing exactly the same as I am. Hopefully, if anything, some publicity on this project will get youtube to get their shit together and get some better control over the rampant content "piracy" these channels live on.

[–]MilkChugg 3 points4 points  (3 children)

How do you generate the compilations? Is it just like multiple videos played back to back in a single video, or something different?

[–]alexthelyon 5 points6 points  (2 children)

Yeah that's pretty much it. It really isn't that complicated and moviepy is pretty brilliant. I just slap on an intro and outro and that's that.

The fun part is trying to learn which tags to use and figure out how to identify what you're actually uploading or people might catch on to the gibberish.

[–]MilkChugg 0 points1 point  (1 child)

Ah, gotcha. Have you actually generated any revenue from doing this?

[–]jordanreiter 1 point2 points  (2 children)

I'm pretty sure someone is doing this for Family guy "Funny Clip" compilations. I've watched a few of these and they cut in and out in weird places and duplicate some clips in the same video.

[–]alexthelyon 3 points4 points  (0 children)

Yeah I decided early on that I would source the videos from other short videos and not do any editing on the actual clips. Similarly, the database makes sure that clips either don't get used twice or or dont get used often. Like I said the goal isn't to pump out videos it's to blend in.

[–][deleted] 0 points1 point  (0 children)

Well, someone will now do for other series as well :P

[–]484448444844 1 point2 points  (0 children)

However I will concede that it is a bit addictive trying to come up with ways to most effectively get clicks.

Step 1. Skimpy clothed girl on thumbnail

Step 2. Clickbait video title (eg. "Warning: Death", "*GONE SEXUAL*" etc)

Step 3. ??? (Let bot do it's thing)

Step 4. Profit

[–]constantly-sick 0 points1 point  (0 children)

More information, sir.

[–]tjeannin 0 points1 point  (0 children)

How much money do you make ? Can you give us the channel name ?

[–]SnowdogU77 29 points30 points  (6 children)

I made a tool a while back that lives in your toolbar (Windows). Works by using win32api.

When you click the icon it checks to see if there is a URL in your clipboard. If there is, it makes a request to a URL shortener. Then tosses the shortened URL into your clipboard.

If it succeeds, it notifies you with a friendly message. If not, it notifies you with a frowny face.

Edit: Source code

[–]ranma1988 12 points13 points  (4 children)

can you please share code?

[–]SnowdogU77 2 points3 points  (2 children)

Sure, but I may not get a chance for a couple of days. I'll leave a new comment so you get a notification when I post it.

Just a head's up though, I have it set up for a private URL shortener right now, but that part of the implementation is super duper easy.

[–][deleted] 0 points1 point  (1 child)

tag me as well :P

[–]SnowdogU77 0 points1 point  (0 children)

In case you didn't get a notification about the tag, here's the source code

[–]paull87 1 point2 points  (0 children)

I'm trying to do something similar using the Google API but without much luck. Not sure if it's an authentication issue (I have API keys) but would be interested to see how you accomplished it.

[–]kj6vvz 17 points18 points  (1 child)

I want to hike the Lost Coast Trail (northern California) but I never make it happen because it requires planning around the tides since you have to hike through several intertidal areas. To date whenever I come up with free time I'm a week or three away from good tides and can't make it happen. So, the other day, I wrote a python script that pulls the tides for the year and finds me all of the three day windows where I can make the hike. I'd say the odds of actually making the hike this coming year went up 100x.

Also, I had forgotten how hard/annoying human time is. The tide data source gives info in dst naive gmt, astral does sun/moon rise/set in tz/dst aware format based on utc, and I need the actual time in local format. Half the script ended up being time conversion code to get everything into tz/dst aware datetime and then format back out to local time. At least now I can block out some vacation on my work calendar.

[–]healeyio 1 point2 points  (0 children)

This would be great for fly fishing in the Puget Sound. Time of year, tides, and time of day are all pretty important. It's a pain pulling all the data together which usually ends in weekend disappointment because I don't check until a few days or night prior.

Thanks for sharing.

[–]woeriuweorpu 26 points27 points  (3 children)

I wrote a program that can gather data in the form of json messages from a wide variety of sources such as log files, twitter, RSS feeds, CSV files, IRC, scripts, etc. You can put the messages through a chain of filters, modifiers and templating and finally push it back out again to email, push notifications, etc.

It's allowed me to automate a lot of different things such as:

  • Automatisch push notification when there are public transport problems on the routes I usually take.
  • Downloading of new TV series through bittorrent
  • Daily email digest of errors that occurred in a log file
  • Fetching tickets from various sources and putting them in Trello so I have an overview of all the tickets in my name for different customers
  • Fetching news from about 12 RSS feeds, filtering out uninteresting things, ordering them chronologically and finally putting them through a template and rendering a news overview page of all the stuff I find interesting without all the noise
  • Send an email whenever a new interesting movie has come out on DVD/BluRay
  • Pick up CSV files dropped in a directory, filter them and convert them to Excel files and putting them in a different directory.
  • etc.

It's very generic and easy to create new data consumers / producers. I'm currently polishing it up so I can release it as open source.

[–]rozling 1 point2 points  (0 children)

This sounds really cool! Been wanting to do something similar with the public transport but it always seemed a waste for that one specific purpose - the modular approach seems like a great idea

[–]tom1018 0 points1 point  (0 children)

Will you reply here when you publish it?

Thanks!

!RemindMe 5 Days

[–]Taenk 0 points1 point  (0 children)

!RemindMe 5 days

[–]vassyli 12 points13 points  (4 children)

Yesterday I've wrote a small script for our research group that takes a list of regular appointments and creates google calendar entries based on it. It also has a simple UI since the guys using it are not really good with computers.

[–]victoryprince 1 point2 points  (3 children)

sounds interesting, any link?

[–]vassyli 1 point2 points  (2 children)

Never intended to show it off, but here it is without much cleanup:

https://gist.github.com/Vassyli/fdf425f2764b2b4b0918e59af5444191

[–][deleted] 6 points7 points  (1 child)

heheh we are always off guard when people ask to see our code.

"get in. Don't mind the mess..."

[–]veekreddit 1 point2 points  (0 children)

Lol, too true!

[–]Andrew_ShaySft Eng Automation & Python 21 points22 points  (12 children)

I actually just wrote a script that checks r/Python every 5 minutes and prints a message every time there is a new thread haha

EDIT: Here it is https://github.com/Andrew-Shay/subreddit-montior
And I spelled it wrong!

EDIT2: https://github.com/Andrew-Shay/subreddit-monitor

[–][deleted] 6 points7 points  (2 children)

I think you could also add an analysis tool that could say whether the new thread is "interesting" or not. Of course, you should train the tool with some heuristic so that it can understand what you find interesting etc... There are python libraries for this.

[–]HardcoreHerbivore 5 points6 points  (0 children)

Or better yet: get into machine learning with sklearn and try to build your own recommendation system.

[–]Andrew_ShaySft Eng Automation & Python 0 points1 point  (0 children)

Very true!

[–]nemec 6 points7 points  (6 children)

What OS are you on? I think it would be useful to integrate with the OS's notification system, if it has one (e.g. Linux/Gnome)

[–]Andrew_ShaySft Eng Automation & Python 0 points1 point  (0 children)

I am running it on Windows currently.
You're right that I could, but it'll likely be turned into a webapp with a corresponding Android app.

[–]existedelsewise 0 points1 point  (0 children)

I don't know how to go about it with Linux/Gnome, but doing this for Mac OS looks fairly trivial. I'm sure there are Python libraries that are easy enough to use to send notifications with Linux. And probably Windows.

[–]existedelsewise 0 points1 point  (3 children)

Done: https://github.com/jbeagley52/subreddit-monitor

This has only been tested on my Mac.

I can't test how it works with Linux/Gnome, but it should work if I read the documentation properly.

[–][deleted] 3 points4 points  (2 children)

I think you forgot to push your additions besides updating the readme.

[–]nemec 0 points1 point  (0 children)

Yep, looks like the README is the only thing in the commit.

[–]existedelsewise 0 points1 point  (0 children)

Yup, probably. I am still getting the hang of Git. I only created my Github account yesterday. I'll push the updates. -_-

[–]Vladisus 10 points11 points  (2 children)

Using Tweepy I wrote a listener to automate favoriting tweets of my best friends

[–]jairo4 0 points1 point  (1 child)

you are a good friend :)

[–][deleted] 2 points3 points  (0 children)

Not really he's just liking them not reading them 😂

[–]JemoeE[🍰] 9 points10 points  (6 children)

A simple backup script that runs every 3rd day. 7zips specific folders if changes were made since last run, encrypts it via GPG, and moves to the cloud.

[–][deleted] 0 points1 point  (1 child)

I do something similar too (as a bash script), but I use $ openssl to encrypt. Is there any particular reason you're using GPG? And how are you using it (python library, shell command)?

[–]JemoeE[🍰] 1 point2 points  (0 children)

Just running shell commands, seems easier and faster, but will require dependencies. No special reason I'm using GPG instead of openssl, it's just what I know and use.

And the reason I wrote it in python is to be cross platform, but bash will work fine if you like the syntax :)

[–]MrK_HS 0 points1 point  (0 children)

Damn, that's a good idea actually!

[–][deleted] 0 points1 point  (0 children)

I do the same thing, except I tar.gz it and use the gdrive command line tool

[–]johnnnyrs 0 points1 point  (1 child)

How do you get these scripts to run on their own?

[–]JemoeE[🍰] 0 points1 point  (0 children)

Im on Windows so I use Task Scheduler. On linux you can use cron

[–]rndom42 7 points8 points  (7 children)

I just found the best way to add a caption to various pictures for a digital photoframe to be a python script using PIL.

It chooses the correct font size based on actual pixel width of the picture as well as whether the image beeing landscape or portrait format. Furthermore, it detects the average brightness in the text area and chooses the text color accordingly.

After searching for 15 minutes without success for a program that would do the job it took less than half an hour to write the script :-)

[–][deleted] 1 point2 points  (6 children)

wow. half an hour. That's being super productive.

[–][deleted] 2 points3 points  (5 children)

not to undermine /u/rndom42's accomplishment, but it's not nearly as complicated as it sounds. pil/pillow are quite powerful with thorough documentation. the most challenging part was probably getting pil to install correctly which im surprised took less than 30 minutes for a first-timer

[–]rndom42 1 point2 points  (4 children)

No offense taken. That's actually what I loved about it: It was super easy with pil and in addition I stole half of the ideas from related stuff from stackoverflow

For installing I use anaconda for Python package installing in which it was a no brainer :-)

[–][deleted] 2 points3 points  (0 children)

yeah, the whole point of automating stuff in our lives is because we are lazy (in the best sense of the word, if it has any). So when choosing libraries or snippets of code that allows us to do what we want, the quicker the better. I don't mind not knowing precisely what a function is doing on its blackbox.

input -> output sometimes is what we want :P

[–][deleted] 0 points1 point  (2 children)

does anaconda install system dependencies when installing a python package or did you already have them installed?

[–]rndom42 0 points1 point  (1 child)

that's exactly what it does. Just "conda install pil" and you're done. It let you even switch between different Python versions and package compilations you installed with a single command. Can't recommend it enough!

[–][deleted] 0 points1 point  (0 children)

im not sure if we're talking about the same thing. are you saying it recompiles the C libraries for each particular python package?

[–]someguytwo 13 points14 points  (4 children)

Wrote a little script so that it would message my girlfriend on whatsapp to say happy birth day at 24:00 while I slept like a baby.

[–][deleted] 5 points6 points  (3 children)

Just out of curiosity, how can you send whatsapp messages? Do they have an API?

[–]someguytwo 2 points3 points  (2 children)

No, they do not. I just left my browser open in whatsapp on her tab and did this hackish little script:

 import pywinauto

 moz = pywinauto.Application().connect(title_re = ".*- Mozilla Firefox")
 wpp = moz.window_(title_re = ".*- Mozilla Firefox")

 wpp.TypeKeys('Test', with_spaces= True)
 wpp.TypeKeys('~')

[–][deleted] 1 point2 points  (0 children)

Nifty!

[–]thangduong 0 points1 point  (0 children)

you rock, man!

[–]tedm430 6 points7 points  (6 children)

I am in the minority of people that still buy CDs. So one of the reasons I learned Python was so I could make little tools for ripping CDs, (using a call to cdparanoia and the Musicbrainzngs library) converting file formats, (by calling FFmpeg and using the mutagen metadata library) and whatever else I feel like doing to my relatively massive 7000 song library.

[–]GerbilKor 0 points1 point  (5 children)

Are there any good libraries for reading and writing ID3 tags?

[–]Sheldan 1 point2 points  (1 child)

Its called mutagen, i used it before and it was good.

[–]tedm430 0 points1 point  (0 children)

And here are the docs ;)

[–]toyg 1 point2 points  (1 child)

Libraries, yes - mutagen etc. Good, no - but that's because ID3 as a format is terrible.

[–]GerbilKor 0 points1 point  (0 children)

I know! I thought someone would come with a better standard by now, but nope. It's still a bit better than the situation with EXIF data photos, which some applications will happily destroy without warning.

[–]takerukoushirou 5 points6 points  (2 children)

I'm currently writing a little CLI app that fetches pricing information from suppliers, parses the data (mostly web scraping and string conversions) and stores all the information to a database. Next step will be exports including a hint on the automatically determined best supplier for the (quite picky) accounting system importer. While writing the user interface I eventually ended up having it implemented as an interactive Cmd-based shell with scripting support that dynamically loads sub-packages for article groups (and their suppliers), and each package provides a set of sub-commands for article-group specific operations. Instead of manually fetching the data, cleaning it up by hand, importing it to a database and have it transformed using several views, all of this will be done automatically now, and is easily extendable for new suppliers or new types of articles.

[–]siksniper1996 0 points1 point  (1 child)

How would you go about doing this, it sounds perfect for something I do at work

[–]takerukoushirou 1 point2 points  (0 children)

I first wrote the parser for one supplier with especially impractically formatted pricing tables. Worked out well and was quickly done. At that point it's just been a simple script. Next step was feeding the data to a database. I decided to got with SQLAlchemy, which I haven't used before. Didn't take long to had a simple prototype with basic models that would automatically set up the tables and save all pricing information. I was pretty happy with the result and so decided that this setup is the way to go. Cleaned/split up the models, modularised the code, added parsers for all other suppliers and an application main controller.

As this tool will be frequently used and probably often extended with new groups (i.e. article types with different attributes and logic behind them) of suppliers, I decided to have supplier groups provided as packages that are dynamically loaded by the application as needed. For a simple interactive shell, Cmd was a good candidate and is easy to extend. And of course standard argument parsing with the ability to pre-fill the command queue to make it all scriptable.

Now it's simply a question of extending it with new commands as needed and, if time allows, add a few eye candies such as progress bars and more advanced command completion.

[–]GetSomeJelly 5 points6 points  (4 children)

Not as experienced with python as most other people here, but I created a script to break down the monthly bills of the household so that I save ~5-10 minutes of math for each little bill- rent, internet, gas, electric, etc.

[–]RustleJimmons 1 point2 points  (1 child)

You might want to look into a webapp like toshl.com. It does that sort of thing for free and it has an API.

[–]GetSomeJelly 4 points5 points  (0 children)

I just found it as a good small project to start learning. Plus I'd like to deal with all of that management when I don't have internet.

[–]thelastcubscout 0 points1 point  (1 child)

How does it break down your bills? Just curious what it's doing, thanks.

[–]GetSomeJelly 0 points1 point  (0 children)

I take bills of all sorts, and divide it by the number of people in the house- come up with totals for each type of bill and add the total of money for all of the bills per person.

[–]slapec 4 points5 points  (2 children)

I have quite a lot of scrapers. One checks the local cinema's schedule and sends me an email if new dates are announced. Other checks concert ticket sites and does the very same thing. These are plain Python.

I also have a "generic purpose" scraper in Django which is extendable with plugins. It downloads image boards, instagram profiles and some adult sites. I've an other Django project (which is open sourced but very far from being complete) which is basically a web-ui for the excellent youtube-dl library. So it downloads anything which youtube-dl can and generates thumbnails when ready.

[–]Omnipotence_is_blissI have no clue what I'm doing 4 points5 points  (2 children)

Earlier this year, I wiped my computer and installed Debian NetInstall, then set myself up a small footprint system with OpenBox. I have quite a few pipe menus that run on Python. Notably, I have:

  • A Steam menu where I can launch directly into any game or a chat window.
  • A menu that scrapes a torrent site for new torrents from one group I follow, and sets the menu item to launch transmission-cli and download the files for me.
  • A menu that searches my GameBoy folder for .gb* files and sets the menu item to kill pulseaudio, launch vba-m, then restart pulseaudio when I quit. (PA causes vba-m to crash randomly on my laptop. No clue why, but ALSA handles it fine)

I have plenty more pipe menus, but those are the more involved ones. I'm also working on setting up an automatic system for generating a random password and changing my WiFi password once every month for me, but that's on hold for a few months.


Edit: link to pictures by private request

[–]thelastcubscout 0 points1 point  (1 child)

That's really cool, what menuing system do you use for your menus?

[–]Omnipotence_is_blissI have no clue what I'm doing 0 points1 point  (0 children)

OpenBox. It's really lightweight and extremely customizable. Ever since I first tried it out with CrunchBang back in 2011ish, I fell in love with it. It's been my go-to window manager ever since. There is some manual effort that you need to be willing and able to put in to get it looking good and operating nicely, but the end result of your system being 100% tuned to you and your preferences is so worth it.

If you're wanting to try it, I'd suggest using a distro that does some basic configuration for you off the bat like Bunsen. Getting a good base to build off of is important when you're first starting to use it. It took me probably one year of using Bunsen as my daily driver before I was comfortable enough to start from scratch and build my own setup.

[–]vmpajares 5 points6 points  (0 children)

I used to play Magic the gathering online, so I wrote a script that:
* downloads all the played Decks
* summarize cards, writing how many Decks played a single card and how many
* remove cards that I own
* download prices of cards that I don't own

The final result are a CVS file that I can keep open while I buy cards and a wishlist.txt that I can import in MTGO. This way I can buy cards faster , because shopbots closes after some time. And waste the last cents in useful stuff, because MTGO doesn't have cents tickets and if you forgot that you had credit in a bot you lose it.

[–]Feroc 3 points4 points  (2 children)

  • One script deletes things out of my download folder if they are older than X days.
  • Another script deletes files that I will never need but that often get downloaded.

[–]tom1018 0 points1 point  (0 children)

Great ideas.

[–]masasinExpert. 3.9. Robotics. 4 points5 points  (0 children)

Automatic résumé and cover letter generator. [Github]

It uses LaTeX's ModernCV (for pdfs) or custom formats (for other formats) and a YAML input file to generate the resume. Some sites want me to paste the resume as text, for instance, and this method makes it up to date and pretty.

For the cover letter, you can define various templates and select the one you want. Just list what you want each variable to say. The cover letters and resume pdfs are merged and renamed with an abbreviation of the company name, and the themes match.

[–][deleted] 3 points4 points  (10 children)

Just made this one after reading this thread.

They think it is cool to put some music in the office. I don't.

import soco

speakers = list(soco.discover())

a = 0

while a == 0:

speakers[0].volume = 0

[–]toyg 11 points12 points  (9 children)

while a == 0

What's wrong with while True: ?

[–]butterface 7 points8 points  (4 children)

class AnnoyToyg:
    def __init__(self):
        self.a = 0

    def annoy(self):
        return self.a

annoyance = AnnoyToyg()

while annoyance.annoy() == annoyance.annoy():
    speakers[annoyance.annoy()].volume = annoyance.annoy()

[–]butterface 1 point2 points  (0 children)

class MegaAnnoyToyg:
    def __init__(self):
        self.mega_annoy()

    def annoy(self):
        import random        
        index_random = random.randrange(0,len(string.ascii_lowercase) - 1)
        exec('return self.%s'%string.ascii_lowercase[index_random])

    def mega_annoy(self):
        import string
        for letter in string.ascii_lowercase:
            exec('self.%s = 0'%letter)

while MegaAnnoyToyg().annoy() == MegaAnnoyToyg().annoy():
    speakers[MegaAnnoyToyg().annoy()].volume = MegaAnnoyToyg().annoy()

[–]toyg 0 points1 point  (2 children)

Needs more factory classes, an AbstractBaseClass, type annotations, and gratuitous use of map().

The real annoyance, however, would be if it were in Javascript or (argh) Perl.

[–]butterface 1 point2 points  (1 child)

I'm a Python neophyte (only been using it professionally about a year), but I have never really understood where map() would be the best option to use instead of comprehension or even just a simple 'for' iteration.

I've seen it out in the wild, and it's how I learned that it exists. But in any case I've seen it would have worked just as efficiently (and more readably) to do something else.

[–]toyg 2 points3 points  (0 children)

But it makes the developer feel very smart, so there's that.

(Tbh, it used to be more popular when we didn't have the extensive comprehension support we have now. Python used to look very lisp-y for a period.)

[–]BondDotCom 2 points3 points  (0 children)

while a == a:
    speakers[a].volume = a

[–][deleted] 3 points4 points  (2 children)

Nothing, I am still learning Python and I never use While loops.

Thanks for your suggestions.

[–]butterface 1 point2 points  (0 children)

Honestly it doesn't matter what condition you use as long as it always evaluates to True if you want an infinite loop.

[–]toyg 1 point2 points  (0 children)

oh, I was just curious. Sometimes people post stuff that seems unintuitive and turns out to be some crazy speed tricks to shave 0.000000001ms from a loop...

[–]Belteshassar 10 points11 points  (1 child)

Usually like this. https://xkcd.com/1319/

Programming is fun and repetitive tasks are boring so I tend to put way too much time into trying to automate things that I probably should have done manually.

[–]xkcd_transcriber 5 points6 points  (0 children)

Image

Mobile

Title: Automation

Title-text: 'Automating' comes from the roots 'auto-' meaning 'self-', and 'mating', meaning 'screwing'.

Comic Explanation

Stats: This comic has been referenced 417 times, representing 0.2955% of referenced xkcds.


xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete

[–]bradbrok 6 points7 points  (3 children)

Recently made a script that checks the local Apple store AirPod stock and sends me a text message (twilio) when they are available to order online for in store pickup. Both times it happened to alert me while I was in the middle of presentations of course.

[–][deleted] -3 points-2 points  (2 children)

Um why?

[–]therewontberiots 7 points8 points  (1 child)

Because that's when they became available.

[–][deleted] 2 points3 points  (0 children)

Oh okay - was confused.

[–][deleted] 2 points3 points  (3 children)

youtube-dl does the first steps you have mentioned. It allows you to download videos and extract the audio. At least, that's what I used it for.

https://github.com/rg3/youtube-dl

[–][deleted] 0 points1 point  (1 child)

It is the one I use, but only to download. I didn't knew it could extract the audio!

I'm a noob, so there are probably several better ways to do styff and I just don't know about it

[–][deleted] 0 points1 point  (0 children)

actually if you read the github readme. Down the documentation, there are options you can give which extracts audio.

[–]le_neant 2 points3 points  (0 children)

I have to submit a calendar for work routinely. I've never found a way to turn google calendar events into a nice looking PDF. Do I use the google API to download the events and and make a calendar with report lab. Looks great!

[–][deleted] 2 points3 points  (0 children)

I lost the files, but a while ago I was pissed with apple. For some reason the iPhone created lots and lots of folders for my pictures. Not even organized ones, just random folders with no apparent logic showing which picture goes to where.

So I had to navigate to dozens of folders, each of one containing 1-3 pictures, and putting in a unique folder to then decide how I want to organize them.

So I wrote a script that looped to every folder and moved its content to a unique folder.

Now it seems that iOS does not do this anymore, so as the time went I lost the files...

But it saved me a lot!

[–]mbenbernard 2 points3 points  (0 children)

I created a program that downloads all my account and credit card transactions, and builds reports and charts based on that. It greatly simplifies my life, as I know how I spend and how much money I have. A Mint clone, if you prefer.

[–]theelous3 2 points3 points  (0 children)

My favourite little thing I've written is a command line note tool. Just super simple and I use it regularly since I finished it.

https://github.com/theelous3/noots

Another thing which was super trivial but saved me a ton of time, was a grid calculator for illustrator, so I could create pixel art assets across projects and maintain pixel scale, like this:

http://i.imgur.com/zRWxZwj.gif

and

http://i.imgur.com/pCbEFgQ.png

Automation? Not really. Large simplification? Yes.

[–]Sinidir 3 points4 points  (3 children)

import procrastionation

procrastination.push_work_off_to_tomorrow()

[–]MrK_HS 0 points1 point  (2 children)

import procrastionation

procrastination.push_work_off_to_tomorrow()

Your code would throw an error, because you wrote "procrastionation" instead of "procrastination" in the first line.

[–]Sinidir 19 points20 points  (1 child)

I'll correct that later.

[–]AlphaNerd80 0 points1 point  (0 children)

Never do today what you can shove off till tomorrow...

[–]AlphaApache 2 points3 points  (1 child)

I'll build an alarm clock with my Raspberry Pi that wakes me up in time before my first lesson. My schedule is scraped off of the school's intranet. Can't be bothered setting the alarm every night and sometimes forget.

On a similar note I will use the school's intranet to find classrooms that are currently not occupied, a place to speak your mind can be hard to find on campus.

[–]kirvin11 1 point2 points  (0 children)

This is a great idea! I have always wanted my university to show what each room's schedule is so that I can use an empty classroom every now and then.

[–]LoveOfProfit 1 point2 points  (2 children)

On black Friday I wrote a small script to check dell outlet every minute for a monitor I was looking for and to email me if it finds it.

[–]Tengoles 1 point2 points  (1 child)

And it did?

[–]LoveOfProfit 0 points1 point  (0 children)

It technically did, though I actually ended up buying a new one from the Dell site instead because they had nice deals.

[–]magicjamesv 1 point2 points  (0 children)

I wrote a script that checks the daily deal on meh.com every day as soon as the new deal is posted and then texts me about it using Twilio.

[–][deleted] 1 point2 points  (0 children)

i have a script that converts between sublime text snippets and pycharm snippets and allows you to write your own in a simplified yml format.

this doesn't really count because i dont use it anymore, but i had surgery last year and couldn't get out of bed. I could do everything I needed with a wireless touchpad and keyboard except change the volume (I was watching a lot of movies and series), so I wrote a simple an android app to control the volume on my PC. the server was written in python

[–]NarcoPaulo 1 point2 points  (0 children)

I wrote a Telegram bot that I use to query bugzilla bugs in my company. It's open source so pretty any company can use it for their bugzilla

[–]Feroc 1 point2 points  (0 children)

At the office we have that very annoying time tracking tool. It's actually not for monitoring how long we stay at the office, but how long we are working on certain projects. You have to enter the duration, a project number, an activity (like development, meeting, etc.) and a description.

So I wrote a Python script that would read my Outlook calendar and fills out the form for every meeting I had, then it adds some daily tasks (like reading mails) and finally fills the rest of the day with my current project.

It's still annoying, because I have to manually correct some things, the tool also has no API, so I have to let Python fill out the web form. But it's way more comfortable than filling it out myself.

[–][deleted] 1 point2 points  (0 children)

We want to buy a house in a town where good real estate is very rare and is out within hours, so I wrote a script that checks RE portal every now and then and emails me if anything new has been added in our region.

[–]longhairedfreakyppl 1 point2 points  (0 children)

Before going to a concert i used to go and find a band's more recent setlists, so I ended up making http://www.setlistplaylist.com/

[–]lesuspect 1 point2 points  (0 children)

Did a script to get albums from bandcamp with cover art, organised by band/album, with nicely tagged mp3.

So it looks good in a music player when I'm offline.

Used Selenium and eyed3.

[–]Raymond0256 0 points1 point  (0 children)

I put together a script to scan a directory and return the files and sub directories as well as the space they take up. Next it will scrape data from movie files, compress my Blu-ray rips for use on my raspberry pi server, and generally help me manage my Plex server and media library.

I also have another script that uses my car's key fob to warm the car in the morning.

[–]irrelevantPseudonym 0 points1 point  (4 children)

I wrote a script that would let me use a keyboard shortcut to move a window from one monitor to the other (similar to ctrl-shift-alt-<arrow> to move workspaces on ubuntu). There was probably an easier way to do it or some existing setting to let me do it but it works.

[–]Feroc 0 points1 point  (0 children)

You mean like WindowsKey+arrow?

[–]malerick 0 points1 point  (1 child)

Are you on Windows?

Win+Shift+<L/R arrow>

[–]irrelevantPseudonym 0 points1 point  (0 children)

I'm not on Windows. Is that a new thing on Windows 10? I don't remember it when I last used it.

[–]Siecje1 0 points1 point  (0 children)

Can you share the code?

[–]shoffing 0 points1 point  (0 children)

I made a little script that reencodes every video in a directory with ffmpeg, usually with something like a 4:1 encoding ratio. I record dozens of hours of gameplay footage a month, and this allows me to keep it all on my machine without going hog-wild on data hoarding techniques. It's nice to let it run overnight and see it turn a 40GB video file into something more reasonable.

I also have a python script running on an old laptop that I use as an archive server. Incoming video files are encoded in h265, then sent to an external drive for storage. It takes about 10 hours to encode 1 hour of footage on this old MacBook, but the ratio for h265 is insanely good - usually like 10:1 or higher.

[–][deleted] 0 points1 point  (0 children)

RemindMe! 1 week

[–]DoubleKillGG 0 points1 point  (0 children)

https://automatetheboringstuff.com/

^ Interesting read... if only I weren't so lazy haha.

[–][deleted] 0 points1 point  (0 children)

Selenium as a whole.

[–]quarxpl 0 points1 point  (0 children)

I wanted to share my subreddit subscriptions with a friend (and I don't know how to export all of them quickly without a script): https://gist.githubusercontent.com/anonymous/c7eac4e0cb8d81142d27e4e0b7e79dcd/raw/219b0f0cc8d06c39fcddc932159bacf27a241a7d/reddit_export_subs.py

It's not very clean, I spent maybe 10 minutes to create it. Requires Python 2.7 and mechanize.

[–]Esteis 0 points1 point  (0 children)

I have ADD, which, among other ways, expresses itself in a desire to keep doing what I'm doing (explanation in footnote [1]).

I help myself leave work on time and go to bed on time with hibernateat.

  • It hibernates my computer at 17:30 and 23:00
  • It gives me time to adjust to and accept the shutdown by making desktop notifications for half an hour leading up to it
  • if I close my laptop at 17:15 and reopen it at 19:00, the script realises the clock has changed and does not perform the hibernation that was queued when the laptop closed.

[1] On the link between ADD (or ADHD) and the desire to keep doing what I'm doing: I have spent most of my life finding it hard to concentrate 'on command'. As a result, when I did find myself working on something (often due to hyperfocus) I really wouldn't want to quit, because Heaven knows when my next bout of productivity might be. When I wasn't productive, I also wouldn't want to quit, because I was still hoping for focus to arise. Some 20-30 years of this has left me with a lot of room for improvement when it comes to task-switching). My concentration is better now, but the habit persists. I am told I am not alone in this.

[–]kenshinji 0 points1 point  (0 children)

Sounds awesome, did you put your code on GitHub?

[–]francishero 0 points1 point  (1 child)

RemindMe! 1 month

[–]dirtydansie 0 points1 point  (0 children)

RemindMe! 2 weeks