Python Tutorial for Machine Learning
https://github.com/gautam1858/python-awesome
/r/Python
https://redd.it/azkpn1
https://github.com/gautam1858/python-awesome
/r/Python
https://redd.it/azkpn1
GitHub
GitHub - gautam1858/python-awesome: Learn Python, Easy to learn, Awesome
Learn Python, Easy to learn, Awesome. Contribute to gautam1858/python-awesome development by creating an account on GitHub.
building flask-sqlalchemy model from preexisting table
is there a way to use existing columns from a pandas dataframe to "automatically" generate a model/table? im trying to store output that consists of thousands of columns (flattened chroma feature data). i assume theres a way to declare characteristics other than manually, but im new to this - perhaps going about this the wrong way. thanks for any help!
/r/flask
https://redd.it/aziwf1
is there a way to use existing columns from a pandas dataframe to "automatically" generate a model/table? im trying to store output that consists of thousands of columns (flattened chroma feature data). i assume theres a way to declare characteristics other than manually, but im new to this - perhaps going about this the wrong way. thanks for any help!
/r/flask
https://redd.it/aziwf1
reddit
r/flask - building flask-sqlalchemy model from preexisting table
2 votes and 2 comments so far on Reddit
Can I use OneToOneField to break up a large modal into smaller related categories?
Say for example a Book class. It has your usual name author year publisher pages isbn fields. But then it also has fields like cover_image author_image publisher_logo etc that you could regroup in a related model BookImages. And it has stuff like critics_review awards accolades back_cover_quotes review_score etc that you could categorize under a model BookReview.
And likewise for any other fields that you could group under a model that would be related to the main Book Model with a OneToOneField.
Is this a valid use case? Or is it fine to just have like 40 attributes for a model.
/r/django
https://redd.it/azjb69
Say for example a Book class. It has your usual name author year publisher pages isbn fields. But then it also has fields like cover_image author_image publisher_logo etc that you could regroup in a related model BookImages. And it has stuff like critics_review awards accolades back_cover_quotes review_score etc that you could categorize under a model BookReview.
And likewise for any other fields that you could group under a model that would be related to the main Book Model with a OneToOneField.
Is this a valid use case? Or is it fine to just have like 40 attributes for a model.
/r/django
https://redd.it/azjb69
reddit
r/django - Can I use OneToOneField to break up a large modal into smaller related categories?
4 votes and 9 comments so far on Reddit
Master & Minions or the Dream of Python Automation
https://www.youtube.com/watch?v=rsSnWuBEro8&t=1s
/r/Python
https://redd.it/azo0ta
https://www.youtube.com/watch?v=rsSnWuBEro8&t=1s
/r/Python
https://redd.it/azo0ta
YouTube
Master & Minions or the Dream of Python Automation
In this day and age, using hand-crafted servers is quickly becoming a losing proposition. Debugging a Python application that runs on custom made servers get...
An interview with the creator of the popular PyTorch deep learning framework
https://www.pythonpodcast.com/pytorch-deep-learning-epsiode-202/
/r/Python
https://redd.it/azl0i7
https://www.pythonpodcast.com/pytorch-deep-learning-epsiode-202/
/r/Python
https://redd.it/azl0i7
The Python Podcast.__init__
The Python Podcast.__init__: The Past, Present, and Future of Deep Learning In PyTorch
An interview with the creator of the popular PyTorch deep learning framework
Django with Tornado does a good work like node.js, for real-time chats?
I was looking at a book for startups, just out of curiosity, at one point, the author says that the node is preferable to things like chat online, being an asynchronous back end and everything. But I also saw in other Django books, the authors mention Django Channels and Tornado for chats, but I have not yet seen how to integrate.
​
In terms of performance and scalability, is there any difference between a back-end chat made with node / express and one done with Django and Tornado?
/r/djangolearning
https://redd.it/azhydl
I was looking at a book for startups, just out of curiosity, at one point, the author says that the node is preferable to things like chat online, being an asynchronous back end and everything. But I also saw in other Django books, the authors mention Django Channels and Tornado for chats, but I have not yet seen how to integrate.
​
In terms of performance and scalability, is there any difference between a back-end chat made with node / express and one done with Django and Tornado?
/r/djangolearning
https://redd.it/azhydl
reddit
r/djangolearning - Django with Tornado does a good work like node.js, for real-time chats?
2 votes and 1 comment so far on Reddit
How to add an object and display at the same instant without hard refresh?
I want, for example, to add a post, but the same page that it adds, is the same one that displays all others.
How do I submit a post and display it in my html at the same time? should I use DOM for this? I already did this with DOM and LocalStorage, but in the case of django; I need to submit a form, and depending on the response, add it to the database and display in the browser at the same time.
I already researched ajax but I did not quite understand.
/r/djangolearning
https://redd.it/azctri
I want, for example, to add a post, but the same page that it adds, is the same one that displays all others.
How do I submit a post and display it in my html at the same time? should I use DOM for this? I already did this with DOM and LocalStorage, but in the case of django; I need to submit a form, and depending on the response, add it to the database and display in the browser at the same time.
I already researched ajax but I did not quite understand.
/r/djangolearning
https://redd.it/azctri
reddit
r/djangolearning - How to add an object and display at the same instant without hard refresh?
4 votes and 1 comment so far on Reddit
Django project structure question
I recently started developing django apps and I'm wondering the best project structure.
More specifically, do you put a data access layer in your django projects that contain all of your migrations? is that the best practice?
Anyway, what are some good design practices for a django project with multiple apps?
/r/django
https://redd.it/azp7i3
I recently started developing django apps and I'm wondering the best project structure.
More specifically, do you put a data access layer in your django projects that contain all of your migrations? is that the best practice?
Anyway, what are some good design practices for a django project with multiple apps?
/r/django
https://redd.it/azp7i3
reddit
r/django - Django project structure question
2 votes and 8 comments so far on Reddit
I wrote a Python game engine that runs on WebAssembly
https://pickitup247.com/pyckitup.html
/r/Python
https://redd.it/azqrvy
https://pickitup247.com/pyckitup.html
/r/Python
https://redd.it/azqrvy
reddit
r/Python - I wrote a Python game engine that runs on WebAssembly
27 votes and 4 comments so far on Reddit
Jupyter notebook XSSI security fix
https://blog.jupyter.org/jupyter-notebook-xssi-security-fix-546cd95babb0
/r/IPython
https://redd.it/azgdce
https://blog.jupyter.org/jupyter-notebook-xssi-security-fix-546cd95babb0
/r/IPython
https://redd.it/azgdce
Jupyter Blog
Jupyter notebook XSSI security fix
We have just released Jupyter notebook 5.7.6 with a security fix for a cross-site inclusion (XSSI) vulnerability, where content from a…
Multiple Image/File Upload with Django, Ionic 4 and FormData
https://www.techiediaries.com/ionic-formdata-multiple-file-upload-tutorial/
/r/django
https://redd.it/azsdeh
https://www.techiediaries.com/ionic-formdata-multiple-file-upload-tutorial/
/r/django
https://redd.it/azsdeh
Techiediaries
Multiple Image Upload with Ionic 6 and FormData | Techiediaries
In this tutorial, you'll learn to implement multiple file upload with Ionic 6, django 3 and FormData
Behavior-Driven Development with Django and Aloe - updated!
https://testdriven.io/blog/behavior-driven-development-with-django-and-aloe/#.XIZgCJtRHiw.reddit
/r/django
https://redd.it/aztcz1
https://testdriven.io/blog/behavior-driven-development-with-django-and-aloe/#.XIZgCJtRHiw.reddit
/r/django
https://redd.it/aztcz1
testdriven.io
Behavior-Driven Development with Django and Aloe
This article details the Behavior-Driven Development (BDD) cycle with Django and Aloe.
RelatedObjectDoesNotExist: User has no "usertype"
I am having issues with Django defining a custom user, which in this case is "cust" (short for customer) in Django 2.1. I have several other user types which contain separate registration forms to register them as a specific user type. I have built this from the tutorial *"How to Implement Multiple User Types with Django"* by Vitor Freitas, which eliminates Django's default user management system. My goal is to have a protected view (customer hub) which only customers can enter, and so on for other user types.
​
My traceback error, respectively, is:
**RelatedObjectDoesNotExist at /companyusers/cust/**
**User has no cust.**
/r/django
https://redd.it/azu965
I am having issues with Django defining a custom user, which in this case is "cust" (short for customer) in Django 2.1. I have several other user types which contain separate registration forms to register them as a specific user type. I have built this from the tutorial *"How to Implement Multiple User Types with Django"* by Vitor Freitas, which eliminates Django's default user management system. My goal is to have a protected view (customer hub) which only customers can enter, and so on for other user types.
​
My traceback error, respectively, is:
**RelatedObjectDoesNotExist at /companyusers/cust/**
**User has no cust.**
/r/django
https://redd.it/azu965
reddit
r/django - RelatedObjectDoesNotExist: User has no "usertype"
0 votes and 1 comment so far on Reddit
[N] OpenAI LP
"We’ve created OpenAI LP, a new “capped-profit” company that allows us to rapidly increase our investments in compute and talent while including checks and balances to actualize our mission."
Sneaky.
https://openai.com/blog/openai-lp/
/r/MachineLearning
https://redd.it/azvbmn
"We’ve created OpenAI LP, a new “capped-profit” company that allows us to rapidly increase our investments in compute and talent while including checks and balances to actualize our mission."
Sneaky.
https://openai.com/blog/openai-lp/
/r/MachineLearning
https://redd.it/azvbmn
Openai
OpenAI LP
We’ve created OpenAI LP, a new “capped-profit” company that allows us to rapidly increase our investments in compute and talent while including checks and balances to actualize our mission.
Detect "real" vs. "fake/spoofed" faces with Python and OpenCV.
https://www.pyimagesearch.com/2019/03/11/liveness-detection-with-opencv/
/r/Python
https://redd.it/azu4ry
https://www.pyimagesearch.com/2019/03/11/liveness-detection-with-opencv/
/r/Python
https://redd.it/azu4ry
PyImageSearch
Liveness Detection with OpenCV - PyImageSearch
Learn how to detect liveness with OpenCV, Deep Learning, and Keras. You'll learn how to detect fake faces and perform anti-face spoofing in face recognition systems with OpenCV.
Question about front-end/back-end interaction: when user clicks on data X, how can I memorize X to re-use in another part of my template?
Hi guys,
I'm sure what I need help with is something very simple to most of you, but I'm relatively new to back-end programming and can't really figure this out.
So I'm building an app that collects information about academic publications. I'm using Django for the back-end and jQuery for the front end.
In my models, among other things, I have a Publication class that has a M2M relationship with an Author class. Each publication includes citations from other publications, therefore the Publication class has another M2M relationship, this time a *recursive* one, that goes through a CitationMetadata class. It looks like this:
class Publication(models.Model):
author = models.ManyToManyField('Author', through='PublicationAuthor', related_name='publications')
title = models.CharField(max_length=200)
year = models.IntegerField()
abstract = models.TextField()
citation = models.ManyToManyField('self', through='CitationMetadata', through_fields=('citer_pub', 'cited_pub'), symmetrical=False, related_name='citations')
class Author(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
class PublicationAuthor(models.Model):
author = models.ForeignKey('Author', related_name='publication_authors', on_delete=models.CASCADE)
publication = models.ForeignKey('Publication', related_name='publication_authors', on_delete=models.CASCADE)
author_rank = models.IntegerField()
/r/django
https://redd.it/azwwxn
Hi guys,
I'm sure what I need help with is something very simple to most of you, but I'm relatively new to back-end programming and can't really figure this out.
So I'm building an app that collects information about academic publications. I'm using Django for the back-end and jQuery for the front end.
In my models, among other things, I have a Publication class that has a M2M relationship with an Author class. Each publication includes citations from other publications, therefore the Publication class has another M2M relationship, this time a *recursive* one, that goes through a CitationMetadata class. It looks like this:
class Publication(models.Model):
author = models.ManyToManyField('Author', through='PublicationAuthor', related_name='publications')
title = models.CharField(max_length=200)
year = models.IntegerField()
abstract = models.TextField()
citation = models.ManyToManyField('self', through='CitationMetadata', through_fields=('citer_pub', 'cited_pub'), symmetrical=False, related_name='citations')
class Author(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
class PublicationAuthor(models.Model):
author = models.ForeignKey('Author', related_name='publication_authors', on_delete=models.CASCADE)
publication = models.ForeignKey('Publication', related_name='publication_authors', on_delete=models.CASCADE)
author_rank = models.IntegerField()
/r/django
https://redd.it/azwwxn
reddit
r/django - Question about front-end/back-end interaction: when user clicks on data X, how can I memorize X to re-use in another…
4 votes and 10 comments so far on Reddit
Has anyone used Django + NodeJS together?
I have a long history of using django for everything. It's fantastic for so many things. But it utterly falls down once you get into responsiveness and websockets. Sorry channels, I've used you, but you just don't compare to NodeJS.
​
I am curious if anyone has attempted to use django over a DB for the things its good at, while also using Node over the same DB for the things its good at?
​
Which makes me think that the biggest problem is; has anyone had success auth'ing/passing tokens/something with node against django's auth system?
/r/django
https://redd.it/azzltx
I have a long history of using django for everything. It's fantastic for so many things. But it utterly falls down once you get into responsiveness and websockets. Sorry channels, I've used you, but you just don't compare to NodeJS.
​
I am curious if anyone has attempted to use django over a DB for the things its good at, while also using Node over the same DB for the things its good at?
​
Which makes me think that the biggest problem is; has anyone had success auth'ing/passing tokens/something with node against django's auth system?
/r/django
https://redd.it/azzltx
reddit
r/django - Has anyone used Django + NodeJS together?
5 votes and 4 comments so far on Reddit
Learning Django Repository
I have started a repository for anybody interested in learning Django. It will be an open source project where you can just fork the repository and make changes. The goal is to make a clone of Reddit, simply for learning purposes, and you can make any changes you want, then initiate a pull request.
[https://github.com/codexplore-io/django-learning-reddit-clone](https://github.com/codexplore-io/django-learning-reddit-clone)
/r/django
https://redd.it/azzla6
I have started a repository for anybody interested in learning Django. It will be an open source project where you can just fork the repository and make changes. The goal is to make a clone of Reddit, simply for learning purposes, and you can make any changes you want, then initiate a pull request.
[https://github.com/codexplore-io/django-learning-reddit-clone](https://github.com/codexplore-io/django-learning-reddit-clone)
/r/django
https://redd.it/azzla6
GitHub
codexplore-io/django-learning-reddit-clone
Contribute to codexplore-io/django-learning-reddit-clone development by creating an account on GitHub.
Help trying to understand nested serializers
I've started to mess around with Django Rest Framework, and its amazing. However, I'm overwhelmed at the same time as to how many options there are (generics, viewsets, different ways to handle nested relationships, etc.) I thought of a good exercise for my self, but am not sure the best way to set up the views and serializers (use generics, viewsets, or customizing?)
I have three models, Trainer, Team, and Pokemon.
Trainer can have many teams, so one to many, and I suppose team and pokemon could be many to many, but for the sake of simplicity, let's go with one to many as well.
I've read the documentation, so I'm not asking for a handout, but just advice on how more seasoned developers would set this up for crud operations (not sure how to save nested relations) and how best to retrieve them (say I want to show a trainers info, all their teams, and if desired, all pokemon in any given team.)
I know this is a lot too ask but I am just overwhelmed by the documentation. Thanks in advance!
/r/django
https://redd.it/b02x3a
I've started to mess around with Django Rest Framework, and its amazing. However, I'm overwhelmed at the same time as to how many options there are (generics, viewsets, different ways to handle nested relationships, etc.) I thought of a good exercise for my self, but am not sure the best way to set up the views and serializers (use generics, viewsets, or customizing?)
I have three models, Trainer, Team, and Pokemon.
Trainer can have many teams, so one to many, and I suppose team and pokemon could be many to many, but for the sake of simplicity, let's go with one to many as well.
I've read the documentation, so I'm not asking for a handout, but just advice on how more seasoned developers would set this up for crud operations (not sure how to save nested relations) and how best to retrieve them (say I want to show a trainers info, all their teams, and if desired, all pokemon in any given team.)
I know this is a lot too ask but I am just overwhelmed by the documentation. Thanks in advance!
/r/django
https://redd.it/b02x3a
reddit
r/django - Help trying to understand nested serializers
0 votes and 0 comments so far on Reddit
Using Python in Weather Forecasting
https://www.youtube.com/watch?v=PNeZOOBV_UQ
/r/Python
https://redd.it/b01if7
https://www.youtube.com/watch?v=PNeZOOBV_UQ
/r/Python
https://redd.it/b01if7
YouTube
Using Python in Weather Forecasting
Social Network for Developers: https://morioh.com/p/b56ae6b04ffc
Developer's Store: https://www.moteefe.com/store/developer?cp=WP6JDT
Learn Startup: https://learnstartup.net
PyData is an educational program of NumFOCUS, a 501(c)3 non-profit organization…
Developer's Store: https://www.moteefe.com/store/developer?cp=WP6JDT
Learn Startup: https://learnstartup.net
PyData is an educational program of NumFOCUS, a 501(c)3 non-profit organization…