People with experience in Django: is it possible to make a web application with a server push feature?
It should be like this:
I have a Raspberry Pi, an Arduino nano connected to the raspberry and other Arduino nano that will communicate with the "central" one.
My central Arduino, the one connected to the raspberry, will receive messages from others and pass them forward to the serial port. My app needs to read this info and do something about it. It can just be ignored, stored, do something on the Arduino end or it can trigger a event in the app. This event should be like a window that pop in front of the web page telling what happened.
I'm aware of the existence of the channels library and the celery one, too. Although I'm not anywhere near sure if it can be pulled together.
So... Can it be done with django?
/r/django
https://redd.it/b8nm6b
It should be like this:
I have a Raspberry Pi, an Arduino nano connected to the raspberry and other Arduino nano that will communicate with the "central" one.
My central Arduino, the one connected to the raspberry, will receive messages from others and pass them forward to the serial port. My app needs to read this info and do something about it. It can just be ignored, stored, do something on the Arduino end or it can trigger a event in the app. This event should be like a window that pop in front of the web page telling what happened.
I'm aware of the existence of the channels library and the celery one, too. Although I'm not anywhere near sure if it can be pulled together.
So... Can it be done with django?
/r/django
https://redd.it/b8nm6b
reddit
r/django - People with experience in Django: is it possible to make a web application with a server push feature?
9 votes and 8 comments so far on Reddit
Kellie Ottoboni Receives Award for Post-Election Auditing Notebook
https://blog.jupyter.org/kellie-ottoboni-receives-award-for-post-election-auditing-notebook-96e7277863d1
/r/IPython
https://redd.it/b8nkmn
https://blog.jupyter.org/kellie-ottoboni-receives-award-for-post-election-auditing-notebook-96e7277863d1
/r/IPython
https://redd.it/b8nkmn
Jupyter Blog
Kellie Ottoboni Receives Award for Post-Election Auditing Notebook
On Thursday, March 14th at their annual conference in Washington DC, Kellie Ottoboni received the Innovation Award from the Election…
Simplifying the API for aggregates in a subquery
https://github.com/martsberger/django-sql-utils
/r/django
https://redd.it/b8lro6
https://github.com/martsberger/django-sql-utils
/r/django
https://redd.it/b8lro6
GitHub
GitHub - martsberger/django-sql-utils: SQL utilities for Django
SQL utilities for Django. Contribute to martsberger/django-sql-utils development by creating an account on GitHub.
Integrating with Slack in 3 minutes (Python + Flask)
https://youtu.be/aVl-ixd7gL8
/r/flask
https://redd.it/b8nag7
https://youtu.be/aVl-ixd7gL8
/r/flask
https://redd.it/b8nag7
YouTube
Integrating with Slack in 3 minutes
In this tutorial, I build a Slack messaging system for my web app. I am integrating Slack in a demo web app built using Flask with Python and pushing the dat...
How do I prevent POST request on page refresh?
Hello,
Currently I am working on my webpage that has an "add to cart" feature.
​
Everything add to cart is clicked (post request), my session\['cart'\] is updated to include the new product added (list of items in the cart).
​
But there's a problem.
Lets say you add an item to cart, to session\['cart'\] = \[Banana\], if you then refresh the page the session\['cart'\] will become
session\['cart'\]=\[Banana, Banana\].
​
If you refresh again it'll become session\['cart'\]=\[Banana, Banana, Banana\] etc.
​
Is there a way to prevent a page refresh to send POST requests?
​
Thank you,
/r/flask
https://redd.it/b7ennc
Hello,
Currently I am working on my webpage that has an "add to cart" feature.
​
Everything add to cart is clicked (post request), my session\['cart'\] is updated to include the new product added (list of items in the cart).
​
But there's a problem.
Lets say you add an item to cart, to session\['cart'\] = \[Banana\], if you then refresh the page the session\['cart'\] will become
session\['cart'\]=\[Banana, Banana\].
​
If you refresh again it'll become session\['cart'\]=\[Banana, Banana, Banana\] etc.
​
Is there a way to prevent a page refresh to send POST requests?
​
Thank you,
/r/flask
https://redd.it/b7ennc
reddit
r/flask - How do I prevent POST request on page refresh?
5 votes and 5 comments so far on Reddit
How to create unique field with random content with only letters and case sensitive?
I want create random chars for links, such like imgur urls, for example: "abZXy". How to do it?
/r/djangolearning
https://redd.it/b8twbv
I want create random chars for links, such like imgur urls, for example: "abZXy". How to do it?
/r/djangolearning
https://redd.it/b8twbv
reddit
r/djangolearning - How to create unique field with random content with only letters and case sensitive?
1 vote and 1 comment so far on Reddit
8 Python Modules For Files Handling
https://devarea.com/8-python-modules-for-files-handling/
/r/Python
https://redd.it/b8vqom
https://devarea.com/8-python-modules-for-files-handling/
/r/Python
https://redd.it/b8vqom
This media is not supported in your browser
VIEW IN TELEGRAM
I wrote a Python package to do adaptive sampling of functions in parallel [OC]
/r/Python
https://redd.it/b8xk3a
/r/Python
https://redd.it/b8xk3a
Call for maintainers for Celery's Django integrations
Since we're beginning our efforts to develop Celery 5 all resources are going to be directed to that effort.
Unlike Django, Celery has a very small team which we are looking to expand.
Part of the reason for expansion is because we no longer have the time to maintain the Django integrations properly.
​
If you are interested in maintaining our Django integrations, comment here or message me.
/r/django
https://redd.it/b8yv8z
Since we're beginning our efforts to develop Celery 5 all resources are going to be directed to that effort.
Unlike Django, Celery has a very small team which we are looking to expand.
Part of the reason for expansion is because we no longer have the time to maintain the Django integrations properly.
​
If you are interested in maintaining our Django integrations, comment here or message me.
/r/django
https://redd.it/b8yv8z
reddit
r/django - Call for maintainers for Celery's Django integrations
0 votes and 6 comments so far on Reddit
Best site I've ever found for learning Python as a beginner.
https://edabit.com/challenges/python3
/r/Python
https://redd.it/b8xf9q
https://edabit.com/challenges/python3
/r/Python
https://redd.it/b8xf9q
The best way to prevent a django model choicefield from saving any value not available in choices
I have a choice field for my Post model called privacy\_setting. Currently, in my PostSerializer, where I save the post with the validated data, I am somehow able to save any value in the privacy\_setting field that is not available in the choices section. What is the best approach to prevent this from happening?
> post = Post.objects.create(
text=validated\_data\['text'\],
owner=validated\_data\['owner'\],
privacy\_setting=validated\_data\['get\_privacy\_setting\_display'\])
My Post model field:
> privacy\_setting = models.CharField(
max\_length = 2,
choices = POST\_PRIVACY\_CHOICES,
default = PUBLIC
)
​
/r/django
https://redd.it/b93r4w
I have a choice field for my Post model called privacy\_setting. Currently, in my PostSerializer, where I save the post with the validated data, I am somehow able to save any value in the privacy\_setting field that is not available in the choices section. What is the best approach to prevent this from happening?
> post = Post.objects.create(
text=validated\_data\['text'\],
owner=validated\_data\['owner'\],
privacy\_setting=validated\_data\['get\_privacy\_setting\_display'\])
My Post model field:
> privacy\_setting = models.CharField(
max\_length = 2,
choices = POST\_PRIVACY\_CHOICES,
default = PUBLIC
)
​
/r/django
https://redd.it/b93r4w
reddit
r/django - The best way to prevent a django model choicefield from saving any value not available in choices
0 votes and 0 comments so far on Reddit
Mypy 0.700 Released: Up To 4x Faster
https://mypy-lang.blogspot.com/2019/04/mypy-0700-released-up-to-4x-faster.html
/r/Python
https://redd.it/b934ac
https://mypy-lang.blogspot.com/2019/04/mypy-0700-released-up-to-4x-faster.html
/r/Python
https://redd.it/b934ac
Blogspot
Mypy 0.700 Released: Up To 4x Faster
We’ve just uploaded mypy 0.700 to the Python Package Index ( PyPI ). Mypy is a static type checker for Python. This release switches to a...
A package I want to use contains Linux paths for reading data and configs. Is there a way I can use it on a Windows machine without editing the source code?
This [very interesting ML package](https://github.com/facebookresearch/habitat-api) just came out, and like most such packages (especially in early phases), it seems to be designed primarily for Linux. For example, this code:
`env = habitat.Env(`
`config=habitat.get_config(config_file="tasks\\pointnav.yaml")`
`)`
returns an error since it wants to read another file from a path that uses forward slashes. Is there a way to get python to automatically "translate" files to work with Windows paths? In principle it shouldn't be too hard to tinker with the paths in one package, but since this seems to be systematic to many packages it would be quite handy to have an easier way to do it.
​
Thanks!
/r/Python
https://redd.it/b94s72
This [very interesting ML package](https://github.com/facebookresearch/habitat-api) just came out, and like most such packages (especially in early phases), it seems to be designed primarily for Linux. For example, this code:
`env = habitat.Env(`
`config=habitat.get_config(config_file="tasks\\pointnav.yaml")`
`)`
returns an error since it wants to read another file from a path that uses forward slashes. Is there a way to get python to automatically "translate" files to work with Windows paths? In principle it shouldn't be too hard to tinker with the paths in one package, but since this seems to be systematic to many packages it would be quite handy to have an easier way to do it.
​
Thanks!
/r/Python
https://redd.it/b94s72
GitHub
facebookresearch/habitat-api
A modular high-level library to train embodied AI agents across a variety of tasks, environments, and simulators. - facebookresearch/habitat-api
[Ask Flask] - Utilizing Flask for Obfuscating/Protecting Client/Server Python Application
My team and I are working on a project currently in Python 3 that utilizes a client/server communication model. Both our client and our server are written in Python 3, with the client utilizing the Kivy Framework for a GUI. All of our client/server communication is protected with strong, third-party audited encryption, with any communication between clients being protected by end-to-end encryption. My team and I would like to eventually release this code as an app both on desktop and mobile devices. However, because Python doesn't really make use of anything to protect code, we are hesitant to just throw our client .py file out there to be read (and copied). We are a very small team, and we worry that our idea could be easily snatched up by a company with massively more resources and funding while in it's early stages.
Since .py code can't really be obfuscated well, we were recommended to take a look at Flask for the purpose of using a web server middleman to mask what's happening behind the scenes. If I understand correctly, essentially we would have our GUI client communicate over Flask (I'd assume something like HTTPS?) with
/r/flask
https://redd.it/b91tbb
My team and I are working on a project currently in Python 3 that utilizes a client/server communication model. Both our client and our server are written in Python 3, with the client utilizing the Kivy Framework for a GUI. All of our client/server communication is protected with strong, third-party audited encryption, with any communication between clients being protected by end-to-end encryption. My team and I would like to eventually release this code as an app both on desktop and mobile devices. However, because Python doesn't really make use of anything to protect code, we are hesitant to just throw our client .py file out there to be read (and copied). We are a very small team, and we worry that our idea could be easily snatched up by a company with massively more resources and funding while in it's early stages.
Since .py code can't really be obfuscated well, we were recommended to take a look at Flask for the purpose of using a web server middleman to mask what's happening behind the scenes. If I understand correctly, essentially we would have our GUI client communicate over Flask (I'd assume something like HTTPS?) with
/r/flask
https://redd.it/b91tbb
reddit
r/flask - [Ask Flask] - Utilizing Flask for Obfuscating/Protecting Client/Server Python Application
4 votes and 4 comments so far on Reddit
What Django e-commerce application/package/framework do you recommend?
I am looking for a good application/package/framework to handle payments for websites that I want to build. I like to use frameworks that are very versatile and offer al lot of options, I am not afraid to go through a steep learning curve or something like that to learn to use the framework. What framework do you suggest to use? I am considering django-oscar but I don't really know anything about my options.
/r/django
https://redd.it/b94a3y
I am looking for a good application/package/framework to handle payments for websites that I want to build. I like to use frameworks that are very versatile and offer al lot of options, I am not afraid to go through a steep learning curve or something like that to learn to use the framework. What framework do you suggest to use? I am considering django-oscar but I don't really know anything about my options.
/r/django
https://redd.it/b94a3y
reddit
r/django - What Django e-commerce application/package/framework do you recommend?
2 votes and 3 comments so far on Reddit
Online based Python groups?
Hi guys, I was wondering there were online like meetups or groups?
I live in Georgia and the most activity for python groups is in Atlanta and that’s about 45 minutes from where I am. I can’t find any local groups on Meetup.com. Any advice or other group meetup sites? Thank you.
/r/Python
https://redd.it/b97kce
Hi guys, I was wondering there were online like meetups or groups?
I live in Georgia and the most activity for python groups is in Atlanta and that’s about 45 minutes from where I am. I can’t find any local groups on Meetup.com. Any advice or other group meetup sites? Thank you.
/r/Python
https://redd.it/b97kce
reddit
r/Python - Online based Python groups?
0 votes and 0 comments so far on Reddit
A review of 5 Python Deep Learning Computer Vision Courses (WARNING LONG).
Hi guys,
So I'm working at a startup where as the 'Chief' Data Scientist (re: only person), I was tasked with learning computer vision for a new application we're developing.
My background is in Mathematics, I've used R extensively. I know some Python for a course I completed in College, but I'm not pro. Previously, most of my work involved performing Data Analytics, with some simple modelling.
The company paid for all courses mentioned below and I took roughly 3 months to complete almost all of them (still had most of my full time tasks to do, so I wasn't dedicated 100% to learning Computer Vision).
**The courses purchased and their price below:**
[https://www.udemy.com/computer-vision-a-z/](https://www.udemy.com/computer-vision-a-z/) \- $12.99 (Udemy sale)
[https://www.udemy.com/python-for-computer-vision-with-opencv-and-deep-learning/](https://www.udemy.com/python-for-computer-vision-with-opencv-and-deep-learning/) \- $12.99 (Udemy sale)
[https://www.udemy.com/master-deep-learning-computer-visiontm-cnn-ssd-yolo-gans/](https://www.udemy.com/master-deep-learning-computer-visiontm-cnn-ssd-yolo-gans/) \- $12.99 (Udemy sale)
[https://www.udemy.com/master-computer-vision-with-opencv-in-python/](https://www.udemy.com/master-computer-vision-with-opencv-in-python/) \- $12.99 (Udemy sale)
[https://www.pyimagesearch.com/deep-learning-computer-vision-python-book/](https://www.pyimagesearch.com/deep-learning-computer-vision-python-book/) \- $236 (20% off sale)
​
I'll give a short review of each, with it's pros and cons and summarize scores below in a table.
​
[Deep Learning and Computer Vision A-Z™: OpenCV, SSD & GANs](https://www.udemy.com/computer-vision-a-z/) \- Created by [Hadelin de Ponteves](https://www.udemy.com/computer-vision-a-z/#instructor-1), [Kirill Eremenko](https://www.udemy.com/computer-vision-a-z/#instructor-2), [SuperDataScience Team](https://www.udemy.com/computer-vision-a-z/#instructor-3)
**Review** \- This course was good. However, I have no idea how it got such a high review on Udemy of 4.7/5. The course covers nice details of building a complex
/r/Python
https://redd.it/b97hdk
Hi guys,
So I'm working at a startup where as the 'Chief' Data Scientist (re: only person), I was tasked with learning computer vision for a new application we're developing.
My background is in Mathematics, I've used R extensively. I know some Python for a course I completed in College, but I'm not pro. Previously, most of my work involved performing Data Analytics, with some simple modelling.
The company paid for all courses mentioned below and I took roughly 3 months to complete almost all of them (still had most of my full time tasks to do, so I wasn't dedicated 100% to learning Computer Vision).
**The courses purchased and their price below:**
[https://www.udemy.com/computer-vision-a-z/](https://www.udemy.com/computer-vision-a-z/) \- $12.99 (Udemy sale)
[https://www.udemy.com/python-for-computer-vision-with-opencv-and-deep-learning/](https://www.udemy.com/python-for-computer-vision-with-opencv-and-deep-learning/) \- $12.99 (Udemy sale)
[https://www.udemy.com/master-deep-learning-computer-visiontm-cnn-ssd-yolo-gans/](https://www.udemy.com/master-deep-learning-computer-visiontm-cnn-ssd-yolo-gans/) \- $12.99 (Udemy sale)
[https://www.udemy.com/master-computer-vision-with-opencv-in-python/](https://www.udemy.com/master-computer-vision-with-opencv-in-python/) \- $12.99 (Udemy sale)
[https://www.pyimagesearch.com/deep-learning-computer-vision-python-book/](https://www.pyimagesearch.com/deep-learning-computer-vision-python-book/) \- $236 (20% off sale)
​
I'll give a short review of each, with it's pros and cons and summarize scores below in a table.
​
[Deep Learning and Computer Vision A-Z™: OpenCV, SSD & GANs](https://www.udemy.com/computer-vision-a-z/) \- Created by [Hadelin de Ponteves](https://www.udemy.com/computer-vision-a-z/#instructor-1), [Kirill Eremenko](https://www.udemy.com/computer-vision-a-z/#instructor-2), [SuperDataScience Team](https://www.udemy.com/computer-vision-a-z/#instructor-3)
**Review** \- This course was good. However, I have no idea how it got such a high review on Udemy of 4.7/5. The course covers nice details of building a complex
/r/Python
https://redd.it/b97hdk
Udemy
Deep Learning Computer Vision™ CNN, OpenCV, YOLO, SSD & GANs
2020 Update with TensorFlow 2.0 Support. Become a Pro at Deep Learning Computer Vision! Includes 20+ Real World Projects
If you ever start feeling bad about yourself remember that I converted my Python code to C and it became 30x slower...
/r/Python
https://redd.it/b9701j
/r/Python
https://redd.it/b9701j
Need Help with image uploads
[https://www.reddit.com/r/learnpython/comments/b98hq0/need\_help\_image\_uploads\_with\_django/](https://www.reddit.com/r/learnpython/comments/b98hq0/need_help_image_uploads_with_django/)
/r/django
https://redd.it/b98kya
[https://www.reddit.com/r/learnpython/comments/b98hq0/need\_help\_image\_uploads\_with\_django/](https://www.reddit.com/r/learnpython/comments/b98hq0/need_help_image_uploads_with_django/)
/r/django
https://redd.it/b98kya
reddit
r/learnpython - Need Help: Image uploads with django
2 votes and 0 comments so far on Reddit
Programs that are against Terms of Service
Hello everyone,
I created a Python program with Selenium to automate my user activity on a website. However, in the Terms of Service of the website, it specifically states that automation is prohibited and they don't have a public API. I haven't invested any money in development nor have I spent very much time developing the program so I'm not heavily vested in this project, but it seems to me like just walking away is giving up too easily. I also don't want to get into any trouble, but the program is useful to me and could be useful to others if I decide to sell it in the future.
Has anyone ever been in this situation where a program you created was against a site's Terms of Service and if so, did you still use it or did you just move on to something else? Additionally, is Selenium easily detected by websites if I only run the script a few times a day? Any feedback would be greatly appreciated.
/r/Python
https://redd.it/b988x8
Hello everyone,
I created a Python program with Selenium to automate my user activity on a website. However, in the Terms of Service of the website, it specifically states that automation is prohibited and they don't have a public API. I haven't invested any money in development nor have I spent very much time developing the program so I'm not heavily vested in this project, but it seems to me like just walking away is giving up too easily. I also don't want to get into any trouble, but the program is useful to me and could be useful to others if I decide to sell it in the future.
Has anyone ever been in this situation where a program you created was against a site's Terms of Service and if so, did you still use it or did you just move on to something else? Additionally, is Selenium easily detected by websites if I only run the script a few times a day? Any feedback would be greatly appreciated.
/r/Python
https://redd.it/b988x8
reddit
r/Python - Programs that are against Terms of Service
6 votes and 5 comments so far on Reddit
MicroPython – Python for Microcontrollers
https://www.youtube.com/watch?v=9j2_nr-el-E
/r/Python
https://redd.it/b99ro5
https://www.youtube.com/watch?v=9j2_nr-el-E
/r/Python
https://redd.it/b99ro5
YouTube
MicroPython – Python for Microcontrollers
Complete Python Bootcamp: Go from zero to hero in Python ☞ http://academy.learnstartup.net/p/rkbzrt_Sl?utm_source=1 Learn Python Through Exercises ☞ http://a...