User Authentication with Angular 4 and Flask
https://realpython.com/blog/python/user-authentication-with-angular-4-and-flask#.WaVoDXfW35M.reddit
/r/flask
https://redd.it/6wr4f0
https://realpython.com/blog/python/user-authentication-with-angular-4-and-flask#.WaVoDXfW35M.reddit
/r/flask
https://redd.it/6wr4f0
Realpython
User Authentication With Angular 4 and Flask – Real Python
Here we look at how to handle user authentication using JSON Web Tokens with Angular and Flask.
Learn Python For Data Science And Machine Learning With Jose Portilla
https://medium.com/@amtoddstewart/learn-python-for-data-science-and-machine-learning-with-jose-portilla-1445beddf345
/r/Python
https://redd.it/6wzk2l
https://medium.com/@amtoddstewart/learn-python-for-data-science-and-machine-learning-with-jose-portilla-1445beddf345
/r/Python
https://redd.it/6wzk2l
Medium
Learn Python For Data Science And Machine Learning With Jose Portilla
You will learn to use NumPy, Pandas, Seaborn, Matplotlib, Plotly, Scikit-Learn, Machine Learning, Tensorflow, and much more
Pynesis, a basic high level AWS Kinesis client for Python
https://github.com/ticketea/pynesis
/r/Python
https://redd.it/6wyl3q
https://github.com/ticketea/pynesis
/r/Python
https://redd.it/6wyl3q
GitHub
ticketea/pynesis
High level python library for using kinesis streams - ticketea/pynesis
Django Migration Don’ts – edX Engineering
https://engineering.edx.org/django-migration-donts-f4588fd11b64
/r/django
https://redd.it/6wyitx
https://engineering.edx.org/django-migration-donts-f4588fd11b64
/r/django
https://redd.it/6wyitx
reddit
Django Migration Don’ts – edX Engineering • r/django
15 points and 10 comments so far on reddit
Python 2.7.14rc1 released
https://mail.python.org/pipermail/python-dev/2017-August/148992.html
/r/Python
https://redd.it/6x1sfm
https://mail.python.org/pipermail/python-dev/2017-August/148992.html
/r/Python
https://redd.it/6x1sfm
[P] Deepmind's StarCraft II RL Tutorial 1
http://chris-chris.ai/2017/08/30/pysc2-tutorial1/
/r/MachineLearning
https://redd.it/6x5284
http://chris-chris.ai/2017/08/30/pysc2-tutorial1/
/r/MachineLearning
https://redd.it/6x5284
reddit
[P] Deepmind's StarCraft II RL Tutorial 1 • r/MachineLearning
25 points and 3 comments so far on reddit
How dos createview trigger saving the model?
Digging through parts of the django 1.6 code (dont ask...) i was not able to find out how the basic CreateView issues saving the model, as is stated in its documentation (https://docs.djangoproject.com/en/1.11/ref/class-based-views/generic-editing/#django.views.generic.edit.CreateView)
Possibly (and hopefully) related things ive found out:
* CreateView's super classes dont handle saving in any way
* BaseModelForm seems to be the only part where the model instance of a form is pulled and actually saved
* BaseInlineFormSet has a save method, that actually calls save on a form, but i was not able to find out how that is related to actual forms, since most forms just inherit from Form, and not BaseModelForm...
Can someone please explain to me how all this works together?
/r/djangolearning
https://redd.it/6x363z
Digging through parts of the django 1.6 code (dont ask...) i was not able to find out how the basic CreateView issues saving the model, as is stated in its documentation (https://docs.djangoproject.com/en/1.11/ref/class-based-views/generic-editing/#django.views.generic.edit.CreateView)
Possibly (and hopefully) related things ive found out:
* CreateView's super classes dont handle saving in any way
* BaseModelForm seems to be the only part where the model instance of a form is pulled and actually saved
* BaseInlineFormSet has a save method, that actually calls save on a form, but i was not able to find out how that is related to actual forms, since most forms just inherit from Form, and not BaseModelForm...
Can someone please explain to me how all this works together?
/r/djangolearning
https://redd.it/6x363z
reddit
How dos createview trigger saving the model? • r/djangolearning
Digging through parts of the django 1.6 code (dont ask...) i was not able to find out how the basic CreateView issues saving the model, as is...
Tags for post
I was thinking if we can create tags for all the awesome resources that are shared on this sub?
For example we could have a tag for e books, online free courses, sample projects. Would be more than happy to contribute.
/r/Python
https://redd.it/6x5nol
I was thinking if we can create tags for all the awesome resources that are shared on this sub?
For example we could have a tag for e books, online free courses, sample projects. Would be more than happy to contribute.
/r/Python
https://redd.it/6x5nol
reddit
Tags for post • r/Python
I was thinking if we can create tags for all the awesome resources that are shared on this sub? For example we could have a tag for e books,...
What are the biggest drawbacks/cons of Python? And why choosing Python over JavaScript?
I want to be a Pentester (and It is my focus) and I like making the Front end side of websites and videogames. With JavaScript I can be a Frontend Developer and making games even for mobile thanks to React Native,Cordova and Ionic and inject Javascript on websites and many other things.
Actually I am interested on knowing more on Python and use It as a main language, but everyone say Python is only a "glue" language,It isn't easily scalable and maintainable than languages like Java and it isn't very suitable for concurrency and other things because it is slow.
On the other hand, I heard people very enthusiastic about Python and this language can do everything,but it is true?
Is Python more than a replacement of Bash?
Thank you!
/r/Python
https://redd.it/6x6oji
I want to be a Pentester (and It is my focus) and I like making the Front end side of websites and videogames. With JavaScript I can be a Frontend Developer and making games even for mobile thanks to React Native,Cordova and Ionic and inject Javascript on websites and many other things.
Actually I am interested on knowing more on Python and use It as a main language, but everyone say Python is only a "glue" language,It isn't easily scalable and maintainable than languages like Java and it isn't very suitable for concurrency and other things because it is slow.
On the other hand, I heard people very enthusiastic about Python and this language can do everything,but it is true?
Is Python more than a replacement of Bash?
Thank you!
/r/Python
https://redd.it/6x6oji
reddit
What are the biggest drawbacks/cons of Python? And why... • r/Python
I want to be a Pentester (and It is my focus) and I like making the Front end side of websites and videogames. With JavaScript I can be a Frontend...
silly question about sessions
I'm using sessions in a current django project and recently got a 'Object of type 'date' is not JSON serializable' error.
Reading through the django docs on sessions I'm not clear why sessions use a serializer?
(I'm using the db to store the session)
From my understanding isn't just the session ID going to the browser in a cookie and the session data is stored in the db? The data in the session can be accessed via the ORM like a normal model. However when I look at the database table there is just one field, session_data (apart from expiry date and session id). Looking at the docs seems to be signed (but not encrypted? - not sure of the difference). So I'm not clear where the serializer is being used?
Additionally I was using django wizard before which stores intermediate data (such as the field causing the date issue above) in the session. I've now switched that part of the app to use seperate views for flexibility (signup wasn't just a linear path), but now have the 'not JSON serializable' error, how does django wizard get round this?
/r/djangolearning
https://redd.it/6x70xe
I'm using sessions in a current django project and recently got a 'Object of type 'date' is not JSON serializable' error.
Reading through the django docs on sessions I'm not clear why sessions use a serializer?
(I'm using the db to store the session)
From my understanding isn't just the session ID going to the browser in a cookie and the session data is stored in the db? The data in the session can be accessed via the ORM like a normal model. However when I look at the database table there is just one field, session_data (apart from expiry date and session id). Looking at the docs seems to be signed (but not encrypted? - not sure of the difference). So I'm not clear where the serializer is being used?
Additionally I was using django wizard before which stores intermediate data (such as the field causing the date issue above) in the session. I've now switched that part of the app to use seperate views for flexibility (signup wasn't just a linear path), but now have the 'not JSON serializable' error, how does django wizard get round this?
/r/djangolearning
https://redd.it/6x70xe
reddit
silly question about sessions • r/djangolearning
I'm using sessions in a current django project and recently got a 'Object of type 'date' is not JSON serializable' error. Reading through the...
Search form with ManyToManyFields
I am creating a basic CRUD application using Django for the first time. I would love to have some guidance and direction regarding how to add a search form.
I need to create a search form for a `ServiceProvider` model. The search form has three text boxes to search for service providers by any or all of `location`, `memberships` and `expertise`. The latter two search fields are of `ManyToManyField` type.
These are the model definitions I have:
class ServiceProvider(models.Model):
provider_name = models.CharField(max_length=200)
created_date = models.DateTimeField(default=timezone.now)
# SEARCH FIELDS ->
location = models.CharField(max_length=100)
memberships = models.ManyToManyField(Memberships)
expertise = models.ManyToManyField(SkillAreas)
class Memberships(models.Model):
membership_name = models.CharField(max_length=200)
membership_description = models.TextField(blank=True, null=True)
class SkillAreas(models.Model):
skill_name = models.CharField(max_length=200)
skill_description = models.TextField(blank=True, null=True)
Though `memberships` is a multi select field in the backend, in the search field, user can only type one skill at the moment. Same goes for `expertise` field. How should I go about adding a search form for this `ServiceProvider`?
I found a solution for search for multiple fields in a stackoverflow [answer](https://stackoverflow.com/a/26640293): [Adding search to a Django site in a snap](https://www.julienphalip.com/blog/adding-search-to-a-django-site-in-a-snap/). In this solution, I didn't quite understand what Q is. Does this solution fit my need at all?
I also learned that there is something called `django-haystack`, but it feels a bit complex than the above solution and also I am not sure if it fits my need. Thanks in advance.
/r/djangolearning
https://redd.it/6wae1j
I am creating a basic CRUD application using Django for the first time. I would love to have some guidance and direction regarding how to add a search form.
I need to create a search form for a `ServiceProvider` model. The search form has three text boxes to search for service providers by any or all of `location`, `memberships` and `expertise`. The latter two search fields are of `ManyToManyField` type.
These are the model definitions I have:
class ServiceProvider(models.Model):
provider_name = models.CharField(max_length=200)
created_date = models.DateTimeField(default=timezone.now)
# SEARCH FIELDS ->
location = models.CharField(max_length=100)
memberships = models.ManyToManyField(Memberships)
expertise = models.ManyToManyField(SkillAreas)
class Memberships(models.Model):
membership_name = models.CharField(max_length=200)
membership_description = models.TextField(blank=True, null=True)
class SkillAreas(models.Model):
skill_name = models.CharField(max_length=200)
skill_description = models.TextField(blank=True, null=True)
Though `memberships` is a multi select field in the backend, in the search field, user can only type one skill at the moment. Same goes for `expertise` field. How should I go about adding a search form for this `ServiceProvider`?
I found a solution for search for multiple fields in a stackoverflow [answer](https://stackoverflow.com/a/26640293): [Adding search to a Django site in a snap](https://www.julienphalip.com/blog/adding-search-to-a-django-site-in-a-snap/). In this solution, I didn't quite understand what Q is. Does this solution fit my need at all?
I also learned that there is something called `django-haystack`, but it feels a bit complex than the above solution and also I am not sure if it fits my need. Thanks in advance.
/r/djangolearning
https://redd.it/6wae1j
Stackoverflow
How can I make Django search in multiple fields using QuerySets and MySql "Full Text Search"?
I'm a Django novice, trying to create a "Search" form for my project using MySql with MyISAM engine. So far, I manage to get the form to work, but Django doesn't seem to search all fields the same ...
wtf-python : A collection of interesting and tricky Python examples which may bite you off!
https://github.com/satwikkansal/wtfPython
/r/Python
https://redd.it/6x6upn
https://github.com/satwikkansal/wtfPython
/r/Python
https://redd.it/6x6upn
GitHub
GitHub - satwikkansal/wtfpython: What the f*ck Python? 😱
What the f*ck Python? 😱. Contribute to satwikkansal/wtfpython development by creating an account on GitHub.
Python Overtakes R for Data Science and Machine Learning
http://www.datasciencecentral.com/profiles/blogs/python-overtakes-r-for-data-science-and-machine-learning
/r/Python
https://redd.it/6x8uth
http://www.datasciencecentral.com/profiles/blogs/python-overtakes-r-for-data-science-and-machine-learning
/r/Python
https://redd.it/6x8uth
Datasciencecentral
Python Overtakes R for Data Science and Machine Learning
This article summarizes a trend in programming languages usage, based on a number of proxy metrics. This change started to be more pronounced in early 2017: Py…
Introductory FPGA design using Python, Jupyter and FOSS tools
http://www.xess.com/static/media/pages/pygmyhdl/examples/1_blinker/fastest_easiest_FPGA_blinker_ever.html
/r/Python
https://redd.it/6x70rm
http://www.xess.com/static/media/pages/pygmyhdl/examples/1_blinker/fastest_easiest_FPGA_blinker_ever.html
/r/Python
https://redd.it/6x70rm
reddit
Introductory FPGA design using Python, Jupyter and FOSS... • r/Python
33 points and 0 comments so far on reddit
How do you query a table in an existing database?
I am trying to write an app that connects to an existing database and I keep running into errors and I am not sure what I am doing wrong.
Here is my SO question,
https://stackoverflow.com/questions/45990681/flask-sqlalchemy-connecting-to-an-existing-database
/r/flask
https://redd.it/6xb3a5
I am trying to write an app that connects to an existing database and I keep running into errors and I am not sure what I am doing wrong.
Here is my SO question,
https://stackoverflow.com/questions/45990681/flask-sqlalchemy-connecting-to-an-existing-database
/r/flask
https://redd.it/6xb3a5
Stack Overflow
Flask-sqlalchemy connecting to an existing database
I am trying to connect to an existing database and I am unsure where to put db.Model.metadata.reflect(db.engine) as shown in the following question.
My flask app that is structured like:
I am no...
My flask app that is structured like:
I am no...
Conda can only be run in super
Hey everybody, just started to pick up Python and Django, and the class I'm following tells me to use conda to set up my venv. After a while of not getting anaconda to run, I fixed my .bash_profile so it can run, but when I run ``` $ conda``` it gives me the following error:
PermissionError: [Errno 13] Permission denied: '/Users/teddykoomen/anaconda3/lib/python3.6/site-packages/numba-0.33.0-py3.6-macosx-10.7-x86_64.egg-info/PKG-INFO'
When I run conda using ```$ sudo conda``` it does not give me the same error. I don't want to have to run conda as super every time. Any ideas? I've looked over stackoverflow and the anaconda docs and I couldn't find anything helpful. Thank you!
/r/Python
https://redd.it/6xci8y
Hey everybody, just started to pick up Python and Django, and the class I'm following tells me to use conda to set up my venv. After a while of not getting anaconda to run, I fixed my .bash_profile so it can run, but when I run ``` $ conda``` it gives me the following error:
PermissionError: [Errno 13] Permission denied: '/Users/teddykoomen/anaconda3/lib/python3.6/site-packages/numba-0.33.0-py3.6-macosx-10.7-x86_64.egg-info/PKG-INFO'
When I run conda using ```$ sudo conda``` it does not give me the same error. I don't want to have to run conda as super every time. Any ideas? I've looked over stackoverflow and the anaconda docs and I couldn't find anything helpful. Thank you!
/r/Python
https://redd.it/6xci8y
reddit
Conda can only be run in super • r/Python
Hey everybody, just started to pick up Python and Django, and the class I'm following tells me to use conda to set up my venv. After a while of...
Python Regular Expressions -part #13 - Word Boundaries
https://www.youtube.com/watch?v=WbtFUuFE9hg&feature=share
/r/Python
https://redd.it/6xbhhe
https://www.youtube.com/watch?v=WbtFUuFE9hg&feature=share
/r/Python
https://redd.it/6xbhhe
YouTube
Python Regular Expressions -part #13 - Word Boundaries
In this video series, we will be tackling Python Regular Expressions. This video goes over: 1) the concept of boundaries \b Don't forget to comment on what y...
[R] Transformer: A Novel Neural Network Architecture for Language Understanding
https://research.googleblog.com/2017/08/transformer-novel-neural-network.html
/r/MachineLearning
https://redd.it/6xao51
https://research.googleblog.com/2017/08/transformer-novel-neural-network.html
/r/MachineLearning
https://redd.it/6xao51
research.google
Transformer: A Novel Neural Network Architecture for Language Understanding
Posted by Jakob Uszkoreit, Software Engineer, Natural Language Understanding Neural networks, in particular recurrent neural networks (RNNs), are n...
Pycharm and Flask
Hi everyone! I wanted to learn flask for quite a time and decide now to dive into it. I’ve written some simple and small apps with VS Code and the terminal. Now I want to grew for the next step: Databases
I find it quite hard to get a grasp on it(where exactly to start, what do I have write for code, how do I set up a database etc.) but I noticed pyCharm has a flask and database integration.
So I opend my flask project in pyCharm and try run it (which of course not work because of the flask run command (I guess)).
Is there a way to get the project work with flask without setting a complete new flask project?
I use a virtualenv with flask and all modules installed. Also tried to google for an solution but everything is just about setting up a new project. ;(
Thanks for your help!
Edit: Thank you for the answers! The main error was a missing:
if __name__ == '__main__':
app.run()
/r/flask
https://redd.it/6x6vdy
Hi everyone! I wanted to learn flask for quite a time and decide now to dive into it. I’ve written some simple and small apps with VS Code and the terminal. Now I want to grew for the next step: Databases
I find it quite hard to get a grasp on it(where exactly to start, what do I have write for code, how do I set up a database etc.) but I noticed pyCharm has a flask and database integration.
So I opend my flask project in pyCharm and try run it (which of course not work because of the flask run command (I guess)).
Is there a way to get the project work with flask without setting a complete new flask project?
I use a virtualenv with flask and all modules installed. Also tried to google for an solution but everything is just about setting up a new project. ;(
Thanks for your help!
Edit: Thank you for the answers! The main error was a missing:
if __name__ == '__main__':
app.run()
/r/flask
https://redd.it/6x6vdy
reddit
Pycharm and Flask • r/flask
Hi everyone! I wanted to learn flask for quite a time and decide now to dive into it. I’ve written some simple and small apps with VS Code and...