Spiral Barcode Generator: Rick and Morty Episode 101
https://imgur.com/a/nYeDB
/r/Python
https://redd.it/6y56v3
https://imgur.com/a/nYeDB
/r/Python
https://redd.it/6y56v3
Imgur
Rick and Morty Story Circle and Barcodes for episode 101
Imgur: The most awesome images on the Internet.
Announcing Kernels, a Jupyter Notebook client for iPad (x-post from /r/MachineLearning)
https://www.reddit.com/r/MachineLearning/comments/6y0ur3/announcing_kernels_a_jupyter_notebook_client_for/
/r/IPython
https://redd.it/6y0vsd
https://www.reddit.com/r/MachineLearning/comments/6y0ur3/announcing_kernels_a_jupyter_notebook_client_for/
/r/IPython
https://redd.it/6y0vsd
reddit
Announcing Kernels, a Jupyter Notebook client... • r/MachineLearning
reddit: the front page of the internet
Hatch - A modern project, package, and virtual env manager
https://github.com/ofek/hatch
/r/Python
https://redd.it/6y69iw
https://github.com/ofek/hatch
/r/Python
https://redd.it/6y69iw
GitHub
GitHub - pypa/hatch: Modern, extensible Python project management
Modern, extensible Python project management. Contribute to pypa/hatch development by creating an account on GitHub.
[AF] Help with combining two Flask-SqlAlchemy queries into one
I have looked myself blind on this issue. Is anybody familiar with SqlAlchemy and can help me in the right direction with combining the following two queries into one query, giving a total count?
unread_count1 = models.MessageThread.query.join(models.AppReg, models.MessageThread.source_app)\
.filter(and_(models.MessageThread.source_read == 0, models.MessageThread.source_archived == 0))\
.filter(models.AppReg.user_UID == g._user.uid)\
.count()
unread_count2 = models.MessageThread.query.join(models.AppReg, models.MessageThread.target_app)\
.filter(and_(models.MessageThread.target_read == 0, models.MessageThread.target_archived == 0))\
.filter(models.AppReg.user_UID == g._user.uid)\
.count()
/r/flask
https://redd.it/6y3agr
I have looked myself blind on this issue. Is anybody familiar with SqlAlchemy and can help me in the right direction with combining the following two queries into one query, giving a total count?
unread_count1 = models.MessageThread.query.join(models.AppReg, models.MessageThread.source_app)\
.filter(and_(models.MessageThread.source_read == 0, models.MessageThread.source_archived == 0))\
.filter(models.AppReg.user_UID == g._user.uid)\
.count()
unread_count2 = models.MessageThread.query.join(models.AppReg, models.MessageThread.target_app)\
.filter(and_(models.MessageThread.target_read == 0, models.MessageThread.target_archived == 0))\
.filter(models.AppReg.user_UID == g._user.uid)\
.count()
/r/flask
https://redd.it/6y3agr
reddit
[AF] Help with combining two Flask-SqlAlchemy queries... • r/flask
I have looked myself blind on this issue. Is anybody familiar with SqlAlchemy and can help me in the right direction with combining the following...
Best way to do dynamic models? (or any other solution?)
Hi all,
I want to implement the following:
A "document" is a collection of different "components" that can be just about anything (text, images, dates, links, output of custom scripts, whatever).
Each component can get status (draft, validated, disabled..), comments, history, validation etc.
We only know at runtime what kind of components a specific document will have, and how many.
I'm a bit lost on how to even get started. I saw some things about dynamic forms, but I can't really get how to relate this with a model.
Any suggestions on how to achieve that using Django? Or maybe it's not the right framework for what I want?
Thanks a lot!
/r/django
https://redd.it/6y78ih
Hi all,
I want to implement the following:
A "document" is a collection of different "components" that can be just about anything (text, images, dates, links, output of custom scripts, whatever).
Each component can get status (draft, validated, disabled..), comments, history, validation etc.
We only know at runtime what kind of components a specific document will have, and how many.
I'm a bit lost on how to even get started. I saw some things about dynamic forms, but I can't really get how to relate this with a model.
Any suggestions on how to achieve that using Django? Or maybe it's not the right framework for what I want?
Thanks a lot!
/r/django
https://redd.it/6y78ih
reddit
Best way to do dynamic models? (or any other solution?) • r/django
Hi all, I want to implement the following: A "document" is a collection of different "components" that can be just about anything (text,...
What's everyone working on this week?
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/6y87sb
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/6y87sb
reddit
What's everyone working on this week? • r/Python
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your...
Raspberry Pie: A discord guild with over 1,800 users where you can get help with your code from a moderately active community
https://discord.gg/P6zsmZm
/r/Python
https://redd.it/6y84d7
https://discord.gg/P6zsmZm
/r/Python
https://redd.it/6y84d7
Discord
Discord - Free voice and text chat for gamers
Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!
Django security releases issued: 1.11.5 and 1.10.8
https://www.djangoproject.com/weblog/2017/sep/05/security-releases/
/r/django
https://redd.it/6y9iy1
https://www.djangoproject.com/weblog/2017/sep/05/security-releases/
/r/django
https://redd.it/6y9iy1
reddit
Django security releases issued: 1.11.5 and 1.10.8 • r/django
5 points and 0 comments so far on reddit
I want to make a minimal Mezzanine site. How do I start from "scratch?"
I've set up a virtual environment using `virtualenv` command. Then I ran these commands:
# Install from PyPI
$ pip install mezzanine
# Create a project
$ mezzanine-project myproject
$ cd myproject
# Create a database
$ python manage.py createdb
# Run the web server
$ python manage.py runserver
When I go to `localhost:8080`, I get the standard, basic Mezzanine site. But I want to make a minimal homepage with two main sections: A navbar up top and a big main section below.
It seems like a lot of work to change the basic Mezzanine theme to match what I want.
So what do I do if I want to start a Mezzanine website/page from scratch?
/r/django
https://redd.it/6y9cqc
I've set up a virtual environment using `virtualenv` command. Then I ran these commands:
# Install from PyPI
$ pip install mezzanine
# Create a project
$ mezzanine-project myproject
$ cd myproject
# Create a database
$ python manage.py createdb
# Run the web server
$ python manage.py runserver
When I go to `localhost:8080`, I get the standard, basic Mezzanine site. But I want to make a minimal homepage with two main sections: A navbar up top and a big main section below.
It seems like a lot of work to change the basic Mezzanine theme to match what I want.
So what do I do if I want to start a Mezzanine website/page from scratch?
/r/django
https://redd.it/6y9cqc
reddit
I want to make a minimal Mezzanine site. How do I start... • r/django
I've set up a virtual environment using `virtualenv` command. Then I ran these commands: # Install from PyPI $ pip install mezzanine ...
PyData Conference
I am relatively new to python (can do the basics, but have few big projects). However, I am debating trying to transition my job from academia to data analyst around May.
My questions for this community:
1) Both in terms of learning new things and interacting with potential employers, is the upcoming PyData conference in New York something that I would benefit from attending?
2) Has anybody attended in the past? What was your experience like?
3) If I decide to attend, how should I prepare?
I should also mention that my college will pay between 50-75% of my total expenses.
I appreciate any thoughts!
/r/pystats
https://redd.it/6xuh5x
I am relatively new to python (can do the basics, but have few big projects). However, I am debating trying to transition my job from academia to data analyst around May.
My questions for this community:
1) Both in terms of learning new things and interacting with potential employers, is the upcoming PyData conference in New York something that I would benefit from attending?
2) Has anybody attended in the past? What was your experience like?
3) If I decide to attend, how should I prepare?
I should also mention that my college will pay between 50-75% of my total expenses.
I appreciate any thoughts!
/r/pystats
https://redd.it/6xuh5x
reddit
PyData Conference • r/pystats
I am relatively new to python (can do the basics, but have few big projects). However, I am debating trying to transition my job from academia to...
A Complete Beginner's Guide to Django
https://simpleisbetterthancomplex.com/series/2017/09/04/a-complete-beginners-guide-to-django-part-1.html
/r/Python
https://redd.it/6y8dgp
https://simpleisbetterthancomplex.com/series/2017/09/04/a-complete-beginners-guide-to-django-part-1.html
/r/Python
https://redd.it/6y8dgp
Simple is Better Than Complex
A Complete Beginner's Guide to Django - Part 1
I'm starting today a new tutorial series about the Django fundamentals. It's a complete beginner's guide to start learning Django. The material is divided in 7 parts. We're going to explore all the...
What is considered to be the definitive Python bible, so far as books go?
I've been doing software development for 20+ years, and I'm not looking for a beginners Python programming book. I'm looking for something more akin to Perl's Camel book - a definitive reference, that covers all aspects of the language.
Many thanks!
/r/Python
https://redd.it/6y8i05
I've been doing software development for 20+ years, and I'm not looking for a beginners Python programming book. I'm looking for something more akin to Perl's Camel book - a definitive reference, that covers all aspects of the language.
Many thanks!
/r/Python
https://redd.it/6y8i05
reddit
What is considered to be the definitive Python bible,... • r/Python
I've been doing software development for 20+ years, and I'm not looking for a beginners Python programming book. I'm looking for something more...
Demo of Flask-Blogging running on AWS lambda
https://serverlessblog.com
/r/flask
https://redd.it/6y87pn
https://serverlessblog.com
/r/flask
https://redd.it/6y87pn
reddit
Demo of Flask-Blogging running on AWS lambda • r/flask
5 points and 0 comments so far on reddit
[AF] Strange problem with output compounding if the a form is submitted within a short timeframe
This one has me stumped.
I have a WTForm that I'm using like so:
form = UserForm()
if form.validate_on_submit():
session['form'] = form.data
return redirect('/analysis')
and then on my analysis function in views.py:
@app.route('/analysis', methods=['GET', 'POST'])
def analysis_results(text=None):
image, answers = main(session.get('form', None))
uniques = answers['uniques']
del answers['uniques']
session['form'] = None # a hack...didn't actually help.
if answers == False:
flash('No viable schedules are possible with these settings. Revise your parameters and submit again.')
return render_template('analysis.html',
title='Analysis',
image=image,
schedules=uniques,
mutations=answers)
So as you can see, I'm calling my backend program (main), which receives the session cookie that has the form data. The problem is that if I go to my analysis page, its great the first time. But, if I go back to the form quickly enough and just submit the same info (or different) in a 30 second window, it processes the whole thing, and then it looks like the 'answers' output (a dict) contains more keys than it should, and these end up getting printed to the analysis page.
Thing is, if I wait more than 30 seconds, no problem.
Thing is, if I try to print the form data, it looks the same no matter what. Or I'm crazy. One of the two.
How the heck could my front end be jacking up my back end if the input form data seemingly stays the same? And its not a problem if I just wait a little? I'm very confused.
This probably wouldn't be an issue for 90% of my users, but if someone did encounter this problem, it would make them lose confidence in my project. Help appreciated.
/r/flask
https://redd.it/6yc6a1
This one has me stumped.
I have a WTForm that I'm using like so:
form = UserForm()
if form.validate_on_submit():
session['form'] = form.data
return redirect('/analysis')
and then on my analysis function in views.py:
@app.route('/analysis', methods=['GET', 'POST'])
def analysis_results(text=None):
image, answers = main(session.get('form', None))
uniques = answers['uniques']
del answers['uniques']
session['form'] = None # a hack...didn't actually help.
if answers == False:
flash('No viable schedules are possible with these settings. Revise your parameters and submit again.')
return render_template('analysis.html',
title='Analysis',
image=image,
schedules=uniques,
mutations=answers)
So as you can see, I'm calling my backend program (main), which receives the session cookie that has the form data. The problem is that if I go to my analysis page, its great the first time. But, if I go back to the form quickly enough and just submit the same info (or different) in a 30 second window, it processes the whole thing, and then it looks like the 'answers' output (a dict) contains more keys than it should, and these end up getting printed to the analysis page.
Thing is, if I wait more than 30 seconds, no problem.
Thing is, if I try to print the form data, it looks the same no matter what. Or I'm crazy. One of the two.
How the heck could my front end be jacking up my back end if the input form data seemingly stays the same? And its not a problem if I just wait a little? I'm very confused.
This probably wouldn't be an issue for 90% of my users, but if someone did encounter this problem, it would make them lose confidence in my project. Help appreciated.
/r/flask
https://redd.it/6yc6a1
reddit
[AF] Strange problem with output compounding if the a... • r/flask
This one has me stumped. I have a WTForm that I'm using like so: form = UserForm() if form.validate_on_submit(): ...
Bokeh poor support of Pandas DataFrame?
Just curious if anybody else find it surprising that Bokeh doesn't support Pandas dataframe as well as they would like as compared to plotly? Bokeh, seaborn, dask, pandas, et. el. are all part of the pydata organization. So I was surprised for instance, if you make a Bokeh chart of multiple lines from a pandas dataframe, the hover tool doesn't include the column names. It includes the (x,y) coordinates and index value, but omits the line labels!!! Hmmm...wow. One of the usefulness of the hover tool is when you have multiple lines, you want to easily identify the corresponding line label. In Bokeh, to get the line labels/column names in the hover tool you have to create a ColumnDataSource object from the Pandas dataframe, create a Hover object, and then use a FOR loop to render each line, otherwise resort to using HoloViews (a higher level API around Bokeh), which I still don't see how to get line labels. So I look into HoloViews further and I also find out it doesn't support pandas dataframe index, you have to resort to doing an additional reset_index() per their [doc](http://dev.holoviews.org/Tutorials/Pandas_Conversion.html).
Plotly surprisingly supports Pandas dataframes more completely compared to Bokeh (shows column names/line labels in the hover tool) and supports dataframe index. This is part of the major reason why it looks like I will have to stick with Plotly for interactive visualizations. If I have a need for a viz server or plot billions of data points, then I'll use Bokeh.
/r/pystats
https://redd.it/6xtmes
Just curious if anybody else find it surprising that Bokeh doesn't support Pandas dataframe as well as they would like as compared to plotly? Bokeh, seaborn, dask, pandas, et. el. are all part of the pydata organization. So I was surprised for instance, if you make a Bokeh chart of multiple lines from a pandas dataframe, the hover tool doesn't include the column names. It includes the (x,y) coordinates and index value, but omits the line labels!!! Hmmm...wow. One of the usefulness of the hover tool is when you have multiple lines, you want to easily identify the corresponding line label. In Bokeh, to get the line labels/column names in the hover tool you have to create a ColumnDataSource object from the Pandas dataframe, create a Hover object, and then use a FOR loop to render each line, otherwise resort to using HoloViews (a higher level API around Bokeh), which I still don't see how to get line labels. So I look into HoloViews further and I also find out it doesn't support pandas dataframe index, you have to resort to doing an additional reset_index() per their [doc](http://dev.holoviews.org/Tutorials/Pandas_Conversion.html).
Plotly surprisingly supports Pandas dataframes more completely compared to Bokeh (shows column names/line labels in the hover tool) and supports dataframe index. This is part of the major reason why it looks like I will have to stick with Plotly for interactive visualizations. If I have a need for a viz server or plot billions of data points, then I'll use Bokeh.
/r/pystats
https://redd.it/6xtmes
Postgres vs MySql - Which is better? Why?
I use MySql, as pythonanywhere has that preinstalled for free accounts. Any reason why you might go with postgres over mysql?
/r/flask
https://redd.it/6y2u0m
I use MySql, as pythonanywhere has that preinstalled for free accounts. Any reason why you might go with postgres over mysql?
/r/flask
https://redd.it/6y2u0m
reddit
Postgres vs MySql - Which is better? Why? • r/flask
I use MySql, as pythonanywhere has that preinstalled for free accounts. Any reason why you might go with postgres over mysql?