Multiple Long Running task > 500 seconds stuck in STARTED state
I am building a celery (remote workers) + flask application(using send_task). The issue I am facing is that when I send multiple tasks to the celery worker, the tasks are executed (2 API calls are successful both return 200, one takes less than 60 seconds and the other takes greater than 400 seconds) but the task status is stuck in STARTED state. I have tried to increase the timeout for the API, added the soft_time_limit and time_limit, but whenever I add more task the task start they execute but the state is stuck. If I only send one task then it executes correctly and the status is also updated correctly. I am just not able to figure out the problem.
/r/flask
https://redd.it/1g2zeie
I am building a celery (remote workers) + flask application(using send_task). The issue I am facing is that when I send multiple tasks to the celery worker, the tasks are executed (2 API calls are successful both return 200, one takes less than 60 seconds and the other takes greater than 400 seconds) but the task status is stuck in STARTED state. I have tried to increase the timeout for the API, added the soft_time_limit and time_limit, but whenever I add more task the task start they execute but the state is stuck. If I only send one task then it executes correctly and the status is also updated correctly. I am just not able to figure out the problem.
/r/flask
https://redd.it/1g2zeie
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Planning a project and getting things “connected”
I think I know the basics of Django but when I comes to connecting the pieces of a project together. For someone with little to no experience, what are ways to learn?
Example. For my work I was thinking of building a “hotel/barracks rooms” management system. Kind of similar to a hotel. Issues; some rooms share a bathroom, some rooms have to be female only since they share a bathroom, if a female is assigned to the room block any male from being assigned. The majority of rooms are male BUT some male rooms will need to be converted if there’s more females than males during that period. I would need a check in and “check out date” we don’t know when they checkout as it depends on them getting in-processed into the installation.
For someone with experience this might seem easy, for someone learning planning a project is difficult. What are some ways to fix this?
/r/djangolearning
https://redd.it/1g2tnd6
I think I know the basics of Django but when I comes to connecting the pieces of a project together. For someone with little to no experience, what are ways to learn?
Example. For my work I was thinking of building a “hotel/barracks rooms” management system. Kind of similar to a hotel. Issues; some rooms share a bathroom, some rooms have to be female only since they share a bathroom, if a female is assigned to the room block any male from being assigned. The majority of rooms are male BUT some male rooms will need to be converted if there’s more females than males during that period. I would need a check in and “check out date” we don’t know when they checkout as it depends on them getting in-processed into the installation.
For someone with experience this might seem easy, for someone learning planning a project is difficult. What are some ways to fix this?
/r/djangolearning
https://redd.it/1g2tnd6
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
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/1g33d10
# 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/1g33d10
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…
Database preference
Hey all, newish to python, wanted to start working with data. In my previous work i dealt a lot with sql, so iam used to looking at that type of layout. What do yall suggest that has a similar layout. Thanks!
/r/Python
https://redd.it/1g2zms9
Hey all, newish to python, wanted to start working with data. In my previous work i dealt a lot with sql, so iam used to looking at that type of layout. What do yall suggest that has a similar layout. Thanks!
/r/Python
https://redd.it/1g2zms9
Reddit
From the Python community on Reddit: Database preference
Posted by imaginepixels - 31 votes and 50 comments
I want to create nth number of forms on an html page using pure flask and jinja and flask wtf forms. Is this possible and what would be the best way ?
I want to create nth number of forms on an html page using pure flask and jinja and flask wtf forms. Is this possible and what would be the best way ?
/r/flask
https://redd.it/1g2gezv
I want to create nth number of forms on an html page using pure flask and jinja and flask wtf forms. Is this possible and what would be the best way ?
/r/flask
https://redd.it/1g2gezv
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Comprehensive Django Deployment Guide for Beginners
https://selftaughtdev.hashnode.dev/comprehensive-django-deployment-guide-for-beginners
/r/django
https://redd.it/1g2thsv
https://selftaughtdev.hashnode.dev/comprehensive-django-deployment-guide-for-beginners
/r/django
https://redd.it/1g2thsv
My Python Django Blog
Comprehensive Django Deployment Guide for Beginners
A practical walkthrough for setting up your Django project on a Linux server
Which tier for how many average users ?
Hey everyone,
I'm trying to buy my own server for the first time. What criteria do I need to consider before buying? I know I can change the plan and I'm asking for educational purposes. I'm curious about how many requests each server can handle and how many users it can support. Thanks!
KVM 1~~US$13.99~~SAVE 64%US$4.99/mo
For 24-month term
Choose planUS$7.99/mowhen you renew1 vCPU core4 GB RAM50 GB NVMe disk space4 TB bandwidthData centers worldwideLinux operating systems
MOST POPULAR
KVM 2~~US$17.99~~SAVE 61%US$6.99/mo
For 24-month term
Choose planUS$10.99/mowhen you renew2 vCPU cores8 GB RAM100 GB NVMe disk space8 TB bandwidthData centers worldwideLinux operating systemsKVM 4~~US$29.99~~SAVE 65%US$10.49/mo
For 24-month term
Choose planUS$22.99/mowhen you renew4 vCPU cores16 GB RAM200 GB NVMe disk space16 TB bandwidthData centers worldwideLinux operating systemsKVM 8~~US$59.99~~SAVE 66%US$19.99/mo
For 24-month term
Choose planUS$44.99/mowhen you renew8 vCPU cores32 GB RAM400 GB NVMe disk space32 TB bandwidthData centers worldwideLinux operating systems
/r/django
https://redd.it/1g38zpv
Hey everyone,
I'm trying to buy my own server for the first time. What criteria do I need to consider before buying? I know I can change the plan and I'm asking for educational purposes. I'm curious about how many requests each server can handle and how many users it can support. Thanks!
KVM 1~~US$13.99~~SAVE 64%US$4.99/mo
For 24-month term
Choose planUS$7.99/mowhen you renew1 vCPU core4 GB RAM50 GB NVMe disk space4 TB bandwidthData centers worldwideLinux operating systems
MOST POPULAR
KVM 2~~US$17.99~~SAVE 61%US$6.99/mo
For 24-month term
Choose planUS$10.99/mowhen you renew2 vCPU cores8 GB RAM100 GB NVMe disk space8 TB bandwidthData centers worldwideLinux operating systemsKVM 4~~US$29.99~~SAVE 65%US$10.49/mo
For 24-month term
Choose planUS$22.99/mowhen you renew4 vCPU cores16 GB RAM200 GB NVMe disk space16 TB bandwidthData centers worldwideLinux operating systemsKVM 8~~US$59.99~~SAVE 66%US$19.99/mo
For 24-month term
Choose planUS$44.99/mowhen you renew8 vCPU cores32 GB RAM400 GB NVMe disk space32 TB bandwidthData centers worldwideLinux operating systems
/r/django
https://redd.it/1g38zpv
Reddit
From the django community on Reddit
Explore this post and more from the django community
How to enable zsh terminal in jupyter when launching from conda environment
So basically I want the terminal that is launched within jupyter (specifically jupyter-lab) to be zsh instead of bash.
If I am have not expressed the my querry clearly attached screenshots might help.
ss-1: default zsh shell with 'ml0' conda env
ss-2 : terminal launched from jupyter-lab uses bash by default and also loses the conda env
And my major motive is to preserve the conda environment in the jupyter from which it is launched.
/r/IPython
https://redd.it/1g3alsy
So basically I want the terminal that is launched within jupyter (specifically jupyter-lab) to be zsh instead of bash.
If I am have not expressed the my querry clearly attached screenshots might help.
ss-1: default zsh shell with 'ml0' conda env
ss-2 : terminal launched from jupyter-lab uses bash by default and also loses the conda env
And my major motive is to preserve the conda environment in the jupyter from which it is launched.
/r/IPython
https://redd.it/1g3alsy
Imgur
Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.
Old school 2000s mouse accessory: Particles following your mouse! Get color under cursor! And more!
I would have loved to instead call this thread: "You can now have shit stuck to your mouse", but I felt it wouldn't take very long until it was removed.
# What my project does:
I've had an idea somewhere in 2022: I want rainbow trails for my mouse cursor. Available software was naught. So I made it myself!
- It can draw particles of any number and color spawning from your mouse cursor. With multiple vectors, influences from mouse motion and rotation, many ideas can be realized: Crazy or decent, river or beehive, smoke or explosion.
- or it can be the time
- Get RGB or RGB complementary color
- or get RYB and RYB complementary color from under it.
- Also useless stuff like the time with milliseconds, system cpu and ram usage, individual or at the same time, if you need it visible there for some obscure reason.
- An image is also possible - default is the poop emoji, of course.
(Just got a new idea: get color from under cursor and spawn particle with it for a sort of "scraping off pixels" effect)
The function to
/r/Python
https://redd.it/1g32kaw
I would have loved to instead call this thread: "You can now have shit stuck to your mouse", but I felt it wouldn't take very long until it was removed.
# What my project does:
I've had an idea somewhere in 2022: I want rainbow trails for my mouse cursor. Available software was naught. So I made it myself!
- It can draw particles of any number and color spawning from your mouse cursor. With multiple vectors, influences from mouse motion and rotation, many ideas can be realized: Crazy or decent, river or beehive, smoke or explosion.
- or it can be the time
- Get RGB or RGB complementary color
- or get RYB and RYB complementary color from under it.
- Also useless stuff like the time with milliseconds, system cpu and ram usage, individual or at the same time, if you need it visible there for some obscure reason.
- An image is also possible - default is the poop emoji, of course.
(Just got a new idea: get color from under cursor and spawn particle with it for a sort of "scraping off pixels" effect)
The function to
/r/Python
https://redd.it/1g32kaw
Reddit
From the Python community on Reddit: Old school 2000s mouse accessory: Particles following your mouse! Get color under cursor!…
Explore this post and more from the Python community
I made a website for finding deals on Pokemon cards on Ebay
Site: https://www.jimmyrustles.com/pokemondeals
Github: https://www.github.com/sgriffin53/pokemontcgdealfinderapp
What My Project Does
For the past few weeks I've been working on a Pokemon deal finder website. It works by finding listings from Ebay and card valuations from Pricecharting then returns the listings with the biggest difference in card price compared to card valuation.
It searches Ebay for 112 different sets and right now it has around 200,000 listings.
The listings will be updated every 8 hours.
It seems pretty successful at identifying cards. Most of the misidentification seems to be when a seller has mislabelled the card or set in the noscript, but for the most part, it seems good at identifying the cards.
It seems to find deals well, though a lot of the deals are heavily played cards that are underpriced due to their condition. For example, on the front page, there's a heavily played Umbreon EX #112 from Unseen Forces that's valued at $165.60 and the price is $19.96.
Target Audience
There's a large market for people buying and selling cards on Ebay. Users are constantly looking for good deals, and this tool is a way to automate looking for deals by comparing listing prices to valuations.
Comparison
There was a site a while ago that I believe did the same thing,
/r/Python
https://redd.it/1g2xje2
Site: https://www.jimmyrustles.com/pokemondeals
Github: https://www.github.com/sgriffin53/pokemontcgdealfinderapp
What My Project Does
For the past few weeks I've been working on a Pokemon deal finder website. It works by finding listings from Ebay and card valuations from Pricecharting then returns the listings with the biggest difference in card price compared to card valuation.
It searches Ebay for 112 different sets and right now it has around 200,000 listings.
The listings will be updated every 8 hours.
It seems pretty successful at identifying cards. Most of the misidentification seems to be when a seller has mislabelled the card or set in the noscript, but for the most part, it seems good at identifying the cards.
It seems to find deals well, though a lot of the deals are heavily played cards that are underpriced due to their condition. For example, on the front page, there's a heavily played Umbreon EX #112 from Unseen Forces that's valued at $165.60 and the price is $19.96.
Target Audience
There's a large market for people buying and selling cards on Ebay. Users are constantly looking for good deals, and this tool is a way to automate looking for deals by comparing listing prices to valuations.
Comparison
There was a site a while ago that I believe did the same thing,
/r/Python
https://redd.it/1g2xje2
My first python package got 844 downloads 😭😭
I know 844 downloads aint much, but i feel so proud.
This was my first project that i published.
Here is the package link: [https://pypi.org/project/Font/](https://pypi.org/project/Font/)
Source code: [https://github.com/ivanrj7j/Font](https://github.com/ivanrj7j/Font)
## **What My Project Does**
My project is a library for rendering custom font using opencv.
## **Target Audience**
* Computer vision devs
* People who are working with text and images etc
## **Comparison**
From what ive seen there arent many other projects out there that does this, but some of similar projects i have seen are:
* [https://pypi.org/project/a-cv2-putTrueTypeText/](https://pypi.org/project/a-cv2-putTrueTypeText/) this project get the job done, but have really messy code and doesnt have any documentation.
/r/Python
https://redd.it/1g3gcz9
I know 844 downloads aint much, but i feel so proud.
This was my first project that i published.
Here is the package link: [https://pypi.org/project/Font/](https://pypi.org/project/Font/)
Source code: [https://github.com/ivanrj7j/Font](https://github.com/ivanrj7j/Font)
## **What My Project Does**
My project is a library for rendering custom font using opencv.
## **Target Audience**
* Computer vision devs
* People who are working with text and images etc
## **Comparison**
From what ive seen there arent many other projects out there that does this, but some of similar projects i have seen are:
* [https://pypi.org/project/a-cv2-putTrueTypeText/](https://pypi.org/project/a-cv2-putTrueTypeText/) this project get the job done, but have really messy code and doesnt have any documentation.
/r/Python
https://redd.it/1g3gcz9
PyPI
Font
A custom text rendering library using custom fonts for opencv
Django-Routify
Released Django-Routify new v0.3.3 version with cool feature and has been writen documentation!
Downloads last month on PyPI: 1800+
Github:
https://github.com/vitaliypopel/django-routify
Check docs here:
https://vitaliypopel.github.io/django-routify-docs/homepage
Django-Routify is a lightweight package designed to simplify routing views in the classic Django framework.
Example:
https://preview.redd.it/nwvnmjgb4qud1.png?width=625&format=png&auto=webp&s=345073c0d149b95c66946192dc89b5082f9156ba
https://preview.redd.it/7lpp9m3d4qud1.png?width=530&format=png&auto=webp&s=a7421b81a3048526f28f4db0a1beb2d2b9abb2a1
/r/django
https://redd.it/1g3fqvv
Released Django-Routify new v0.3.3 version with cool feature and has been writen documentation!
Downloads last month on PyPI: 1800+
Github:
https://github.com/vitaliypopel/django-routify
Check docs here:
https://vitaliypopel.github.io/django-routify-docs/homepage
Django-Routify is a lightweight package designed to simplify routing views in the classic Django framework.
Example:
https://preview.redd.it/nwvnmjgb4qud1.png?width=625&format=png&auto=webp&s=345073c0d149b95c66946192dc89b5082f9156ba
https://preview.redd.it/7lpp9m3d4qud1.png?width=530&format=png&auto=webp&s=a7421b81a3048526f28f4db0a1beb2d2b9abb2a1
/r/django
https://redd.it/1g3fqvv
Auth external provider ?
Looking to use Supabase or Auth0 for auth.
I am leaning towards Supabase as their free tier also offers a managed db which looks generous.
Anyone got any recommendations of auth? Looking for Google SSO mainly. Something with a decent free tier
/r/flask
https://redd.it/1g3d4jn
Looking to use Supabase or Auth0 for auth.
I am leaning towards Supabase as their free tier also offers a managed db which looks generous.
Anyone got any recommendations of auth? Looking for Google SSO mainly. Something with a decent free tier
/r/flask
https://redd.it/1g3d4jn
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Which libraries have the best docs?
Hi,
Out of all the available python libraries and frameworks, which ones do you think have the best documentation?
I am looking for examples to learn how to create good docs for a project I am working on.
Thanks!
/r/Python
https://redd.it/1g3hrkl
Hi,
Out of all the available python libraries and frameworks, which ones do you think have the best documentation?
I am looking for examples to learn how to create good docs for a project I am working on.
Thanks!
/r/Python
https://redd.it/1g3hrkl
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Tuesday Daily Thread: Advanced questions
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1g3uko4
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1g3uko4
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 413614 members
Teaching the world's largest programming lesson
This past Saturday I taught the world's largest programming lesson, with 1668 students, breaking the previous record of 724 students.
We broke the record in Portugal 🇵🇹 and the event was co-organised by a local university and a company I used to work at.
It was an insane event.
I have been in plenty of events with WAY more than 2k people.
Music festivals, sports matches, etc.
And yet, nothing beat being on stage, teaching Python to ~1750 students.
(The official record is at 1668 because some students were disqualified for not actually following the lesson 🤦.)
The lesson was split in three and I taught the middle segment, which was scheduled to last for half of the lesson.
The professor before me taught the students what an algorithm was, conceptually.
One of the examples provided was a brute forcy algorithm to solve a Sudoku puzzle.
Then, I taught them some basic Python syntax.
The objective was for me to introduce enough syntax so that we could implement the algorithm described in the first part on top of an abstraction that I created beforehand.
Finally, a third professor showed a couple of more advanced applications of Python, like creating a RAG application to interact with a major literary work that Portuguese students
/r/Python
https://redd.it/1g3loz8
This past Saturday I taught the world's largest programming lesson, with 1668 students, breaking the previous record of 724 students.
We broke the record in Portugal 🇵🇹 and the event was co-organised by a local university and a company I used to work at.
It was an insane event.
I have been in plenty of events with WAY more than 2k people.
Music festivals, sports matches, etc.
And yet, nothing beat being on stage, teaching Python to ~1750 students.
(The official record is at 1668 because some students were disqualified for not actually following the lesson 🤦.)
The lesson was split in three and I taught the middle segment, which was scheduled to last for half of the lesson.
The professor before me taught the students what an algorithm was, conceptually.
One of the examples provided was a brute forcy algorithm to solve a Sudoku puzzle.
Then, I taught them some basic Python syntax.
The objective was for me to introduce enough syntax so that we could implement the algorithm described in the first part on top of an abstraction that I created beforehand.
Finally, a third professor showed a couple of more advanced applications of Python, like creating a RAG application to interact with a major literary work that Portuguese students
/r/Python
https://redd.it/1g3loz8
Reddit
From the Python community on Reddit: Teaching the world's largest programming lesson
Explore this post and more from the Python community
Need assistance connecting SQL Alchemy app db to Web App
I am building a WebApp with Flask, and Python. I have attempted to connect the database to the app, but I am unable to enter/retain any data. I am certain the databaseb exists, as I can see the empty file and can read the success messages:
Database URI: sqlite:///projects.db
Database initialized successfully.
* Debugger is active!
I get the error below when attempting to enter any data as a result:
sqlite3.OperationalError: no such table: projectsqlite3.OperationalError: no such table: project
/r/flask
https://redd.it/1g3yfh1
I am building a WebApp with Flask, and Python. I have attempted to connect the database to the app, but I am unable to enter/retain any data. I am certain the databaseb exists, as I can see the empty file and can read the success messages:
Database URI: sqlite:///projects.db
Database initialized successfully.
* Debugger is active!
I get the error below when attempting to enter any data as a result:
sqlite3.OperationalError: no such table: projectsqlite3.OperationalError: no such table: project
/r/flask
https://redd.it/1g3yfh1
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Full Stack Web Developer Hiring
Hi everyone, we have added a new job on our platform. If you are looking for a Full Stack Web Developer position please check the link below
Role - Full Stack Web Developer in Ashburn, Virginia, United States (Remote, Full-Time)
Job Link - devloprr.com/jobs#308
https://preview.redd.it/5cazdz94znud1.png?width=992&format=png&auto=webp&s=73ddc2e4e30caedd6d4c71e8f3df88f8db808447
/r/flask
https://redd.it/1g39onr
Hi everyone, we have added a new job on our platform. If you are looking for a Full Stack Web Developer position please check the link below
Role - Full Stack Web Developer in Ashburn, Virginia, United States (Remote, Full-Time)
Job Link - devloprr.com/jobs#308
https://preview.redd.it/5cazdz94znud1.png?width=992&format=png&auto=webp&s=73ddc2e4e30caedd6d4c71e8f3df88f8db808447
/r/flask
https://redd.it/1g39onr
Devloprr
Login - devloprr.com
devloprr.com is a new social media and collaboration platform created for Developers/programmers where developers can create account, blogs and post short content and long articles and earn money from Monetization as well.
Speeding up PyTest by removing big libraries
I've been working on a small project that uses "big" libraries, and it was extremely annoying to have `pytest` to take 15–20 seconds to run 6 test cases that were not even doing anything.
Armed with the excellent [PyInstrument](https://www.reddit.com/r/Python/comments/1g1az6i/pyinstrument_v50_flamegraphs_for_python/) I went ahead to search for what was the reason.
Turns out that biggish libraries are taking a lot of time to load, maybe because of the `importlib` method used by my `pytest`, or whatever.
But I don't really need these libraries in the tests … so how about I remove them?
# tests/conftest.py
import sys
from unittest.mock import MagicMock
def pytest_sessionstart():
sys.modules['networkx'] = MagicMock()
sys.modules['transformers'] = MagicMock()
And yes, this worked wonders! Reduced the tests run from 15 to much lower than 1 second from `pytest` start to results finish.
I would have loved to remove `sqlalchemy` as well, but unfortunately `sqlmodel` is coupled with it so much it is inseparable from the models based on `SQLModel`.
Would love to hear your reaction to this kind of heresy.
/r/Python
https://redd.it/1g3o5tw
I've been working on a small project that uses "big" libraries, and it was extremely annoying to have `pytest` to take 15–20 seconds to run 6 test cases that were not even doing anything.
Armed with the excellent [PyInstrument](https://www.reddit.com/r/Python/comments/1g1az6i/pyinstrument_v50_flamegraphs_for_python/) I went ahead to search for what was the reason.
Turns out that biggish libraries are taking a lot of time to load, maybe because of the `importlib` method used by my `pytest`, or whatever.
But I don't really need these libraries in the tests … so how about I remove them?
# tests/conftest.py
import sys
from unittest.mock import MagicMock
def pytest_sessionstart():
sys.modules['networkx'] = MagicMock()
sys.modules['transformers'] = MagicMock()
And yes, this worked wonders! Reduced the tests run from 15 to much lower than 1 second from `pytest` start to results finish.
I would have loved to remove `sqlalchemy` as well, but unfortunately `sqlmodel` is coupled with it so much it is inseparable from the models based on `SQLModel`.
Would love to hear your reaction to this kind of heresy.
/r/Python
https://redd.it/1g3o5tw
Reddit
From the Python community on Reddit: Pyinstrument v5.0 - flamegraphs for Python!
Explore this post and more from the Python community
Having issues deploying my flask app on vercel. Please Help!!!
This is the error I'm getting on vercel
in my vercel.json I have
{
"version": 2,
"builds":
{
"src": "main.py",
"use": "@vercel/python"
}
,
"routes":
{
"src": "/(.*)",
"dest": "main.py"
}
}
This is my file structure
/r/flask
https://redd.it/1g29gsh
This is the error I'm getting on vercel
in my vercel.json I have
{
"version": 2,
"builds":
{
"src": "main.py",
"use": "@vercel/python"
}
,
"routes":
{
"src": "/(.*)",
"dest": "main.py"
}
}
This is my file structure
/r/flask
https://redd.it/1g29gsh
Finally I make money from my django project
It was quite long journey.. it took about a year and a half to build and no sales for 4months.. I was quite depressed..
I figured out what to fix and my site started to make sales and now I make $100~$200 in revenue everyday. It is not that big amount but I can do this for living and I know how to scale up
I feel really thanks to django foundation..
If I chose nodejs or something else I wouldnt build a service for living in that short period of time..
/r/django
https://redd.it/1g3knhs
It was quite long journey.. it took about a year and a half to build and no sales for 4months.. I was quite depressed..
I figured out what to fix and my site started to make sales and now I make $100~$200 in revenue everyday. It is not that big amount but I can do this for living and I know how to scale up
I feel really thanks to django foundation..
If I chose nodejs or something else I wouldnt build a service for living in that short period of time..
/r/django
https://redd.it/1g3knhs
Reddit
From the django community on Reddit
Explore this post and more from the django community