Android app, PyFCM, Flask, MySql
Hello everyone! I go straight to the point: I use pythonanywhere.com and I'm developing an application for Android that interfaces with a Python server that uses Flask.
The application makes extensive use of json to get data from the database and I would a notification on the device when a row has been added to a table and a notification when a row already downloaded has been changed.
I imagine it is too expensive to do a service that checks every interval if the json on the server are the same as those already downloaded, so I came to the conclusion (at least for the first notification) to listen on the database and launch a notification from the server when an INSERT query was performed on a given table. If the user is interested then he will give the ok to download the new json.
My problem is that I did not understand how I can properly use the tools written in the title to do this, or at least what is the most effective way to get what I described and I would like to receive some advice from those more experienced than me .
Thanks in advance!
/r/flask
https://redd.it/8c3dd2
Hello everyone! I go straight to the point: I use pythonanywhere.com and I'm developing an application for Android that interfaces with a Python server that uses Flask.
The application makes extensive use of json to get data from the database and I would a notification on the device when a row has been added to a table and a notification when a row already downloaded has been changed.
I imagine it is too expensive to do a service that checks every interval if the json on the server are the same as those already downloaded, so I came to the conclusion (at least for the first notification) to listen on the database and launch a notification from the server when an INSERT query was performed on a given table. If the user is interested then he will give the ok to download the new json.
My problem is that I did not understand how I can properly use the tools written in the title to do this, or at least what is the most effective way to get what I described and I would like to receive some advice from those more experienced than me .
Thanks in advance!
/r/flask
https://redd.it/8c3dd2
reddit
Android app, PyFCM, Flask, MySql • r/flask
Hello everyone! I go straight to the point: I use pythonanywhere.com and I'm developing an application for Android that interfaces with a Python...
Basic Data Analysis on Twitter with Python
https://medium.com/@lucaskohorst/basic-data-analysis-on-twitter-with-python-251c2a85062e
/r/pystats
https://redd.it/8czi0y
https://medium.com/@lucaskohorst/basic-data-analysis-on-twitter-with-python-251c2a85062e
/r/pystats
https://redd.it/8czi0y
Medium
Basic Data Analysis on Twitter with Python
After creating the Free Wtr bot using Tweepy and Python and this code, I wanted a way to see how Twitter users are perceiving the bot…
Zulip 1.8: Open source team chat, powered by Python 3
http://blog.zulip.org/2018/04/18/zulip-1-8-released/
/r/Python
https://redd.it/8d1kt3
http://blog.zulip.org/2018/04/18/zulip-1-8-released/
/r/Python
https://redd.it/8d1kt3
The Zulip Blog
Zulip 1.8: Open-source team chat
We’re excited to announce the release of Zulip Server 1.8, containing hundreds
of new features and bug fixes.
Zulip is the world’s most productive team chat software,
an alternative to Slack, HipChat, and IRC. Zulip combines the immediacy of chat
with the…
of new features and bug fixes.
Zulip is the world’s most productive team chat software,
an alternative to Slack, HipChat, and IRC. Zulip combines the immediacy of chat
with the…
Lessons learned from migrating to Python 3
https://able.bio/rhett/lessons-learned-from-migrating-to-python-3--27jsj82
/r/Python
https://redd.it/8d442u
https://able.bio/rhett/lessons-learned-from-migrating-to-python-3--27jsj82
/r/Python
https://redd.it/8d442u
Able
Lessons learned from migrating to Python 3
As the Python 2 End of Life date approaches, many developers will need to start looking at migrating their builds to Python 3. I sat down with Dan Palmer to discuss Thread's recent migrat...
Interactive Graphs
I am building some regressions and machine learning networks. For visualization purposes, I wanted to show a graph of the true values versus the predicted values of different methods. Rather than just a scatter plot with 5 different lines, I was wondering if there are any guides out there to build a graph where you can click a button with the name of the method, and it overlays the line of the predicted values of that method.
Thanks!
/r/IPython
https://redd.it/8d0vdy
I am building some regressions and machine learning networks. For visualization purposes, I wanted to show a graph of the true values versus the predicted values of different methods. Rather than just a scatter plot with 5 different lines, I was wondering if there are any guides out there to build a graph where you can click a button with the name of the method, and it overlays the line of the predicted values of that method.
Thanks!
/r/IPython
https://redd.it/8d0vdy
reddit
Interactive Graphs • r/IPython
I am building some regressions and machine learning networks. For visualization purposes, I wanted to show a graph of the true values versus the...
Is it possible to remove brainfuck from list of Languages in notebook?
Not the Kernel, i mean the list if languages used in the text editor for syntax highlighting. I suspect my employer would prefer that particular four-letter word not being in the list.
Thanks
/r/JupyterNotebooks
https://redd.it/8d53aq
Not the Kernel, i mean the list if languages used in the text editor for syntax highlighting. I suspect my employer would prefer that particular four-letter word not being in the list.
Thanks
/r/JupyterNotebooks
https://redd.it/8d53aq
reddit
r/JupyterNotebooks - Is it possible to remove brainfuck from list of Languages in notebook?
5 votes and 2 comments so far on Reddit
What are the topics that are not currently relevant and what are other topics that needs to be added to this learning journey?[X-Post from r/learnmachinelearning]
I have tried looking at many learning resources including [Open Data science Masters](http://datasciencemasters.org/) among others. But i found [this](http://nirvacana.com/thoughts/wp-content/uploads/2018/01/RoadToDataScientist1.png) particular path where topics are represented as metro stops and all the journey as a metro map. This covers the list of topics which i felt were not very broadly classified and not narrow at the same time.
My query now is the [blog](http://nirvacana.com/thoughts/2013/07/08/becoming-a-data-scientist/) by author was written in 2013 which makes it 5 years old. What are the topics that got obsolete and what topics should be added to this map to make it more relevant to current time.?
/r/pystats
https://redd.it/8cyluq
I have tried looking at many learning resources including [Open Data science Masters](http://datasciencemasters.org/) among others. But i found [this](http://nirvacana.com/thoughts/wp-content/uploads/2018/01/RoadToDataScientist1.png) particular path where topics are represented as metro stops and all the journey as a metro map. This covers the list of topics which i felt were not very broadly classified and not narrow at the same time.
My query now is the [blog](http://nirvacana.com/thoughts/2013/07/08/becoming-a-data-scientist/) by author was written in 2013 which makes it 5 years old. What are the topics that got obsolete and what topics should be added to this map to make it more relevant to current time.?
/r/pystats
https://redd.it/8cyluq
The best of Python: a collection of my favorite articles from 2017 and 2018 (so far)
https://medium.freecodecamp.org/python-collection-of-my-favorite-articles-8469b8455939
/r/Python
https://redd.it/8d591m
https://medium.freecodecamp.org/python-collection-of-my-favorite-articles-8469b8455939
/r/Python
https://redd.it/8d591m
freeCodeCamp.org
The best of Python: a collection of my favorite articles from 2017 and 2018 (so far)
My intention with publishing this collection
I decided to read a bit about web scraping last night and came up with this this morning
https://streamable.com/v586n
/r/Python
https://redd.it/8d58wa
https://streamable.com/v586n
/r/Python
https://redd.it/8d58wa
Streamable
2018-04-18 13-22-37 - Streamable
Check out this video on Streamable using your phone, tablet or desktop.
Working with data in web frameworks
https://medium.com/algotech-solutions/working-with-data-in-web-frameworks-476808f8f491
/r/django
https://redd.it/8d7y1n
https://medium.com/algotech-solutions/working-with-data-in-web-frameworks-476808f8f491
/r/django
https://redd.it/8d7y1n
Medium
Working with data in web frameworks
At Algotech Solutions, we are always interested in modern technologies and what makes them unique. Previously we’ve covered why converting…
Django, DRF, and React Native together?
Hi, currently using the above to work on a senior project and I'm trying to build on my understanding of there tools working together and just wanna see if anyone can clear up some questions.
Have a signup and login screens so far, I've created a user model and the views and urls and the fields all match on both ends. I have a react native front that i want to use fetch to get the django urls i have defined. I'm using a serializer of my models to return a json. When I manage.py runserver I can navigate into the URL i have defined and the json response will show up in my browser. Now when I put that api into the fetch in the react native side I get an error about the server not being able to connect to dev server. so like fetch(localhost/app/user)
I tried to follow a few tutorials which got me far on both ends but now i want to glue them together. I read documentations but there's not much that discusses these working together in a version as detailed as I'd hoped for.
Does anyone have experience with these working together?
Do I need to change the ports for the django and/or react native server when they're running simultaneously on my local machine(for development purposes)? After I can get them linked, I create a user model on my react front it matches the user model on my django, how do I check that its inserted into my sqlite DB? Do I have to do anything on the django side to set up the db?
I know its a lot to ask without seeing my entire code, but if anyone has any tips on how to get this tool stack working together I'd appreciate it.
Thanks.
/r/django
https://redd.it/8d7ypo
Hi, currently using the above to work on a senior project and I'm trying to build on my understanding of there tools working together and just wanna see if anyone can clear up some questions.
Have a signup and login screens so far, I've created a user model and the views and urls and the fields all match on both ends. I have a react native front that i want to use fetch to get the django urls i have defined. I'm using a serializer of my models to return a json. When I manage.py runserver I can navigate into the URL i have defined and the json response will show up in my browser. Now when I put that api into the fetch in the react native side I get an error about the server not being able to connect to dev server. so like fetch(localhost/app/user)
I tried to follow a few tutorials which got me far on both ends but now i want to glue them together. I read documentations but there's not much that discusses these working together in a version as detailed as I'd hoped for.
Does anyone have experience with these working together?
Do I need to change the ports for the django and/or react native server when they're running simultaneously on my local machine(for development purposes)? After I can get them linked, I create a user model on my react front it matches the user model on my django, how do I check that its inserted into my sqlite DB? Do I have to do anything on the django side to set up the db?
I know its a lot to ask without seeing my entire code, but if anyone has any tips on how to get this tool stack working together I'd appreciate it.
Thanks.
/r/django
https://redd.it/8d7ypo
reddit
Django, DRF, and React Native together? • r/django
Hi, currently using the above to work on a senior project and I'm trying to build on my understanding of there tools working together and just...
Is there a way to make radioField within for loop ? if possible how to set the values for them?
/r/flask
https://redd.it/8d81jw
/r/flask
https://redd.it/8d81jw
reddit
Is there a way to make radioField within for loop ? if... • r/flask
7 points and 7 comments so far on reddit
Adding a CMS solution to existing Django.
Can someone help me locate a CMS solution/add on the an existing standard Django system?
It seems everything I'm finding is a purely stand alone CMS system built on Django. What I have is an existing website that I want to add a managed blog to with a nice WYSIWYG editor for our marketing people.
If you can help point me in the right direction I greatly appreciate your time.
/r/django
https://redd.it/8d9b5w
Can someone help me locate a CMS solution/add on the an existing standard Django system?
It seems everything I'm finding is a purely stand alone CMS system built on Django. What I have is an existing website that I want to add a managed blog to with a nice WYSIWYG editor for our marketing people.
If you can help point me in the right direction I greatly appreciate your time.
/r/django
https://redd.it/8d9b5w
reddit
Adding a CMS solution to existing Django. • r/django
Can someone help me locate a CMS solution/add on the an existing standard Django system? It seems everything I'm finding is a purely stand alone...
[Ask Flask] Context_processor usage brings up a TypeError?
Hi, so I'm working on a website which allows users to make and delete posts. The delete function should be accessible using a link below said post, much like posts on Reddit, so I wrote this line in my index.html file:
<p><a href={{ delete_posts(post_id=post.id) }}>Delete</a><p>
The delete_posts function is here:
@app.context_processor
def utility_processor():
def delete_posts(post_id):
post = Post.query.filter_by(id=post_id).first()
if post != None: # This statement was added after the error was found, but it has no effect
db.session.delete(post)
db.session.commit()
When I run this I get the following error:
> TypeError: 'NoneType' object is not iterable
I was using the example on the flask website, so I'm expecting it has something to do with the database being used?
Here is a link to the full html file, and a .txt file containing the error.
https://gist.github.com/ModoUnreal/031741e6a8fe6277a786f11e6261c7f5
/r/flask
https://redd.it/8c1fiy
Hi, so I'm working on a website which allows users to make and delete posts. The delete function should be accessible using a link below said post, much like posts on Reddit, so I wrote this line in my index.html file:
<p><a href={{ delete_posts(post_id=post.id) }}>Delete</a><p>
The delete_posts function is here:
@app.context_processor
def utility_processor():
def delete_posts(post_id):
post = Post.query.filter_by(id=post_id).first()
if post != None: # This statement was added after the error was found, but it has no effect
db.session.delete(post)
db.session.commit()
When I run this I get the following error:
> TypeError: 'NoneType' object is not iterable
I was using the example on the flask website, so I'm expecting it has something to do with the database being used?
Here is a link to the full html file, and a .txt file containing the error.
https://gist.github.com/ModoUnreal/031741e6a8fe6277a786f11e6261c7f5
/r/flask
https://redd.it/8c1fiy
Gist
index file for question
How to integrate crawler in flask? I have python code but how to run it with flask.
/r/flask
https://redd.it/8bxsco
/r/flask
https://redd.it/8bxsco
reddit
How to integrate crawler in flask? I have python code... • r/flask
2 points and 7 comments so far on reddit
Robust Word2Vec Models with Gensim & Applying Word2Vec Features for Machine Learning Tasks
https://www.kdnuggets.com/2018/04/robust-word2vec-models-gensim.html
/r/Python
https://redd.it/8ddzxi
https://www.kdnuggets.com/2018/04/robust-word2vec-models-gensim.html
/r/Python
https://redd.it/8ddzxi
reddit
Robust Word2Vec Models with Gensim & Applying... • r/Python
2 points and 0 comments so far on reddit
Understanding how to write a custom middleware in Django
https://www.zeolearn.com/magazine/what-are-middlewares
/r/django
https://redd.it/8ddc54
https://www.zeolearn.com/magazine/what-are-middlewares
/r/django
https://redd.it/8ddc54
Zeolearn
Understanding how to write a custom middleware in Django | Setup custom Django Middleware
Learn how to Create a custom middleware component for Django.It gives you a better understanding how to write Django middleware.Explore how to process and modify Django middleware
[AF] SQLAlchemy: Converting a query object to raw SQL & parameters and then executing it
I hope that it is OK to post this question here, although it is not strictly related to Flask. I couldn't find a better place to post it.
Context: Flask, SQLAlchemy and MySQL
I am looking for a way to convert a query object to raw SQL and parameters and save this in a dictionary, in order to be able to pickle dump and load the dictionary before executing the query. How can I achieve converting the query and then executing the text and parameters with SQLAlcehmy?
I'd be eternally grateful if anyone could point me in the right direction.
/r/flask
https://redd.it/8dewj6
I hope that it is OK to post this question here, although it is not strictly related to Flask. I couldn't find a better place to post it.
Context: Flask, SQLAlchemy and MySQL
I am looking for a way to convert a query object to raw SQL and parameters and save this in a dictionary, in order to be able to pickle dump and load the dictionary before executing the query. How can I achieve converting the query and then executing the text and parameters with SQLAlcehmy?
I'd be eternally grateful if anyone could point me in the right direction.
/r/flask
https://redd.it/8dewj6
Reddit
reddit: the front page of the internet
r/flask: Flask is a Python micro-framework for web development. Flask is easy to get started and a great way to build web sites and web applications.