Part 2 here: Push Notifications from Backend (Django and FCM) - Link in original post.
https://youtu.be/grSfBbYuJ0I?feature=shared
/r/django
https://redd.it/1m32etu
https://youtu.be/grSfBbYuJ0I?feature=shared
/r/django
https://redd.it/1m32etu
YouTube
JS client, SW and Test Messages | Django Web Push Notifications Part-1 | Ishaan Topkar
Learn how to send web push notifications from Django. This is the part 1 of the tutorial- setting up a JavaScript client, a service worker and sending test messages from firebase. Part 2 coming soon.
Source Code (JS client and SW):
https://github.com/topCodegeek/fcm…
Source Code (JS client and SW):
https://github.com/topCodegeek/fcm…
Looking for widget which shows selections at the top
https://preview.redd.it/d4ogb4b6bndf1.png?width=552&format=png&auto=webp&s=4e49ddca9387bb6ca2cb6b116306e7c47e83ec6a
What widget class generates the widget for the field Categories shown above?
Thanks,
Rob
/r/djangolearning
https://redd.it/1m34dx4
https://preview.redd.it/d4ogb4b6bndf1.png?width=552&format=png&auto=webp&s=4e49ddca9387bb6ca2cb6b116306e7c47e83ec6a
What widget class generates the widget for the field Categories shown above?
Thanks,
Rob
/r/djangolearning
https://redd.it/1m34dx4
Django Javascript DX
Hi,
Long user of Django here, but recently developed mainly in React and Next JS.
I want to use Django + htmx (and maybe Alpine or vanilla js for some interactivity) for my next project. One thing I missing when using Django is intellisense/linter and good DX when it comes to templates and it comes to templates and javascript.
Templates
There are many ways to create components (include tag, Django cotton, etc..), but is there a way to get good autocomplete and intellisense, go to definition with cmd click etc.. for both the component name and the props that are passed to it?
Scripts
Is there a way to get imports, linter and autocomplete without involving webpack or another build step? For example, I have a main javascript file with functions that I add to my base HTML via script. But when I write js code specifically in the templates, I don't really have DX tools. In react world I'd import the main file into the component and get all of the DX tools.
/r/django
https://redd.it/1m3axyx
Hi,
Long user of Django here, but recently developed mainly in React and Next JS.
I want to use Django + htmx (and maybe Alpine or vanilla js for some interactivity) for my next project. One thing I missing when using Django is intellisense/linter and good DX when it comes to templates and it comes to templates and javascript.
Templates
There are many ways to create components (include tag, Django cotton, etc..), but is there a way to get good autocomplete and intellisense, go to definition with cmd click etc.. for both the component name and the props that are passed to it?
Scripts
Is there a way to get imports, linter and autocomplete without involving webpack or another build step? For example, I have a main javascript file with functions that I add to my base HTML via script. But when I write js code specifically in the templates, I don't really have DX tools. In react world I'd import the main file into the component and get all of the DX tools.
/r/django
https://redd.it/1m3axyx
Reddit
From the django community on Reddit
Explore this post and more from the django community
Showcase: Recursive Functions To Piss Off Your CS Professor
I've created a series of technically correct and technically recursive functions in Python.
Git repo: https://github.com/asweigart/recusrive-functions-to-piss-off-your-cs-prof
Blog post: https://inventwithpython.com/blog/recursive-functions-to-piss-off-your-cs-prof.html
* What My Project Does
Ridiculous (but technically correct) implementations of some common recursive functions: factorial, fibonacci, depth-first search, and a is_odd() function.
These are joke programs, but the blog post also provides earnest explanations about what makes them recursive and why they still work.
* Target Audience
Computer science students or those who are interested in recursion.
* Comparison
I haven't found any other silly uses of recursion online in code form like this.
/r/Python
https://redd.it/1m3bowq
I've created a series of technically correct and technically recursive functions in Python.
Git repo: https://github.com/asweigart/recusrive-functions-to-piss-off-your-cs-prof
Blog post: https://inventwithpython.com/blog/recursive-functions-to-piss-off-your-cs-prof.html
* What My Project Does
Ridiculous (but technically correct) implementations of some common recursive functions: factorial, fibonacci, depth-first search, and a is_odd() function.
These are joke programs, but the blog post also provides earnest explanations about what makes them recursive and why they still work.
* Target Audience
Computer science students or those who are interested in recursion.
* Comparison
I haven't found any other silly uses of recursion online in code form like this.
/r/Python
https://redd.it/1m3bowq
GitHub
GitHub - asweigart/recusrive-functions-to-piss-off-your-cs-prof: Implementations of recursive functions that will infuriate cs…
Implementations of recursive functions that will infuriate cs professors but are still technically recursive. - asweigart/recusrive-functions-to-piss-off-your-cs-prof
My 1st Flask App, Need Review/Suggestions!
Hi, I’ve just completed my first Flask app – a Staffing / Recruitment Management System – and would love your feedback.
🔗 Live link: https://ekrahgir.pythonanywhere.com/login
Test Credentials:
Username: `dummy`
Password: dummy
Features: Consultant Crud, Client Crud, Interview & Submission Crud, Tools, Database Management & explore more itself.
Would really appreciate your constructive feedback to help me grow and improve this project further! 🙏
/r/flask
https://redd.it/1m3dvmu
Hi, I’ve just completed my first Flask app – a Staffing / Recruitment Management System – and would love your feedback.
🔗 Live link: https://ekrahgir.pythonanywhere.com/login
Test Credentials:
Username: `dummy`
Password: dummy
Features: Consultant Crud, Client Crud, Interview & Submission Crud, Tools, Database Management & explore more itself.
Would really appreciate your constructive feedback to help me grow and improve this project further! 🙏
/r/flask
https://redd.it/1m3dvmu
P Understanding Muon: A Revolutionary Neural Network Optimizer
https://preview.redd.it/oiupfzxptldf1.png?width=1536&format=png&auto=webp&s=ffc81d2aad36267e19040a2ce4515a933362690a
I just published a breakdown of Muon, the optimizer powering the new OS SOTA trillion-parameter model Kimi K2 and beating GPT-4.
💡 Why is Muon a big deal?
It rethinks how we optimize neural networks by treating weight matrices not just as numbers, but as geometric objects leading to 35% faster training with 15% fewer tokens.
Would love to hear your suggestions :)
https://glorious-potato-19.notion.site/Understanding-Muon-A-Revolutionary-Neural-Network-Optimizer-233ffa7f40c4800eafa5cc843e039327
https://preview.redd.it/r50mbmjrtldf1.png?width=1242&format=png&auto=webp&s=67e799f1a77dea762f8d8a459d051826bbfe37ea
/r/MachineLearning
https://redd.it/1m2y23l
https://preview.redd.it/oiupfzxptldf1.png?width=1536&format=png&auto=webp&s=ffc81d2aad36267e19040a2ce4515a933362690a
I just published a breakdown of Muon, the optimizer powering the new OS SOTA trillion-parameter model Kimi K2 and beating GPT-4.
💡 Why is Muon a big deal?
It rethinks how we optimize neural networks by treating weight matrices not just as numbers, but as geometric objects leading to 35% faster training with 15% fewer tokens.
Would love to hear your suggestions :)
https://glorious-potato-19.notion.site/Understanding-Muon-A-Revolutionary-Neural-Network-Optimizer-233ffa7f40c4800eafa5cc843e039327
https://preview.redd.it/r50mbmjrtldf1.png?width=1242&format=png&auto=webp&s=67e799f1a77dea762f8d8a459d051826bbfe37ea
/r/MachineLearning
https://redd.it/1m2y23l
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1m3i04u
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1m3i04u
YouTube
Data Structures and Algorithms in Python - Full Course for Beginners
A beginner-friendly introduction to common data structures (linked lists, stacks, queues, graphs) and algorithms (search, sorting, recursion, dynamic programming) in Python. This course will help you prepare for coding interviews and assessments.
🔗 Course…
🔗 Course…
Would Python/flask be a good choice to use for a fintech project and has it been done?
Are there any fintech companies using flask as part of their tech stack solely and not just a minimal part of the infrastructure?
/r/flask
https://redd.it/1m2fkhj
Are there any fintech companies using flask as part of their tech stack solely and not just a minimal part of the infrastructure?
/r/flask
https://redd.it/1m2fkhj
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Django 4.2 in 2025 still worth it?
Hi, trying to learn Python + Django and in some places like Coursera or Udemy. I see Django content is in 4.2 in a lot of places. Do you think still worth it to learn or should I look for some random tutorials in Youtube working with Djando 5.x?
My concern is mostly for deprecated content/functionalities
Thanks in advanced
/r/django
https://redd.it/1m3pia6
Hi, trying to learn Python + Django and in some places like Coursera or Udemy. I see Django content is in 4.2 in a lot of places. Do you think still worth it to learn or should I look for some random tutorials in Youtube working with Djando 5.x?
My concern is mostly for deprecated content/functionalities
Thanks in advanced
/r/django
https://redd.it/1m3pia6
Reddit
From the django community on Reddit
Explore this post and more from the django community
D Advice on 10-min Ph.D. Interview Presentation (Bioinformatics)
Hi all,
I’ve been shortlisted for a Ph.D. position in bioinformatics in Spain, and I’ve been asked to give a 10-minute presentation during the interview. The topic is:
>
The research group is focused on QSAR, PBPK modeling, multi-omics integration, and predictive toxicology, so I want my presentation to reflect strong domain awareness — not just generic ML explanations.
Here’s what they expect me to cover:
How ML models are applied in this domain
Types of data involved (chemical structures, omics, assay outputs)
How models are validated
Current limitations or regulatory challenges
I’d really appreciate your thoughts on a few things:
1. How technical should I go, given it’s only 10 minutes?
2. Should I briefly include a case study like Tox21 or DeepTox for real-world relevance?
3. Would visuals like SHAP plots, ROC curves, or a workflow diagram help clarify things — or risk overloading the time limit?
4. Should I mention OECD acceptance of QSAR/ML models in regulatory toxicology?
5. Any advice to stand out as a good Ph.D. candidate through this presentation?
If you’ve gone through a similar interview — especially in bioinformatics, computational toxicology, or machine learning for biology/health — I’d love to hear how you approached your presentation.
Thanks so much!
/r/MachineLearning
https://redd.it/1m3la0x
Hi all,
I’ve been shortlisted for a Ph.D. position in bioinformatics in Spain, and I’ve been asked to give a 10-minute presentation during the interview. The topic is:
>
The research group is focused on QSAR, PBPK modeling, multi-omics integration, and predictive toxicology, so I want my presentation to reflect strong domain awareness — not just generic ML explanations.
Here’s what they expect me to cover:
How ML models are applied in this domain
Types of data involved (chemical structures, omics, assay outputs)
How models are validated
Current limitations or regulatory challenges
I’d really appreciate your thoughts on a few things:
1. How technical should I go, given it’s only 10 minutes?
2. Should I briefly include a case study like Tox21 or DeepTox for real-world relevance?
3. Would visuals like SHAP plots, ROC curves, or a workflow diagram help clarify things — or risk overloading the time limit?
4. Should I mention OECD acceptance of QSAR/ML models in regulatory toxicology?
5. Any advice to stand out as a good Ph.D. candidate through this presentation?
If you’ve gone through a similar interview — especially in bioinformatics, computational toxicology, or machine learning for biology/health — I’d love to hear how you approached your presentation.
Thanks so much!
/r/MachineLearning
https://redd.it/1m3la0x
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
My journey to scale a Python service to handle dozens of thousands rps
Hello!
I recently wrote this medium. I’m not looking for clicks, just wanted to share a quick and informal summary here in case it helps anyone working with Python, FastAPI, or scaling async services.
# Context
Before I joined the team, they developed a Python service using fastAPI to serve recommendations thru it. The setup was rather simple, ScyllaDB and DynamoDB as data storages and some external APIs for other data sources. However, the service could not scale beyond 1% traffic and it was already rather slow (e.g, I recall p99 was somewhere 100-200ms).
When I just started, my manager asked me to take a look at it, so here it goes.
# Async vs sync
I quickly noticed all path operations were defined as async, while all I/O operations were sync (i.e blocking the event loop). FastAPI docs do a great job explaining when or not using asyn path operations, and I'm surprised how many times this page is overlooked (not the first time I see this error), and to me that is the most important part in fastAPI. Anyway, I updates all I/O calls to be non-blocking either offloading them to a thread pool or using an asyncio compatible library (eg, aiohttp and aioboto3).
/r/Python
https://redd.it/1m3t5dv
Hello!
I recently wrote this medium. I’m not looking for clicks, just wanted to share a quick and informal summary here in case it helps anyone working with Python, FastAPI, or scaling async services.
# Context
Before I joined the team, they developed a Python service using fastAPI to serve recommendations thru it. The setup was rather simple, ScyllaDB and DynamoDB as data storages and some external APIs for other data sources. However, the service could not scale beyond 1% traffic and it was already rather slow (e.g, I recall p99 was somewhere 100-200ms).
When I just started, my manager asked me to take a look at it, so here it goes.
# Async vs sync
I quickly noticed all path operations were defined as async, while all I/O operations were sync (i.e blocking the event loop). FastAPI docs do a great job explaining when or not using asyn path operations, and I'm surprised how many times this page is overlooked (not the first time I see this error), and to me that is the most important part in fastAPI. Anyway, I updates all I/O calls to be non-blocking either offloading them to a thread pool or using an asyncio compatible library (eg, aiohttp and aioboto3).
/r/Python
https://redd.it/1m3t5dv
Medium
Scaling recommendations service at OLX
In distributed systems, there is a motto that says ‘you are as slow as your slowest tasks’. In Python, thanks to the notorious Global…
Test your knowledge of f-strings
If you enjoyed jsdate.wtf you'll love fstrings.wtf
And most likely discover a thing or two that Python can do and you had no idea.
/r/Python
https://redd.it/1m3tmro
If you enjoyed jsdate.wtf you'll love fstrings.wtf
And most likely discover a thing or two that Python can do and you had no idea.
/r/Python
https://redd.it/1m3tmro
jsdate.wtf
new Date("wtf")
How well do you know JavaScript's Date class?
Django + AWS
Hey Folks,
I am Building a dashboard booking system and need fast, reliable AWS deployment.
Looking for speed, easy scaling, and future support for Celery/background tasks.
As I am using containerization strategy.
Need docker friendly one.
Thanks in Advance
/r/django
https://redd.it/1m3wh33
Hey Folks,
I am Building a dashboard booking system and need fast, reliable AWS deployment.
Looking for speed, easy scaling, and future support for Celery/background tasks.
As I am using containerization strategy.
Need docker friendly one.
Thanks in Advance
/r/django
https://redd.it/1m3wh33
Reddit
From the django community on Reddit
Explore this post and more from the django community
This media is not supported in your browser
VIEW IN TELEGRAM
[R] NeuralOS: a generative OS entirely powered by neural networks
/r/MachineLearning
https://redd.it/1m3v7ll
/r/MachineLearning
https://redd.it/1m3v7ll
Quiz How well do you know f-strings? (made by Armin Ronacher)
~~20~~ ~~22~~ 26 questions to check how well you can understand f-strings:
https://fstrings.wtf
> An interactive quiz website that tests your knowledge of Python f-string edge cases and advanced features.
> This quiz explores the surprising, confusing, and powerful aspects of Python f-strings through 20 carefully crafted questions. While f-strings seem simple on the surface, they have many hidden features and edge cases that can trip up even experienced Python developers.
> Remember: f-strings are powerful, but with great power comes great responsibility... and occasionally great confusion!
Source repo: https://github.com/mitsuhiko/fstrings-wtf
P.S. I got 10/20 on my first try.
/r/Python
https://redd.it/1m3hei1
~~20~~ ~~22~~ 26 questions to check how well you can understand f-strings:
https://fstrings.wtf
> An interactive quiz website that tests your knowledge of Python f-string edge cases and advanced features.
> This quiz explores the surprising, confusing, and powerful aspects of Python f-strings through 20 carefully crafted questions. While f-strings seem simple on the surface, they have many hidden features and edge cases that can trip up even experienced Python developers.
> Remember: f-strings are powerful, but with great power comes great responsibility... and occasionally great confusion!
Source repo: https://github.com/mitsuhiko/fstrings-wtf
P.S. I got 10/20 on my first try.
/r/Python
https://redd.it/1m3hei1
fstrings.wtf
fstrings.wtf - Python F-String Quiz
Test your knowledge of Python's f-string formatting with this interactive quiz. How well do you know Python's string formatting quirks?
My first experience with Python
Okay I won’t go into much detail, but I’m a non-coder type. I am very technical-just don’t like coding basics mostly because of how my brain works. But I will say after spending 3-4 weeks in Python Hell trying to get things working; I will say this. Everyone who can get Python to sing has my utmost respect. I have never thought coding or programming was overly easy, BUT I now understand why coders and programmers want to throw computers across the room. It was one of the most frustrating and weird experiences of my life. So to the people who work in the Python/CSS area of coding. I tip my hat to you. Keep up the good work.
/r/Python
https://redd.it/1m3l6hf
Okay I won’t go into much detail, but I’m a non-coder type. I am very technical-just don’t like coding basics mostly because of how my brain works. But I will say after spending 3-4 weeks in Python Hell trying to get things working; I will say this. Everyone who can get Python to sing has my utmost respect. I have never thought coding or programming was overly easy, BUT I now understand why coders and programmers want to throw computers across the room. It was one of the most frustrating and weird experiences of my life. So to the people who work in the Python/CSS area of coding. I tip my hat to you. Keep up the good work.
/r/Python
https://redd.it/1m3l6hf
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Suggestion needed for best AI helper for a (small) Django project
I'm stuck on my project since some time, on paper all scaffolding has been done, but I'm in the (bad) habit of losing too many hours on details and then the next working season starts, and... by the time I'm back I have to start all over again as I can't remember what does what and why.
What is in your experience the best among the various AI helpers, specifically for Django / Python language? I need something to delegate all boilerplate code so I can focus on the useful parts.
IDE is JetBrains, if that's useful to know... project is really basic, think a CRUD app, like a ticketing app with an extremely simplified asset management section.
/r/djangolearning
https://redd.it/1m3xa9h
I'm stuck on my project since some time, on paper all scaffolding has been done, but I'm in the (bad) habit of losing too many hours on details and then the next working season starts, and... by the time I'm back I have to start all over again as I can't remember what does what and why.
What is in your experience the best among the various AI helpers, specifically for Django / Python language? I need something to delegate all boilerplate code so I can focus on the useful parts.
IDE is JetBrains, if that's useful to know... project is really basic, think a CRUD app, like a ticketing app with an extremely simplified asset management section.
/r/djangolearning
https://redd.it/1m3xa9h
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
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 script 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/1m4avkf
# 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 script 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/1m4avkf
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
I'm writing a short, practical guide on deploying Django & Celery with Docker. What's the #1 problem you'd want it to solve?
I have a lot of production experience with this stack and I'm tired of seeing outdated tutorials. I'm putting together a tiny guide focused on a modern, deploy-able setup. What are the biggest pain points you've faced that I should be sure to cover?
/r/django
https://redd.it/1m3zwer
I have a lot of production experience with this stack and I'm tired of seeing outdated tutorials. I'm putting together a tiny guide focused on a modern, deploy-able setup. What are the biggest pain points you've faced that I should be sure to cover?
/r/django
https://redd.it/1m3zwer
Reddit
From the django community on Reddit
Explore this post and more from the django community
What are some libraries i should learn to use?
I am new to python and rn im learning syntax i will mostly be making pygame games or automation tools that for example "click there" wait 3 seconds "click there" etc what librariea do i need to learn?
/r/Python
https://redd.it/1m46zf1
I am new to python and rn im learning syntax i will mostly be making pygame games or automation tools that for example "click there" wait 3 seconds "click there" etc what librariea do i need to learn?
/r/Python
https://redd.it/1m46zf1
Reddit
From the Python community on Reddit
Explore this post and more from the Python community