[AF] Using SQLAlchemy dialects in Flask-SQLAlchemy
Dear Flask and SQLAlchemy experts: Is it OK to import the datatypes for PostgreSQL from sqlalchemy.dialects.postresql and replace what generic flask_sqlalchemy fields but still use the db.Column, for example:
`generic_field = db.Column(db.Text())`
with something like:
`pgsql_field = db.Column(VARCHAR())` ?
/r/flask
https://redd.it/6txueg
Dear Flask and SQLAlchemy experts: Is it OK to import the datatypes for PostgreSQL from sqlalchemy.dialects.postresql and replace what generic flask_sqlalchemy fields but still use the db.Column, for example:
`generic_field = db.Column(db.Text())`
with something like:
`pgsql_field = db.Column(VARCHAR())` ?
/r/flask
https://redd.it/6txueg
reddit
[AF] Using SQLAlchemy dialects in Flask-SQLAlchemy • r/flask
Dear Flask and SQLAlchemy experts: Is it OK to import the datatypes for PostgreSQL from sqlalchemy.dialects.postresql and replace what generic...
TensorFlow 1.3 released
https://github.com/tensorflow/tensorflow/releases/tag/v1.3.0
/r/MachineLearning
https://redd.it/6ubaf2
https://github.com/tensorflow/tensorflow/releases/tag/v1.3.0
/r/MachineLearning
https://redd.it/6ubaf2
GitHub
Release TensorFlow 1.3.0 · tensorflow/tensorflow
Release 1.3.0
See also TensorBoard 0.1.4 release notes.
Major Features and Improvements
Added canned estimators to Tensorflow library. List of added estimators:
DNNClassifier
DNNRegressor
LinearC...
See also TensorBoard 0.1.4 release notes.
Major Features and Improvements
Added canned estimators to Tensorflow library. List of added estimators:
DNNClassifier
DNNRegressor
LinearC...
Is Flask Documentation enough?
Hi there, whenever someone asks about resources to learn Flask, Miguel Grinberg's flask tutorials are recommended. So, I was following Miguel's Flask Mega-tutorial, and even though I tried, I couldn't like it. It doesn't explain the details quite well, uses old technology (openID), at times is verbose. I really like Miguel's intentions and his openness to teach the topic. But, I am not impressed with the delivery of that specific tutorial, my question to you guys is - is Flask documentation enough to go deep into the intricacies of Flask and develop scalable apps?
I thought of making this post as I am getting a bit demotivated after going through Flask Mega-tutorial. I have taken Flask tutorials at Lynda, and some watched few video series on YouTube including Michael Herman's flask tutorial and they were really good.
I am aware Miguel will be updating his Flask-Mega tutorial this year so let's see how that goes?!
What's your opinion of Flask Documentation?
/r/flask
https://redd.it/6qxs3s
Hi there, whenever someone asks about resources to learn Flask, Miguel Grinberg's flask tutorials are recommended. So, I was following Miguel's Flask Mega-tutorial, and even though I tried, I couldn't like it. It doesn't explain the details quite well, uses old technology (openID), at times is verbose. I really like Miguel's intentions and his openness to teach the topic. But, I am not impressed with the delivery of that specific tutorial, my question to you guys is - is Flask documentation enough to go deep into the intricacies of Flask and develop scalable apps?
I thought of making this post as I am getting a bit demotivated after going through Flask Mega-tutorial. I have taken Flask tutorials at Lynda, and some watched few video series on YouTube including Michael Herman's flask tutorial and they were really good.
I am aware Miguel will be updating his Flask-Mega tutorial this year so let's see how that goes?!
What's your opinion of Flask Documentation?
/r/flask
https://redd.it/6qxs3s
reddit
Is Flask Documentation enough? • r/flask
Hi there, whenever someone asks about resources to learn Flask, Miguel Grinberg's flask tutorials are recommended. So, I was following Miguel's...
Who maintains PyPI and where and by whom is it hosted?
After reading this comment https://www.reddit.com/r/Python/comments/4jaaib/pypi_download_stats_have_stopped_working_again/d355dt6/
I started wondering where does PyPI actually lie? Who hosts the PyPI servers? Where are they physically localted? Who maintains and submits the code there? How can I trust what packages come out when I type install?
/r/Python
https://redd.it/6ug04h
After reading this comment https://www.reddit.com/r/Python/comments/4jaaib/pypi_download_stats_have_stopped_working_again/d355dt6/
I started wondering where does PyPI actually lie? Who hosts the PyPI servers? Where are they physically localted? Who maintains and submits the code there? How can I trust what packages come out when I type install?
/r/Python
https://redd.it/6ug04h
reddit
Pypi Download Stats Have Stopped Working Again and Again and Again...
Posted in r/Python by u/kmmbvnr • 3 points and 10 comments
Trying to get Django and chart.js to work.
I have the following coming from a template html.
<!DOCTYPE html>
<html lang='en'>
<meta http-equiv="content-type" content="text/html; charset=UTF8">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script language="JavaScript">
var ctx = document.getElementById("myChart");
var defaultLabels = JSON.parse('["2017-01-01", "2017-01-02", "2017-01-03", "2017-01-04", "2017-01-05", "2017-01-06", "2017-01-07"]');
var defaultData = JSON.parse('["12", "8", "4", "9", "18", "1", "4"]');
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: defaultLabels,
datasets: [{
lineTension: 0,
label: 'Activity Profile',
data: defaultData,
}]
}
})
</script>
</head>
<body>
<canvas id="myChart"></canvas>
</body>
</html>
I keep getting a "Uncaught TypeError: Cannot read property 'length' of null" error. I'm trying to plot a simple line chart using chart.js and django. Any pointers much appreciated.
/r/django
https://redd.it/6uesnc
I have the following coming from a template html.
<!DOCTYPE html>
<html lang='en'>
<meta http-equiv="content-type" content="text/html; charset=UTF8">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script language="JavaScript">
var ctx = document.getElementById("myChart");
var defaultLabels = JSON.parse('["2017-01-01", "2017-01-02", "2017-01-03", "2017-01-04", "2017-01-05", "2017-01-06", "2017-01-07"]');
var defaultData = JSON.parse('["12", "8", "4", "9", "18", "1", "4"]');
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: defaultLabels,
datasets: [{
lineTension: 0,
label: 'Activity Profile',
data: defaultData,
}]
}
})
</script>
</head>
<body>
<canvas id="myChart"></canvas>
</body>
</html>
I keep getting a "Uncaught TypeError: Cannot read property 'length' of null" error. I'm trying to plot a simple line chart using chart.js and django. Any pointers much appreciated.
/r/django
https://redd.it/6uesnc
IPython magic to profile and view your Python code as a heat map
https://github.com/csurfer/pyheatmagic
/r/Python
https://redd.it/6umiru
https://github.com/csurfer/pyheatmagic
/r/Python
https://redd.it/6umiru
GitHub
GitHub - csurfer/pyheatmagic: IPython magic command to profile and view your python code as a heat map.
IPython magic command to profile and view your python code as a heat map. - csurfer/pyheatmagic
application of itertools in dungeons and dragons
http://koaning.io/the-icewind-dale-problem.html
/r/Python
https://redd.it/6uog7v
http://koaning.io/the-icewind-dale-problem.html
/r/Python
https://redd.it/6uog7v
koaning.io
The Icewind Dale Problem — koaning.io
Title: The Icewind Dale Problem; Date: 2017-07-16; Author: Vincent D. Warmerdam
Linking Python to C with CFFI
https://tmarkovich.github.io//articles/2017-08/linking-python-to-c-with-cffi
/r/Python
https://redd.it/6ur42g
https://tmarkovich.github.io//articles/2017-08/linking-python-to-c-with-cffi
/r/Python
https://redd.it/6ur42g
tmarkovich.github.io
Linking Python to C with CFFI
Why link Python to C?I hope that it is uncontroversial to state that Python is a great language that can suffer from occasional performance issues. This is e...
IPython magic command to profile and view your Python code as a heat map.
https://github.com/csurfer/pyheatmagic
/r/IPython
https://redd.it/6umjge
https://github.com/csurfer/pyheatmagic
/r/IPython
https://redd.it/6umjge
GitHub
GitHub - csurfer/pyheatmagic: IPython magic command to profile and view your python code as a heat map.
IPython magic command to profile and view your python code as a heat map. - csurfer/pyheatmagic
Secure Flask API
I made a REST api to be used in an iOS app I created. Currently you can go to api.mysite.com/featured and it will display the JSON. How can I reject all requests that do not come from my iOS app?
/r/flask
https://redd.it/6umdwq
I made a REST api to be used in an iOS app I created. Currently you can go to api.mysite.com/featured and it will display the JSON. How can I reject all requests that do not come from my iOS app?
/r/flask
https://redd.it/6umdwq
Best way to learn Python as a beginner?
Hey guys, have been shortly working through some tutorials on Python, but have never really gotten past the first hump.
Where should i turn to, being a complete beginner wanting to learn python?
/r/Python
https://redd.it/6uruoh
Hey guys, have been shortly working through some tutorials on Python, but have never really gotten past the first hump.
Where should i turn to, being a complete beginner wanting to learn python?
/r/Python
https://redd.it/6uruoh
reddit
Best way to learn Python as a beginner? • r/Python
Hey guys, have been shortly working through some tutorials on Python, but have never really gotten past the first hump. Where should i turn to,...
Run python & have better GPU support for OpenGL applications
https://github.com/cprogrammer1994/optimuspy
/r/Python
https://redd.it/6uomo4
https://github.com/cprogrammer1994/optimuspy
/r/Python
https://redd.it/6uomo4
GitHub
cprogrammer1994/optimuspy
optimuspy - Python Launcher with Optimus Enablement
[P] Machine Learning for Humans: A Beginner's Guide to AI/ML
https://medium.com/machine-learning-for-humans/why-machine-learning-matters-6164faf1df12
/r/MachineLearning
https://redd.it/6upvf2
https://medium.com/machine-learning-for-humans/why-machine-learning-matters-6164faf1df12
/r/MachineLearning
https://redd.it/6upvf2
Medium
A Beginner’s Guide to AI/ML 🤖👶
The ultimate guide to machine learning. Simple, plain-English explanations accompanied by math, code, and real-world examples.
A Python cheat sheet about security
https://github.com/crazyguitar/pysheeet/blob/master/docs/notes/python-crypto.rst
/r/Python
https://redd.it/6utwyn
https://github.com/crazyguitar/pysheeet/blob/master/docs/notes/python-crypto.rst
/r/Python
https://redd.it/6utwyn
Django Autoreloader: hot reload files in browser for development (Linux)
The [django-autoreloader](https://github.com/synw/django-autoreloader) module is a simple management command that watch directories for file change and reloads the browser when a file changes. A list of directories to watch is declared in settings as well as some paths to exclude from reloading.
Limitation: it works only for Linux.
This has just been released. It was tested on python 2.7 / 3.5 with Django 1.11 and Firefox / Chromium. I would appreciate some feedback to ensure that it works as expected for other configurations than mine. I also share because this module is pretty useful to me and might help some other Django devs.
/r/django
https://redd.it/6up23j
The [django-autoreloader](https://github.com/synw/django-autoreloader) module is a simple management command that watch directories for file change and reloads the browser when a file changes. A list of directories to watch is declared in settings as well as some paths to exclude from reloading.
Limitation: it works only for Linux.
This has just been released. It was tested on python 2.7 / 3.5 with Django 1.11 and Firefox / Chromium. I would appreciate some feedback to ensure that it works as expected for other configurations than mine. I also share because this module is pretty useful to me and might help some other Django devs.
/r/django
https://redd.it/6up23j
GitHub
synw/django-autoreloader
Autoreload files in browser for Django development - synw/django-autoreloader
[N] Microsoft is attempting to patent Active Machine Learning
https://www.google.com/patents/US20160162802
/r/MachineLearning
https://redd.it/6uqdgp
https://www.google.com/patents/US20160162802
/r/MachineLearning
https://redd.it/6uqdgp
Google Books
Patent US20160162802 - Active Machine Learning
Technologies are described herein for active machine learning. An active machine learning method can include initiating active machine learning through an active machine learning system configured to train an auxiliary machine learning model to produce at…
A simple Discord-Bot written with discord.py to protocol member actions on a server
https://github.com/LordDRuffi/connecteroonie
/r/Python
https://redd.it/6ut4ko
https://github.com/LordDRuffi/connecteroonie
/r/Python
https://redd.it/6ut4ko
GitHub
LordDRuffi/connecteroonie
connecteroonie - A simple Discord-Bot written with discord.py to protocol member actions on a server
[D] what happened with Distill? is it dead?
https://distill.pub/ was a great idea to innovate research publishing, however, it seems that the community never ended up adopting it.
Does anybody know if more publications will be published from the initial ones or is this project officially abandoned?
/r/MachineLearning
https://redd.it/6usqhc
https://distill.pub/ was a great idea to innovate research publishing, however, it seems that the community never ended up adopting it.
Does anybody know if more publications will be published from the initial ones or is this project officially abandoned?
/r/MachineLearning
https://redd.it/6usqhc
Distill
Distill — Latest articles about machine learning
[AF][Flask-Login] Refreshing page causes is_authenticated to fail
I'm setting up a login system with Flask-Login, and I set up an if statement in Jinja to write to the HTML if a user is logged in, and write "Not logged in." otherwise.
{% if current_user.is_authenticated %}
You are logged in as {{ current_user.get_username() }}.
{% else %}
You are not logged in.
{% endif %}
However, when I log in, it will show that it is logged in, but then when I refresh the page, it will sometimes say that it is not logged in, but upon another refresh, say that it is logged in. If I spam refreshes, it will be about 50/50 chance of being either. My suspicion is that its not actually logging me out, but the is_authenticated is resolving to false which might be causing the problem, but I am somewhat new to Flask so I don't know if I am missing something. Any help would be appreciated!
/r/flask
https://redd.it/6uubmb
I'm setting up a login system with Flask-Login, and I set up an if statement in Jinja to write to the HTML if a user is logged in, and write "Not logged in." otherwise.
{% if current_user.is_authenticated %}
You are logged in as {{ current_user.get_username() }}.
{% else %}
You are not logged in.
{% endif %}
However, when I log in, it will show that it is logged in, but then when I refresh the page, it will sometimes say that it is not logged in, but upon another refresh, say that it is logged in. If I spam refreshes, it will be about 50/50 chance of being either. My suspicion is that its not actually logging me out, but the is_authenticated is resolving to false which might be causing the problem, but I am somewhat new to Flask so I don't know if I am missing something. Any help would be appreciated!
/r/flask
https://redd.it/6uubmb
reddit
[AF][Flask-Login] Refreshing page causes... • r/flask
I'm setting up a login system with Flask-Login, and I set up an if statement in Jinja to write to the HTML if a user is logged in, and write "Not...
DjangoCon help update!
Hello everyone!
You may remember I posted here a [about a month ago](https://www.reddit.com/r/django/comments/6fl9ml/hello_im_speaking_at_djangocon_this_year_and_want/) asking for your opinion on what I should do in my [DjangoCon talk](https://2017.djangocon.us/tutorials/from-0-to-100-in-django/). Well I am happy to say I collected a ton of information and opinions from everyone, and I wanted to thank the community as a whole for making my talk so successful!
A few different people had asked if the talk would be posted online at a later date, at the time I was unsure of this myself as DjangoCon has done some tutorials in the past, but not always. I found out this week that they will not be posting my tutorial (or any of the 2017 tutorials) this year. Rest assured that all of the talks will be posted as normal though!
---
Regardless the tutorial was a huge success and many of the people who came were incredibly happy to have a more detailed look at Django, instead of the usual "copy/paste this code and type this command" that some talks and tutorials provide. I have been asked by multiple different attendee's if I would be willing to release my slides and code (which I will be doing in a few days), however the largest part of the tutorial was a live coding and q/a section. This cannot really be replicated with a github repo. Instead I want to try and do the next best thing. Over the next few weeks I plan on release a series of blog posts (2 a week) called "0-100 in Django." These blog posts will cover everything I covered in the tutorial. It will be an indepth look at the polls tutorial, that goes even further than the DjangoProject website takes it.
We will talk about Models, Managers, Querysets, Migrations, CBV vs Functional Views, and even best practices for code. We will also add user authentication, unit testing, and so much more!
So if you were one of the people who wanted to go to DjangoCon, but just couldn't afford it please come by! The [first post is already available](https://medium.com/@jeremytiki/0-100-in-django-introduction-75a182637462), and number 2 will be up Monday and cover setting up the best Django environment possible.
/r/django
https://redd.it/6ullat
Hello everyone!
You may remember I posted here a [about a month ago](https://www.reddit.com/r/django/comments/6fl9ml/hello_im_speaking_at_djangocon_this_year_and_want/) asking for your opinion on what I should do in my [DjangoCon talk](https://2017.djangocon.us/tutorials/from-0-to-100-in-django/). Well I am happy to say I collected a ton of information and opinions from everyone, and I wanted to thank the community as a whole for making my talk so successful!
A few different people had asked if the talk would be posted online at a later date, at the time I was unsure of this myself as DjangoCon has done some tutorials in the past, but not always. I found out this week that they will not be posting my tutorial (or any of the 2017 tutorials) this year. Rest assured that all of the talks will be posted as normal though!
---
Regardless the tutorial was a huge success and many of the people who came were incredibly happy to have a more detailed look at Django, instead of the usual "copy/paste this code and type this command" that some talks and tutorials provide. I have been asked by multiple different attendee's if I would be willing to release my slides and code (which I will be doing in a few days), however the largest part of the tutorial was a live coding and q/a section. This cannot really be replicated with a github repo. Instead I want to try and do the next best thing. Over the next few weeks I plan on release a series of blog posts (2 a week) called "0-100 in Django." These blog posts will cover everything I covered in the tutorial. It will be an indepth look at the polls tutorial, that goes even further than the DjangoProject website takes it.
We will talk about Models, Managers, Querysets, Migrations, CBV vs Functional Views, and even best practices for code. We will also add user authentication, unit testing, and so much more!
So if you were one of the people who wanted to go to DjangoCon, but just couldn't afford it please come by! The [first post is already available](https://medium.com/@jeremytiki/0-100-in-django-introduction-75a182637462), and number 2 will be up Monday and cover setting up the best Django environment possible.
/r/django
https://redd.it/6ullat
reddit
Hello! I'm speaking at DjangoCon this year and want... • r/django
Good morning everyone! I was selected to speak at DjangoCon this year for the talk "Going from 0-100 with Django". It is going to be a 3-3.5 hour...