Tuesday Daily Thread: Advanced questions
Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.
If your question is a beginner question we hold a beginner Daily Thread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.
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/lfpln1
Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.
If your question is a beginner question we hold a beginner Daily Thread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.
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/lfpln1
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
I wrote a song about everyone's favorite Python Enhancement Proposal
https://www.youtube.com/watch?v=hgI0p1zf31k
/r/Python
https://redd.it/lfuy5e
https://www.youtube.com/watch?v=hgI0p1zf31k
/r/Python
https://redd.it/lfuy5e
YouTube
🎵 The PEP 8 Song 🎵
A songification of that most holiest of Python Enhancement Proposals, the PEP 8.
Based on an idea by Daniel "Mr. Hemlock" Brown.
Written and performed by Leon Sandøy, A.K.A. lemonsaurus.
Music and melody from Mad World by Roland Orzabal. This version was…
Based on an idea by Daniel "Mr. Hemlock" Brown.
Written and performed by Leon Sandøy, A.K.A. lemonsaurus.
Music and melody from Mad World by Roland Orzabal. This version was…
Building a Social Network in 1 Month (Day 8 of 28) (Daily Coding Vlogs)
https://www.youtube.com/watch?v=v1-of1G48aQ&feature=youtu.be&ab_channel=IsaacJoy
/r/django
https://redd.it/lfq4sd
https://www.youtube.com/watch?v=v1-of1G48aQ&feature=youtu.be&ab_channel=IsaacJoy
/r/django
https://redd.it/lfq4sd
YouTube
Let's build a Social Network in 1 month (Day 8 of 28)
building https://chitterchat.com - a social network for meeting people online
tech stack - nuxt.js(vue.js) / django / postgres
code: https://gitlab.com/isaacjoy/chitter.chat
time spent: 3 hours
tech stack - nuxt.js(vue.js) / django / postgres
code: https://gitlab.com/isaacjoy/chitter.chat
time spent: 3 hours
Writing a book on autonomous quadcopter projects? Latex vs Jupyter Book?
Hi, So I finished my masters in computer science with a focus on deep learning and computer vision. Now I want to write a book showcasing some useful and popular things in this field. Here's a small list of libraries that I use in some chapters:
1. Eigen (3D geometry, Linear algebra)
2. Sophus (3D geometry, Lie algebra)
3. Ceres Solver (3D geometry)
4. ROS (Robotics software)
5. OpenCV (computer vision)
6. Tensorflow (deep learning)
7. Pandas, numpy, matplotlib (Data science)
I want to explore concepts in papers and showcase examples and projects which use these libraries. In Latex, I can simply add a code block in `listing` environment. But I want the code to be executable so that users can try it out themselves. Can the top 4 libraries be used along with Jupyter book so that the code I specify (which is written in C++ 14 btw, not python) is executable? These libraries are installed natively and not in a conda (or virtual) environment.
/r/JupyterNotebooks
https://redd.it/lg0exy
Hi, So I finished my masters in computer science with a focus on deep learning and computer vision. Now I want to write a book showcasing some useful and popular things in this field. Here's a small list of libraries that I use in some chapters:
1. Eigen (3D geometry, Linear algebra)
2. Sophus (3D geometry, Lie algebra)
3. Ceres Solver (3D geometry)
4. ROS (Robotics software)
5. OpenCV (computer vision)
6. Tensorflow (deep learning)
7. Pandas, numpy, matplotlib (Data science)
I want to explore concepts in papers and showcase examples and projects which use these libraries. In Latex, I can simply add a code block in `listing` environment. But I want the code to be executable so that users can try it out themselves. Can the top 4 libraries be used along with Jupyter book so that the code I specify (which is written in C++ 14 btw, not python) is executable? These libraries are installed natively and not in a conda (or virtual) environment.
/r/JupyterNotebooks
https://redd.it/lg0exy
reddit
Writing a book on autonomous quadcopter projects? Latex vs Jupyter...
Hi, So I finished my masters in computer science with a focus on deep learning and computer vision. Now I want to write a book showcasing some...
Is there a way for Django to secure the connection to a Postgres DB using one of Postgres's supported authentication methods?
When Django uses the Postgres credentials configured in the settings..py file to connect to the DB, is there a way to secure this connection that Django provides?
Postgres's supported authentication methods
/r/django
https://redd.it/lfyxrs
When Django uses the Postgres credentials configured in the settings..py file to connect to the DB, is there a way to secure this connection that Django provides?
Postgres's supported authentication methods
/r/django
https://redd.it/lfyxrs
PostgreSQL Documentation
20.3. Authentication Methods
20.3. Authentication Methods # PostgreSQL provides various methods for authenticating users: Trust authentication, which simply trusts that users are who they …
PEP 634 (Structural Pattern Matching) is approved! Welcome match statement,
https://realworldpython.hashnode.dev/structural-pattern-matching-pep-634-in-python
/r/Python
https://redd.it/lfz5af
https://realworldpython.hashnode.dev/structural-pattern-matching-pep-634-in-python
/r/Python
https://redd.it/lfz5af
The Most Popular Programming Languages - 1965/2020
https://youtu.be/UNSoPa-XQN0
/r/pystats
https://redd.it/lg45z6
https://youtu.be/UNSoPa-XQN0
/r/pystats
https://redd.it/lg45z6
YouTube
The Most Popular Programming Languages - 1965/2020
In this video the most used programming languages from 1965 to 2020. The data are updated to the second quarter of 2020. In the second quarter of 2020 the most used programming languages are: Python, Javascript and Java. C#, PHP, C++ and others follow.
…
…
The 22 Most-Used Python Packages in The World
Hi Reddit, I assembled the **top 22 most used Python packages in the world** (medium, link bypasses the paywall).
I did some research and wrote about each of them. I had a lot of fun writing this. I'd love to hear your comments!
/r/Python
https://redd.it/lfzbcg
Hi Reddit, I assembled the **top 22 most used Python packages in the world** (medium, link bypasses the paywall).
I did some research and wrote about each of them. I had a lot of fun writing this. I'd love to hear your comments!
/r/Python
https://redd.it/lfzbcg
Medium
The 22 Most-Used Python Packages in The World in 2021
Educational and surprising insights into how Python is used
Sending full html link through rendertemplate?
Hi all,
It is possible to send an html link through flask render\template?
\-----------------------
app.route('/site1')
def site1():
data = '<a href="/info?id=12345">12345</a>'
return render_template('site1.html', data=data)
\-----------------------
I've tested the above, but it comes out as a string and not recognized as a link.
I can send the data and format it as <a href="/info?id={data}">{data}</a> within the html, but i'm using a table loop and the first entry is an id that I'd also like to be a link for drill down purposes. Fairly new to web design and hope I'm asking the question accurately.
Thank you!
/r/flask
https://redd.it/lg68xd
Hi all,
It is possible to send an html link through flask render\template?
\-----------------------
app.route('/site1')
def site1():
data = '<a href="/info?id=12345">12345</a>'
return render_template('site1.html', data=data)
\-----------------------
I've tested the above, but it comes out as a string and not recognized as a link.
I can send the data and format it as <a href="/info?id={data}">{data}</a> within the html, but i'm using a table loop and the first entry is an id that I'd also like to be a link for drill down purposes. Fairly new to web design and hope I'm asking the question accurately.
Thank you!
/r/flask
https://redd.it/lg68xd
reddit
Sending full html link through render_template?
Hi all, It is possible to send an html link through flask render\_template? \----------------------- app.route('/site1') def site1(): ...
Django as a pure backend independent of the frontend or Django alongside the frontend when using React.
I've already built some parts of the frontend using React, and I was wondering now that I am going to start building the backend, which of the two approaches is more suitable.
​
I know that both approaches are useable, but I am not sure about the trade-offs between using Django as an independent backend or using react as an app of a Django project.
​
I am hoping that someone could point of the trade-offs between the two approaches or provide some resource to learn about the topic if possible.
​
Thank you
/r/djangolearning
https://redd.it/lg50u2
I've already built some parts of the frontend using React, and I was wondering now that I am going to start building the backend, which of the two approaches is more suitable.
​
I know that both approaches are useable, but I am not sure about the trade-offs between using Django as an independent backend or using react as an app of a Django project.
​
I am hoping that someone could point of the trade-offs between the two approaches or provide some resource to learn about the topic if possible.
​
Thank you
/r/djangolearning
https://redd.it/lg50u2
reddit
Django as a pure backend independent of the frontend or Django...
I've already built some parts of the frontend using React, and I was wondering now that I am going to start building the backend, which of the two...
[Python 3][Flask] need help with a generator object thats supposed to be returning 2 values as a dictionary
https://www.reddit.com/r/learnpython/comments/lgg7qm/python_3flask_need_help_with_a_generator_object/
/r/flask
https://redd.it/lggml6
https://www.reddit.com/r/learnpython/comments/lgg7qm/python_3flask_need_help_with_a_generator_object/
/r/flask
https://redd.it/lggml6
reddit
[Python 3][Flask] need help with a generator object thats supposed...
im following a course on flask using codecademy, this is the question that i am stuck on In app.py collect the name and value data from the...
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/lgh38f
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/lgh38f
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
I made a Password Generator which uses diceware password generating algorithm to generate cryptographically strong memorable passphrases.
https://github.com/sameera-madushan/Diceware-Password-Generator
​
https://i.redd.it/kzl259o0hig61.gif
/r/Python
https://redd.it/lgcjcq
https://github.com/sameera-madushan/Diceware-Password-Generator
​
https://i.redd.it/kzl259o0hig61.gif
/r/Python
https://redd.it/lgcjcq
GitHub
GitHub - sameera-madushan/Diceware-Password-Generator: Python implementation of the diceware password generating algorithm.
Python implementation of the diceware password generating algorithm. - GitHub - sameera-madushan/Diceware-Password-Generator: Python implementation of the diceware password generating algorithm.
Whats the role tools like django-environ, python-dotenv etc when using django with docker?
I'm wondering what's the role/benfit of using the tools mentioned above when using django with docker? Is it mainly for local use without docker?
/r/django
https://redd.it/lghy32
I'm wondering what's the role/benfit of using the tools mentioned above when using django with docker? Is it mainly for local use without docker?
/r/django
https://redd.it/lghy32
reddit
Whats the role tools like django-environ, python-dotenv etc when...
I'm wondering what's the role/benfit of using the tools mentioned above when using django with docker? Is it mainly for local use without docker?
A little jab at C in PEP 20 that I just noticed
In "The Zen of Python", PEP 20, the thirteenth guideline is written
Based on how those em-dashes are formatted, it feels like the guideline is poking fun at C (and other languages with C-like syntax). For those that aren't aware, in C you can decrement a variable by one, either with
In other words, there are two ways to do it; it's not Pythonic. I don't know if I'm a moron for not seeing this in the PEP until now, but in my defense I learned Python before I learned C. Also, it seems like the Wikipedia editors missed it, too, based on the formatting.
/r/Python
https://redd.it/lgeb8m
In "The Zen of Python", PEP 20, the thirteenth guideline is written
There should be one-- and preferably only one --obvious way to do it.Based on how those em-dashes are formatted, it feels like the guideline is poking fun at C (and other languages with C-like syntax). For those that aren't aware, in C you can decrement a variable by one, either with
var-- or --var. (The difference being that the first expression evaluates, then increments, and the second increments, then evaluates, if that brief explanation makes any sense.) In other words, there are two ways to do it; it's not Pythonic. I don't know if I'm a moron for not seeing this in the PEP until now, but in my defense I learned Python before I learned C. Also, it seems like the Wikipedia editors missed it, too, based on the formatting.
/r/Python
https://redd.it/lgeb8m
If you use Poetry and github actions 🏄♂️
If you use Poetry and Github actions, and don't already use an action for combining these, please check out our poetry install action!
https://github.com/snok/install-poetry
The action itself can be useful, but most of all I hope the repo docs might be helpful to people, as we've put a lot of work into providing useful example workflows that people can use as starting points for crafting their own.
We also recently put some extra effort into improving our Windows documentation - an area that people generally seem to struggle with.
Hope this can be of use to you - and feel free to raise issues, make contributions, or leave a comment here with any feedback! It would be much appreciated 👏
/r/Python
https://redd.it/lgryif
If you use Poetry and Github actions, and don't already use an action for combining these, please check out our poetry install action!
https://github.com/snok/install-poetry
The action itself can be useful, but most of all I hope the repo docs might be helpful to people, as we've put a lot of work into providing useful example workflows that people can use as starting points for crafting their own.
We also recently put some extra effort into improving our Windows documentation - an area that people generally seem to struggle with.
Hope this can be of use to you - and feel free to raise issues, make contributions, or leave a comment here with any feedback! It would be much appreciated 👏
/r/Python
https://redd.it/lgryif
GitHub
GitHub - snok/install-poetry: Github action for installing and configuring Poetry
Github action for installing and configuring Poetry - snok/install-poetry
Vuejs with django
Best way to use vuejs with django, is it possible to club both and run vuejs as if its part of django?
/r/django
https://redd.it/lgtxgp
Best way to use vuejs with django, is it possible to club both and run vuejs as if its part of django?
/r/django
https://redd.it/lgtxgp
reddit
Vuejs with django
Best way to use vuejs with django, is it possible to club both and run vuejs as if its part of django?
I made auto-steering project
It was my dream since I started to learn Python. It was a long journey. Finally I did it :)
I used OpenCV and Keras. I drove car 1 hour and I trained model. It's running on Euro Truck Simulator 2.
Here is the results
Detailed information and files
/r/Python
https://redd.it/lgvojf
It was my dream since I started to learn Python. It was a long journey. Finally I did it :)
I used OpenCV and Keras. I drove car 1 hour and I trained model. It's running on Euro Truck Simulator 2.
Here is the results
Detailed information and files
/r/Python
https://redd.it/lgvojf
YouTube
hope Autonomous Driving on Euro Truck Simulator 2
Detailed information and files: https://github.com/umutkcbs/hope-autonomous-driving/In this video, the program processes the image of the screen, gives it to...
Raspberry Pi & Python powered tank with live streaming + web UI
https://www.linuxscrew.com/raspberry-pi-python-powered-tank-part-2
/r/Python
https://redd.it/lgxyhj
https://www.linuxscrew.com/raspberry-pi-python-powered-tank-part-2
/r/Python
https://redd.it/lgxyhj
Linux Guides, Tips and Tutorials | LinuxScrew
Raspberry Pi & Python Powered Tank - Part II
This is part 2 of the Raspberry Pi and Python powered tank project. In this article, we attempt to display a live video stream and buttons to control the tank in a web UI.
How to prevent users from downloading video files?
Using the HTML5 video tag, how do you prevent users from viewing the source code and clicking the video file and downloading it from source?
I would like the user to see the video file publicly without viewing the source code but not be able to view the source code and download it that way. In javascript, I could prevent users from downloading the file on the front end. But once someone views the source code and clicks the video file, the javascript protection does not exist.
Is there a way in nginx or django to password protect each video file link but still show it on the front end to users?
/r/djangolearning
https://redd.it/lh0nf0
Using the HTML5 video tag, how do you prevent users from viewing the source code and clicking the video file and downloading it from source?
I would like the user to see the video file publicly without viewing the source code but not be able to view the source code and download it that way. In javascript, I could prevent users from downloading the file on the front end. But once someone views the source code and clicks the video file, the javascript protection does not exist.
Is there a way in nginx or django to password protect each video file link but still show it on the front end to users?
/r/djangolearning
https://redd.it/lh0nf0
reddit
How to prevent users from downloading video files?
Using the HTML5 video tag, how do you prevent users from viewing the source code and clicking the video file and downloading it from source? I...
How to create flask sqlalchemy models of existing database that has 35 tables?
Is there any option to automate that process or do I have to create it manually one by one.
Please answer this asap.
/r/flask
https://redd.it/lgvcyl
Is there any option to automate that process or do I have to create it manually one by one.
Please answer this asap.
/r/flask
https://redd.it/lgvcyl
reddit
How to create flask sqlalchemy models of existing database that...
Is there any option to automate that process or do I have to create it manually one by one. Please answer this asap.