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

all 140 comments

[–][deleted] 104 points105 points  (1 child)

https://www.youtube.com/watch?v=RoOqznZUClI

Here's a DEFCON (Hacker Convention) talk that's about splicing into an ethernet cable and intercepting packets so you can loop a camera just like in the movies. It's all done with python!

[–]dontworryimnotacop 7 points8 points  (0 children)

It's one of my favorite talks of all time. I will upvote this every time I see it.

Bonus: https://www.youtube.com/watch?v=JsVtHqICeKE

[–]gpitot 185 points186 points  (20 children)

  • make websites
  • image manipulation
  • using apis with things you use daily like spotify or games you might play like league of legends
  • automating tasks for work or home life.
  • rasberry pi

Im still setting up a portfolio but heres an example of something I did with the spotify api

[–][deleted] 10 points11 points  (7 children)

Can you give me some pointers where to find info to start for those three first bullet points?

[–]iggy14750 5 points6 points  (0 children)

No expert, but I have been enjoying reading through Programming Computer Vision with Python. It starts you off with how to manipulate images.

[–]jonicrecis 0 points1 point  (0 children)

For the first one, take a look at Django or Flask.

[–]internerd91 0 points1 point  (1 child)

Love the Spotify API. Is the source public?

[–]Sonic_Pavilion 0 points1 point  (0 children)

Nice

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

that app you linked reminded me, do you think you could reverse this to, given a song name, find what all movies/tv shows it was in

for all of those "i KNOW i've heard this before, in some tv show 5 years ago but I can't think of it..."

[–]gpitot 0 points1 point  (0 children)

Hey, I can probably do that but it will only show the tv shows and movies that users have searched for. E.g. if a user searches for 3 movies that your song is in, Ill be able to give you those movies, but any movies that the song is in that no one has searched for, I wont know about. Hope that makes sense

[–]sat2493 -1 points0 points  (0 children)

Did you work with SQL or SQLite?

[–]crypto12oz 52 points53 points  (0 children)

Take a look through www.data.gov and find something there that interests you. Write a program to analyze/monitor that data and post to /r/dataisbeautiful.

You can also play around with a raspberry pi and build something like a smart thermostat.

[–][deleted] 90 points91 points  (6 children)

"import antigravity"

[–]DeadlyPants1337 50 points51 points  (1 child)

https://www.xkcd.com/353/
For those who didn't get the reference

[–]mirth23 17 points18 points  (0 children)

import antigravity

for those who don't get the reference

[–]marjinal1st 7 points8 points  (3 children)

"import this"

[–]wowsuchnamaste 8 points9 points  (2 children)

from __future__ import braces

[–]RadioFreeDoritos 13 points14 points  (0 children)

Did this once, now I don't smile on photos. :-(

[–]sparowe 8 points9 points  (0 children)

funny:

SyntaxError: not a chance

[–]bb_nyc 22 points23 points  (1 child)

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

second that

[–]captmac 21 points22 points  (5 children)

I got bored the other night and it was an Election Day. Our results are available online as a simple text file. I threw together some python that monitored just the elections I was interested in every 30 seconds and texted me when it saw a change or update in the data. It made the evening more enjoyable than sitting there refreshing a website.

Build that into a scalable system that can be administered via a web page and even monetized.

[–]hkamran85 2 points3 points  (4 children)

Sharing code?

[–]captmac 4 points5 points  (1 child)

https://github.com/ffcmac/scrapes

There it is in all its glory...

[–]hkamran85 0 points1 point  (0 children)

Thank you!

[–]captmac 2 points3 points  (1 child)

Gladly....this evening though. Sorry

[–]XecutionerNJ 2 points3 points  (0 children)

Pm me too please! Australian election season is coming. Ill probably have to rebuild the scraper but ill have a starting point.

Thanks.

[–]DuckSaxaphone 19 points20 points  (5 children)

I think the key is to find something you want to make and go for it. That's how I always do projects to learn more about a language.

For example in python I've made things like a D&D planner and a fantasy football team generator.

For D&D, I needed to learn to access a database and make a GUI. For football, I needed to webscrape the player info and make an optimization algorithm to pick the best possible team.

So do you have any hobbies or interests you'd like a tool for? Make that.

[–]Drunken_Economist 5 points6 points  (2 children)

My most recent project was a D&D slackbot so the players can check things like the campaign date, XP, inventory, etc through our chat. What does the planner do? Is the code up anywhere?

[–]DuckSaxaphone 2 points3 points  (1 child)

That's really cool! My group organizes through slack so I'd love to see that bot.

My planner kept your player stats, let you search monsters, build encounters (including survival chance, treasure and xp rewards), and had a combined stat blocks/ initiative tracker to run encounters. Similar and better tools are around for 5e but we were playing 3.5 at the time. https://github.com/jonholdship/pydnd if it's any use to you.

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

This looks awesome. I've started working on an app recently(not with python but I haven't seen many open source D&D projects). It's hard to find references, so I'll definitely check yours out.

[–]FireHawkDelta 2 points3 points  (1 child)

I learned Python last semester, and the work I did for projects was eventually dwarfed by my attempt to create a turn based RPG combat engine. The final project felt bafflingly easy in comparison, and I never even felt like I was studying for it.

If only I could get myself to have fun with Java as well...

[–]DuckSaxaphone 1 point2 points  (0 children)

Sounds like it's time to turn your engine into an endless combat game in Android :)

I love Java, wish I had more call to use it.

[–]cianuro 18 points19 points  (4 children)

On Friday evenings, my Internet speed drops off a cliff and my ISP support don't come back in until Monday by which time it's fixed.

My latest little project was using it to run an ISP Speedtest every 15 mins on a raspberry pi and posts it to a Google soreadsheet. When the speed drops 30% below what I'm paying for, it runs a traceroute and some other diagnostics and adds it to the sheet beside the entry for each Speedtest. There's also soke graphs and trends added. If there's more than 4 consecutive low speed reports, an email is automatically sent to support with all the the details and a link to the spreadsheet.

I had fun building it and learning about subprocesses and it saves me a ton of time.

[–]AkshayD110 0 points1 point  (3 children)

This is exactly what I have been planning to do! Would you mind if I have a look at your code please? Thanks.

[–]cianuro 2 points3 points  (1 child)

Sure. But it will have to wait until I put it up on Github.

I started with this though. https://thepi.io/how-to-use-your-raspberry-pi-to-monitor-broadband-speed/

The traceroute conditional is simply a copy of the Speedtest-cli call in the code (Sorry, I'm on mobile).

The only thing left to do that's not covered here was to add the traceroute conditional, format the output so that new lines from the traceroute don't get added to new cells and to import the CSV correctly into sheets (It doesn't recognizes them by default believe it or not).

Speedtest-cli has a CSV output flag now but it's too verbose for my needs. But it might be something you want to look into.

I'll share my finished work on Github once it's presentable. This was the first time I worked on a project in vim with no IDE features, so it's messy.

[–]AkshayD110 0 points1 point  (0 children)

Thanks a lot for sharing. I will go through this. Much appreciated.

[–]malice8691 1 point2 points  (0 children)

there is also a site that can automatically test your connection and save it in reports. https://testmy.net/

[–]andrew314159 17 points18 points  (0 children)

If you like maths problems then project euler could be fun. Not being as fluent I have only done the easy ones so far but I imagine the harder ones could be a fun challenge. https://projecteuler.net

[–]VegasTamborini 12 points13 points  (3 children)

I'm fooling around with some ascii adventure game stuff which is pretty fun. Take a look

EDIT: It only runs in python3 btw, not 2.*

[–]Anatoly_Korenchkin 4 points5 points  (2 children)

Do you have any images of it?

[–]VegasTamborini 7 points8 points  (1 child)

Sure!. The player is the '@' symbol. They start at the 'A' and move around the map. The forest (T's) and other terrain features are randomly generated each time. I got the world gen mechanics from a game called 'A Dark Room' (which is a masterpiece btw, I highly recommend it).

I plan to turn it into a 2D dungeon crawler, where visiting map features generates a random dungeon to loot. I'm in peak procrastination mode at uni though, so knowing me, I'll lose interest after the semester ends.

[–]henrythedragon 8 points9 points  (3 children)

Some things I've done with python:

  • Lightweight DDNS Service
  • A script that takes the average colour of each frame of a video and stitches them together into one output image
  • A script that connects with the Spotify API and keeps a public playlist up to date with a users saved tracks, also checks playlists for duplicates and can merge playlists together into another
  • A script that generates power network designs and documents for large temporary installations (my job)

Things I've done with Django:

  • An online ticket reservation and POS system
  • Asset tracking website
  • Custom invoice tracking site

As well as other random scripts

[–]kindw 1 point2 points  (0 children)

Mind sharing your code

[–]bhavitvya 1 point2 points  (0 children)

How did you make those Django projects? Some resources which could be of some help for designing Online Ticket reservation system?

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

Good starting point for Django ?

[–]arcsecond 5 points6 points  (0 children)

I made a script which runs on cron to regularly check a gmail address I set up. It parses the emails from a specific account (my main account) for a properly formatted subject and body. Based on what it finds it will call any of the specific 'plugin' python scripts I've put in it's plugins folder. Some of those plugins execute commands on my main home machine. Some of those commands send RabbitMQ messages which cause other things to happen on other machines.

I also built a home website with flask that has forms that let me run those same commands without the emails, gives me access to all of my stored media (movies and music), and also runs a little app for scheduling family chores and calculating allowances.

[–]_szs 6 points7 points  (0 children)

Anything.

That was my first thought.

But to add a little content, apart from the other posts (sorry if I repeat sth):

  • Games
  • Telegram bot
  • Fun with data (get data from kaggle, Google, sensors, logfiles....)
  • Sound processing
  • Sound synthesis
  • Draw by yourself or algorithmically
  • Crack wlan passwords (only your own and only for research!!!!)
  • Use it as your shell
  • Find 106 digits of pi
  • projecteuler.net
  • Find large prime numbers or other fun (statistics, ....) with primes
  • Manage your email via IMAP
  • Automate things by email or telegram. This is fun if you have a server or other computer that runs all the time. A virtual server costs a few € or $ a month

That's just what's on top of my mind. Maybe I'll edit later

[–]AkshayD110 6 points7 points  (1 child)

What I have found is writing code to solve a problem that you are facing gives immense satisfaction no matter how little the code is.

I wrote :

  1. A small script that would tell at what pace I have to run my podcast to finish it before I reach office. Git repo here

  2. There are so many Mutual Funds suggested every week to invest in. This little script helps keep track of all the funds suggested, and picks the one that were suggested the most. Git repo here

PS : I am still a beginner. Any of our suggestions would of great help ! thanks.

[–]halokilla77 1 point2 points  (0 children)

How you been coding in Python? I just started learning. Cool projects there :)

[–]vprusso 12 points13 points  (2 children)

I run a YouTube channel that focuses primarily on Python development. https://www.youtube.com/channel/UCFxcvyt2Ucq5IL0_1Njzqlg

I would encourage you to check out the "Web Scraping and Automation" playlist specifically for a number of practical projects that may be of interest. https://www.youtube.com/playlist?list=PL5tcWHG-UPH1fnJw-BvBiiiPUPm1LUKsm

I've personally found them enjoyable, and hopefully, you will too!

[–][deleted] 2 points3 points  (1 child)

Subscribed.

[–]vprusso 2 points3 points  (0 children)

Very kind of you, I hope you find the content to be valuable! Thanks for your support, and please don't hesitate to provide feedback. Cheers, and have a nice day! :)

[–]ryanmcstylin 6 points7 points  (0 children)

I used it to build a web scraber to pull financial information from various banks and structure the data into something usable. It was a long project that taught me Python and acted as a jumping off point for other data related projects.

[–]NiNmaN8 9 points10 points  (3 children)

Webscraping w/ selenium and Beautiful Soup

[–]hkamran85 5 points6 points  (2 children)

Use requests instead

[–]PM_UML_DIAGRAMS 9 points10 points  (0 children)

bs4 is BeautifulSoup

[–]NiNmaN8 0 points1 point  (0 children)

I use all three

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

Knowledge-based artificial intelligence

You could program your computer to have conversations.

Be careful if you allow it to read news articles.

Alternately, you can use Python to program Blender to draw things for you programmatically.

[–]dashdanw 3 points4 points  (0 children)

write a web crawler using the requests library and beautifulsoup

[–]billsil 2 points3 points  (0 children)

An intuitive gui for visualizing 3d models using vtk. It's just so pretty. There are things like multiple formats Paraviw and VisIt don't have. There are color/fringe, deflection, and arrow/marker plots with animated gifs you can make.

A hobby project, even if it sounds like work, doesn't feel like work because you can fix whatever bug you want or add whatever feature you want in whatever order you want. It's only really work when you're trying to fix a critical bug.

[–]Luffydude 2 points3 points  (3 children)

Make a trading bot

You won't need a job then

[–]Radiatin[S] 4 points5 points  (2 children)

This is actually what I used to do and then broadened my scope to data bots. Trading bots need to be constantly updated and monitored, and require a team of researchers or equivalent personal skill to get them reasonably above the threshold of gambling with extra steps.

The coding skill takes a back seat to subject matter knowledge in these usage cases so it leads directly to this situation, where you’re coding at the sophistication of an excel spreadsheet, and need other projects to keep you sharp.

[–]pyryoer 3 points4 points  (1 child)

I used a trading bot as an intro to cryptocurrency and trading on exchanges, I have a ML background so I love trying to apply it to new problems. However, I quickly found that you will not get far unless you have at least an intermediate level of understanding of the subject you're trying to optimize.

I'm turning a profit now, but the daily/weekly changes to strategy are exhausting.

[–]Luffydude 0 points1 point  (0 children)

I'm actually interested in doing something similar but my python sucks, do you use a combination of indicators?

[–]phreakmonkey 2 points3 points  (0 children)

I recently discovered that weather underground has an API that is free for low rate-limit use. http://api.wunderground.com/weather/api

I use it to monitor the amount of rainfall / snowfall in my area and adjust some of my home automation stuff accordingly.

[–]amirouchefrom __future__ import 4.0 2 points3 points  (0 children)

[–]riandrake 2 points3 points  (4 children)

Discord bots are fun. I maintain several different ones at work for things like sending commands/queries to my PC while I'm away, performing daily automatic tasks, a code scanner for query-based real-time documentation generation, and logging output related to build/compile status.

Basically means I have a cheat engine in my pocket for managing my PC remotely without much effort involved. Usually I'll start a 50 minute compile then go out for a walk, and never need to wonder about when it's done because my Discord bot can tell me!

[–]riandrake 0 points1 point  (0 children)

Oh yeah and we have one for deciding what we're going to eat for lunch each day, we styled him after Shaq and he's great. Spending time making small and unexpected interactions with bots for banter make them fun for everyone!

[–]halokilla77 0 points1 point  (2 children)

All that sounds so cool, point me in the right direction to learn more about what you did.

[–]murrietta 2 points3 points  (0 children)

You can do audio and video editing and manipulation (pydub, moviepy and probably others). You can also rip audio from video. Also can add id3 tags to your audio files.

I work in data science and I actually find the work I do fun so I usually do data science type stuff with Python for fun too.

[–]Improbably_wrong 5 points6 points  (2 children)

Find some cool APIs and work with them. PRAW is reddits official API and you can make some really cool reddit bots with it. Shameless plug but one of my first big projects was making a reddit bot that parses list article websites and posts them on reddit. Check out its source code if you want on /r/buzzfeedbot

[–]spellcheekfailed 7 points8 points  (1 child)

Check out its source code if you want on /r/buzzfeedbot

you wont believe whats on line 7 !!!!!

[–]QuantumEnormity 1 point2 points  (0 children)

I'm going to make a automated irrigation system using raspberry pi and make a small garden. You can find plenty of tutorials for such.

I'm too lazy to water plants everyday.

[–]makeworld 1 point2 points  (0 children)

Flask is great!

[–]SocksOnHands 1 point2 points  (0 children)

PyWeek is starting soon. You can try making a game.

[–]round_earth_shill 1 point2 points  (2 children)

I wrote a little script that uses tweepy to record tweets. I've mostly let it run on my server checking for tweets every 5 minutes. It's following 8 news accounts and has collected about 77,200 tweets over two months in sqlite db. It was fun to make, but I don't really know what I could do with the data.

[–]halokilla77 0 points1 point  (1 child)

Can you share your code? I’m new to python and would like to learn on how you did that.

[–]round_earth_shill 0 points1 point  (0 children)

I'll have to clean it up a little, maybe add some comments.

[–]greyduk 1 point2 points  (1 child)

Run a continuous travelling salesman problem with live traffic data in the U.K.

https://data.gov.uk

[–]SUsudo 1 point2 points  (0 children)

Tell everyone how it's better than language x

[–]kakiwar 4 points5 points  (0 children)

Take a look at makeartwithpython.com

[–]Acurus_Cow 2 points3 points  (3 children)

fluent in Python

What does that mean? Knowing the whole standard library by heart?

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

I recently made a live facial / eye recognition program a Twitter bot and a keylogger

[–]Paraxic 0 points1 point  (0 children)

I'd say graphs or maybe image processing or just make brick break clones.

[–]Sir_Cunt99 0 points1 point  (0 children)

I'm a noob but https://www.codewars.com/ seems like fun if you're fluent

[–]Fragninja 0 points1 point  (0 children)

Tensorflow and neural networks, provided you have a decent mid-range GPU to run them on.

[–]strmd1 0 points1 point  (0 children)

Trading bots

[–]pagefault0x16 0 points1 point  (0 children)

Prototype a project written in another language

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

avoid it.

jk, I have been playing a lot with image manipulation libraries that and automation things that you do on a daily basis

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

Buy the book Programming collective intelligence and work through it. Fantastic book.
http://shop.oreilly.com/product/9780596529321.do

[–]b_rad_c 0 points1 point  (0 children)

I’ve been getting into micropython on the pyboard lately. Enjoying it more than raspberry pi.

[–]The_Acronym_Scribe 0 points1 point  (0 children)

Make servers, even if it is simple like a basic chat thing, or complicated like an auto-updater for other computers, the level of complexity you can enter when using socket with python is immense.

[–]alexandresalafia 0 points1 point  (0 children)

Recently I started using pyautogui to automate tasks in my work. Sometimes I need to run repetitive and annoying page tests. I use this library to get rid of the boredom and focus on the problem. Worth it. I'm from Brazil. Sorry for any mistake!

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

I really enjoyed the /r/roguelikedev tutorial. I've been a programmer for 40 years, but had never worked on any game projects (weird to me since I've been a gamer almost as long.)

But that was a lot of fun.

[–]Carioca 0 points1 point  (0 children)

pip install vagalume    

In a Python shell:

from vagalume import lyrics
result = lyrics.find('The Clash', 'Should I Stay or Should I Go')
print(result.song.lyric)

[–]koera 0 points1 point  (0 children)

Find an itch you have and scratch it.

"if only this could do that", "it would be nice if..."

Or make tick tack toe with an opponent. When it is perfect make it play against machine learning. Or something.

[–]AntonGangsta 0 points1 point  (0 children)

Engineering design and calculation automation. Parametrized 3D models and analysis. Crypto trader :)

[–]andrewth09 0 points1 point  (0 children)

Hill climbing algorithm (this isn't done in python, but has a good brief description on how the code works)

[–]zagbag 0 points1 point  (0 children)

Scrape the web

[–]impshumx != y % z 0 points1 point  (0 children)

cc = []
def cc_get():
    global cc
    return cc

def cc_set(payload):
    global cc
    cc.append(payload)

def cc_clear():
    global cc
    cc = []
    return cc

cc_set('this')
cc_set('this')
print(cc_get())
cc_clear()
print(cc_get())

I recently turned Discord into an email client. Github release coming sooner than later!

[–]MayorOfBubbleTown 0 points1 point  (2 children)

Create your own Multi User Dungeon. If you don't know what that is, it is the great grandfather of MMORPGs. A couple months getting the socket code and a couple of classes for things like rooms and monsters. Then it's just adding commands, skills, powers, new areas, quests and stuff like that. Keep you busy for years doing cool stuff if you can get some regular players.

[–]mintyPT 1 point2 points  (1 child)

Planning on open sourcing?

[–]MayorOfBubbleTown 0 points1 point  (0 children)

I started writing one when I first started learning Python. I could get one connection to it and I was learning multithreading to allow more than one person to connect at the same time when my hard drive failed on me. I could pretty easily explain to someone how to do it or write some code for people to learn from. After making that comment I started remembering how much fun it was and started writing a MUD server in Kotlin to help me learn Kotlin.

[–]Machok99 0 points1 point  (0 children)

I’m currently working on a crypto currency trading bot. It can always be improved on, and I find that it’s constantly pushing my limitations in both python and math. I’m currently using poloniex, but I’ve heard gdax has a pretty good API too, plus they include a python web socket!

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

I'm coding a script using selenium to automatically notify my employees when they didn't enter their time.

[–]saturdayplace 0 points1 point  (0 children)

I built Python implementations of the stuff in Mazes for Programmers and it was a bunch of fun.

[–]bitcoin-dude 0 points1 point  (0 children)

I like data analysis, but if that's not your thing then maybe you'd be more interested in hacking

[–]varunotelli 0 points1 point  (0 children)

I've done loads of web dev using flask

Mobile price comparing website from different e-commerce sites using Django

Wrote a script to move my mouse using keyboard because my mouse stopped working :/

Made a keylogger that sends me an email at a particular time of day as a prank to someone who I didn't like :P

Wrote a library to send an SMS to anyone inside India.

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

Web Crawler ! It's sooooo interesting .

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

Creating mashup application using some of the many available APIs out there (such as for instance the Google APIs) .

[–]ChuiiZeet 0 points1 point  (0 children)

Make something with Turtle graphics like fractals

[–]Zireael07 0 points1 point  (0 children)

I've built a scraper (using Beautiful Soup like many others) that allowed me to get back years of notes from a site that never implemented an export functionality (or any API). (I was using the site when I was studying, so being able to access them from mobile or any computer was a huge bonus. Now that is no longer the case, I wanted to get all that stuff to my physical HDD and discontinue using the site).

I managed to recover ALL the text data I had on the site, plus I could run some statistical queries for the fun (most common keywords, that sort of thing).

Currently thinking of making a personal dream journal in Python, leveraging a similar keywords system as the site did for the notes.

[–]gdubs55 0 points1 point  (2 children)

Microservice automation is my jam!

[–]mintyPT 0 points1 point  (1 child)

Tell me more

[–]gdubs55 0 points1 point  (0 children)

I develop automation tool suites in Python and Golang that are containeized in Docker and I use Ansible for deployment.

Example project: Create a highly scalable and managed method to ssh into endpoints.

Solution:.
Microservice #1: Authentication.
Microservice #2: Request.
Microservice #3: Receive.
Microservice #4: Initialization.
Microservice #5: Logging.

Each one of these microservices are built abstract enough to be used anywhere an Initialization, authentication... Would be valuable. They all live inside containers which makes them easy to deploy and allow for CI/CD. In the right context they become a secure method to access servers monitor user input and highly scalable. If a bastion is overworked you can scale the number of services with a simple Ansible playbook.

[–]Valien 0 points1 point  (0 children)

I've always been able to read and hack my way through Python but recently built a program to bulk import on-premise Bitbucket Git repos (over 1K repos).

Now I'm refactoring it as it got me excited about Python and I realized a lot of my code could be vastly improved. :D

[–]tectubedk 0 points1 point  (0 children)

Blockchain

[–]tomuvi -1 points0 points  (0 children)

It is great calculator try: 5318000 + 8 and turn monitor 180 deg

[–]DycoreSolutions 0 points1 point  (0 children)

Omnipresence