Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
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
A little jab at C in PEP 20 that I just noticed

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
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
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
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
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
Anyone open to Flask "chatting" with me?

I realize maybe this is a bit desperate, but I really don't know how else to approach this. I feel like I've hit a wall when it comes to Flask/Python. I'm a beginner and have maybe been learning for just a few short months when it comes to both Python and Flask. I created a little GUI project using Tkinter I'm very proud of then immediately discovered Flask and have been obsessed ever since. Creating webpages is the coolest thing ever, and Flask lets me do it in a language I love using.

The thing I'm missing is a Yoda. I have struggled through tutorial after tutorial and learned so much, but at a certain point I feel like if you can't openly communicate to ask basic questions, google can only do so much for you. My goal for ever since I picked up Flask has been relatively basic. All I've wanted to create is a Flask website that displays a table, read from SQLite (maybe later converted to MySQL) that then lets an authenticated user (username and password) look at and modify records for computer assets (i.e. machine name, serial, mac). I have literally gone through dozens of tutorials

/r/flask
https://redd.it/lh1c42
D Why did it took 3 years to use transformers in computer vision ?

When reading An image is worth 16\*16 words, its seems like a quite straight-forward adaptation of the transformer architecture : the main thing they changed was breaking the image into 16*16 patches so that it reduces the n² cost of computing self-attention.

I'm thus wondering why did it take 3 years to apply transformers to computer vision ?

/r/MachineLearning
https://redd.it/lh7iwp
D DL Surveyception: a survey of overviews, reviews and surveys in deep learning for computer vision, time-series, GANs, transformers, and others. I went through a total of 29 papers published in the last 4 years, with 15 since last year, and prepared slides summarizing what I learned from them.

https://hackmd.io/@arkel23/deeplearning\_surveyception

This is a densely packed review of reviews in different areas of deep learning including computer vision, time-series, GANs, transformers, not fully-supervised learning schemes, and others. I think it could be great as a starting point for discussion on recent advances in the field, and identifying long and short-term trends in the literature.

It's not for everyone since I use quite a few acronyms and abbreviations, and some of the slides are extremely packed in information. The idea was to include as much content as possible in a small amount of space, kind of like a cheatsheet, a personal one to compress everything I had learned; one small package to which I could always go back to when needing direction.

However, maybe someone, who like me is looking for a topic to delve deeper into, can also use this as a starting point to understand and get a general idea of how different areas of deep learning have been developing in the past years. And maybe, find something among the many topics that interests you, and which you can delve deep into.

/r/MachineLearning
https://redd.it/lh17d5
Restrict access to a url unless user is coming from a certain page

For example the user won't be able to access page 'b' unless they are coming from page 'a' (they can't just paste the link and go to the page)


Edit: I'm using django views to reset password and I don't want the user to be able to access the final page (success page) if he haven't actually changed his password


Any source/documentation/videos would be appreciated

/r/django
https://redd.it/lhe2gy
Thursday Daily Thread: Python careers!

Discussion of using Python in a professional environment, getting jobs in Python and more!

This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.

/r/Python
https://redd.it/lh7r9e
R One-Shot Medical Image Segmentation using Deformable Registration Networks

Hello guys! Check out this article I've just published explaining how deep deformable registration networks can help us perform one-shot medical image segmentation!

Feedback welcome!
https://www.sicara.ai/blog/one-shot-medical-image-segmentation

/r/MachineLearning
https://redd.it/lguvk5
P Japanese genetic algorithm experiment to make a "pornographic" image

I don't have anything to do with this project myself, I've just been following it because I found it interesting and figured I'd share.

This guy made a project where anyone is welcome to look at two images and choose which one they think is more "pornographic" to train the AI. There isn't really a goal, but it started out with the guy saying that the project "wins" when Google Adsense deems the image to be pornographic.

The project "won" today with the 11225th iteration getting Google to limit the Adsense account tied to the project. That being said it's still ongoing.

You can also take a look at all previous iterations of the image here

I wouldn't consider the current version to be NSFW myself as it's still pretty abstract but YMMV (Google certainly seems to think differently at least)

/r/MachineLearning
https://redd.it/lhhe8e
D What do people use machine learning for at home?

Very new to posting anywhere so I'm sorry if questions like these aren't allowed.

I have been wondering this for a long time. I see questions on many machine learning and data science and build a PC subreddits asking about hardware requirements for machine learning projects at home. Some talk about training neural networks and lots of other things. This is coming from someone who is learning about the field and does not know much so please don't be hostile.

Why do people spend so much money to build extremely powerful machines to use at home for machine learning that is not work related? What kind of machine learning do they do? Is it only a hobby? Only learning? Do people make money with these projects? How do they do that? I am a software engineer very interested in hearing what the deal is and trying to learn the ropes on my own. Thanks for taking the time.

/r/MachineLearning
https://redd.it/lhh7mb