D Resources to get up to the speed with the state of the art evolutionary optimization
There're plenty of good books letting you get close to the state of the art in the field, on Machine Learning, and Deep Learning in particular. However, are there any good modern books on evolutionary optimization? Are there any good courses?
/r/MachineLearning
https://redd.it/1hbt986
There're plenty of good books letting you get close to the state of the art in the field, on Machine Learning, and Deep Learning in particular. However, are there any good modern books on evolutionary optimization? Are there any good courses?
/r/MachineLearning
https://redd.it/1hbt986
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Django's built-in test client or pytest?
For testing in a Django project, what should I use Django's built-in test client or pytest?
Or what's the benefit of using one of them instead of the other one?
/r/django
https://redd.it/1hbxxi6
For testing in a Django project, what should I use Django's built-in test client or pytest?
Or what's the benefit of using one of them instead of the other one?
/r/django
https://redd.it/1hbxxi6
Reddit
From the django community on Reddit
Explore this post and more from the django community
Recommended Tutorials for Network Programming Using Django as a Beginner?
I’m a network engineer currently studying Django to build a front end for my Python noscript. I’ve started watching some video tutorials and reading through the Django documentation, but I’m still looking for resources that specifically focus on network programming or tools for beginners using Django.
Does anyone have recommendations for tutorials, video courses, or guides that might help someone in my position? Thank you
/r/django
https://redd.it/1hc2tl4
I’m a network engineer currently studying Django to build a front end for my Python noscript. I’ve started watching some video tutorials and reading through the Django documentation, but I’m still looking for resources that specifically focus on network programming or tools for beginners using Django.
Does anyone have recommendations for tutorials, video courses, or guides that might help someone in my position? Thank you
/r/django
https://redd.it/1hc2tl4
Reddit
From the django community on Reddit
Explore this post and more from the django community
Deployment
Hello, I already finished my software for my friend clinic using django and my sql for db and i want to install it on my friend laptop and it will work only locally so what’s the best way to do this ?
/r/django
https://redd.it/1hc9gzg
Hello, I already finished my software for my friend clinic using django and my sql for db and i want to install it on my friend laptop and it will work only locally so what’s the best way to do this ?
/r/django
https://redd.it/1hc9gzg
Reddit
From the django community on Reddit
Explore this post and more from the django community
Struggling to store uploaded files on the server.
from flask import Flask, render_template, session, Response, request, flash, redirect, url_for
from random import randint
import os
app = Flask(__name__)
app.secret_key = "run"
uploadfolder = 'upload_img'
extensions = {'png','jpg','jpeg','gif'}
app.config["UPLOAD_FOLDER"] = uploadfolder
def isallowed(filename):
return '.' in filename and filename.rsplit('.', 1)[1].lower() in extensions
@app.route("/")
def default():
return render_template("index.html")
@app.route("/uploadimg" , methods=["POST"])
def imgpicker():
file = request.files["file"]
if file and isallowed(file.filename):
if not os.path.exists(uploadfolder):
os.makedirs(uploadfolder)
/r/flask
https://redd.it/1hbv2sq
from flask import Flask, render_template, session, Response, request, flash, redirect, url_for
from random import randint
import os
app = Flask(__name__)
app.secret_key = "run"
uploadfolder = 'upload_img'
extensions = {'png','jpg','jpeg','gif'}
app.config["UPLOAD_FOLDER"] = uploadfolder
def isallowed(filename):
return '.' in filename and filename.rsplit('.', 1)[1].lower() in extensions
@app.route("/")
def default():
return render_template("index.html")
@app.route("/uploadimg" , methods=["POST"])
def imgpicker():
file = request.files["file"]
if file and isallowed(file.filename):
if not os.path.exists(uploadfolder):
os.makedirs(uploadfolder)
/r/flask
https://redd.it/1hbv2sq
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1hc7z1a
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1hc7z1a
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Open-source Python Uno shuffler
Hi r/Python community! I recently made an Uno shuffler program with python. You can fork it here: https://github.com/LarryEmerson12/UnoShuffler/. It simply just generates the whole Uno deck, and then shuffles it. You can shuffle it as many times as you want.
Target Audience:
You can implement it in your other projects.
Comparison:
I do not know about other projects.
If there are any issues, feel free to comment.
/r/Python
https://redd.it/1hcbfp7
Hi r/Python community! I recently made an Uno shuffler program with python. You can fork it here: https://github.com/LarryEmerson12/UnoShuffler/. It simply just generates the whole Uno deck, and then shuffles it. You can shuffle it as many times as you want.
Target Audience:
You can implement it in your other projects.
Comparison:
I do not know about other projects.
If there are any issues, feel free to comment.
/r/Python
https://redd.it/1hcbfp7
GitHub
GitHub - LarryEmerson12/UnoShuffler: A simple python noscript that returns shuffled Uno cards.
A simple python noscript that returns shuffled Uno cards. - LarryEmerson12/UnoShuffler
Why is this retrieve method incrementing the viewcount by 2 instead of 1 ? .
class ArticleViewSet(ArticleViewSetMixin, viewsets.ReadOnlyModelViewSet):
filtersetclass = ArticleFilter
permissionclasses = (AllowAny,)
queryset = Article.objects.filter(publisheddatelte=datetime.now(tz=IST))
serializerclass = ArticleSerializer
def retrieve(self, *args, **kwargs):
instance = self.getobject()
Article.objects.filter(pk=instance.pk).update(viewcount=F("viewcount") + 1)
instance.refreshfromdb()
serializer = self.getserializer(instance)
return Response(serializer.data)
Each time i send a postman request, its incrementing the view\count by 2 instead of 1 ? .
why is that ? .
I also don't have any separate signals or anything, this is the only method I have overridden.
/r/django
https://redd.it/1hcfjdz
class ArticleViewSet(ArticleViewSetMixin, viewsets.ReadOnlyModelViewSet):
filtersetclass = ArticleFilter
permissionclasses = (AllowAny,)
queryset = Article.objects.filter(publisheddatelte=datetime.now(tz=IST))
serializerclass = ArticleSerializer
def retrieve(self, *args, **kwargs):
instance = self.getobject()
Article.objects.filter(pk=instance.pk).update(viewcount=F("viewcount") + 1)
instance.refreshfromdb()
serializer = self.getserializer(instance)
return Response(serializer.data)
Each time i send a postman request, its incrementing the view\count by 2 instead of 1 ? .
why is that ? .
I also don't have any separate signals or anything, this is the only method I have overridden.
/r/django
https://redd.it/1hcfjdz
Reddit
From the django community on Reddit
Explore this post and more from the django community
Help needed: Flask not loading images in one template
https://preview.redd.it/isayd97rhd6e1.png?width=900&format=png&auto=webp&s=defc230877ba3f07585cb25cf2693309808682dd
Hello,
I'm new to Flask and having trouble with images in one of my templates (`login.html`). Images load fine when `dashboard.html` using `{{ url_for('static', filename='images/logo.jpg') }}`, but the same code doesn't work in `login.html`. Similarly, the CSS file (`/static/css/styles.css`) also doesn't load for `login.html`.
I've checked the file structure and paths, cleared my browser cache, and tried hardcoding the image paths (`/static/images/logo.jpg`), but no luck. Whenever I load the HTML page separately with the hardcoded path, it works fine.
What could be causing this inconsistency? I would appreciate any help!
**Login.html:**
<header>
<img src="/static/images/logo.jpg" alt="logo">
<!-- <img src ="{{ url_for('static', filename='/images/logo.jpg') }}"> -->
</header>
<footer>
<!-- Bottom-center motto -->
<img src="/static/images/motto.jpg" alt="motto">
</footer>
**Dashboard.html:**
<header>
<!-- <img src="{{ url_for('static', filename='images/logo.jpg') }}" alt="Logo">-->
<img src="/static/images/logo.jpg" alt="logo">
<button class="logout-btn" onclick="
window
.location.href='{{ url_for('logout') }}'">Logout</button>
/r/flask
https://redd.it/1hcg89m
https://preview.redd.it/isayd97rhd6e1.png?width=900&format=png&auto=webp&s=defc230877ba3f07585cb25cf2693309808682dd
Hello,
I'm new to Flask and having trouble with images in one of my templates (`login.html`). Images load fine when `dashboard.html` using `{{ url_for('static', filename='images/logo.jpg') }}`, but the same code doesn't work in `login.html`. Similarly, the CSS file (`/static/css/styles.css`) also doesn't load for `login.html`.
I've checked the file structure and paths, cleared my browser cache, and tried hardcoding the image paths (`/static/images/logo.jpg`), but no luck. Whenever I load the HTML page separately with the hardcoded path, it works fine.
What could be causing this inconsistency? I would appreciate any help!
**Login.html:**
<header>
<img src="/static/images/logo.jpg" alt="logo">
<!-- <img src ="{{ url_for('static', filename='/images/logo.jpg') }}"> -->
</header>
<footer>
<!-- Bottom-center motto -->
<img src="/static/images/motto.jpg" alt="motto">
</footer>
**Dashboard.html:**
<header>
<!-- <img src="{{ url_for('static', filename='images/logo.jpg') }}" alt="Logo">-->
<img src="/static/images/logo.jpg" alt="logo">
<button class="logout-btn" onclick="
window
.location.href='{{ url_for('logout') }}'">Logout</button>
/r/flask
https://redd.it/1hcg89m
Open-source Python Time-wasters
Hi r/Python community! I recently made an time waster program with python. You can fork it here: https://github.com/LarryEmerson12/TimeWasters/ It simply just shows some 0s, and then animates it. You can edit the speed at how you want.
Target Audience:
Use this when you're bored.
Comparison:
I do not know about other projects.
If there are any issues, feel free to comment.
/r/Python
https://redd.it/1hcgtrz
Hi r/Python community! I recently made an time waster program with python. You can fork it here: https://github.com/LarryEmerson12/TimeWasters/ It simply just shows some 0s, and then animates it. You can edit the speed at how you want.
Target Audience:
Use this when you're bored.
Comparison:
I do not know about other projects.
If there are any issues, feel free to comment.
/r/Python
https://redd.it/1hcgtrz
GitHub
GitHub - LarryEmerson12/TimeWasters
Contribute to LarryEmerson12/TimeWasters development by creating an account on GitHub.
How to upload files to server using django rest framework (i'm using flutter for the front end)
I'm building a user application which allows user to upload designs for saree's (basically the app is going to be used in textile industries in precise) here i stuck with the file uploading part like how to upload files which are around 2-30mb to the server using DRF.
for context the app is going to communicate with the machine using mqtt protocol so once the design is uploaded to the server it will then be used by the machines.
Please let me know if you have any suggestions on this matter as it would be very helpful.
/r/django
https://redd.it/1hciojh
I'm building a user application which allows user to upload designs for saree's (basically the app is going to be used in textile industries in precise) here i stuck with the file uploading part like how to upload files which are around 2-30mb to the server using DRF.
for context the app is going to communicate with the machine using mqtt protocol so once the design is uploaded to the server it will then be used by the machines.
Please let me know if you have any suggestions on this matter as it would be very helpful.
/r/django
https://redd.it/1hciojh
Reddit
From the django community on Reddit
Explore this post and more from the django community
Free Python IDE for Android with Pypi
Blaze IDE for Python on Android is now released!
https://play.google.com/store/apps/details?id=com.blaze.code&hl=en_IN
**Target Audience**
Many students across the world have an interest for coding but they are not able to fulfill their dreams because they don't own a laptop or a computer.
But no need to worry, because Blaze is here to solve the problem!
Features of Blaze
Runs via web so minimal ram requirements
Pypi modules are supported (except gui)
Fast code compiler
Less than 15 mb app size
Download & Support
Please support the initiative by giving ⭐⭐⭐⭐⭐ reviews! Hope you will love Blaze!
**Comparisions**
Other projects have atleast 300 mb storage while this is Just 15mb
Tutorials
https://github.com/techxsarthak/Blaze-code
/r/Python
https://redd.it/1hcj48d
Blaze IDE for Python on Android is now released!
https://play.google.com/store/apps/details?id=com.blaze.code&hl=en_IN
**Target Audience**
Many students across the world have an interest for coding but they are not able to fulfill their dreams because they don't own a laptop or a computer.
But no need to worry, because Blaze is here to solve the problem!
Features of Blaze
Runs via web so minimal ram requirements
Pypi modules are supported (except gui)
Fast code compiler
Less than 15 mb app size
Download & Support
Please support the initiative by giving ⭐⭐⭐⭐⭐ reviews! Hope you will love Blaze!
**Comparisions**
Other projects have atleast 300 mb storage while this is Just 15mb
Tutorials
https://github.com/techxsarthak/Blaze-code
/r/Python
https://redd.it/1hcj48d
Google Play
Blaze Code- Python IDE – Apps on Google Play
Python IDE & Compiler for mobile with support for modules
Python OCR for each element/section reading multiple details of multiple objects
Hey I have a list of buttons underneath each other (sections). Each button has some details, pretty many different, I need to read some data with OCR, some with is image in that region,... I really struggle to find something reliable, anyone got any tips.
And please if you do not dont write, pytesseract is not the way to go here...
/r/Python
https://redd.it/1hcgtlr
Hey I have a list of buttons underneath each other (sections). Each button has some details, pretty many different, I need to read some data with OCR, some with is image in that region,... I really struggle to find something reliable, anyone got any tips.
And please if you do not dont write, pytesseract is not the way to go here...
/r/Python
https://redd.it/1hcgtlr
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
python-json-logger has changed hands
Hi r/python,
I wanted to introduce myself as the new maintainer of python-json-logger and hopefully establish a bit of trust.
Understandably there has been some anxiety over the PEP 541 Request that I submitted given the importance / popularity of the package - especially in the context of the XZ Utils backdoor earlier in the year.
I think it's important to highlight that although this was prompted by the PEP 541 request, it was not done through PEP 541 mechanisms. In other words this was a decision by the original maintainer and not the PyPI Administrators.
For those wanting to know more about me (to prove that I'm not some statebased actor subverting the package), I'm a security professional and maintain a few other packages. You might also have seen some of my blog posts on reddit.
Finally apologies if the newly released versions broke your things - despite my best efforts at testing and maintaining backwards compatibility it appears some bugs managed to slip through.
/r/Python
https://redd.it/1hcm2rr
Hi r/python,
I wanted to introduce myself as the new maintainer of python-json-logger and hopefully establish a bit of trust.
Understandably there has been some anxiety over the PEP 541 Request that I submitted given the importance / popularity of the package - especially in the context of the XZ Utils backdoor earlier in the year.
I think it's important to highlight that although this was prompted by the PEP 541 request, it was not done through PEP 541 mechanisms. In other words this was a decision by the original maintainer and not the PyPI Administrators.
For those wanting to know more about me (to prove that I'm not some statebased actor subverting the package), I'm a security professional and maintain a few other packages. You might also have seen some of my blog posts on reddit.
Finally apologies if the newly released versions broke your things - despite my best efforts at testing and maintaining backwards compatibility it appears some bugs managed to slip through.
/r/Python
https://redd.it/1hcm2rr
PyPI
python-json-logger
JSON Log Formatter for the Python Logging Package
Django on ecs
Whats the common practice for serving a Django app from ECS?
Should I use gunicorn from within the container and nginx as reverse proxy?
It’s mainly going to be used as a project to go on my resume so don’t need anything to complex.
Thanks
/r/django
https://redd.it/1hcl1pu
Whats the common practice for serving a Django app from ECS?
Should I use gunicorn from within the container and nginx as reverse proxy?
It’s mainly going to be used as a project to go on my resume so don’t need anything to complex.
Thanks
/r/django
https://redd.it/1hcl1pu
Reddit
From the django community on Reddit
Explore this post and more from the django community
Programming languages that compile to Python?
All I'm aware of is Coconut, which is a functional programming language that is essentially a superset of Python syntax. Are there any other languages like this?
/r/Python
https://redd.it/1hchwjd
All I'm aware of is Coconut, which is a functional programming language that is essentially a superset of Python syntax. Are there any other languages like this?
/r/Python
https://redd.it/1hchwjd
coconut-lang.org
Coconut Programming Language
Simple, elegant, Pythonic functional programming.
Question about app.config'UPLOAD_FOLDER' statement
I don't understand the usefulness of this statement: app.config['UPLOAD_FOLDER'\]
Can't use the os library? Also because I have to constantly change path based on the name of a file.
Example: /static/uploads/Username/S/song.mp3
/r/flask
https://redd.it/1hck2gp
I don't understand the usefulness of this statement: app.config['UPLOAD_FOLDER'\]
Can't use the os library? Also because I have to constantly change path based on the name of a file.
Example: /static/uploads/Username/S/song.mp3
/r/flask
https://redd.it/1hck2gp
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
encoding error
Hi guys, i'm new to coding on flask and python. I'm creating small web application and facing one problem. I input data via textboxes and use my native language while doing it. I am trying to get some data (group and day in def student_show()). After input the error appears, which goes "UnicodeEncodeError: 'ascii' codec can't encode characters in position 11-21: ordinal not in range(128)". I tried to apply .decode('cp1251').encode('utf8'), but got another error "'str' object has no attribute 'decode'". All screeenshots are included. I also included student.html. How can I fix it?
My code
Error
Decode error
HTML
/r/flask
https://redd.it/1hch3sb
Hi guys, i'm new to coding on flask and python. I'm creating small web application and facing one problem. I input data via textboxes and use my native language while doing it. I am trying to get some data (group and day in def student_show()). After input the error appears, which goes "UnicodeEncodeError: 'ascii' codec can't encode characters in position 11-21: ordinal not in range(128)". I tried to apply .decode('cp1251').encode('utf8'), but got another error "'str' object has no attribute 'decode'". All screeenshots are included. I also included student.html. How can I fix it?
My code
Error
Decode error
HTML
/r/flask
https://redd.it/1hch3sb
Why does the allowedmethods() function return all http methods even though only get is implemented?
I have a view being inherited by APIView and I have only implemented the GET method in it. But when I call ClassInstance._allowed_methods() I get list of all the HTTP methods even though they are not implemented. When I hit that API with a POST request I get a not allowed error. How could it be?
/r/djangolearning
https://redd.it/1hcn9ug
I have a view being inherited by APIView and I have only implemented the GET method in it. But when I call ClassInstance._allowed_methods() I get list of all the HTTP methods even though they are not implemented. When I hit that API with a POST request I get a not allowed error. How could it be?
/r/djangolearning
https://redd.it/1hcn9ug
Reddit
[deleted by user] : r/djangolearning
29K subscribers in the djangolearning community. A group dedicated to learning Django, a Python web framework.
ER Diagrams in Mermaid
Does anyone know of a way to export Django models to Mermaid UML?
/r/django
https://redd.it/1hczo8d
Does anyone know of a way to export Django models to Mermaid UML?
/r/django
https://redd.it/1hczo8d
Reddit
From the django community on Reddit
Explore this post and more from the django community
DRF docs
I noticed the docs for DRF aren't really detailed. I've learnt a lot of what I can do within it from breaking stuff and asking AI or SOF. I was wondering if there are more detailed articles on it or parts of it like views and generic views
/r/django
https://redd.it/1hcxkyv
I noticed the docs for DRF aren't really detailed. I've learnt a lot of what I can do within it from breaking stuff and asking AI or SOF. I was wondering if there are more detailed articles on it or parts of it like views and generic views
/r/django
https://redd.it/1hcxkyv
Reddit
From the django community on Reddit: DRF docs
Posted by WayAndMeans01 - 9 votes and 5 comments