Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/y1oht5
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/y1oht5
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. | 412982 members
Jupyterhub Server on AWS
JupyterHub is best suited to serve Jupyter notebook for multiple users. With the diverse AWS EC2 instances, JupyterHub can find various applications such as course teaching, data mining, or scientific research simulations. We provide an Amazon Machine Image (AMI) that has more than 300 python packages preinstalled. For details, please visit https://docs.jhub.cloud/
/r/JupyterNotebooks
https://redd.it/w072n9
JupyterHub is best suited to serve Jupyter notebook for multiple users. With the diverse AWS EC2 instances, JupyterHub can find various applications such as course teaching, data mining, or scientific research simulations. We provide an Amazon Machine Image (AMI) that has more than 300 python packages preinstalled. For details, please visit https://docs.jhub.cloud/
/r/JupyterNotebooks
https://redd.it/w072n9
docs.jhub.cloud
jhub.cloud -- JupyterHub Server in the Cloud
Multiple User JupyterHub Server on AWS cloud for data science, machine learning and course teaching
I created a tool to quickly view reference images using keybindings
This tool follows sort of the vim philosophy of never having to leave your keyboard. This can act as an image viewer, or as a program to quickly refer reference images, cheat sheets, notes, keybindings, etc.
​
You can specify a root directory in the config file and then navigate through the entire dir using only keys (which are also configurable in the config file)
​
This is the first time I've dedicated this much time for a project which I'll be using myself (I use it to refer all my keybindings) and also the first time I've put effort into writing proper documentation.
​
Give it a shot to see if you like it and do share your honest thoughts on areas I can improve or features you'd like to see. Let me know what you guys think!
​
https://reddit.com/link/y2519a/video/rcjwhcwjudt91/player
Link to project: https://github.com/pranavpa8788/Rekey
/r/Python
https://redd.it/y2519a
This tool follows sort of the vim philosophy of never having to leave your keyboard. This can act as an image viewer, or as a program to quickly refer reference images, cheat sheets, notes, keybindings, etc.
​
You can specify a root directory in the config file and then navigate through the entire dir using only keys (which are also configurable in the config file)
​
This is the first time I've dedicated this much time for a project which I'll be using myself (I use it to refer all my keybindings) and also the first time I've put effort into writing proper documentation.
​
Give it a shot to see if you like it and do share your honest thoughts on areas I can improve or features you'd like to see. Let me know what you guys think!
​
https://reddit.com/link/y2519a/video/rcjwhcwjudt91/player
Link to project: https://github.com/pranavpa8788/Rekey
/r/Python
https://redd.it/y2519a
GitHub
GitHub - pranavpa8788/Rekey
Contribute to pranavpa8788/Rekey development by creating an account on GitHub.
Is there a way to hard code a data value into a model for a specific data entry?
Sorry if this question doesnt make sense but im going to do my best.
I need to create a new data field in a model. I know how to do this, I know how to make and apply a migration etc etc.
However, I need to hard-code SPECIFIC data values in this field for certain data entries. Is there a way I can do this in the model?
Ive seen how you can create a default value, but is there any way to query a specific data entry and then give it a value, and have this applied when I make the migration?
For example:
where ID = 1, name = 'bob'
where ID = 2, name = 'john'
/r/djangolearning
https://redd.it/y2a32k
Sorry if this question doesnt make sense but im going to do my best.
I need to create a new data field in a model. I know how to do this, I know how to make and apply a migration etc etc.
However, I need to hard-code SPECIFIC data values in this field for certain data entries. Is there a way I can do this in the model?
Ive seen how you can create a default value, but is there any way to query a specific data entry and then give it a value, and have this applied when I make the migration?
For example:
where ID = 1, name = 'bob'
where ID = 2, name = 'john'
/r/djangolearning
https://redd.it/y2a32k
reddit
Is there a way to hard code a data value into a model for a...
Sorry if this question doesnt make sense but im going to do my best. I need to create a new data field in a model. I know how to do this, I know...
How to Train YOLOv7 on a Custom Dataset for License Plate Recognition in Python — ANPR / ALPR Tutorial — Theos AI
https://blog.theos.ai/articles/how-to-train-yolov7-on-a-custom-dataset-for-license-plate-recognition-in-python-anpr-alpr-tutorial
/r/Python
https://redd.it/y25kbl
https://blog.theos.ai/articles/how-to-train-yolov7-on-a-custom-dataset-for-license-plate-recognition-in-python-anpr-alpr-tutorial
/r/Python
https://redd.it/y25kbl
Theos AI
How to Train YOLO v7 on a Custom Dataset for License Plate Recognition in Python (ANPR / ALPR Tutorial 2023) — Theos AI
Build a computer vision model that automatically detects the position and size of all the license plates within an image or video and reads them using Optical Character Recognition (OCR).
[R] Neural Networks are Decision Trees
https://arxiv.org/abs/2210.05189
/r/MachineLearning
https://redd.it/y2pi2a
https://arxiv.org/abs/2210.05189
/r/MachineLearning
https://redd.it/y2pi2a
reddit
[R] Neural Networks are Decision Trees
Posted in r/MachineLearning by u/MLC_Money • 39 points and 39 comments
Am I doing the Post/Redirect/Get pattern wrong?
Hello everyone! I'm currently trying to write a ModelForm but when the form validation fails and I try to refresh the page I've got this error message:
https://preview.redd.it/w600xriwxjt91.png?width=414&format=png&auto=webp&s=1e1b29889419119f786a33e12546e99d3dd57fd5
I followed a couple of tutorials and this is my current view:
def index(request):
if request.method == 'POST':
form = PostForm(request.POST, label_suffix='')
if form.is_valid():
form.save()
return redirect('home')
else:
form = PostForm(label_suffix='')
return render(request, 'post/index.html', {'form': form})
And this is my form:
class PostForm(ModelForm):
class Meta:
model = Post
fields = ['name']
I'm just
/r/djangolearning
https://redd.it/y2vjfn
Hello everyone! I'm currently trying to write a ModelForm but when the form validation fails and I try to refresh the page I've got this error message:
https://preview.redd.it/w600xriwxjt91.png?width=414&format=png&auto=webp&s=1e1b29889419119f786a33e12546e99d3dd57fd5
I followed a couple of tutorials and this is my current view:
def index(request):
if request.method == 'POST':
form = PostForm(request.POST, label_suffix='')
if form.is_valid():
form.save()
return redirect('home')
else:
form = PostForm(label_suffix='')
return render(request, 'post/index.html', {'form': form})
And this is my form:
class PostForm(ModelForm):
class Meta:
model = Post
fields = ['name']
I'm just
/r/djangolearning
https://redd.it/y2vjfn
How to deal with large data in rest framework
A request to my api takes a long time to complete. I am afraid I will run into Gateway timeouts. Is there a way to prepare the data (with celery?) and store it in cache?
/r/django
https://redd.it/y2t3iw
A request to my api takes a long time to complete. I am afraid I will run into Gateway timeouts. Is there a way to prepare the data (with celery?) and store it in cache?
/r/django
https://redd.it/y2t3iw
reddit
How to deal with large data in rest framework
A request to my api takes a long time to complete. I am afraid I will run into Gateway timeouts. Is there a way to prepare the data (with celery?)...
DjangoCMS vs Wagtail
Hi, I want to design and build a blog for testing purpose. Would you recommend Django CMS or Wagtail. I am a back-end developer but I get by front-end to.
/r/django
https://redd.it/y2td60
Hi, I want to design and build a blog for testing purpose. Would you recommend Django CMS or Wagtail. I am a back-end developer but I get by front-end to.
/r/django
https://redd.it/y2td60
reddit
DjangoCMS vs Wagtail
Hi, I want to design and build a blog for testing purpose. Would you recommend Django CMS or Wagtail. I am a back-end developer but I get by...
Help please: how to build a hangman game for Jupyter where hangman images are imported or in a seperate file?
/r/JupyterNotebooks
https://redd.it/y2uwvf
/r/JupyterNotebooks
https://redd.it/y2uwvf
reddit
Help please: how to build a hangman game for Jupyter where hangman...
Posted in r/JupyterNotebooks by u/Dandanoid123 • 1 point and 0 comments
I need help creating new users using Django, I am getting User() got unexpected keyword arguments: 'f_name', 'l_name' error
https://redd.it/y2zhhe
@pythondaily
https://redd.it/y2zhhe
@pythondaily
reddit
I need help creating new users using Django, I am getting User()...
Posted in r/djangolearning by u/Old_Adhesiveness_576 • 1 point and 5 comments
Help me ! <3
Hi guys, can somebody help me with exercies?
I'm just really far from it (
\--------------------------------------------------------
In the corridor of length S, the floor needs to be painted.
After painting a part of the corridor with length L, A kg of paint was spent.
Write the code for calculating how many cans of paint are needed to
to repaint the corridor if the can of paint weighs 900 g?
Enter: the length of the corridor, the length of its painted part,
weight of spent paint.
Display the calculation result.
\--------------------------------------------------------
/r/JupyterNotebooks
https://redd.it/y33nrk
Hi guys, can somebody help me with exercies?
I'm just really far from it (
\--------------------------------------------------------
In the corridor of length S, the floor needs to be painted.
After painting a part of the corridor with length L, A kg of paint was spent.
Write the code for calculating how many cans of paint are needed to
to repaint the corridor if the can of paint weighs 900 g?
Enter: the length of the corridor, the length of its painted part,
weight of spent paint.
Display the calculation result.
\--------------------------------------------------------
/r/JupyterNotebooks
https://redd.it/y33nrk
reddit
Help me ! <3
Hi guys, can somebody help me with exercies? I'm just really far from it ( \-------------------------------------------------------- ...
Does the Jupyter API allow using Jupyter from the CL?
Can you actually use Jupyter functionalities from the command line like executing or editing and re-executing line 3?
Or is the API just for basics like exporting a notebook into a Python script?
Thank you
/r/JupyterNotebooks
https://redd.it/y2djyl
Can you actually use Jupyter functionalities from the command line like executing or editing and re-executing line 3?
Or is the API just for basics like exporting a notebook into a Python script?
Thank you
/r/JupyterNotebooks
https://redd.it/y2djyl
reddit
Does the Jupyter API allow using Jupyter from the CL?
Can you actually use Jupyter functionalities from the command line like executing or editing and re-executing line 3? Or is the API just for...
Is it worth using the sitemap framework in a six-year Django website with 500,000 URLs?
I'm reflecting on it because it is necessary to use models and I have something like 19 models. So, Is it worth using Django's sitemap framework? If not, do you have a suggestion that fits Django?
/r/django
https://redd.it/y32x7q
I'm reflecting on it because it is necessary to use models and I have something like 19 models. So, Is it worth using Django's sitemap framework? If not, do you have a suggestion that fits Django?
/r/django
https://redd.it/y32x7q
reddit
Is it worth using the sitemap framework in a six-year Django...
I'm reflecting on it because it is necessary to use models and I have something like 19 models. So, Is it worth using Django's sitemap framework?...
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/y2jpp1
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/y2jpp1
reddit
Thursday Daily Thread: Python Careers, Courses, and Furthering...
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python...
Real time collaboration whiteboard for Jupyter notebooks?
I'm finding a common scenario for remote data science meetings is that a data scientist screen shares their Jupyter notebook in Zoom or Hangouts, then proceeds to start scrolling down and explaining their results. Usually their font size is too small and somebody asks them to zoom in a little. When I ask questions about a plot or table, there's a lot of "can you scroll up a little, no too far, back down a little" before they get to the one of interest. If I want to point to an area of the plot or highlight a number in a table, I can annotate with Zoom but not Hangouts, and with Zoom the annotation locations are out of place once the notebook is scrolled.
It seems like there should be a way where the presenter can share their notebook as a collaborative whiteboard, with support for annotations that stay in place and the ability to save the annotated notebook content after the meeting is over. This would let each meeting participant highlight an area of interest that would be shown the rest of the participants ala Google Docs, except I don't even need the ability to have people edit the
/r/JupyterNotebooks
https://redd.it/vzsg09
I'm finding a common scenario for remote data science meetings is that a data scientist screen shares their Jupyter notebook in Zoom or Hangouts, then proceeds to start scrolling down and explaining their results. Usually their font size is too small and somebody asks them to zoom in a little. When I ask questions about a plot or table, there's a lot of "can you scroll up a little, no too far, back down a little" before they get to the one of interest. If I want to point to an area of the plot or highlight a number in a table, I can annotate with Zoom but not Hangouts, and with Zoom the annotation locations are out of place once the notebook is scrolled.
It seems like there should be a way where the presenter can share their notebook as a collaborative whiteboard, with support for annotations that stay in place and the ability to save the annotated notebook content after the meeting is over. This would let each meeting participant highlight an area of interest that would be shown the rest of the participants ala Google Docs, except I don't even need the ability to have people edit the
/r/JupyterNotebooks
https://redd.it/vzsg09
Reddit
r/JupyterNotebooks on Reddit: Real time collaboration whiteboard for Jupyter notebooks?
Posted by u/jimgoo - 4 votes and 2 comments
New, free book from Al Sweigart: Python Programming Exercises, Gently Explained
Hello, I've released my new book "Python Programming Exercises, Gently Explained". You can read it for free at:
https://inventwithpython.com/pythongently
Description: Many books and websites have aggressive programming challenges for top coders. However, Python Programming Exercises, Gently Explained is for the rest of us. We want challenges that improve our coding skills, not leave us confused and discouraged. Other tutorials and books have taught you the basics of Python, but the 42 programming exercises in this book let you practice what you've learned. Selected for their simplicity, these programming problems include gentle explanations of the problem, the prerequisite coding concepts you’ll need to understand the solution, and helpful templates to put together the programs if you have trouble starting from scratch.
This is the perfect book for beginner and intermediate programmers who want to test their Python skills but aren’t ready to begin professional-level software development. You don’t need the frustration of being expected to create complex algorithms and computer science theory; you need a large set of programming challenges that meet you at your level, with gentle explanations.
/r/Python
https://redd.it/y38r6b
Hello, I've released my new book "Python Programming Exercises, Gently Explained". You can read it for free at:
https://inventwithpython.com/pythongently
Description: Many books and websites have aggressive programming challenges for top coders. However, Python Programming Exercises, Gently Explained is for the rest of us. We want challenges that improve our coding skills, not leave us confused and discouraged. Other tutorials and books have taught you the basics of Python, but the 42 programming exercises in this book let you practice what you've learned. Selected for their simplicity, these programming problems include gentle explanations of the problem, the prerequisite coding concepts you’ll need to understand the solution, and helpful templates to put together the programs if you have trouble starting from scratch.
This is the perfect book for beginner and intermediate programmers who want to test their Python skills but aren’t ready to begin professional-level software development. You don’t need the frustration of being expected to create complex algorithms and computer science theory; you need a large set of programming challenges that meet you at your level, with gentle explanations.
/r/Python
https://redd.it/y38r6b
Reddit
r/Python on Reddit: New, free book from Al Sweigart: Python Programming Exercises, Gently Explained
Posted by u/AlSweigart - 1,042 votes and 91 comments
Starlite: v1.27.0 updates
Hi Pythonistas!
Been 3 weeks since my last post here and a lot of new stuff happened in Starlite land.
First off, lemme start with the usual intro for those who don't know what im talking about: Starlite is an ASGI (async Python) API framework. It started out as an alternative to FastAPI - built on the same foundations: the Starlette ASGI Kit and pydantic. It evolved and has been intensely developed over the past year+ and is now a sophisticated and powerful API framework with a vibrant community and several (currently 4) maintainers.
Note regarding the name: The framework is called Starlite to show the relation to Starlette. This was important to me when starting this project, although to be honest Starlite now uses Starlette only in several select places and is almost completely distinct.
With this part out of the way - lemme give some updates:
1. We implemented a new on_app_init hook that allow plugins to set all elements of application configuration (more on this lower).
2. Building on the point above, we updated the
/r/Python
https://redd.it/y2w6fl
Hi Pythonistas!
Been 3 weeks since my last post here and a lot of new stuff happened in Starlite land.
First off, lemme start with the usual intro for those who don't know what im talking about: Starlite is an ASGI (async Python) API framework. It started out as an alternative to FastAPI - built on the same foundations: the Starlette ASGI Kit and pydantic. It evolved and has been intensely developed over the past year+ and is now a sophisticated and powerful API framework with a vibrant community and several (currently 4) maintainers.
Note regarding the name: The framework is called Starlite to show the relation to Starlette. This was important to me when starting this project, although to be honest Starlite now uses Starlette only in several select places and is almost completely distinct.
With this part out of the way - lemme give some updates:
1. We implemented a new on_app_init hook that allow plugins to set all elements of application configuration (more on this lower).
2. Building on the point above, we updated the
SQLAlchemyPlugin to now support creating a DB connection and injection sessions using dependency injection. This is completely optional, but it also allows using Starlite with SQLAlchemy as an/r/Python
https://redd.it/y2w6fl
GitHub
GitHub - litestar-org/litestar: Light, flexible and extensible ASGI framework | Built to scale
Light, flexible and extensible ASGI framework | Built to scale - litestar-org/litestar