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?
[AF] Where to store data and and static charts to be accessed by a Flask app
Flask newbie here! I have a question about how best to supply data to a Flask app.
I have a Flask app that shows some data and charts that are updated every hour. I'd consider the data "small" (a table of ~50 rows and 3 columns). The data and charts are generated by an R script that I have running outside and independently of my Flask app. The R script stores the data as a csv file and the charts as images on AWS S3, which the Flask app loads and presents. The Flask app does not write to the data set; it only reads it.
This setup works fine for now, but I'm wondering if I will experience issues as usage of the app (hopefully) scales. Are there issues with the app loading a csv file instead of reading from a database? Are there issues with the data and charts sitting outside of the app entirely?
Being new to web app development, I just want to make sure that I'm on the right path and not making egregious mistakes. Apologies if my current setup is way off the mark, but I would appreciate feedback. Thanks for your help!
/r/flask
https://redd.it/6xvlwk
Flask newbie here! I have a question about how best to supply data to a Flask app.
I have a Flask app that shows some data and charts that are updated every hour. I'd consider the data "small" (a table of ~50 rows and 3 columns). The data and charts are generated by an R script that I have running outside and independently of my Flask app. The R script stores the data as a csv file and the charts as images on AWS S3, which the Flask app loads and presents. The Flask app does not write to the data set; it only reads it.
This setup works fine for now, but I'm wondering if I will experience issues as usage of the app (hopefully) scales. Are there issues with the app loading a csv file instead of reading from a database? Are there issues with the data and charts sitting outside of the app entirely?
Being new to web app development, I just want to make sure that I'm on the right path and not making egregious mistakes. Apologies if my current setup is way off the mark, but I would appreciate feedback. Thanks for your help!
/r/flask
https://redd.it/6xvlwk
reddit
[AF] Where to store data and and static charts to be... • r/flask
Flask newbie here! I have a question about how best to supply data to a Flask app. I have a Flask app that shows some data and charts that are...
Great talk by David Beazley about the new features of python 3.6
https://www.youtube.com/watch?v=js_0wjzuMfc
/r/Python
https://redd.it/6ydaw4
https://www.youtube.com/watch?v=js_0wjzuMfc
/r/Python
https://redd.it/6ydaw4
YouTube
The Fun of Reinvention (Screencast)
Invited Keynote Talk from PyCon Israel, June 12, 2017. I cause trouble and build a framework using all sorts of new Python 3.6+ features.
This video can be discussed at https://forum.dabeaz.com/t/the-fun-of-reinvention-pycon-israel-june-12-2017/204/1
David…
This video can be discussed at https://forum.dabeaz.com/t/the-fun-of-reinvention-pycon-israel-june-12-2017/204/1
David…
Python for Data Science and Machine Learning Bootcamp
https://medium.com/@amtoddstewart/learn-python-for-data-science-and-machine-learning-with-jose-portilla-1445beddf345
/r/Python
https://redd.it/6ye3n7
https://medium.com/@amtoddstewart/learn-python-for-data-science-and-machine-learning-with-jose-portilla-1445beddf345
/r/Python
https://redd.it/6ye3n7
Medium
Learn Python For Data Science And Machine Learning With Jose Portilla
You will learn to use NumPy, Pandas, Seaborn, Matplotlib, Plotly, Scikit-Learn, Machine Learning, Tensorflow, and much more
Creative Applications of Deep Learning python package (open-sourced TensorFlow models from MOOC)
https://github.com/pkmital/pycadl
/r/Python
https://redd.it/6ycuye
https://github.com/pkmital/pycadl
/r/Python
https://redd.it/6ycuye
GitHub
pkmital/pycadl
pycadl - Python package with source code from the course "Creative Applications of Deep Learning w/ TensorFlow"
Help to redo Economics: The Agent-Based Computational Economics Library. I worked for 5 years and it is finally stable.
https://github.com/AB-CE/abce/releases/tag/0.9b
/r/Python
https://redd.it/6ybnhj
https://github.com/AB-CE/abce/releases/tag/0.9b
/r/Python
https://redd.it/6ybnhj
GitHub
AB-CE/abce
abce - Agent-Based Complete Economy, the Python library that makes AB modelling easier..
A journey of reproducibility from Excel to Pandas
https://www.software.ac.uk/blog/2017-09-01-lonely-journey-excel-pandas
/r/Python
https://redd.it/6yfrhh
https://www.software.ac.uk/blog/2017-09-01-lonely-journey-excel-pandas
/r/Python
https://redd.it/6yfrhh
reddit
A journey of reproducibility from Excel to Pandas • r/Python
2 points and 0 comments so far on reddit
Any Python project for students?
Hi, Reddit! I'm a student of MIPT and I have a course about programming and innovations (not really innovations, administration just calls it this way), and during this course we will have to create different "innovative" projects in small teams (about 2 - 3 student per team). These projects don't have to be really innovative, but it's also not a good idea to create someting that was created thousands times before, like TODO application. Unfortunately, I don't have any good ideas for such project! The only one I have is to create some kind of Wolfram Alpha analogue using Telegram Bot and SymPy.
So, do you have any ideas, what should we (my team and I) implement? Any help will be appreciated!
/r/Python
https://redd.it/6yg2qx
Hi, Reddit! I'm a student of MIPT and I have a course about programming and innovations (not really innovations, administration just calls it this way), and during this course we will have to create different "innovative" projects in small teams (about 2 - 3 student per team). These projects don't have to be really innovative, but it's also not a good idea to create someting that was created thousands times before, like TODO application. Unfortunately, I don't have any good ideas for such project! The only one I have is to create some kind of Wolfram Alpha analogue using Telegram Bot and SymPy.
So, do you have any ideas, what should we (my team and I) implement? Any help will be appreciated!
/r/Python
https://redd.it/6yg2qx
reddit
Any Python project for students? • r/Python
Hi, Reddit! I'm a student of MIPT and I have a course about programming and innovations (not really innovations, administration just calls it this...
A Python module for parallel optimization of expensive black-box functions
https://github.com/paulknysh/blackbox
/r/Python
https://redd.it/6yg0d6
https://github.com/paulknysh/blackbox
/r/Python
https://redd.it/6yg0d6
GitHub
GitHub - paulknysh/blackbox: A Python module for parallel optimization of expensive black-box functions
A Python module for parallel optimization of expensive black-box functions - paulknysh/blackbox
Problem with Flask-SQLAlchemy
Hi, everybody. I'm trying to pass an HTML text (a tag text) to a table using "db.session.Model(HTML)", but I get "sqlalchemy.exc.InterfaceError: (sqlite3.InterfaceError) Error binding parameter 0 - probably unsupported type." If I then pass "HTML" inside a str() function, to turn it into a string, I get "sqlalchemy.orm.exc.UnmappedInstanceError: Class 'builtins.str' is not mapped".
Does anyone know how to solve that problem?
/r/flask
https://redd.it/6wsbz0
Hi, everybody. I'm trying to pass an HTML text (a tag text) to a table using "db.session.Model(HTML)", but I get "sqlalchemy.exc.InterfaceError: (sqlite3.InterfaceError) Error binding parameter 0 - probably unsupported type." If I then pass "HTML" inside a str() function, to turn it into a string, I get "sqlalchemy.orm.exc.UnmappedInstanceError: Class 'builtins.str' is not mapped".
Does anyone know how to solve that problem?
/r/flask
https://redd.it/6wsbz0
reddit
Problem with Flask-SQLAlchemy • r/flask
Hi, everybody. I'm trying to pass an HTML text (a tag text) to a table using "db.session.Model(HTML)", but I get "sqlalchemy.exc.InterfaceError:...
Easiest way to send information to a site
Hi all,
I have a site running on pythonanywhere that uses a database to display information to users. The problem is that pythonanywhere doesn't let you remotely write to a database so it is a pain to update the database and I'm looking for a way to automate it. I was thinking of having a specific route in which I could send it a list of values and these values would be written to the database. I was looking and it seems that an API would be an option. I'm not in the mood to learn how to create an API right now if I don't have to. Is there an easier way to do this? Basically I would like to have a python script running on my home computer then at a certain point, it accesses the appropriate page (using requests or something like that) and these values get written to the database.
Thanks
/r/flask
https://redd.it/6wr416
Hi all,
I have a site running on pythonanywhere that uses a database to display information to users. The problem is that pythonanywhere doesn't let you remotely write to a database so it is a pain to update the database and I'm looking for a way to automate it. I was thinking of having a specific route in which I could send it a list of values and these values would be written to the database. I was looking and it seems that an API would be an option. I'm not in the mood to learn how to create an API right now if I don't have to. Is there an easier way to do this? Basically I would like to have a python script running on my home computer then at a certain point, it accesses the appropriate page (using requests or something like that) and these values get written to the database.
Thanks
/r/flask
https://redd.it/6wr416
reddit
Easiest way to send information to a site • r/flask
Hi all, I have a site running on pythonanywhere that uses a database to display information to users. The problem is that pythonanywhere doesn't...