Wacky shit to do with Python
June 20, 2016 9:32 AM   Subscribe

I am no longer a novice learning Python; no, as of this weekend, I am a (baby) Python programmer! So um what do I do? What nutty things (impractical OK!) can I do now? What's the coolest thing you have done using Python?

I saw this question and this question, but the answers were in general not wacky enough.

I just finished this great book (Python for Biologists) this weekend, and have these two books (Automate the Boring Stuff with Python and Python Crash Course) I used as a reference/more in-depth resource for that book. I have 3 more books on the way from Amazon: Advanced Python for Biologists, Practical Computing for Biologists and Tkinter GUI Application Development Blueprints. Yes, I am awash in books.

The books will give me ideas (or instructions) for things I could do, and while I will definitely be writing programs that will help me at my job, a topic amply covered by the books -- but I am so excited to have my new 8-crayons-worth of Python tools, and I want to do something FUN. Beyond my current toolset is fine (I have all these books!). Something that I can point to as my first real program and giggle to myself.
  • I have an idea that maybe it is possible to have the music I'm currently listening to (on GooglePlay, on my iPhone) play on my website, with a picture of my head bobbing and/or wiggling in time to the music?
  • Somebody asked me to make the game Battleship in Python -- I want to make the blingiest Battleship evar... somehow?
  • Something with my Ardiuno? (I don't have a Raspberry Pi).
  • A phone app?
  • Stuff like that?
If you could let me know what kinds of programming tools I would need to use to build what you suggest, I will know what to read about. (If you posted your actual code for a suitably bananas project somewhere for me to learn from -- oh, that would be amazing!)

Thanks for any ideas you can give me!
posted by pH Indicating Socks to Computers & Internet (11 answers total) 35 users marked this as a favorite
 
Pygame might be helpful for making Battleship (and other visually-driven GUI programs).
posted by Maecenas at 9:59 AM on June 20, 2016 [3 favorites]


Pynomo
posted by Confess, Fletch at 10:01 AM on June 20, 2016 [1 favorite]


As for the Arduino, I just learned about micropython the other day. That should allow for suitable wackiness.
posted by destructive cactus at 10:09 AM on June 20, 2016


I'm not sure if micropython actually runs specifically on the Arduino, so as to not be totally useless, here's a link to other python/arduino tools and uses. If you just want to run the python on the computer but talk to the Arduino, there's this.
posted by destructive cactus at 10:12 AM on June 20, 2016


Something else wacky might be to create some kind of frighteningly weird Siri-like using NLTK.
posted by destructive cactus at 10:14 AM on June 20, 2016


I've been meaning play around with Kivy, a python framework for creating cross-platform mobile apps: kivy.org
posted by piyushnz at 10:35 AM on June 20, 2016 [1 favorite]


If you want wacky, you could build a Twitter image bot that combines text from a source and an image from another or whatever suits your fancy.
posted by Candleman at 10:47 AM on June 20, 2016


You could use Python to send data to the Arduino for various purposes, over the serial connection. Here's a thing I did that generates a scrolling marquee on an LED matrix. (It was written to run on a Raspberry Pi, but it works on a regular PC too.) Python does the heavy lifting of rendering the text while the Arduino handles the LEDs.
posted by neckro23 at 12:51 PM on June 20, 2016


I would watch Paul Lamere's talk on music hacking with Spotify, and then take a look at his blog and Github. He writes most of it in python, and his stuff is wonderfully fun.
posted by geryon at 1:53 PM on June 20, 2016 [2 favorites]


I wrote a program in Perl (but I'd do it in Python if I did it today) to "help" my students reach word count requirements on essays. It would scan through any input text looking for synonyms for every word using thesaurus data from WordNet. For any word with a multi-word synonym, it would replace the word with the longer "synonym" (e.g., "write" → "drop a line"). The process could be repeated to reach just about any length desired. Of course, the results were ridiculous.

Another fun-with-words program I wrote that would be good to do in Python was a Markov text generator that I would feed with text from Project Gutenberg. It would generate a few sentences, and for each, it would pull in an image from Flickr based on a less common word in that sentence. It made some delightfully odd little illustrated stories, especially when fed with a few wildly different sources (I was fond of mixing Alice in Wonderland, Pride and Prejudice, and Crime and Punishment).
posted by whatnotever at 2:58 PM on June 20, 2016 [6 favorites]


You can do some cool audio stuff with Python and specifically librosa libraries. Check out musicinformationretrieval.com which is material used for a summer workshop series at Stanford (which I attended last year and is accepting applicants right now for this year).

A wacky thing I did with this information was to 'adjust' the tempo of Blackalicious' Alphabet Aerobics so it would be a constant tempo throughout.
posted by TwoWordReview at 12:33 PM on June 21, 2016 [2 favorites]


« Older Rambling UK journey between London + Cornwall....   |   Puppy Poop Schedule Newer »
This thread is closed to new comments.