Learning flask, but stuck on wtforms
(tldr below)I'm an entry level front-end dev trying to understand what happens with the data after I send it from forms. So I've been learning flask, from Miguel Grinberg's The Flask Mega-Tutorial which is great so far but I've hit a roadblock at chapter 3: web forms.
My problem is:
Pretend I work as a front-end dev for a company. I'll make the HTML or possibly react, and pass the file(s) to the back-end dev. If they use flask, and want the csrf protection and validation from wtforms, they have to re-write all the forms using wtforms.
tl;dr: front-end dev writes page in html(or react), passes files to back-end dev who has to re-write in wtforms. Seems like wasted time.
/r/flask
https://redd.it/aybuv3
(tldr below)I'm an entry level front-end dev trying to understand what happens with the data after I send it from forms. So I've been learning flask, from Miguel Grinberg's The Flask Mega-Tutorial which is great so far but I've hit a roadblock at chapter 3: web forms.
My problem is:
Pretend I work as a front-end dev for a company. I'll make the HTML or possibly react, and pass the file(s) to the back-end dev. If they use flask, and want the csrf protection and validation from wtforms, they have to re-write all the forms using wtforms.
tl;dr: front-end dev writes page in html(or react), passes files to back-end dev who has to re-write in wtforms. Seems like wasted time.
/r/flask
https://redd.it/aybuv3
reddit
r/flask - Learning flask, but stuck on wtforms
0 votes and 5 comments so far on Reddit
[N] Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning
Hi,
Coursera released new course with focus on Tensorflow and its best practices and I thought some of you may find it useful. I realise most of you guys are experienced engineers or researchers and already settled for PyTorch or Tensorflow or know both, however every time "PyTorch vs. Tensorflow" post pops up, there are some people unsure where to start with TF.
[https://www.coursera.org/learn/introduction-tensorflow](https://www.coursera.org/learn/introduction-tensorflow)
​
>If you are a software developer who wants to build scalable AI-powered algorithms, you need to understand how to use the tools to build them. This Specialization will teach you best practices for using TensorFlow, a popular open-source framework for machine learning.
>
> The Machine Learning course and Deep Learning Specialization from Andrew Ng teach the most important and foundational principles of Machine Learning and Deep Learning. This new deeplearning.ai TensorFlow Specialization teaches you how to use TensorFlow to implement those principles so that you can start building and applying scalable models to real-world problems. To develop a deeper understanding of how neural networks work, we recommend that you take the Deep Learning Specialization.
>
>The full deeplearning.ai TensorFlow Specialization will be available later this year, but you can get started with Course 1,
/r/MachineLearning
https://redd.it/ayap05
Hi,
Coursera released new course with focus on Tensorflow and its best practices and I thought some of you may find it useful. I realise most of you guys are experienced engineers or researchers and already settled for PyTorch or Tensorflow or know both, however every time "PyTorch vs. Tensorflow" post pops up, there are some people unsure where to start with TF.
[https://www.coursera.org/learn/introduction-tensorflow](https://www.coursera.org/learn/introduction-tensorflow)
​
>If you are a software developer who wants to build scalable AI-powered algorithms, you need to understand how to use the tools to build them. This Specialization will teach you best practices for using TensorFlow, a popular open-source framework for machine learning.
>
> The Machine Learning course and Deep Learning Specialization from Andrew Ng teach the most important and foundational principles of Machine Learning and Deep Learning. This new deeplearning.ai TensorFlow Specialization teaches you how to use TensorFlow to implement those principles so that you can start building and applying scalable models to real-world problems. To develop a deeper understanding of how neural networks work, we recommend that you take the Deep Learning Specialization.
>
>The full deeplearning.ai TensorFlow Specialization will be available later this year, but you can get started with Course 1,
/r/MachineLearning
https://redd.it/ayap05
Coursera
Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning
Offered by DeepLearning.AI. If you are a software ... Enroll for free.
Supervisor for running multiple dynamically started python scripts?
Hey guys, I'm looking for a supervisor that will take care of dynamically created/started/stopped/destroyed python script processes, can you reccomend a good one?
/r/Python
https://redd.it/aycr6t
Hey guys, I'm looking for a supervisor that will take care of dynamically created/started/stopped/destroyed python script processes, can you reccomend a good one?
/r/Python
https://redd.it/aycr6t
reddit
r/Python - Supervisor for running multiple dynamically started python scripts?
0 votes and 4 comments so far on Reddit
converting from flask to aiohttp
I'm looking into converting to aiohttp but in flask there is `@app.before_request` and `@app.after_request` that get called before and after each request. I also get as global `g` object. Not sure how to translate this over to aiohttp. Does aiohttp have similar features? I saw a context object possibly for `g` but didn't see anything for before/after request hooks.
/r/Python
https://redd.it/ayd0yn
I'm looking into converting to aiohttp but in flask there is `@app.before_request` and `@app.after_request` that get called before and after each request. I also get as global `g` object. Not sure how to translate this over to aiohttp. Does aiohttp have similar features? I saw a context object possibly for `g` but didn't see anything for before/after request hooks.
/r/Python
https://redd.it/ayd0yn
reddit
r/Python - converting from flask to aiohttp
3 votes and 1 comment so far on Reddit
[P] I built Lambda's $12,500 deep learning rig for $6200
See: http://l7.curtisnorthcutt.com/build-pro-deep-learning-workstation
Hi Reddit! I built a 3-GPU deep learning workstation similar to Lambda's 4-GPU ( RTX 2080 TI ) rig for half the price. In the hopes of helping other researchers, I'm sharing a time-lapse of the build, the parts list, the receipt, and benchmarking versus Google Compute Engine (GCE) on ImageNet. You save $1200 (the cost of an EVGA RTX 2080 ti GPU) per ImageNet training to use your own build instead of GCE. The training time is reduced by over half. In the post, I include 3 GPUs, but the build (increase PSU wattage) will support a 4th RTX 2080 TI GPU for $1200 more ($7400 total). Happy building!
/r/MachineLearning
https://redd.it/ayd01o
See: http://l7.curtisnorthcutt.com/build-pro-deep-learning-workstation
Hi Reddit! I built a 3-GPU deep learning workstation similar to Lambda's 4-GPU ( RTX 2080 TI ) rig for half the price. In the hopes of helping other researchers, I'm sharing a time-lapse of the build, the parts list, the receipt, and benchmarking versus Google Compute Engine (GCE) on ImageNet. You save $1200 (the cost of an EVGA RTX 2080 ti GPU) per ImageNet training to use your own build instead of GCE. The training time is reduced by over half. In the post, I include 3 GPUs, but the build (increase PSU wattage) will support a 4th RTX 2080 TI GPU for $1200 more ($7400 total). Happy building!
/r/MachineLearning
https://redd.it/ayd01o
Curtisnorthcutt
Build a Pro Deep Learning Workstation... for Half the Price
03/07/2019 This post is in the all-time highest ranked posts on Reddit in the r/MachineLearning forum. 03/21/2019 Updates: Amazon links added for all parts. ...
Flask + Celery In Docker Container but sharing files.
Hey All,
Know I am asking a lot of questions here lately. But I am learning in leaps and bounds.
Currently I have A Docker Compose file that boots up my flask app. and my celery worker into two different containers. My understanding is this is good practice. However I have a slight problem.
My Flask Application takes a file upload. This file gets uploaded into the static directory of the flask application. Then once the file is written to the host the celery worker picks up the file and processes it in the background. All this works perfectly on my local machine outside of docker.
One small issue. Which I am sure you can already foresee. When I containerise my application. Put the app and the worker into container. The user uploads the file and it goes into the flask containers file system. Then as expected the Celery Worker, In its container picks up the job. However the Celery Worker Cannot Locate the uploaded file for processing cause the file exists in the file system of the Flask App Container and not the Celery Worker Container.
Does any one have any experience working this one out? Any ideas
/r/flask
https://redd.it/aygfbt
Hey All,
Know I am asking a lot of questions here lately. But I am learning in leaps and bounds.
Currently I have A Docker Compose file that boots up my flask app. and my celery worker into two different containers. My understanding is this is good practice. However I have a slight problem.
My Flask Application takes a file upload. This file gets uploaded into the static directory of the flask application. Then once the file is written to the host the celery worker picks up the file and processes it in the background. All this works perfectly on my local machine outside of docker.
One small issue. Which I am sure you can already foresee. When I containerise my application. Put the app and the worker into container. The user uploads the file and it goes into the flask containers file system. Then as expected the Celery Worker, In its container picks up the job. However the Celery Worker Cannot Locate the uploaded file for processing cause the file exists in the file system of the Flask App Container and not the Celery Worker Container.
Does any one have any experience working this one out? Any ideas
/r/flask
https://redd.it/aygfbt
reddit
r/flask - Flask + Celery In Docker Container but sharing files.
7 votes and 5 comments so far on Reddit
First Python Script! Who knew old dogs can learn new tricks!
Woooo!
https://pastebin.com/ASmeZhRm
It's just a small script that tells me how much tea I need to buy for the month based on cup size and number or cups I drink daily...lol
The exercize did say keep the first one simple...
p.s. started with python2 and got shit on at stackexchange for trying to get a more exact output number...
was told flat out to use python3 LOL
https://i.imgur.com/KSfzK0P.jpg
python2 = old and busted
python3 = new hotness
/r/Python
https://redd.it/ayj6ge
Woooo!
https://pastebin.com/ASmeZhRm
It's just a small script that tells me how much tea I need to buy for the month based on cup size and number or cups I drink daily...lol
The exercize did say keep the first one simple...
p.s. started with python2 and got shit on at stackexchange for trying to get a more exact output number...
was told flat out to use python3 LOL
https://i.imgur.com/KSfzK0P.jpg
python2 = old and busted
python3 = new hotness
/r/Python
https://redd.it/ayj6ge
Pastebin
[Python] teacalc.py - Pastebin.com
From ‘R vs Python’ to ‘R and Python’: Leveraging the best of both ‘Python and R’ in a single project.
https://towardsdatascience.com/from-r-vs-python-to-r-and-python-aa25db33ce17
/r/Python
https://redd.it/aymayq
https://towardsdatascience.com/from-r-vs-python-to-r-and-python-aa25db33ce17
/r/Python
https://redd.it/aymayq
Medium
From ‘R vs Python’ to ‘R and Python’
Choosing Programming language based on your needs rather than popularity.
What is the recommended way to install and manage Django?
Hello all, I recently started teaching myself python and have found my way to django and I have a couple questions.
I am running Devuan Ascii (basically debian stretch). I have installed pip3. I messed up doing this once already mostly because there are so many new things I'm learning I haven't quite learned how to manage what what way haha.
So here I am starting fresh. So my questions are:
1) Should I install django through my distributions repos? Or through pip?
2) When should I upgrade pip through pip vs through my distributions package manager? I have seen conflicting recommendations on other forums. I feel like I should stick with my distro repos for upgrades, because I suspect that my following a tutorial that had me upgrade pip with pip after having initially installed from distro repos is what caused the issues I had before
​
Any input would be appreciated!
/r/django
https://redd.it/ayncaw
Hello all, I recently started teaching myself python and have found my way to django and I have a couple questions.
I am running Devuan Ascii (basically debian stretch). I have installed pip3. I messed up doing this once already mostly because there are so many new things I'm learning I haven't quite learned how to manage what what way haha.
So here I am starting fresh. So my questions are:
1) Should I install django through my distributions repos? Or through pip?
2) When should I upgrade pip through pip vs through my distributions package manager? I have seen conflicting recommendations on other forums. I feel like I should stick with my distro repos for upgrades, because I suspect that my following a tutorial that had me upgrade pip with pip after having initially installed from distro repos is what caused the issues I had before
​
Any input would be appreciated!
/r/django
https://redd.it/ayncaw
reddit
r/django - What is the recommended way to install and manage Django?
0 votes and 4 comments so far on Reddit
firebase for server UI
I have a flask app which is the backend and has an Android client. How can i use firebase to show notification on the web UI (Backend UI). Does firebase allow sending notification to only clients (Android, IOS, Web) ?
/r/flask
https://redd.it/aym6c5
I have a flask app which is the backend and has an Android client. How can i use firebase to show notification on the web UI (Backend UI). Does firebase allow sending notification to only clients (Android, IOS, Web) ?
/r/flask
https://redd.it/aym6c5
reddit
r/flask - firebase for server UI
3 votes and 0 comments so far on Reddit
400GB data-set of Conversational Audio. (Unlabeled) Cross-post from r/NLP [Project]
New here. Currently working on a project to explore the abilities of the transformer architecture to elaborate from data similar to how Open AI's release with GPT-2 does for text. I have scrapped about 400GB of conversational audio data with most files in both .ogg and .mp3 from podcasts and audio books available on [archive.org](https://archive.org). I would be happy to share with anyone that is interested.
​
Here is a link to the readme for my project for those interested in that: [https://github.com/gittb/audiosandbox/blob/master/README.md](https://github.com/gittb/audiosandbox/blob/master/README.md)
​
If anyone has any knowledge into how I would possibly encode an STFT array similar to how text vectors are fed to the GPT-2 model I would love to hear your approach. I'm a current student in college and always looking for explanations and viewpoints.
​
Data Update: Due to the large amount of demand for the data-set, I will be publishing AWS links here tomorrow (Friday) around 2PM Central Time in 50GB chunks, this should enable everyone that wants the data access without compromising the utility of my machine. I plan on hosting the data for 3 months.
/r/MachineLearning
https://redd.it/ayl3wb
New here. Currently working on a project to explore the abilities of the transformer architecture to elaborate from data similar to how Open AI's release with GPT-2 does for text. I have scrapped about 400GB of conversational audio data with most files in both .ogg and .mp3 from podcasts and audio books available on [archive.org](https://archive.org). I would be happy to share with anyone that is interested.
​
Here is a link to the readme for my project for those interested in that: [https://github.com/gittb/audiosandbox/blob/master/README.md](https://github.com/gittb/audiosandbox/blob/master/README.md)
​
If anyone has any knowledge into how I would possibly encode an STFT array similar to how text vectors are fed to the GPT-2 model I would love to hear your approach. I'm a current student in college and always looking for explanations and viewpoints.
​
Data Update: Due to the large amount of demand for the data-set, I will be publishing AWS links here tomorrow (Friday) around 2PM Central Time in 50GB chunks, this should enable everyone that wants the data access without compromising the utility of my machine. I plan on hosting the data for 3 months.
/r/MachineLearning
https://redd.it/ayl3wb
UpdateView limit field items
I have a generic UpdateView with a dropdown, but I only want to show items that belong to the current user. How would I go about this? Very new to this, thanks.
/r/djangolearning
https://redd.it/ay6857
I have a generic UpdateView with a dropdown, but I only want to show items that belong to the current user. How would I go about this? Very new to this, thanks.
/r/djangolearning
https://redd.it/ay6857
reddit
r/djangolearning - UpdateView limit field items
3 votes and 4 comments so far on Reddit
Test-Driven Development: Still a little confused...
I was going through the tutorial in the Django documentation and one of the last things covered is tests. The tutorial mentions a bug in the code and then writing a test to fix the bug. The recommendation is to create tests and then write/re-factor code until the test passes. My confusion is around how one would know what tests to create in the first place. I think things just haven't "clicked" for me yet.
Do you generally write a basic placeholder function, then write a detailed test for what output you want to get based on certain inputs, then fill out the function until the test passes? Any clarification on how you approach tests would be greatly appreciated.
/r/django
https://redd.it/ayrtjw
I was going through the tutorial in the Django documentation and one of the last things covered is tests. The tutorial mentions a bug in the code and then writing a test to fix the bug. The recommendation is to create tests and then write/re-factor code until the test passes. My confusion is around how one would know what tests to create in the first place. I think things just haven't "clicked" for me yet.
Do you generally write a basic placeholder function, then write a detailed test for what output you want to get based on certain inputs, then fill out the function until the test passes? Any clarification on how you approach tests would be greatly appreciated.
/r/django
https://redd.it/ayrtjw
reddit
r/django - Test-Driven Development: Still a little confused...
7 votes and 9 comments so far on Reddit
Python *args and **kwargs Made Easy
\*args and \*\*kwargs may seem scary, but the truth is that they are not that difficult to grasp and have the power to grant your functions with flexibility and readability.
​
[Python \*args and \*\*kwargs Made Easy](https://www.pythoncheatsheet.org/blog/python-easy-args-kwargs)
/r/Python
https://redd.it/ayr1mf
\*args and \*\*kwargs may seem scary, but the truth is that they are not that difficult to grasp and have the power to grant your functions with flexibility and readability.
​
[Python \*args and \*\*kwargs Made Easy](https://www.pythoncheatsheet.org/blog/python-easy-args-kwargs)
/r/Python
https://redd.it/ayr1mf
www.pythoncheatsheet.org
Python Cheatsheet
The Python Cheatsheet
Another video on discovering hidden APIs with python is here! This time a bit more challenging, a bit more fun!
https://www.youtube.com/watch?v=6zge0N962aw
/r/Python
https://redd.it/ayofit
https://www.youtube.com/watch?v=6zge0N962aw
/r/Python
https://redd.it/ayofit
YouTube
Discovering Hidden APIs | Part-2 (LectureNotes Note Material API)
As a continuation of the "Discovering Hidden APIs" series, we are gonna discover & explore a more challenging API in this video which requires CSRF Token as a request header!
Code: https://github.com/nikhilkumarsingh/discovering-hidden-apis/blob/master/…
Code: https://github.com/nikhilkumarsingh/discovering-hidden-apis/blob/master/…
Sentence Similarity in Python using Doc2Vec
https://kanoki.org/2019/03/07/sentence-similarity-in-python-using-doc2vec/
/r/Python
https://redd.it/ayrbw6
https://kanoki.org/2019/03/07/sentence-similarity-in-python-using-doc2vec/
/r/Python
https://redd.it/ayrbw6
reddit
r/Python - Sentence Similarity in Python using Doc2Vec
25 votes and 0 comments so far on Reddit
[D] Are the connections between deep learning and neuroscience still relevant?
I think it's a pretty common belief here that modern deep learning research has moved away from being inspired by neuroscience, and I would say I was also, until recently, under this belief. However, after reading Moheb Costandi's excellent *Neuroplasticity*, it made me rethink that a bit.
Although I don't think most modern DL research is directly inspired by neuroscience, there are some interesting connections I hadn't realized before. For example:
* ResNet: The idea of a gradient super-highway is not so unlike the importance of signal propagation in Long Term Potentiation (LTP), which is thought to underlie learning and memory in the brain. Some researchers also believe that retrograde signaling happens in LTP, meaning that the LTP signal is back-propagated to the instigating pre-synaptic neuron. Obviously, the connection with back-propagation in DL is clear, but backprop is not so much a new/modern technique.
* Transfer Learning: The ability of neuroplasticity in brain-injured or dear/blind peoples allows specialized neural regions to adapt and perform tasks outside their specialized region. For example, some blind people use their visual cortex more during language processing than the control.
* Capsule Networks: Actually indeed inspired by biology, these networks take a routing approach to visual classification. This
/r/MachineLearning
https://redd.it/ayvxvc
I think it's a pretty common belief here that modern deep learning research has moved away from being inspired by neuroscience, and I would say I was also, until recently, under this belief. However, after reading Moheb Costandi's excellent *Neuroplasticity*, it made me rethink that a bit.
Although I don't think most modern DL research is directly inspired by neuroscience, there are some interesting connections I hadn't realized before. For example:
* ResNet: The idea of a gradient super-highway is not so unlike the importance of signal propagation in Long Term Potentiation (LTP), which is thought to underlie learning and memory in the brain. Some researchers also believe that retrograde signaling happens in LTP, meaning that the LTP signal is back-propagated to the instigating pre-synaptic neuron. Obviously, the connection with back-propagation in DL is clear, but backprop is not so much a new/modern technique.
* Transfer Learning: The ability of neuroplasticity in brain-injured or dear/blind peoples allows specialized neural regions to adapt and perform tasks outside their specialized region. For example, some blind people use their visual cortex more during language processing than the control.
* Capsule Networks: Actually indeed inspired by biology, these networks take a routing approach to visual classification. This
/r/MachineLearning
https://redd.it/ayvxvc
reddit
r/MachineLearning - [D] Are the connections between deep learning and neuroscience still relevant?
87 votes and 26 comments so far on Reddit
The easiest way to send emails with Django (using SES from AWS)
https://hackernoon.com/the-easiest-way-to-send-emails-with-django-using-ses-from-aws-62f3d3d33efd
/r/django
https://redd.it/ayuwne
https://hackernoon.com/the-easiest-way-to-send-emails-with-django-using-ses-from-aws-62f3d3d33efd
/r/django
https://redd.it/ayuwne
Hackernoon
The easiest way to send emails with Django (using SES from AWS) | HackerNoon
Do you want to send emails in your application? Notifications, newsletters, promotions, there are so many reasons to send emails.