r/learnpython • u/testfire10 Github mokrunka • Nov 02 '20
Project ideas for those interested in doing something cool while learning Python
Hey everyone, we all are always asking about some good projects to get into while we learn to write Python (myself included). So, I figured I would share my latest idea (haven't started yet), as well as some others that I've done in the past. Let's have a discussion about some of the other things you've each done!
My latest idea is as follows. Backblaze, a cloud backup solution company (no affiliation), for about 7 years has been publishing data on hard drive failure rates from their datacenter (here). What's interesting is that in addition to a blog post about the data, they also provide the raw data, in CSV format that their software generates. You can read more at the link, but basically they have a row for each hard drive every day, along with the drvie details, whether the drive has failed or not, and SMART stats for each drive. I'm thinking it would be cool to practice pandas and take this data and do some plotting and such, and maaaybe try some machine learning stuff to see if we can predict if certain SMART attributes are better predictors of failure than others. There have been studies on this kind of thing before, but it could be an opportunity to learn more about some nerdy stuff like hard drive failure rates, pandas, matplotlib, and SMART stats.
Some of the other projects I've done are:
- a very small program to search the graphics card prices on newegg
- if you're interested in data, here's another github link of a bunch of big datasets
E: wow friends! This got a lot more traction than I thought. Thanks for all the awards and let’s keep the suggestions coming!
3
u/burlyginger Nov 03 '20
In your first script you import bs4 and it appears that you never use it.
3
u/testfire10 Github mokrunka Nov 03 '20
Yes, you’re right. Most of this is a work in progress as I learn. Thanks for pointing it out!
3
u/Kuwertzel Nov 03 '20
I did a similation of Planets being pulled towards eachother with respective forces, calculated with the gravitational formula. It's super satisfying to watch and play around with. Ideal to learn about object oriented programming. Also used it as my A-Levels oral presentation. Feel free to ask if you want to try it yourself and need help :)
2
u/testfire10 Github mokrunka Nov 03 '20
Yeah that sounds really cool dude. Got a link to your code?
2
u/Kuwertzel Nov 03 '20
I haven't uploaded it anywhere public yet but I can give you a Google Drive link once i'm home.
2
u/Kuwertzel Nov 03 '20 edited Nov 03 '20
Well, instead I just created a GitHub account and a repository: https://github.com/Kuwertzel/PyPlanetsLet's hope this works so far...
Just make sure you have pygame installed (
pip install pygame), then launchgame.py. There is some additional info in the readme file.EDIT: This should be below my previous post, I replied wrongly
56
u/CatMilkFountain Nov 02 '20
A small script extracting current stock values and display them as icons in the Taskbar.
3
3
u/DisregardMyUsername1 Nov 03 '20
How would you put icons in the taskbar?
2
u/shiningmatcha learn python Nov 03 '20
I'd like to know that too
2
u/SniperViperV2 Nov 03 '20
Maybe pin an executable into the taskbar and use a python script to change the icon of the program? I don't actually know, but it's the first thing id try off the top of my head.
0
Nov 03 '20
[deleted]
8
u/CatMilkFountain Nov 03 '20
Yeah, I'm using that one. 👍 For me, the fun part is to get some display going.
23
u/vectorpropio Nov 02 '20
Good. I whant to add some projects i want to do.
a maze creator/ solver (yes, al those videos with A* va Dijkstra va whatnot, but it's cool anyway). Extra point for maze with bridges, tunnels and/or toroidal topology.
a find a word generator (sopa de letras in Spanish) , generate a png image (to entertain my children). Lot of difficulties, from square boards to arbitrary borders; word from predefined lists, or make it from most relevant from some blog/ news site / framework documentation.
a face mask usage image classifier
7
u/sebas99sebas Nov 03 '20
The maze solver is a fun project. I made one where you would input a png picture of a maze and output a png picture with the maze solved.
5
u/vectorpropio Nov 03 '20
I need to learn how to work with images. What lib did you use? PIL?
6
u/sebas99sebas Nov 03 '20
Actually, I did that project in Java, but I've been using PIL for a python project I am working on right now and it has been ok so far.
2
11
u/nck93 Nov 03 '20
I've recently been exploring pyautogui. I work in sales and recruiting and usually have to send a lot of in mails and connection requests over LinkedIn.
I started this today, where I use the pyautogui. display mouse position and finding the x, y coordinates for each button and using hot keys for ctrl+c and v. Isn't fully functional yet, but super cool and keeps me motivated to keep learning python.
3
6
u/javanutsy Nov 03 '20 edited Nov 03 '20
I'm learning Python and wrote a program to display currently playing track/album art from Spotify on a Raspberry Pi. Had fun trying to display the Artist, Track name, Release date over the image without being too obtrusive. Even going as far as analyzing the image color pallette (via a library) to use while overlaying the text so that the colors go well together... album art
4
u/jesse_pinkman_11 Nov 03 '20
Hey how did u do that iam new to coding and I like ur project
2
u/javanutsy Nov 03 '20
Inspired by this page https://www.hackster.io/mark-hank/sonos-album-art-on-raspberry-pi-screen-5b0012. Followed it to setup up the hardware. But as I didn't have sonos or know what that is, didn't bother to look at his code and looked else where and wrote own code to query from spotify via spotipy... My code on github if interested: https://github.com/weylunlee/pyalbumart
1
2
u/shiningmatcha learn python Nov 03 '20
By using an API?
2
u/javanutsy Nov 03 '20
Yes (what is programming but using a bunch of APIs?). So far liking Python because there are so many libraries out there. For this one, I used:
spotipy for spotify access
Pil for image manipulation (including fade transition)
colorgram to analyze album art color pallete (on the thumbnail for improved performance)
dotmap to convert dict to map notation
PyYAML for configuration externalization
5
3
u/SniperViperV2 Nov 03 '20
I really want to start learning how to make a project to identify skin lesions to help people understand changes over their whole body instantly and in hard to see places. (think strip in a door frame and compare spots between before and after). What something could do for skin cancer would be amazing. There are paid apps that do this, as well as industries that will do it also, but open source using phones etc would make a real difference.
2
u/dvboy Nov 03 '20
I just created a word generator for the word find app "Word Trip". In that game you are provided with 7 letters and need to find 3-7 letter words to fill in the blanks provided. I found it presented some interesting challenges regarding programming in general, not restricted to just Python, such as not using letters multiple times unless they are provided multiple times. Example: if the letters are 'abcdefg', you wouldn't suggest 'add', but if they were 'abcdefd', you would. I also arranged the output to print them out in alphabetical order descending in size, so all 7 letter words alphabetically, then 6, 5. etc.
Mine was 103 lines of code and pyenchant to determine if a letter combination is a word.
2
u/HoTDog4Life Nov 03 '20 edited Nov 03 '20
RE: Directory with Tons of Small Files:
Below should get your friend a good head start!I made a file mover in my 100 days of python. Just replace the DIR1,2,3 with the dir of his choice.
edit:
Sharing a pastebin instead of markup
2
2
u/Gagsterrent Nov 04 '20
you can also use jexcel , to create saas based web applications just by integrating spreadsheets.
0
Nov 02 '20
[deleted]
10
u/EbenenBonobo Nov 02 '20
I did nearly exactly that with a raspi. I used the fritzconnection package.
5
Nov 02 '20
python source/code suggestions?
12
u/EbenenBonobo Nov 03 '20
i used something like this and called it with crontab every 10 min:
from fritzconnection import FritzConnection ip = 192.168.178.1 pw = password123 fc = FritzConnection(address=ip, password=pw) call_num = fc.call_action( service_name='WLANConfiguration1', action_name='GetTotalAssociations') num = call_num['NewTotalAssociations'] macs = [] for i in range(num): call_i= fc.call_action( service_name='WLANConfiguration1', action_name='GetGenericAssociatedDeviceInfo', arguments={'NewAssociatedDeviceIndex':i}) mac = call_i['NewAssociatedDeviceMACAddress'] macs.append(mac) ...I don't know where exactly i found the service and action names and so on. Might even be directly from the avm website, there are some ressources for developers.
4
u/cryptospartan Crypto-Spartan Nov 03 '20
You could do something like a simple ping and keep a table / database of MAC addresses. Scapy would be good for that
Edit: could also monitor the network for DHCP requests incase a device has a firewall that blocks ping
2
0
6
u/kvndakin Nov 03 '20
i just made something to fill out my timesheets, just finished 2 mins ago, it prolly looks like trash but damn it feels good.