P I built a transformer that skips layers per token based on semantic importance
I’m a high school student who’s been exploring how to make transformers/ai models more efficient, and I recently built something I’m really excited about: a transformer that routes each token through a different number of layers depending on how "important" it is.
The idea came from noticing how every token, even simple ones like “the” or “of”, gets pushed through every layer in standard transformers. But not every token needs the same amount of reasoning. So I created a lightweight scoring mechanism that estimates how semantically dense a token is, and based on that, decides how many layers it should go through.
It’s called SparseDepthTransformer, and here’s what it does:
Scores each token for semantic importance
Skips deeper layers for less important tokens using hard gating
Tracks how many layers each token actually uses
Benchmarks against a baseline transformer
In my tests, this reduced memory usage by about 15% and cut the average number of layers per token by \~40%, while keeping output quality the same. Right now it runs a bit slower because the skipping is done token-by-token, but batching optimization is next on my list.
Here’s the GitHub repo if you’re curious or want to give feedback:
https://github.com/Quinnybob/sparse-depth-transformer
Would love if you
/r/MachineLearning
https://redd.it/1kpalhd
I’m a high school student who’s been exploring how to make transformers/ai models more efficient, and I recently built something I’m really excited about: a transformer that routes each token through a different number of layers depending on how "important" it is.
The idea came from noticing how every token, even simple ones like “the” or “of”, gets pushed through every layer in standard transformers. But not every token needs the same amount of reasoning. So I created a lightweight scoring mechanism that estimates how semantically dense a token is, and based on that, decides how many layers it should go through.
It’s called SparseDepthTransformer, and here’s what it does:
Scores each token for semantic importance
Skips deeper layers for less important tokens using hard gating
Tracks how many layers each token actually uses
Benchmarks against a baseline transformer
In my tests, this reduced memory usage by about 15% and cut the average number of layers per token by \~40%, while keeping output quality the same. Right now it runs a bit slower because the skipping is done token-by-token, but batching optimization is next on my list.
Here’s the GitHub repo if you’re curious or want to give feedback:
https://github.com/Quinnybob/sparse-depth-transformer
Would love if you
/r/MachineLearning
https://redd.it/1kpalhd
GitHub
GitHub - Quinnybob/sparse-depth-transformer: A novel transformer architecture that routes each token through a variable number…
A novel transformer architecture that routes each token through a variable number of layers based on semantic importance, reducing memory usage and unnecessary compute. - Quinnybob/sparse-depth-tra...
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/1kp6wqf
# 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/1kp6wqf
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
FastAPI + React Front - Auth0, build from scratch?
I have a fastapi backend with a react front end. I’m trying to figure out the best way to manage my users login, credentials, permissions, etc. I keep finding myself just defaulting to building it all myself. Am I missing a different option? What are most people using?
/r/Python
https://redd.it/1kpby44
I have a fastapi backend with a react front end. I’m trying to figure out the best way to manage my users login, credentials, permissions, etc. I keep finding myself just defaulting to building it all myself. Am I missing a different option? What are most people using?
/r/Python
https://redd.it/1kpby44
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
D Can we possibly construct an AlphaEvolve@HOME?
Today, consumer grade graphics cards are getting to nearly 50 TeraFLOPS in performance. If a PC owner is browsing reddit, or their computer is turned off all night, the presence of an RTX 50XX idling away is wasted computing potential.
When millions of people own a graphics card, the amount of computing potential is quite vast. Under ideal conditions, that vast ocean of computing potential could be utilized for something else.
> AlphaEvolve is a coding agent that orchestrates an autonomous pipeline of computations including queries to LLMs, and produces algorithms that address a userspecified task. At a high level, the orchestrating procedure is an evolutionary algorithm that gradually develops programs that improve the score on the automated evaluation metrics associated with the task.
Deepmind's recent AlphaEvolve agent is performing well on the discovery -- or "invention" -- of new methods. As Deepmind describes above, AlphaEvolve is using an evolutionary algorithm in its workflow pipeline. Evolutionary algorithms are known to benefit from large-scale parallelism. This means it may be possible to run AlphaEvolve on the many rack servers to exploit the parallelism provided by a data center.
Or
/r/MachineLearning
https://redd.it/1kp4nxq
Today, consumer grade graphics cards are getting to nearly 50 TeraFLOPS in performance. If a PC owner is browsing reddit, or their computer is turned off all night, the presence of an RTX 50XX idling away is wasted computing potential.
When millions of people own a graphics card, the amount of computing potential is quite vast. Under ideal conditions, that vast ocean of computing potential could be utilized for something else.
> AlphaEvolve is a coding agent that orchestrates an autonomous pipeline of computations including queries to LLMs, and produces algorithms that address a userspecified task. At a high level, the orchestrating procedure is an evolutionary algorithm that gradually develops programs that improve the score on the automated evaluation metrics associated with the task.
Deepmind's recent AlphaEvolve agent is performing well on the discovery -- or "invention" -- of new methods. As Deepmind describes above, AlphaEvolve is using an evolutionary algorithm in its workflow pipeline. Evolutionary algorithms are known to benefit from large-scale parallelism. This means it may be possible to run AlphaEvolve on the many rack servers to exploit the parallelism provided by a data center.
Or
/r/MachineLearning
https://redd.it/1kp4nxq
Reddit
From the MachineLearning community on Reddit: [D] Can we possibly construct an AlphaEvolve@HOME?
Explore this post and more from the MachineLearning community
Lets make visualizations of 3D images in Notebooks just as simple as for 2D images
# Target Audience
Many of us who deal with image data in their everyday life and use Python to perform some kind of analysis, are used to employ Jupyter Notebooks. Notebooks are great, because they permit to write a story of the analysis that we perform: We sketch the motivation of our investigation, we write the code to load the data, we explore the data directly inside the Notebooks by embedding images, we write the code for the analysis, we inspect the results (more images!), make observations and we draw conclusions.
Thanks to matplotlib, visualization of 2D images inside Notebooks—be it for exploration or for inspection—is absolutely trivial. Notebooks are a paradise of an ecosystem, for 2D image data. However, things get more complicated when you move to 3D.
>LibCarna is an attempt to make the visualization of 3D image data in Jupyter Notebooks just as simple as it is for 2D images.
In a nutshell: If you ever wanted to visualize 3D images in Notebooks, then LibCarna might be for you.
# What My Project Does
LibCarna started off more than a decade ago (see "Scope of the Project" section below, if you're interested) and was developed with an emphasis on simplicity and flexibility. Under
/r/Python
https://redd.it/1kpfnrc
# Target Audience
Many of us who deal with image data in their everyday life and use Python to perform some kind of analysis, are used to employ Jupyter Notebooks. Notebooks are great, because they permit to write a story of the analysis that we perform: We sketch the motivation of our investigation, we write the code to load the data, we explore the data directly inside the Notebooks by embedding images, we write the code for the analysis, we inspect the results (more images!), make observations and we draw conclusions.
Thanks to matplotlib, visualization of 2D images inside Notebooks—be it for exploration or for inspection—is absolutely trivial. Notebooks are a paradise of an ecosystem, for 2D image data. However, things get more complicated when you move to 3D.
>LibCarna is an attempt to make the visualization of 3D image data in Jupyter Notebooks just as simple as it is for 2D images.
In a nutshell: If you ever wanted to visualize 3D images in Notebooks, then LibCarna might be for you.
# What My Project Does
LibCarna started off more than a decade ago (see "Scope of the Project" section below, if you're interested) and was developed with an emphasis on simplicity and flexibility. Under
/r/Python
https://redd.it/1kpfnrc
Reddit
From the Python community on Reddit: Lets make visualizations of 3D images in Notebooks just as simple as for 2D images
Explore this post and more from the Python community
Dashboard Panel for Django
I am looking into creating a dashboard like SaaS project. Instead of creating everything from the beginning and I looking into using premade components and UI for the MVP. My platform is not too complex at the moment.
What are good options? I have found AdminLTE or Jazzmin. What else would you recommend?
/r/django
https://redd.it/1kpga8h
I am looking into creating a dashboard like SaaS project. Instead of creating everything from the beginning and I looking into using premade components and UI for the MVP. My platform is not too complex at the moment.
What are good options? I have found AdminLTE or Jazzmin. What else would you recommend?
/r/django
https://redd.it/1kpga8h
Reddit
From the django community on Reddit
Explore this post and more from the django community
Best GUI library with fast rendering times for data visualization
Hey everyone! I'm looking for a lightweight Python library to develop a graphical user interface (GUI) for a data science project. This GUI application involves rendering a lot of points at once — on average, more than a 100,000. One of the core features of the application is switching between batches of those 100,000 data points by clicking buttons. This needs to be fast — when I switch to another batch of a 100,000 data points, due to the nature of the application, I require that it doesn't take too long to completely render — an ideal rendering time would be less than a second. Now, I don't really have to render all of those points on a single window at once — typically, only \~1000 points will be shown on the window at once. If loading and rendering all points at once does not take too long (should happen in less than a second), I would just have all the points rendered at once; if rendering all the points at once causes performance issues, I would only load the ones that will be seen on the screen and load more as the window is navigated forward. What is the
/r/Python
https://redd.it/1kpivim
Hey everyone! I'm looking for a lightweight Python library to develop a graphical user interface (GUI) for a data science project. This GUI application involves rendering a lot of points at once — on average, more than a 100,000. One of the core features of the application is switching between batches of those 100,000 data points by clicking buttons. This needs to be fast — when I switch to another batch of a 100,000 data points, due to the nature of the application, I require that it doesn't take too long to completely render — an ideal rendering time would be less than a second. Now, I don't really have to render all of those points on a single window at once — typically, only \~1000 points will be shown on the window at once. If loading and rendering all points at once does not take too long (should happen in less than a second), I would just have all the points rendered at once; if rendering all the points at once causes performance issues, I would only load the ones that will be seen on the screen and load more as the window is navigated forward. What is the
/r/Python
https://redd.it/1kpivim
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Hiring 6 REMOTE Full Stack Devs who has the following experience ($75 AUD / hr)
We recently got funding to develop a music sharing platform similar to Soundcloud. If you have experience building something like this, YOU'RE A PERFECT FIT!
Skills you should be familiar with (As long as you have most of these, you should be fine):
\- REACT JS for the frontend
\- Preferably NodeJS experience or any other backend framework experience.
\- Tailwind CSS + any component library that you have experience using
\- State Management
\- Any DB. SQL is fine.
\- Python and also Typescript
\- AWS, Docker and Vercel (or similar alternatives)
\- Metadata Processing
\- User authenticaion (login, signup etc...)
Pay and hours
$48 / hr USD REMOTE full stack dev role. Must be available ASAP and should be able to work at least 5 - 6 hours per day.
We need 4 - 6 devs at the moment. Must have whatsapp as that's what we use to communicate.
If you are in AUS, we pay via payroll direct to bank. If elsewhere, then paypal and Remitly are 2 other options.
Email me - admin@outreachaddict.com if interested. You MUST include why you think you will be a good fit. Show me some of your past side projects etc....
Thanks
/r/django
https://redd.it/1kpmp15
We recently got funding to develop a music sharing platform similar to Soundcloud. If you have experience building something like this, YOU'RE A PERFECT FIT!
Skills you should be familiar with (As long as you have most of these, you should be fine):
\- REACT JS for the frontend
\- Preferably NodeJS experience or any other backend framework experience.
\- Tailwind CSS + any component library that you have experience using
\- State Management
\- Any DB. SQL is fine.
\- Python and also Typescript
\- AWS, Docker and Vercel (or similar alternatives)
\- Metadata Processing
\- User authenticaion (login, signup etc...)
Pay and hours
$48 / hr USD REMOTE full stack dev role. Must be available ASAP and should be able to work at least 5 - 6 hours per day.
We need 4 - 6 devs at the moment. Must have whatsapp as that's what we use to communicate.
If you are in AUS, we pay via payroll direct to bank. If elsewhere, then paypal and Remitly are 2 other options.
Email me - admin@outreachaddict.com if interested. You MUST include why you think you will be a good fit. Show me some of your past side projects etc....
Thanks
/r/django
https://redd.it/1kpmp15
Reddit
From the django community on Reddit: [Hiring] 6 REMOTE Full Stack Devs who has the following experience ($75 AUD / hr)
Posted by Ambitious_Cup_1813 - 27 votes and 15 comments
Automated Python CLI Tool for Converting PDFs to Kindle-Compatible eBooks and Sending via USB/Email
**What My Project Does**
This is a Python CLI tool that converts PDF files into Kindle-compatible eBook formats—AZW3 for USB transfers and EPUB for email delivery. It adds metadata like title, author, and cover images, automates USB Kindle detection on Windows, and sends EPUB files to your Kindle via email using SMTP with Gmail app passwords. The tool manages file compatibility and automates the entire workflow from conversion to delivery.
**Target Audience**
This project is intended for intermediate to advanced Python users who want to automate their eBook workflow for Kindle devices. It's practical for frequent readers who want their documents properly formatted and organized, and for developers interested in building CLI automation around eBook management. The tool is designed for everyday use, not just as a hobby or experiment.
**Comparison**
While Calibre offers GUI tools for ebook conversion and management, this script provides a streamlined command-line interface for batch processing, automation, and remote usage. Unlike generic PDF converters, it enforces Kindle-specific format rules, detects connected Kindle devices for direct USB transfers, and supports sending files via email with secure authentication. This fills a gap for users who want to script and automate their ebook handling beyond what GUI tools allow.
**Additional Details**
* Built with Python
/r/Python
https://redd.it/1kpn02i
**What My Project Does**
This is a Python CLI tool that converts PDF files into Kindle-compatible eBook formats—AZW3 for USB transfers and EPUB for email delivery. It adds metadata like title, author, and cover images, automates USB Kindle detection on Windows, and sends EPUB files to your Kindle via email using SMTP with Gmail app passwords. The tool manages file compatibility and automates the entire workflow from conversion to delivery.
**Target Audience**
This project is intended for intermediate to advanced Python users who want to automate their eBook workflow for Kindle devices. It's practical for frequent readers who want their documents properly formatted and organized, and for developers interested in building CLI automation around eBook management. The tool is designed for everyday use, not just as a hobby or experiment.
**Comparison**
While Calibre offers GUI tools for ebook conversion and management, this script provides a streamlined command-line interface for batch processing, automation, and remote usage. Unlike generic PDF converters, it enforces Kindle-specific format rules, detects connected Kindle devices for direct USB transfers, and supports sending files via email with secure authentication. This fills a gap for users who want to script and automate their ebook handling beyond what GUI tools allow.
**Additional Details**
* Built with Python
/r/Python
https://redd.it/1kpn02i
Reddit
From the Python community on Reddit: Automated Python CLI Tool for Converting PDFs to Kindle-Compatible eBooks and Sending via…
Explore this post and more from the Python community
audiobackend - Python library for advanced audio playback with custom buffering and resampling
Hey r/Python!
I'm excited to share my first "serious" Python library,
GitHub: https://github.com/Niamorro/audiobackend
---
### What My Project Does
Key Features:
File Loading & Decoding: Uses PyAV (FFmpeg bindings) to load and decode a wide variety of audio formats.
Playback Control: Standard play, pause, stop, and volume control.
Seeking: Allows seeking to specific positions within the audio track.
Advanced Threaded Buffering: Implements a multi-threaded buffering system to ensure smooth playback. It dynamically fills a buffer in a separate thread, with configurable thresholds and sizes to manage latency and prevent underflows.
Audio Resampling: Can resample audio on-the-fly to a preferred sample rate or adapt to the original file's rate using PyAV's `AudioResampler`. It also handles very high sample rates by downsampling to a supported maximum if necessary.
Callbacks: Provides callbacks for position updates, playback state
/r/Python
https://redd.it/1kpprn7
Hey r/Python!
I'm excited to share my first "serious" Python library,
audiobackend, which I've been working on to get more control over audio playback than what's typically offered by simpler libraries. I'd love to get your feedback!GitHub: https://github.com/Niamorro/audiobackend
---
### What My Project Does
audiobackend is a Python library designed to provide a flexible backend for playing audio files. It handles the complexities of decoding, resampling, buffering, and outputting audio, allowing developers to focus on their application logic.Key Features:
File Loading & Decoding: Uses PyAV (FFmpeg bindings) to load and decode a wide variety of audio formats.
Playback Control: Standard play, pause, stop, and volume control.
Seeking: Allows seeking to specific positions within the audio track.
Advanced Threaded Buffering: Implements a multi-threaded buffering system to ensure smooth playback. It dynamically fills a buffer in a separate thread, with configurable thresholds and sizes to manage latency and prevent underflows.
Audio Resampling: Can resample audio on-the-fly to a preferred sample rate or adapt to the original file's rate using PyAV's `AudioResampler`. It also handles very high sample rates by downsampling to a supported maximum if necessary.
Callbacks: Provides callbacks for position updates, playback state
/r/Python
https://redd.it/1kpprn7
State of AI adoption in Python community
I was just at PyCon, and here are some observations that I found interesting:
* The level of AI adoption is incredibly low. The vast majority of folks I interacted with were not using AI. On the other hand, although most were not using AI, a good number seemed really interested and curious but don’t know where to start. I will say that PyCon does seem to attract a lot of individuals who work in industries requiring everything to be on-prem, so there may be some real bias in this observation.
* The divide in AI adoption levels is massive. The adoption rate is low, but those who were using AI were going around like they were preaching the gospel. What I found interesting is that whether or not someone adopted AI in their day to day seemed to have little to do with their skill level. The AI preachers ranged from Python core contributors to students…
* I feel like I live in an echo chamber. Hardly a day goes by when I don’t hear Cursor, Windsurf, Lovable, Replit or any of the other usual suspects. And yet I brought these up a lot and rarely did the person I was
/r/Python
https://redd.it/1kprv02
I was just at PyCon, and here are some observations that I found interesting:
* The level of AI adoption is incredibly low. The vast majority of folks I interacted with were not using AI. On the other hand, although most were not using AI, a good number seemed really interested and curious but don’t know where to start. I will say that PyCon does seem to attract a lot of individuals who work in industries requiring everything to be on-prem, so there may be some real bias in this observation.
* The divide in AI adoption levels is massive. The adoption rate is low, but those who were using AI were going around like they were preaching the gospel. What I found interesting is that whether or not someone adopted AI in their day to day seemed to have little to do with their skill level. The AI preachers ranged from Python core contributors to students…
* I feel like I live in an echo chamber. Hardly a day goes by when I don’t hear Cursor, Windsurf, Lovable, Replit or any of the other usual suspects. And yet I brought these up a lot and rarely did the person I was
/r/Python
https://redd.it/1kprv02
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
flaskcourse advancement
https://preview.redd.it/5lio85aaql1f1.png?width=347&format=png&auto=webp&s=162f65126fc4622d745159ff31ad074be01abf78
https://preview.redd.it/zpas5ct3tl1f1.png?width=2141&format=png&auto=webp&s=a58cd1d0e69f6d8a75370dfc459cc80d4f901f1f
flask cours is starting to advance rapidly, it's another part of flask wiki that will be available to everyone for free, a bit like LeetCode,
What would you like to see?
What are your recommendations?
What you wish to not see on the platforme ?
I'm coming to you today for all these questions:)
/r/flask
https://redd.it/1kptx02
https://preview.redd.it/5lio85aaql1f1.png?width=347&format=png&auto=webp&s=162f65126fc4622d745159ff31ad074be01abf78
https://preview.redd.it/zpas5ct3tl1f1.png?width=2141&format=png&auto=webp&s=a58cd1d0e69f6d8a75370dfc459cc80d4f901f1f
flask cours is starting to advance rapidly, it's another part of flask wiki that will be available to everyone for free, a bit like LeetCode,
What would you like to see?
What are your recommendations?
What you wish to not see on the platforme ?
I'm coming to you today for all these questions:)
/r/flask
https://redd.it/1kptx02
Feedback Request: Is My Django Project Ready for Junior Developer Roles?
Hi r/django community,
I'm seeking feedback on my Django project to assess if it's suitable for junior developer positions. Here's the GitHub repository: Cashflow\_project.
Project Overview:
Purpose: A web application to manage cash flow records.
Features:
Create, edit, delete, and view cash flow entries.
Fields include date, status (Business, Personal, Tax), and type (Income, Expense).
Implemented using Django and SQLite.
Includes Russian localization.
I'm particularly interested in feedback regarding:
Code quality and structure.
Best practices and potential improvements.
Readiness for real-world applications.
Suitability for junior developer roles.
Any insights or suggestions would be greatly appreciated!
Thank you in advance for your time and assistance.
/r/django
https://redd.it/1kpnish
Hi r/django community,
I'm seeking feedback on my Django project to assess if it's suitable for junior developer positions. Here's the GitHub repository: Cashflow\_project.
Project Overview:
Purpose: A web application to manage cash flow records.
Features:
Create, edit, delete, and view cash flow entries.
Fields include date, status (Business, Personal, Tax), and type (Income, Expense).
Implemented using Django and SQLite.
Includes Russian localization.
I'm particularly interested in feedback regarding:
Code quality and structure.
Best practices and potential improvements.
Readiness for real-world applications.
Suitability for junior developer roles.
Any insights or suggestions would be greatly appreciated!
Thank you in advance for your time and assistance.
/r/django
https://redd.it/1kpnish
GitHub
GitHub - BarGhasH17/Cashflow_project
Contribute to BarGhasH17/Cashflow_project development by creating an account on GitHub.
API Collaboration
Hi Sir,
Postman doesn't allows more then 3 users for free accounts.
Is there any free alternative for postman?
Does DRF has anything inbuilt or third party package for API sharing and testing.
I have came across spectacular but the problem is that it doesn't stores the data ( I know it's not even supposed to do so). In case of postman, My team mates can also see the data that I send in API calls. This feature actually helps us a lot.
Is there anything that I can connect to a database and then API calls history will also be saved, just like postman.
Postman is very easy and intuitive.
/r/django
https://redd.it/1kpkvh9
Hi Sir,
Postman doesn't allows more then 3 users for free accounts.
Is there any free alternative for postman?
Does DRF has anything inbuilt or third party package for API sharing and testing.
I have came across spectacular but the problem is that it doesn't stores the data ( I know it's not even supposed to do so). In case of postman, My team mates can also see the data that I send in API calls. This feature actually helps us a lot.
Is there anything that I can connect to a database and then API calls history will also be saved, just like postman.
Postman is very easy and intuitive.
/r/django
https://redd.it/1kpkvh9
Reddit
From the django community on Reddit
Explore this post and more from the django community
Does Config come as pre-defined attribute, and if so, do we need to import?
I'm doing Miguel Grinberg's lesson, and I have some questions about the Config attribute that I don't see getting answered therein. I've tried ChatGPT to clarify (here is the chat), but here it's switching some of the characterization around (specifically, using lowercase "config" for the instance of the class, and uppercase "Config" for the class name itself - whereas Grinberg does the opposite).
But more confusing to me is where each party is getting Config/config. Here is Griberg's Git, where he creates a file "
So my first question is: How does Grinberg get away without ever importing
/r/flask
https://redd.it/1kptqkp
I'm doing Miguel Grinberg's lesson, and I have some questions about the Config attribute that I don't see getting answered therein. I've tried ChatGPT to clarify (here is the chat), but here it's switching some of the characterization around (specifically, using lowercase "config" for the instance of the class, and uppercase "Config" for the class name itself - whereas Grinberg does the opposite).
But more confusing to me is where each party is getting Config/config. Here is Griberg's Git, where he creates a file "
config.py", and within this file, he appears to autonomously (ie: on his own, without importing from a library) construct Config (or maybe he is overwriting/extending a pre-existing attribute of the an instantiated Flask object???). But ChatGPT (link above) takes a totally different route. Please see that it explicitly imports "Config" from flask, where it expresses at the top of both examples: from flask import Flask, ConfigSo my first question is: How does Grinberg get away without ever importing
Config from flask? Nor does he import all of flask at once. Everything from flask he imports one-by-one (ie: all methods, and the class/app instance). So how does Grinberg get access to Config if he never imports it/r/flask
https://redd.it/1kptqkp
Miguelgrinberg
The Flask Mega-Tutorial, Part III: Web Forms
This is the third installment of the Flask Mega-Tutorial series, in which I'm going to tell you how to work with web forms.You are reading the 2024 edition of the Flask Mega-Tutorial. The complete…
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 description 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
**Description**: 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
**Description**: 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
**Description**: Create a script 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/1kpy6bo
# 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 description 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
**Description**: 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
**Description**: 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
**Description**: Create a script 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/1kpy6bo
YouTube
Build & Integrate your own custom chatbot to a website (Python & JavaScript)
In this fun project you learn how to build a custom chatbot in Python and then integrate this to a website using Flask and JavaScript.
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
I made a excelize module updates for read and write spreadsheets
I made a Python module named excelize. It allows reading and writing XLAM, XLSM, XLSX, XLTM, and XLTX files with a simple interface. You can install it by `pip install excelize`.
It Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data.
- PyPI: https://pypi.org/project/excelize
- Code: https://github.com/xuri/excelize-py
If you're working with spreadsheets files in Python, you might find it helpful. Feel free to check it out and share any feedback.
In this release, there are 4 normal mode functions added in this version
- get_col_width
- get_comments
- get_sheet_list
- get_sheet_map
**Bug Fixes**
- Fix invalid ELF header error on Linux to fix, resolve issue #7
**Miscellaneous**
- Returning errors instead of raising exceptions for Python style
- Add support for working with 32 bits Python on 64 bits Windows
/r/Python
https://redd.it/1kq0cvs
I made a Python module named excelize. It allows reading and writing XLAM, XLSM, XLSX, XLTM, and XLTX files with a simple interface. You can install it by `pip install excelize`.
It Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data.
- PyPI: https://pypi.org/project/excelize
- Code: https://github.com/xuri/excelize-py
If you're working with spreadsheets files in Python, you might find it helpful. Feel free to check it out and share any feedback.
In this release, there are 4 normal mode functions added in this version
- get_col_width
- get_comments
- get_sheet_list
- get_sheet_map
**Bug Fixes**
- Fix invalid ELF header error on Linux to fix, resolve issue #7
**Miscellaneous**
- Returning errors instead of raising exceptions for Python style
- Add support for working with 32 bits Python on 64 bits Windows
/r/Python
https://redd.it/1kq0cvs
GitHub
GitHub - xuri/excelize-py: Excelize is a Python port of Go Excelize library that allow you to write to and read from XLAM / XLSM…
Excelize is a Python port of Go Excelize library that allow you to write to and read from XLAM / XLSM / XLSX / XLTM / XLTX files. - xuri/excelize-py
Need help in django deployment
https://github.com/DeveshSoni973/flashify
this is a django rest framework and react project I made
for fun
I wanna ask
how can I deploy it? I mean on render or vercel ?
can we put it in one docker and do it?
/r/djangolearning
https://redd.it/1kq9ps2
https://github.com/DeveshSoni973/flashify
this is a django rest framework and react project I made
for fun
I wanna ask
how can I deploy it? I mean on render or vercel ?
can we put it in one docker and do it?
/r/djangolearning
https://redd.it/1kq9ps2
GitHub
GitHub - DeveshSoni973/flashify: this is a flashCard project, made for fun.
this is a flashCard project, made for fun. Contribute to DeveshSoni973/flashify development by creating an account on GitHub.
Phase Modulation Synthesis in Python
# Background
I am posting a series of Python scripts that demonstrate using Supriya, a Python API for SuperCollider, in a dedicated subreddit. Supriya makes it possible to create synthesizers, sequencers, drum machines, and music, of course, using Python.
All demos are posted here: r/supriya\_python.
The code for all demos can be found in this GitHub repo.
These demos assume knowledge of the Python programming language. They do not teach how to program in Python. Therefore, an intermediate level of experience with Python is required.
# The demo
In the latest demo, I show how to do phase modulation (PM) synthesis by creating operators and algorithms in Supriya. This is an alternate implementation of the frequency modulation demo I posted earlier.
/r/Python
https://redd.it/1kq7c5e
# Background
I am posting a series of Python scripts that demonstrate using Supriya, a Python API for SuperCollider, in a dedicated subreddit. Supriya makes it possible to create synthesizers, sequencers, drum machines, and music, of course, using Python.
All demos are posted here: r/supriya\_python.
The code for all demos can be found in this GitHub repo.
These demos assume knowledge of the Python programming language. They do not teach how to program in Python. Therefore, an intermediate level of experience with Python is required.
# The demo
In the latest demo, I show how to do phase modulation (PM) synthesis by creating operators and algorithms in Supriya. This is an alternate implementation of the frequency modulation demo I posted earlier.
/r/Python
https://redd.it/1kq7c5e
Reddit
r/supriya_python
A place to learn and share information about Supriya, the Python API for SuperCollider.
Movie and web series data collector using pandas
"Okay but… ever watched so many shows that you forget what you even liked?
Same. So I built a solution — with Python."
Introducing my latest project: a Movie & Web Show Review Tracker — made for binge-watchers like me who love keeping things organized (but also forget easily).
What it does:
🎬 Lets me log every movie or show I watch — title, genre, platform, my rating, and a little review
🕒 Automatically stamps it with the date & time (thanks datetime!)
📊 Shows all the entries in a clean, table-like view
📁 And saves everything in a .csv file — like a personal media diary
⚙ Built with pandas for smooth data handling + os for managing files
It’s a small project — but it’s mine. And I learned a lot building it.
Not just about Python, but about how simple tools can actually make your day-to-day better.
(And now I never forget whether that one show was mid or a must-watch.)
More projects coming soon — this is just the beginning.
Let’s build cool stuff together!
GitHub source link :-https://github.com/Vishwajeet2805/Python-Projects/blob/main/Movie%20and%20web%20series%20Collection%20Organizer.py
Please give feedback or any suggestion if you find
/r/Python
https://redd.it/1kqbh6o
"Okay but… ever watched so many shows that you forget what you even liked?
Same. So I built a solution — with Python."
Introducing my latest project: a Movie & Web Show Review Tracker — made for binge-watchers like me who love keeping things organized (but also forget easily).
What it does:
🎬 Lets me log every movie or show I watch — title, genre, platform, my rating, and a little review
🕒 Automatically stamps it with the date & time (thanks datetime!)
📊 Shows all the entries in a clean, table-like view
📁 And saves everything in a .csv file — like a personal media diary
⚙ Built with pandas for smooth data handling + os for managing files
It’s a small project — but it’s mine. And I learned a lot building it.
Not just about Python, but about how simple tools can actually make your day-to-day better.
(And now I never forget whether that one show was mid or a must-watch.)
More projects coming soon — this is just the beginning.
Let’s build cool stuff together!
GitHub source link :-https://github.com/Vishwajeet2805/Python-Projects/blob/main/Movie%20and%20web%20series%20Collection%20Organizer.py
Please give feedback or any suggestion if you find
/r/Python
https://redd.it/1kqbh6o
GitHub
Python-Projects/Movie and web series Collection Organizer.py at main · Vishwajeet2805/Python-Projects
Contribute to Vishwajeet2805/Python-Projects development by creating an account on GitHub.