Python Daily – Telegram
Python Daily
2.57K subscribers
1.49K photos
53 videos
2 files
39K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
D Modern use-cases for RNNs?

The discussion can be twofold.
1)What are in your opinion some tasks, for the personal projects scale, where you think RNNs close to traditional implementations (LSTM, GRU) are still the best starting and ending point? Especially compared to transformers.

In small time-series forecasting settings I can see a GRU being more convenient than a Transformer probably, but I am interested also in tasks where inputs are sequences of symbols or measures, but outputs maybe not.

The main goal is to play with LSTM and GRU variants (eg minGRU) on datasets where it makes sense, might do tiny-Shakespeare but it doesn't warm my heart...

2) do you think there are sequential tasks and settings where RNNs are not only the more natural option according to our intuition, but actually the only theoretically or experimentally available option to make do, compared to Transformers or 1D CNNs etc?

/r/MachineLearning
https://redd.it/1h38ym2
I need help with using aiortc with flask.

I was hoping someone could help me, I am new to flask. I am trying to implement a webrtc stream for a one way CCTV/rtsp monitoring system. I chose flask because I am using computer vision for security and also training and/or deploying AI models was the goal for this project. I just can’t find a project anywhere or get any type of AI to help me properly configure it all to work for one way, server to client streaming. I am also a newb to programming, just a hobbyist. Right now my repo is private because I have personal info in some of my code that could cause vulnerabilities, that I do not want to share. But I was wondering if anybody out there has a public repo that was good for one way WebRTC streaming and that actually functions. I’m not trying to video and voice chat, just view a security camera’s stream. I had it working with HTTP but it was absolutely horrible frame quality. It was like slow motion and you had to refresh the page. So I want to try WebRTC so freaking bad lol. I guess I could ditch flask for something else but

/r/flask
https://redd.it/1h3ghxi
Sunday Daily Thread: What's everyone working on this week?

# Weekly Thread: What's Everyone Working On This Week? 🛠️

Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!

## How it Works:

1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.

## Guidelines:

Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.

## Example Shares:

1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a noscript to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!

Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟

/r/Python
https://redd.it/1h3q203
Looking for Beginner-Friendly Flask Project Ideas


Hi everyone,

I’m new to Flask and want to work on some beginner-friendly projects that can help me improve my skills while staying manageable for a learner.

I’d appreciate any suggestions for projects that:

Cover basic Flask features like routing, templates, and forms.

Are practical or fun to build and learn from.

Can be expanded with additional features as I progress.


Thanks a lot for your ideas and guidance!💗


/r/flask
https://redd.it/1h3fabe
Protocols vs Abstract Base Classes in Python

Hi everyone. Last time I shared a post about Interface programming using abs in Python, and it got a lot of positive feedback—thank you!

Several people mentioned protocols, so I wrote a new article exploring that topic. In it, I compare protocols with abstract base classes and share my thoughts and experiences with both. You can check it out here: https://www.tk1s.com/python/protocols-vs-abstract-base-classes-in-python Hope you'll like it! Thanks!

/r/Python
https://redd.it/1h3rmn5
Big Tech Best Practices

I'm working at small startup, we are using FastAPI, SQLAlchemy, Pydantic, Postgres for backend
I was wondering what practices do people in FAANG use when building production API
Code organization, tests structure, data factories, session managing, error handling, logging etc

I found this repo https://github.com/zhanymkanov/fastapi-best-practices and it gave me some insights but I want more

Please share practices from your company if you think they worth to share

/r/Python
https://redd.it/1h3jize
Is Django an overkill for a Landing page?

Client asked me to deliver a Landing page. It will be a promo page with animations and GSAP scroll triggers. With a slight functionality of a TikTok API.

I don't know React well enough to build this solely on it, so I though of me using Django, because I'm familiar with it. I know it might sound like an over kill... but maybe not?

Any thoughts?

Thanks!

/r/django
https://redd.it/1h3u3yh
Enhance Your Python Logging with Pretty Pie Log: Colorized, Structured, and Thread-Safe!

# What My Project Does:

Pretty Pie Log is a feature-rich Python logging utility designed to improve the readability and usability of logs. It provides colorized output for easy distinction of log levels, supports structured logging with JSON, and offers thread-safe logging for multi-threaded applications. It can be customized with different colors, log formatting, timezone support, and file logging. It even tracks function execution and provides detailed stack traces for exceptions.

# Target Audience:

This package is intended for developers working on small—to medium-sized Python applications and those with multi-threaded components. It's ideal for debugging and tracking program behaviour in an organized and visually appealing way. Pretty Pie Log is lightweight enough for noscripts but offers features robust enough for small applications or internal tools.

# Comparison:

There are several Python logging libraries available, such as logging and loguru. However, Pretty Pie Log stands out because of its:

Colorized Output: Making logs more readable at a glance.
Thread-Safety: A key feature that ensures reliability in multi-threaded environments.
Function Execution Tracking: Using decorators to log function entry, exit, and results automatically.
Enhanced Data Handling: It handles complex data types, including non-serializable objects, with automatic serialization to strings.

Other logging libraries might lack one or more of these

/r/Python
https://redd.it/1h42kmi
project django

Hi, I learned python and django with python, but I really have a big doubt if I am able or not to create a website with django, then I would like to make 7 to 8 project with django so:

1) is it a good idea to do projects?

2) how do I find projects with django python?

/r/djangolearning
https://redd.it/1h1rsh6
Advent of Code 2024!

# Join the Advent of Code Challenge with Python!

Hey Pythonistas! 🐍

It's almost that exciting time of the year again! The Advent of Code is just around the corner, and we're inviting everyone to join in the fun!

## What is Advent of Code?

Advent of Code is an annual online event that runs from December 1st to December 25th. Each day, a new coding challenge is released—two puzzles that are part of a continuing story. It's a fantastic way to improve your coding skills and get into the holiday spirit!

You can read more about it here.

## Why Python?

Python is a great choice for these challenges due to its readability and wide range of libraries. Whether you're a beginner or an experienced coder, Python makes solving these puzzles both fun and educational.

## How to Participate?

1. **Sign Up/In**.
2. Join the r/Python private leaderboard with code 2186960-67024e32
3. Start solving the puzzles released each day using Python.
4. Share your solutions and discuss strategies with the community.

## Join the r/Python Leaderboard!

We can have up to 200 people in a private leaderboard, so this may go over poorly - but you can join us with the following code: 2186960-67024e32

## How to Share Your Solutions?

You can join the Python

/r/Python
[https://redd.it/1h47nhs
I made a Python Script that Shows up current playing song lyrics synced as discord activity.

demo : https://imgur.com/a/guIH7fM

hey , its my first time posting here.

i got this idea few days ago , i wanted to show the lyrics as status in my discord. so i made it happen!

# What My Project Does:

it tracks your current playing song using spotify api and fetch the lyrics and apply it to rpc.

its really easy to use i hope u enjoy it!

# Target Audience:

anyone who uses discord and wants a nice RPC.

# Comparison:

i couldn't find anything like this in my search so i dont know if there is something similar.

let me know if there is something i can do to make it better!

https://github.com/iiDriisTN/lyrics-rpc

/r/Python
https://redd.it/1h48722
kanban-tui , customizable cross platform kanban/task manager in your terminal

* **What My Project Does**

Kanban-Tui is a CLI tool that gives you a visual board with moveable tasks in the terminal.

With the newest release v0.4.0, you can create multiple boards with individual columns.
More Customization like creating task categories for tasks or change the column visibility is also possible.
It also utilizes plotext to give you an overview about several metrics (created/completed/started tasks).


For a quick demo you can use uvx to create a temporary database and config files with: `uvx --from kanban-tui ktui demo`
They get deleted after you close the application. For detailed instructions and features you can check the Readme on github.

Source Code on github: [Link](https://github.com/Zaloog/kanban-tui)


* **Target Audience** 

Terminal affine developers who do not want to miss a nice graphical experience.

* **Comparison** 

Its similar to kanban-python, which I created before before this project but less minimal and the interaction with the tasks is faster more convenient.
I.e with the TUI one is able to utilize vim-like motions to move cards around, which comes closer to the feeling of actually moving physical cards.



If you find bugs or are missing a feature, please dont hesitate to open an [issue](https://github.com/Zaloog/kanban-tui/issues).

/r/Python
https://redd.it/1h4aagg
Monday Daily Thread: Project ideas!

# Weekly Thread: Project Ideas 💡

Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.

## How it Works:

1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.

## Guidelines:

* Clearly state the difficulty level.
* Provide a brief denoscription and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.

# Example Submissions:

## Project Idea: Chatbot

**Difficulty**: Intermediate

**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar

**Denoscription**: Create a chatbot that can answer FAQs for a website.

**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)

# Project Idea: Weather Dashboard

**Difficulty**: Beginner

**Tech Stack**: HTML, CSS, JavaScript, API

**Denoscription**: Build a dashboard that displays real-time weather information using a weather API.

**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)

## Project Idea: File Organizer

**Difficulty**: Beginner

**Tech Stack**: Python, File I/O

**Denoscription**: Create a noscript that organizes files in a directory into sub-folders based on file type.

**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)

Let's help each other grow. Happy

/r/Python
https://redd.it/1h4hhn4
D Simple Questions Thread

Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the noscript.

Thanks to everyone for answering questions in the previous thread!

/r/MachineLearning
https://redd.it/1h46e6j
Want to contribute to django projects.

Hi everyone,

I want to contribute on some django projects. if any one are willing to suggest me some applications please feel free to reply to this post.

Thanks.

/r/django
https://redd.it/1h4kbga
Advanced Python Development Workflow in Emacs

Hey everyone!

Lately, I’ve been spending more time reading code than writing it, but I still code every now and then, mostly in Python. My daily editor — for both coding and just about everything else — has been Emacs for several years now.

Recently, I decided to dig into how the Language Server Protocol (LSP) and Debug Adapter Protocol (DAP) work in Emacs, how they can be integrated, and what minimal configuration is needed to get started. As I explored, I took notes for myself, and eventually, those notes turned into a blog post.

It ended up being quite a long read, but I’m really happy with the result. The more I researched and wrote, the further I drifted from my original goal of creating a quick and minimal Emacs setup guide. I rewrote the introduction a few times before landing on something I felt good about, and now I’m ready to share it with you.

The article isn’t perfect — there are still some rough edges and gaps I plan to address soon. For example:

* I haven’t covered tree-sitter integration.
* Navigation between code elements feels a bit underexplored.
* Some parts are more superficial than I’d like.

But it’s in a good enough state

/r/Python
https://redd.it/1h45hl7
Kitten Mixer: A Fun Tool to Combine Cat Images with AI

Hello Python community,

My name is Dylan, and I’m a data scientist. I recently developed a fun little project called [Kitten Mixer](https://mezclador-gatitos.streamlit.app/), and I’d love to share it with you and hear your feedback!

# What My Project Does

Kitten Mixer is a Python-based web app that uses Variational Autoencoders (VAEs) to generate smooth image interpolations of cats. By combining the power of AI with some adorable cat pictures, the app creates unique and visually fascinating blends between different cat images.

# Key Features

* **Image Interpolations:** Combine two cat images and explore their latent-space interpolations.
* **Latent Space Exploration:** Visualize how the neural network represents cat images in a 2D latent space.
* **Interactive Web App:** The app is built with Streamlit for an intuitive and easy-to-use interface.

# Target Audience

* **Who It’s For:** Python enthusiasts, AI hobbyists, and cat lovers looking for an entertaining and educational use of machine learning.
* **Intended Use:** Great for learning about Variational Autoencoders, showcasing AI-generated content, or just having fun creating unique cat images.

# How It Works

1. The project uses a Variational Autoencoder (VAE) implemented in PyTorch to encode and decode cat images.
2. By interpolating in the latent space of the VAE, the app generates smooth transitions between any two selected cat images.
3. The app runs interactively

/r/Python
https://redd.it/1h43i92
Do you deploy your own databases or use any paid database service like neon

I am trying to launch my web app and I am very confused . I have very less budget because it a side project my web app is made on top of django help me with this.

/r/django
https://redd.it/1h46ryh
Why Do REST Frameworks Use Their Own Auth Layers Instead of Django’s Auth Backends?

I've been exploring REST frameworks like Django REST Framework (DRF) and Django Ninja, and I noticed that they both introduce their own layers for authentication.

DRF does it in the base class of all REST views.
Django Ninja does it in the router that wraps the views.

This creates separate libraries, like djangorestframework-simplejwt for DRF and django-ninja-simplejwt for Django Ninja.

But Django already has a good auth system with backends that work for all views. Why don’t these frameworks just use Django’s auth backends and a middleware?

Is Django’s auth system missing something, or do these frameworks need extra features that Django doesn’t provide?

/r/django
https://redd.it/1h4rcx1