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
QualityScaler 2.0 - image/video AI upscaler

​

https://preview.redd.it/yzvfha4mc1va1.png?width=1126&format=png&auto=webp&v=enabled&s=cde493fb5c566af51c7eec4cebe8b187fa891ee4

[https://jangystudio.itch.io/qualityscaler](https://jangystudio.itch.io/qualityscaler)
https://github.com/Djdefrag/QualityScaler

### THANKS

I want to sincerely thank the people who support and will support this work (financially and otherwise).
Thank you for allowing me to learn how to develop these projects and at the same time be able to help my parents financially.

# Changelog 2.0.

### NEW

It is now possible to upscale images and videos in one shot
The message box is now more "conversational"
Now the app will save the upscaled files by adding the chosen resolution % tag.
this allows you to try different % resolutions without overwriting the previous file.
for example, an image with BSRGANx4 and Resolution 70%:
QualityScaler 1.14 => image_BSRGANx4.png
QualityScaler 2.0 => image\_BSRGANx4\_70%.png
New GUI based on the splendid work of customtkinter:
it is now possible to select files via a "Select files" button instead of the Drag&Drop function that presented several problems
this new library allows for much more organized and optimized code
the new interface is fully resizable and so adaptable to any screen
the new interface also allows more space to add new

/r/Python
https://redd.it/12sxlx5
I just want to say, I love django!

I have been programming for more than 15+ years and professionally about than 7 years. Out of all the frameworks, and the languages, I have worked with. I think django is one of most well thought framework, it has a simplicity that matches with python and Damm, the documentation, it just makes building and programming such an enjoyable experience.

I have worked with some huge and legacy Django code bases too but, getting around in it still feels familiar and not much overhead.

Django all the way!

/r/django
https://redd.it/12so91h
Just created a set of Python info cards - would love your feedback!

Hey everyone! I recently put together a set of information cards on Python basics for those getting started, covering topics like data types, file i/o, and debugging. I'd love to hear your thoughts on the content, design, and overall usefulness.

https://preview.redd.it/s095n2w2v1va1.png?width=4154&format=png&auto=webp&v=enabled&s=c24aaccaf59e5accb368d1a67265a03bd6f09a34

/r/Python
https://redd.it/12t0mk5
Create a simple, yet beautiful design with Python and CSS for your next Flask project. (Part 2/2)

Hi all, just published part 2/2 of my frontend mini-series for Flask in Level Up Coding. This time focusing on CSS.
Tutorial includes:
\- All the CSS needed to create the design.
\- How to structure the CSS into multiple files to improve code maintenance and readability.
\- How to use the Flask Assets package to minify and optimise your CSS for production.

Check it out here: https://levelup.gitconnected.com/create-a-simple-yet-beautiful-design-with-python-and-css-for-your-next-flask-project-part-2-2-f189bfe9492f

Here is the final design:

https://preview.redd.it/ftn5lucan0va1.png?width=3360&format=png&auto=webp&v=enabled&s=67cabdb599d1bd666d0f1f6329b8aebe1e21200d

PS: if you missed part 1 on the HTML, you can find it here: https://levelup.gitconnected.com/save-money-on-expensive-no-code-tools-build-the-frontend-for-your-flask-app-with-python-html-b2f8f1c8cb84

/r/flask
https://redd.it/12stv85
Spooky Static Files

Ok, I'm at my wit's end. I just spent give hours trying to solve an issue and I'm not getting any further.

Here's my stack:

Docker
Nginx
Gunicorn
Django

Everything works fine with Debug is true.

My css files that are under the same folder structure as my images and Javascript files do not seem to completely load when I run the production server.

Everything is served though. If I manually input the url in my web browsers (Mozilla, Edge, Chrome) I can see them fine, but when I inspect elements they do not show up in the styles panel, even though they do show up in the development server.

So in essence my css does not load in production, even though the files are served under the correct static link and everything.

Any idea?

I can provide more in info upon request, but seeing I literally went over everything I could think of, I didn't want to make this a huge wall of text just yet.

I asked chatgpt and he's been very helpful, but he seems to be clueless on this as well.



Any ideas?

/r/django
https://redd.it/12tig93
Unicodeitplus: Convert simple LaTeX into an unicode approximation and paste it anywhere.

This is a small library with a CLI to convert simple LaTeX into unicode. There are much more powerful LaTeX to HTML converts, like KaTeX, but the beauty of unicode is that it works everywhere, in the terminal, in Powerpoint, ... . The library is inspired by unicodeit but uses a better LaTeX parser that fixes a few bugs in unicodeit.

Package on PyPI

Source on Github

/r/Python
https://redd.it/12tguck
All Python books 25%-off at No Starch Press

Note: I am not affiliated w/ NoStarch in any way, am not using any referral links, was not asked to post this and do not receive any compensation for doing so. I'm just a fan of their books and personally own a bunch.

Just got an email that all Python books at No Starch Press are 25%-off now through Sunday "in honor of PyCon's 20th anniversary celebration this week". Use coupon: PYTHONISTA

https://nostarch.com/catalog/python

/r/Python
https://redd.it/12tagoo
I built an API with Flask based on the adult animated sitcom Archer

The API provides data about Archer's characters, episodes and quotes:

https://www.archerapi.com/

Source code: https://github.com/ben-n93/archer\_api

Any feedback is greatly appreciated as this is my first API/Flask project.

Thanks!

/r/flask
https://redd.it/12tqtpn
QR Code, Scanning?

Continuing to battle away on my app, and it's coming together. When the user registers I generate a uniqueID and i'm displaying that on their dashboard as a QR Code. The idea is on a separate page they can add the uniqueID code and it will compare their film watchlist and other users. I have a page that does the comparison and it works great adding the code manually. The next step is adding a button to open the camera and extract this 15-digit code from the QR code to enter into the input box.

Is there an easy way of doing this? chatgtp wants me to integrate a script into the HTML file, The code is below, and it doesn't do a thing....

​

'''
{% extends 'base.html' %}

{% block content %}
<h1>Find Something To Chill Too</h1>
<form method="POST">
<label for="unique_id">Enter unique ID:</label>
<input type="text" id="unique_id" name="unique_id">
<button type="submit">Find Similar Users</button>


/r/flask
https://redd.it/12tullw
Built This GPT-Powered Document Search and Question Answering App with Django

Thought you guys might appreciate this. It's a starter app to build apps that interact with documents and use Large Language Models like GPT3 to find documents and answer questions.

The core libraries are:

1. Django
2. Django Channels
3. Django Ninja
4. Redis
5. Celery
6. LlamaIndex
7. Langchain
8. OpenAI
9. React
10. Docker & Docker Compose

Repo here and a detailed walkthrough here . Checkout the short video below. Feedback and/or contributions are welcome!

Demo of Django-Powered Document Search and Question Answering Tool

/r/django
https://redd.it/12tmsin
Share Jupyter Notebook on Hugging Face Spaces with Mercury

Have you ever have to rewrite Python notebook to Flask or Streamlit or Dash?

I created a step-by-step guide on how to share Jupyter Notebooks on Hugging Face Spaces with Mercury.

- Hugging Face Spaces is a service for hosting data web apps,
- Mercury is a framework for converting Jupyter Notebooks to interactive apps (Voila killer),
- you can use both technologies to share Python notebooks to non-technical users

/r/Python
https://redd.it/12tz52r
Records not showing up on a Model's admin panel page

Hi everyone!


I've been using Django for quite a while and I'm facing a problem I've never faced before. I had a few models and some data in the database. It was an old codebase and everything was working fine.


I made a few changes and created a new migration and applied it to the database. Now for some reason, I CAN see the model on the admin panel BUT CANNOT see any records. While querying the shell I can tell that there are at least 60 objects that should show up. But there are 0 that show up on the admin panel. All the DRF APIs - that perform various CRUD actions on the model - are working perfectly fine.


Can anybody give me any leads or advice on how I should go about this and what I should look for?


The model -

```

class Magazine(BaseEntityModel):
user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete=models.SET_NULL)
title = models.TextField(max_length=255) # max_length 100
description = models.TextField(blank=True)
cover_art_path = models.CharField(max_length=140, default="No path available")
feature_img_path = models.CharField(max_length=140, default="No path available")
view_count = models.PositiveIntegerField(default=0)
likes_count

/r/djangolearning
https://redd.it/12u376u
Productivity tools

I just installed debug toolbar and browser reload. Both are amazing and wondering what else I should be using to make life easier.

/r/django
https://redd.it/12u1di0
If I want to create a inventory app which will be SaaS , every user will have his own stores, products and invoices..etc .. what approach I should use ?

Should I create product and store tables contain userID or I should have separated Database for every user ? And how to achieve the second approach if its better ?

/r/django
https://redd.it/12u18ga
PyCon US 2023 Has Begun!
https://us.pycon.org/2023/

/r/Python
https://redd.it/12u67jd