Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Sunday megathread: What's everyone working on this week?

Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.

/r/Python
https://redd.it/ietbjh
Genetic Algorithm That Learns To Play Pygame Mini-game

My first "project" since beginning my undertaking of Python. Genetic algorithms were something that caught my eye early into my programming career, so I did my best to implement one on a very beginner problem. Excluding Pygame, all of the code in the project was written from scratch. I am far from done, but this is the first working version I was able to make, there are probably a lot of beginner mistakes in it I am aware (including in Github). Any feedback is great, will hopefully post a video of it later.

[https://github.com/ZacharyGott/Pygame-GeneticAlgo](https://github.com/ZacharyGott/Pygame-GeneticAlgo)

/r/Python
https://redd.it/ievn1t
Crime Watch: An Interactive Way To View Crime

​

[A Demonstration Of Crime Watch](https://reddit.com/link/iexkwp/video/720vz4ioqoi51/player)

[Github Link Here](https://github.com/BlastSolar/Crime-Watch)

​

Hey r/Python, I'm a high schooler and I created this simple application that I fondly call, Crime Watch. Crime Watch is an application where you can enter an address, latitude/longitude, or use your current location (using your IP address) to show the crime that has occurred near that location. The maps are generated using Folium, and along with this, the application also uses Plotly and the FBI-NIBRS database to show historical crime data for each state from 2000 to 2018. In addition, Crime Watch also gives a breakdown of crime in major cities in your location's state.

​

I appreciate any feedback, and thank you so much for reading this :)

/r/Python
https://redd.it/iexkwp
What is the most impressive Python based project you have seen?

Sometimes I find that Python can be so much more, but people use it mainly in data science (which is fine).

Wonder any engineer out there have ever done any massive project with Python.

/r/Python
https://redd.it/if0rfh
This media is not supported in your browser
VIEW IN TELEGRAM
Contour Based Writing using OpenCV & Python Code Link: In the Comment

/r/Python
https://redd.it/if6tmw
How my friend and I built a multiplayer game using Flask and WebSockets

GuessTheSong is a project that was spawned by a course on Human-Computer Interaction done in University. From the ideation stage, we knew that we were going to continue working on this project, even after the course is over. Our course didn’t even require us to have a real backend. It was expected that we would return static data from a list, or possibly a [Wizard of Oz experiment](https://en.wikipedia.org/wiki/Wizard_of_Oz_experiment#:~:text=In%20the%20field%20of%20human,by%20an%20unseen%20human%20being.). However in the short week that we had in Uni to work on the project we worked on laying the foundation for future improvements by creating proper routing, a game manager, and a database.

# What is GuessTheSong

[GuessTheSong](http://guessthesong.io/) is a free online browser-based multiplayer game, with multiple game modes. Where you can either compete against yourself or against others. The game runs on all devices with a web browser and is fun to play with your friends from home, or at a party.

## How do you play GuessTheSong?

In GuessTheSong you can either play *‘Standard’* mode, or *‘Theme’* mode, I will explain the difference between the two below.

https://preview.redd.it/urerrofdisi51.jpg?width=703&format=pjpg&auto=webp&s=844564a320678cb99069624d53c5c2c4639a9801

To start a game of GuessTheSong, one person needs to create a [lobby](https://gts-dev.vps.guessthesong.io/create-room), and then invite their friends by sharing the code. Once you can see everyone in the lobby, start the

/r/flask
https://redd.it/if7po9
I'm just learning Python and Django. Most Django tutorials I've seen have recommended using a virtual environment to install Django. Is this necessary? Is it only necessary if your using windows command prompt? I'm just trying to understand why this would be the case.



/r/django
https://redd.it/if6xkc
Python logo in colored ASCII art!

/r/Python
https://redd.it/ifag14
Magic 8-Ball made in Python

Hello r/Python!

I wrote a Magic 8-Ball fortune teller in Python 3. I'm a complete newbie at Python so don't bully me!

https://preview.redd.it/zm46a5igpti51.png?width=429&format=png&auto=webp&s=bab41877a5a19dc144761eb11e1a0dcbed97e68a

[Source code](https://github.com/kapsync/Magic-8-Ball)

/r/Python
https://redd.it/ifc4nq
Stripe Checkout Form With Custom Amount

[https://dpaste.org/KKo8](https://dpaste.org/KKo8)

Descriptions/problems and code in the dpaste.

/r/djangolearning
https://redd.it/ifi9kh
A simple background subtraction motion detector with an adaptive threshold

I made a simple motion detector (reference background subtraction) with an adaptive threshold for pixel delta, so it can work in low light and in bright conditions without changing the thresholds manually.

The video is a coding time lapse. The code is actually a comparison of various experiments/settings so it is slightly longer than needed (about \~100 lines). I commented on a text file during the time lapse to share my thoughts while coding.

[https://www.youtube.com/watch?v=xxUFR\_EFkvQ](https://www.youtube.com/watch?v=xxUFR_EFkvQ)

From here, it is easy to convert this to a consecutive frame differencing approach so it can work with continuously variable background lighting (i.e., a motion detector that can work throughout the day as the background lighting dims). Some tests:

[https://www.youtube.com/watch?v=9sJNisnVhqE](https://www.youtube.com/watch?v=9sJNisnVhqE)

/r/Python
https://redd.it/ifiplo
Django restful file upload progress

I am relatively new to django dev, mostly using Django Rest Framework for my projects. I am unable to figure out how to show upload progress when i POST a file on the API endpoint(api/upload for e.g). I tried using [DRF-chunked-upload repo](https://pypi.org/project/drf-chunked-upload/), but the documentation made no sense to me.

I just want to get an API response of sorts from DRF so i can reflect the upload progress on frontend.

I am using ReactJs as a frontend for my web application with DRF as my backend...

Any guidance would be much appreciated :)

/r/django
https://redd.it/ifm4d1
How much should a beginner django freelancer charge to maintain a website per month?

I’m quite new to django and maybe in the future I’ll be looking to do some freelancing and after doing research about django freelancing I heard that youre supposed to charge to maintain the website. How much would someone roughly charge for that per month or is it by the hour?

/r/django
https://redd.it/ifn1vx