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
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
MS Dhonii's picture rendered using python ,where each pixel is a picture from his career.

​

https://i.redd.it/s6cehb28mwi51.gif

git hub link: [https://github.com/bharath-gowda-571/pixel2image](https://github.com/bharath-gowda-571/pixel2image)

(leave a star if u like it)

/r/Python
https://redd.it/ifknmo
We've launched a course on Deep Learning based Time-Series Forecasting with TensorFlow 2.0 and Python. It is an elaboration of the TensorFlow 2.0 documentation and we're constantly updating the course to cover more topics.
https://www.theclickreader.com/courses/time-series-forecasting-with-tensorflow-2-0/

/r/Python
https://redd.it/ifpti5
Hostman is a simple cloud hosting provider where you can deploy your web apps with just a few clicks

We are trying to get user feedback and are providing a **$50 bonus (no credit card required)** on signup for you to test it out and let us know what you think about the platform.

Here's the link: [https://hostman.com/?coupon=reddit50](https://hostman.com/?coupon=reddit50)

Some features of Hostman are:

\- Free hosting for frontend apps

\- Automated deploy from your git repo. Just link your project's repo, and it'll be deployed automatically

\- CI/CD out of the box

\- Free SSL

\- Support for a lot of frameworks

/r/flask
https://redd.it/ifn9ht
Cannot access my admin panel.

I'm new to Django. I was creating a blog website. Everything was going fine until suddenly I'm unable to access my admin panel. Here is a screenshot of error on the left and the folder structure on right. Please let me know if I'm supposed to share some other information as well.

​

​

https://preview.redd.it/7t7y82teyzi51.png?width=1920&format=png&auto=webp&s=a597c8f133b429d97f9655069efc7f15c92c2260

/r/djangolearning
https://redd.it/ifv63s
Tuesday megathread: Advanced questions

Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.

**If your question is a beginner question we hold a beginner megathread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.**

/r/Python
https://redd.it/ig12f3
JupyterLab Minimalist Container

I've been using containers to create isolated ML environments for a while now and have relied heavily on the awesome [Jupyter Docker Stacks](https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html) project. Having stable, portable pre-configured environments ready to go has been awesome.

However, the minimalist in me wanted to slim down these images as they include much that I never used. And so I began working on a project I am calling [jupyterlab-minimalist-image](https://github.com/gitjeff05/jupyterlab-minimalist-image). Now open for feedback and requests.

In addition to making the images smaller, I wanted:

- A simple and intuitive Dockerfile (~20 lines)
- To be based off the [Official Python Docker image](https://hub.docker.com/_/python)
- Multi-stage builds
- A Reduction in dependencies (only what is necessary)

In the end I was able to make significant reductions when comparing to the `jupyter/scipy-notebook` image that I was using. Specifically, I saw a **%75** reduction in image size and an **%88** reduction in lines of Dockerfile:

| Image | # Layers | # lines in Dockerfile | Size (GB) |
|---|---|---|---|
| `jupyterlab-minimalist` | 10 | 22 | 0.663 |
| `jupyter/scipy-notebook` | 21 | 190 | 2.67 |

As I note in the docs, this is not exactly a fair comparison because the scipy image from Jupyter Docker

/r/JupyterNotebooks
https://redd.it/ifu0x5
A few months ago I asked the Django community here if anyone would be open to talk about their tech stack and lessons learned from using Django in production on a podcast I started. You crushed it! Here's some of the results

The original post was here: https://www.reddit.com/r/django/comments/gddnh0/are_you_running_any_type_of_django_app_in/

Since then:

- Over 30 people have filled out the form to become a guest on the show
- About 28 of those episodes have been recorded
- 12 of them are live on the podcast site as of this post

The Django specific episodes are at: https://runninginproduction.com/tags/django

Episodes range from a small team creating their own insurance company from scratch with a 300,000+ line Django app running on a Kubernetes cluster on AWS to folks who just deployed their first Django project on Heroku. Every episode has a different Django app with a different tech stack / story.

**I just wanted to say thank you to everyone who came on or happens to listen to any episode.**

The only downside is it will take a few more months to publish the rest of the episodes since it's a weekly show. With that said, if you don't mind waiting and you want to be a guest on the show, I'm always open to having new guests on! The form to get the ball rolling is here: https://docs.google.com/forms/d/e/1FAIpQLSdaCRorXztETX1rQxcYT67OTkF3BKb-max99RYpRPrEiO-sKw/viewform

/r/django
https://redd.it/ifrcd6
Learning React..converting frontend project?

Hey guys,

I have a project thats kind of on the large size. I wanted to convert it to react front and flask backend. What am I in for exactly?

/r/flask
https://redd.it/ifyd54
A little help!

I have been working on a django project where i have used bootstrap forms. Now I want to that functionality where an user fills out the form then the form information gets stored in the database under corresponding field. Then the stored data gets displayed in the dashboard area. Can anyone tell me how could I achieve this?

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