[R] Holy shit you guys, the new google assistant is incredible.
https://youtu.be/pKVppdt_-B4
/r/MachineLearning
https://redd.it/8i3zll
https://youtu.be/pKVppdt_-B4
/r/MachineLearning
https://redd.it/8i3zll
YouTube
Google Assistant making a phone call
From Google I/O'18
This is really some fascinating stuff.
This is really some fascinating stuff.
Announcing glom: Restructured Data for Python
https://sedimental.org/glom_restructured_data.html
/r/Python
https://redd.it/8i97g5
https://sedimental.org/glom_restructured_data.html
/r/Python
https://redd.it/8i97g5
sedimental.org
Announcing glom: Restructured Data for Python — Sedimental
Accretionary thoughts by Mahmoud Hashemi
How to "visit" a page without "visiting" it in Flask?
Okay, so I might just be confused as fuck or something.
When I 'visit' a page that triggers a route on my app, say like '/install', that route executes and redirects to another route, eventually generating an auth code.
Now, I want to run this route, without having to visit the page - so basically, I am trying to run this route so that I can get the auth code in the end.
Now I am calling this route from an external website. I am simply sending a GET request to a function 'load' and in that function there is another function called: get_install(), which contains the below code.
call = requests.get(url_for('install', _external = True, _scheme = "https"))
Now this code works but when I type print (request.args) nothing comes up.
So I am wondering, how do I execute the install route without visiting the {my_app_url}/install route?
/r/flask
https://redd.it/8dyr7z
Okay, so I might just be confused as fuck or something.
When I 'visit' a page that triggers a route on my app, say like '/install', that route executes and redirects to another route, eventually generating an auth code.
Now, I want to run this route, without having to visit the page - so basically, I am trying to run this route so that I can get the auth code in the end.
Now I am calling this route from an external website. I am simply sending a GET request to a function 'load' and in that function there is another function called: get_install(), which contains the below code.
call = requests.get(url_for('install', _external = True, _scheme = "https"))
Now this code works but when I type print (request.args) nothing comes up.
So I am wondering, how do I execute the install route without visiting the {my_app_url}/install route?
/r/flask
https://redd.it/8dyr7z
reddit
How to "visit" a page without "visiting" it in Flask? • r/flask
Okay, so I might just be confused as fuck or something. When I 'visit' a page that triggers a route on my app, say like '/install', that route...
Creating Dynamic Forms with Django
https://www.caktusgroup.com/blog/2018/05/07/creating-dynamic-forms-django/
/r/django
https://redd.it/8ic8u3
https://www.caktusgroup.com/blog/2018/05/07/creating-dynamic-forms-django/
/r/django
https://redd.it/8ic8u3
Caktusgroup
Creating Dynamic Forms with Django | Caktus Group
Dynamic forms need to change the number of fields they have at runtime, which makes them more challenging to develop. Proper usage of Django's form system makes the process far more straightforward. Learn how to do it in this blog post.
Custom module not running in Notebook
Hi all,
Say I have the following in my notebook:
// some code
// bunch of other code
It runs perfectly, but if I try to create a bunchofothercode.py file and put // bunch of other code in it, and then:
// some code
import bunchofothercode
This doesn't give any errors, but it doesn't run the code.
I'm sure I am missing something, but I don't know what :)
/r/IPython
https://redd.it/8id40o
Hi all,
Say I have the following in my notebook:
// some code
// bunch of other code
It runs perfectly, but if I try to create a bunchofothercode.py file and put // bunch of other code in it, and then:
// some code
import bunchofothercode
This doesn't give any errors, but it doesn't run the code.
I'm sure I am missing something, but I don't know what :)
/r/IPython
https://redd.it/8id40o
reddit
r/IPython - Custom module not running in Notebook
1 votes and 1 so far on reddit
YouTube channel for PyCon 2018 is now up (with today's tutorials)
https://www.youtube.com/channel/UCsX05-2sVSH7Nx3zuk3NYuQ
/r/Python
https://redd.it/8iamxy
https://www.youtube.com/channel/UCsX05-2sVSH7Nx3zuk3NYuQ
/r/Python
https://redd.it/8iamxy
YouTube
PyCon 2018
Share your videos with friends, family, and the world
How to make a RESTful API with flask-Restplus and Python
http://prosof.site/how-to-make-a-restful-api-with-flask-restplus-and-python
/r/flask
https://redd.it/8id7qc
http://prosof.site/how-to-make-a-restful-api-with-flask-restplus-and-python
/r/flask
https://redd.it/8id7qc
Boostlog
How to make a RESTful API with flask-Restplus and Python
I like [Flask](http://flask.pocoo.org/). According to their official documentation website:
Flask is a microframework for Python based on Werkzeug,
Flask is a microframework for Python based on Werkzeug,
How to combine docker instances and Apache web server for django scaling ?
I am having a doubt about scalabilty. Does configuring an Apache web server and running ,multiple instances docker multiply scalabilty ,does it increase max no requests ? What advantage do we get having cluster of computers along with web server ? What is differnce between having a load- balancer and also configuring Apache web server for having max concurrent request ?
Edit: I re frame my question,how to scale django for large web apps like 1 million users,how many simultaneous requests can a django app handle ?,how to configure my django application in such a way.
/r/django
https://redd.it/8iezsb
I am having a doubt about scalabilty. Does configuring an Apache web server and running ,multiple instances docker multiply scalabilty ,does it increase max no requests ? What advantage do we get having cluster of computers along with web server ? What is differnce between having a load- balancer and also configuring Apache web server for having max concurrent request ?
Edit: I re frame my question,how to scale django for large web apps like 1 million users,how many simultaneous requests can a django app handle ?,how to configure my django application in such a way.
/r/django
https://redd.it/8iezsb
reddit
r/django - How to combine docker instances and Apache web server for django scaling ?
2 votes and 0 so far on reddit
How to manually use bcrypt?
I followed the [Password management documentation](https://docs.djangoproject.com/en/2.0/topics/auth/passwords/) and managed to download the bcrypt library and use bcrypt as my password hasher. But now additionally to hashing passwords I want to use bcrypt for some other uses and create a few hashes in a python file. How can I import it and use the commands such as bcrypt.gensalt etc?
/r/django
https://redd.it/8iggc6
I followed the [Password management documentation](https://docs.djangoproject.com/en/2.0/topics/auth/passwords/) and managed to download the bcrypt library and use bcrypt as my password hasher. But now additionally to hashing passwords I want to use bcrypt for some other uses and create a few hashes in a python file. How can I import it and use the commands such as bcrypt.gensalt etc?
/r/django
https://redd.it/8iggc6
Django Project
Password management in Django | Django documentation
The web framework for perfectionists with deadlines.
display certain number of digits
I'm using jupyter and although the following piece of code produce the proper output:
np.set_printoptions(precision=3)
print(np.array([1.123456789]))
>>> 1.123
When I use the following, as it is not a np object, it doesn't take into account the restrictions:
np.set_printoptions(precision=3)
print(1.123456789)
>>> 1.1233456789
I would like to have the same output as for np object.
Thanks in advance
/r/IPython
https://redd.it/8ifuwq
I'm using jupyter and although the following piece of code produce the proper output:
np.set_printoptions(precision=3)
print(np.array([1.123456789]))
>>> 1.123
When I use the following, as it is not a np object, it doesn't take into account the restrictions:
np.set_printoptions(precision=3)
print(1.123456789)
>>> 1.1233456789
I would like to have the same output as for np object.
Thanks in advance
/r/IPython
https://redd.it/8ifuwq
reddit
display certain number of digits • r/IPython
I'm using jupyter and although the following piece of code produce the proper output: np.set_printoptions(precision=3) ...
Rubberduck: Finish your code reviews faster
https://www.rubberduck.io/?v
/r/Python
https://redd.it/8if11m
https://www.rubberduck.io/?v
/r/Python
https://redd.it/8if11m
reddit
Rubberduck: Finish your code reviews faster • r/Python
106 points and 17 comments so far on reddit
For people who live in Cleveland, are there any PyCon events that are walk-in (i.e. free for poor undergrads)?
/r/Python
https://redd.it/8ik019
/r/Python
https://redd.it/8ik019
reddit
r/Python - For people who live in Cleveland, are there any PyCon events that are walk-in (i.e. free for poor undergrads)?
45 votes and 12 so far on reddit
Fabric 2.0 released, includes Python 3 compatibility
http://docs.fabfile.org/en/latest/upgrading.html#upgrading
/r/django
https://redd.it/8ikmwm
http://docs.fabfile.org/en/latest/upgrading.html#upgrading
/r/django
https://redd.it/8ikmwm
Advice o two-step user registration process with SMS verification
My Django app uses a subclass of Usercreationform, with a char field for an SMS code requested via ajax. I'm using the mobile # as the username.
When submitted, if form.is\_valid and the sms code submitted is the one sent \(saved in db\), form is saved and the newly created user is logged in.
I am breaking this up into 2 steps to prevent getting flooded with malicious/frivolous sms requests. The sms field is replaced with a django\-simple\-captcha field. If form.is\_valid, a user is created with is\_active=False. The request is then redirected to a page with a one\-time url to request and submit an sms code to verify account, which flips user.is\_active to True if successful.
I'm just realizing that a vulnerability is created if someone maliciously "registers" a whole bunch of real mobile numbers without verifying, and when the real owner of one of the numbers tries to register, my form subclassed from Usercreationform would complain that an account already exists with that username.
I guess I can do something on the frontend with JS to still make it 2\-step but submit the form in one go, and if everything is valid an active user gets created, otherwise nothing happens. But does Django have anything quick and simple that solves my problem?
Also, any general advice? I thought about rate limiting with Nginx my current structure instead. But what would be a sensible rate for user sign\-up? Something like 1r/s per IP seems way too high. But if I set a rate too restrictive, I run the risk of blocking potential customers behind a NAT with a mysterious error code.
Thanks!
/r/django
https://redd.it/8ik0ki
My Django app uses a subclass of Usercreationform, with a char field for an SMS code requested via ajax. I'm using the mobile # as the username.
When submitted, if form.is\_valid and the sms code submitted is the one sent \(saved in db\), form is saved and the newly created user is logged in.
I am breaking this up into 2 steps to prevent getting flooded with malicious/frivolous sms requests. The sms field is replaced with a django\-simple\-captcha field. If form.is\_valid, a user is created with is\_active=False. The request is then redirected to a page with a one\-time url to request and submit an sms code to verify account, which flips user.is\_active to True if successful.
I'm just realizing that a vulnerability is created if someone maliciously "registers" a whole bunch of real mobile numbers without verifying, and when the real owner of one of the numbers tries to register, my form subclassed from Usercreationform would complain that an account already exists with that username.
I guess I can do something on the frontend with JS to still make it 2\-step but submit the form in one go, and if everything is valid an active user gets created, otherwise nothing happens. But does Django have anything quick and simple that solves my problem?
Also, any general advice? I thought about rate limiting with Nginx my current structure instead. But what would be a sensible rate for user sign\-up? Something like 1r/s per IP seems way too high. But if I set a rate too restrictive, I run the risk of blocking potential customers behind a NAT with a mysterious error code.
Thanks!
/r/django
https://redd.it/8ik0ki
reddit
Advice o two-step user registration process with SMS... • r/django
My Django app uses a subclass of Usercreationform, with a char field for an SMS code requested via ajax. I'm using the mobile # as the...
Practicality Beats Purity: Microservices vs Monoliths
http://tryexceptpass.org/article/practicality-beats-purity-3/
/r/Python
https://redd.it/8iikd3
http://tryexceptpass.org/article/practicality-beats-purity-3/
/r/Python
https://redd.it/8iikd3
tryexceptpass.org
Practicality Beats Purity - Microservices vs Monoliths
Consequences of microservice architectures and the problems they solve.
[R] Full-body high-resolution Anime Generation with Progressive Structure-conditional GANs
http://dena.com/intl/anime-generation/
/r/MachineLearning
https://redd.it/8iky2y
http://dena.com/intl/anime-generation/
/r/MachineLearning
https://redd.it/8iky2y
Anyone wants to be my study-buddy for learning Flask?
Anyone wants to be my study-buddy for learning Flask using Miguel Grinberg's Flask Mega Tutorial?https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
Starting: May 14th
/r/flask
https://redd.it/8iiz6m
Anyone wants to be my study-buddy for learning Flask using Miguel Grinberg's Flask Mega Tutorial?https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
Starting: May 14th
/r/flask
https://redd.it/8iiz6m
Miguelgrinberg
The Flask Mega-Tutorial, Part I: Hello, World!
You are reading the 2024 edition of the Flask Mega-Tutorial. The complete course is also available to order in e-book and paperback formats from Amazon. Thank you for your support!If you are looking…
How to combat blog spam?
This is a bit of a meta post about r/python, rather than python itself. However, it seems to me that there is a very noticeable amount of blog spam, which I'll loosely define as having the following features:
* Poorly-written
* Unhelpful - sometimes just plain incorrect and misleading
* Heavily focused just on SEO
Have others noticed the same thing?
Can anything be done to limit the amount of blog spam? Require posts to be authorised by mods before going live? Other measures to be taken?
I just wanted to attempt to open it up for debate, so please discuss below, if this is appropriate.
/r/Python
https://redd.it/8in595
This is a bit of a meta post about r/python, rather than python itself. However, it seems to me that there is a very noticeable amount of blog spam, which I'll loosely define as having the following features:
* Poorly-written
* Unhelpful - sometimes just plain incorrect and misleading
* Heavily focused just on SEO
Have others noticed the same thing?
Can anything be done to limit the amount of blog spam? Require posts to be authorised by mods before going live? Other measures to be taken?
I just wanted to attempt to open it up for debate, so please discuss below, if this is appropriate.
/r/Python
https://redd.it/8in595
reddit
r/Python - How to combat blog spam?
91 votes and 31 so far on reddit