Develop your first web application in Django 1.10 â Part 4
http://blog.adnansiddiqi.me/develop-your-first-web-application-in-django-1-10-part-4/?utm_source=r_django_part4&utm_medium=reddit&utm_campaign=c_r_django_part4
/r/django
https://redd.it/689q1t
http://blog.adnansiddiqi.me/develop-your-first-web-application-in-django-1-10-part-4/?utm_source=r_django_part4&utm_medium=reddit&utm_campaign=c_r_django_part4
/r/django
https://redd.it/689q1t
Adnan's Random bytes
Develop your first web application in Django 1.10 – Part 4
In previous post I discussed about Db interaction with a Django application and how to pass data in a html view and display it. Now we will move onto next step and will learn how to use HTML forms to store data in database.
Django Forms
The form I am going…
Django Forms
The form I am going…
Creating a rest api with many to many relationships
As the title says I'm creating an API to map employees to shifts, I've got /employees and /shifts, but I'm a little confused about creating an endpoint to map the two? I was going to create another endpoint /patterns, and then pass an employee id and shift id and parameters to create a new mapping, does this sound correct? Also do I need to create a new model or serializer for this endpoint?
thanks
/r/django
https://redd.it/68bzyy
As the title says I'm creating an API to map employees to shifts, I've got /employees and /shifts, but I'm a little confused about creating an endpoint to map the two? I was going to create another endpoint /patterns, and then pass an employee id and shift id and parameters to create a new mapping, does this sound correct? Also do I need to create a new model or serializer for this endpoint?
thanks
/r/django
https://redd.it/68bzyy
reddit
Creating a rest api with many to many relationships • r/django
As the title says I'm creating an API to map employees to shifts, I've got /employees and /shifts, but I'm a little confused about creating an...
Free Wolfram Alpha clone written in Python. How is this not more popular?
http://gamma.sympy.org/
/r/Python
https://redd.it/68cgsn
http://gamma.sympy.org/
/r/Python
https://redd.it/68cgsn
reddit
Free Wolfram Alpha clone written in Python. How is this... • r/Python
29 points and 3 comments so far on reddit
My university is thinking of teaching the engineering students python instead of matlab - How to help convince them?
Hey all
As the title suggests, the teaching committee at my university are thinking of moving from teaching undergrad engineering students python instead of matlab.
Since they've asked for some student input, can anyone think of any decent arguments to try to make the move?
biggest reason presented for keeping matlab is that matrix manipulations are easy (if you've ever tried to do FEM stuff in numpy it just makes you sad).
/r/Python
https://redd.it/68ahc5
Hey all
As the title suggests, the teaching committee at my university are thinking of moving from teaching undergrad engineering students python instead of matlab.
Since they've asked for some student input, can anyone think of any decent arguments to try to make the move?
biggest reason presented for keeping matlab is that matrix manipulations are easy (if you've ever tried to do FEM stuff in numpy it just makes you sad).
/r/Python
https://redd.it/68ahc5
reddit
My university is thinking of teaching the engineering... • r/Python
Hey all As the title suggests, the teaching committee at my university are thinking of moving from teaching undergrad engineering students python...
[R] Toward Efficient Deep Neural Network Deployment: Deep Compression and EIE (2016)
https://www.youtube.com/watch?v=CrDRr2fxbsg
/r/MachineLearning
https://redd.it/68c88v
https://www.youtube.com/watch?v=CrDRr2fxbsg
/r/MachineLearning
https://redd.it/68c88v
YouTube
Toward Efficient Deep Neural Network Deployment: Deep Compression and EIE, Song Han
Neural networks are both computationally and memory intensive, making them difficult to deploy on embedded systems with limited hardware resources. Song Han explains how deep compression addresses this limitation by reducing the storage requirement of neural…
PRAW 4.5.0 Released
Notable additions:
* Complete API support for the new modmail system (huge shout out to [Levi Roth](https://github.com/leviroth) for the implementation)
* inbox stream
* Ability to introduce pauses into streams (thanks /u/elnuno)
Please see the 4.5.0 change log entries here: https://praw.readthedocs.io/en/latest/package_info/change_log.html
### PRAW 5
The next release, sans any necessary bug fixes, will be PRAW5 in order to resolve all the deprecations up to this point in the PRAW4 versions. Those items are already enumerated in the previously linked change log. To make use of these changes now, install the development version of PRAW via:
pip install --upgrade https://github.com/praw-dev/praw/archive/master.zip
Thanks again to everyone who has contributed to PRAW via code, documentation, or by simply helping to answer other people's questions. PRAW wouldn't be what it is today without your help.
/r/Python
https://redd.it/68e6z7
Notable additions:
* Complete API support for the new modmail system (huge shout out to [Levi Roth](https://github.com/leviroth) for the implementation)
* inbox stream
* Ability to introduce pauses into streams (thanks /u/elnuno)
Please see the 4.5.0 change log entries here: https://praw.readthedocs.io/en/latest/package_info/change_log.html
### PRAW 5
The next release, sans any necessary bug fixes, will be PRAW5 in order to resolve all the deprecations up to this point in the PRAW4 versions. Those items are already enumerated in the previously linked change log. To make use of these changes now, install the development version of PRAW via:
pip install --upgrade https://github.com/praw-dev/praw/archive/master.zip
Thanks again to everyone who has contributed to PRAW via code, documentation, or by simply helping to answer other people's questions. PRAW wouldn't be what it is today without your help.
/r/Python
https://redd.it/68e6z7
GitHub
leviroth - Overview
Leviroth is a hostile 72 elite kraken located in the waters just north of the Riplash Ruins proper in the southern waters of the Borean Tundra. - leviroth
Django LTS: Security patches for older versions of the Django web development framework
https://djangolts.com/
/r/django
https://redd.it/68atb0
https://djangolts.com/
/r/django
https://redd.it/68atb0
reddit
Django LTS: Security patches for older versions of the... • r/django
0 points and 3 comments so far on reddit
Science Flask: a web-app template for online scientific research tools, built with Python Flask
Here's [Science Flask](https://github.com/danielhomola/science_flask), a template project for scientic web-apps. If you're a scientist planning to put your research tool online, then hopefully it will save you weeks of development time. I definitely wish I had something like this when I started [CorrMapper](https://www.medbio.imperial.ac.uk/corrmapper/).
/r/flask
https://redd.it/68g01c
Here's [Science Flask](https://github.com/danielhomola/science_flask), a template project for scientic web-apps. If you're a scientist planning to put your research tool online, then hopefully it will save you weeks of development time. I definitely wish I had something like this when I started [CorrMapper](https://www.medbio.imperial.ac.uk/corrmapper/).
/r/flask
https://redd.it/68g01c
GitHub
GitHub - danielhomola/science_flask: ScienceFlask: an open-source template for scientific web-app development
ScienceFlask: an open-source template for scientific web-app development - danielhomola/science_flask
[P]Automatic Speech Recognition implemented in TensorFlow
https://github.com/zzw922cn/Automatic_Speech_Recognition
/r/MachineLearning
https://redd.it/68f60z
https://github.com/zzw922cn/Automatic_Speech_Recognition
/r/MachineLearning
https://redd.it/68f60z
GitHub
GitHub - zzw922cn/Automatic_Speech_Recognition: End-to-end Automatic Speech Recognition for Madarian and English in Tensorflow
End-to-end Automatic Speech Recognition for Madarian and English in Tensorflow - GitHub - zzw922cn/Automatic_Speech_Recognition: End-to-end Automatic Speech Recognition for Madarian and English in...
[P] Globally and Locally consistent image completion
https://twitter.com/stsiizk/status/858517661889646592
/r/MachineLearning
https://redd.it/68gfbl
https://twitter.com/stsiizk/status/858517661889646592
/r/MachineLearning
https://redd.it/68gfbl
Twitter
Satoshi Iizuka
SIGGRAPH 2017に論文が正式に採択されました。ディープラーニングによって複雑な画像補完を行う手法です。画像中の不要な物体を消したり、人の顔を変化させたりもできます。 https://t.co/iHccQXmqEh https://t.co/zhmVjIajcy
Django Tutorial | sqlmigrate command ending in error
I am going through this [tutorial](https://docs.djangoproject.com/en/1.11/intro/tutorial02/) in the documentation. When I execute the command: "python manage.py sqlmigrate polls 0001" it is ending in below error. Please help resolve the issue.
**Error:**
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/commands/sqlmigrate.py", line 33, in execute
return super(Command, self).execute(*args, **options)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/commands/sqlmigrate.py", line 62, in handle
sql_statements = executor.collect_sql(plan)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/db/migrations/executor.py", line 219, in collect_sql
with self.connection.schema_editor(collect_sql=True, atomic=migration.atomic) as schema_editor:
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py", line 25, in __enter__
self._initial_pragma_fk = c.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
**Versions:**
Python **2.7.13**
Django **1.11**
sqlite3 **2.6.0**
/r/djangolearning
https://redd.it/68fbvp
I am going through this [tutorial](https://docs.djangoproject.com/en/1.11/intro/tutorial02/) in the documentation. When I execute the command: "python manage.py sqlmigrate polls 0001" it is ending in below error. Please help resolve the issue.
**Error:**
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/commands/sqlmigrate.py", line 33, in execute
return super(Command, self).execute(*args, **options)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/commands/sqlmigrate.py", line 62, in handle
sql_statements = executor.collect_sql(plan)
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/db/migrations/executor.py", line 219, in collect_sql
with self.connection.schema_editor(collect_sql=True, atomic=migration.atomic) as schema_editor:
File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py", line 25, in __enter__
self._initial_pragma_fk = c.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
**Versions:**
Python **2.7.13**
Django **1.11**
sqlite3 **2.6.0**
/r/djangolearning
https://redd.it/68fbvp
reddit
Django Tutorial | sqlmigrate command ending in... • r/djangolearning
I am going through this [tutorial](https://docs.djangoproject.com/en/1.11/intro/tutorial02/) in the documentation. When I execute the command:...
Why did Flask run past CherryPy?
I've been wondering this off and on for awhile. I've been a user of
Python before Flask existed and CherryPy served me well then. And it
still does now. I simply don't understand what motivated the creation
of Flask when CherryPy already existed. And I certainly dont
understand why anyone who did a point-for-point comparision of
frameworks before choosing one would choose Flask, save for popularity
of the author.
The first thing I notice about Flask is manual routing whereas
CherryPy has automatic routing by default. That seems like a step
backward not forward.
The rest of my observations about the 2 microframeworks I will post as
a reply
to
[Eric Larsen's post on the subject](http://ionrock.org/2014/12/19/flask_vs_cherrypy.html).
> I suspect the reason CherryPy is not seen a hip framework is due to
> most users of CherryPy happily work around the rough edges and get
> work done rather than make an effort market their framework of
> choice.
I agree that CherryPy is not popular. I dont know what rough edges you
are taking about. It works fine for me.
> The best thing I can say about Flask is the community of projects.
Seconded. There are a lot of downloadable flask apps and plugins.
> Flask-Admin is extremely helpful along side Flask-SQLAlchemy.
Yes, I really like an automatic admin interface. That is the one thing
I miss from Django. And what I disliked about Django (`settings.py`)
is solved by something called `importd` (but I cant find a link to
it). But what I see as unsolveable by Django is that the ORM is not SQLAlchemy and I refuse to have things like "Stale MySQL handle" errors... anyway, back to the CherryPy/Flask topic of this post.
> Unfortunately, while this wealth of excellent community packages is
> excellent, Flask falls short when it comes to actual
> development. Its lack of organization in terms of dispatching makes
> organizing code feel very haphazard. It is easy to create circular
> dependencies due to the use of imports for establishing what code
> gets called. In essence, Flask forces you to build some patterns
> that are application specific rather than prescribing some models
> that make sense generally.
> While a lack of direction can make the organization of the code less
> obvious, it does allow you to easily hook applications together. The
> Blueprint model, from what I can tell, makes it reasonably easy to
> compose applications within a site.
Hmm, being able to mount applications is a big thing and if Flask
forces you through a tube to do it, then that sounds like an OK
thing.
/r/Python
https://redd.it/68ff8b
I've been wondering this off and on for awhile. I've been a user of
Python before Flask existed and CherryPy served me well then. And it
still does now. I simply don't understand what motivated the creation
of Flask when CherryPy already existed. And I certainly dont
understand why anyone who did a point-for-point comparision of
frameworks before choosing one would choose Flask, save for popularity
of the author.
The first thing I notice about Flask is manual routing whereas
CherryPy has automatic routing by default. That seems like a step
backward not forward.
The rest of my observations about the 2 microframeworks I will post as
a reply
to
[Eric Larsen's post on the subject](http://ionrock.org/2014/12/19/flask_vs_cherrypy.html).
> I suspect the reason CherryPy is not seen a hip framework is due to
> most users of CherryPy happily work around the rough edges and get
> work done rather than make an effort market their framework of
> choice.
I agree that CherryPy is not popular. I dont know what rough edges you
are taking about. It works fine for me.
> The best thing I can say about Flask is the community of projects.
Seconded. There are a lot of downloadable flask apps and plugins.
> Flask-Admin is extremely helpful along side Flask-SQLAlchemy.
Yes, I really like an automatic admin interface. That is the one thing
I miss from Django. And what I disliked about Django (`settings.py`)
is solved by something called `importd` (but I cant find a link to
it). But what I see as unsolveable by Django is that the ORM is not SQLAlchemy and I refuse to have things like "Stale MySQL handle" errors... anyway, back to the CherryPy/Flask topic of this post.
> Unfortunately, while this wealth of excellent community packages is
> excellent, Flask falls short when it comes to actual
> development. Its lack of organization in terms of dispatching makes
> organizing code feel very haphazard. It is easy to create circular
> dependencies due to the use of imports for establishing what code
> gets called. In essence, Flask forces you to build some patterns
> that are application specific rather than prescribing some models
> that make sense generally.
> While a lack of direction can make the organization of the code less
> obvious, it does allow you to easily hook applications together. The
> Blueprint model, from what I can tell, makes it reasonably easy to
> compose applications within a site.
Hmm, being able to mount applications is a big thing and if Flask
forces you through a tube to do it, then that sounds like an OK
thing.
/r/Python
https://redd.it/68ff8b
ionrock.org
Flask vs. CherryPy — Ionrock Dot Org
The Homepage of Eric Larson
How do I make my package available to do 'conda install XXXX'? I already got 'conda install -c jos_pol pandas-profiling' working
Hi all,
Does anybody know how to register a package in the main Anaconda channels? I already got
> conda install -c jos_pol pandas-profiling
working. Ideally, i would like to have instead
> conda install pandas-profiling
Just like with pip you just have
>pip install pandas-profiling
Is that even possible or is it restricted to a manually curated list by the Anaconda folks?
/r/pystats
https://redd.it/68eojb
Hi all,
Does anybody know how to register a package in the main Anaconda channels? I already got
> conda install -c jos_pol pandas-profiling
working. Ideally, i would like to have instead
> conda install pandas-profiling
Just like with pip you just have
>pip install pandas-profiling
Is that even possible or is it restricted to a manually curated list by the Anaconda folks?
/r/pystats
https://redd.it/68eojb
reddit
How do I make my package available to do 'conda... • r/pystats
Hi all, Does anybody know how to register a package in the main Anaconda channels? I already got > conda install -c jos_pol...
[R] Generating 3D animations for characters in videogames in realtime
http://theorangeduck.com/page/phase-functioned-neural-networks-character-control
/r/MachineLearning
https://redd.it/68i69k
http://theorangeduck.com/page/phase-functioned-neural-networks-character-control
/r/MachineLearning
https://redd.it/68i69k
Theorangeduck
Phase-Functioned Neural Networks for Character Control
Computer Science, Machine Learning, Programming, Art, Mathematics, Philosophy, and Short Fiction
Why use RESTfull API?
So far I just worked with flask rendering all websites itself. Example: http://flask.pocoo.org/
Yesterday I heard about RESTfull API. Example: https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
What is the advantage of separating the front end (VueJS, AngularJS, ...) and the backend (flask, returning JSON)? Unfortunately, I didn't understand the reason.
/r/flask
https://redd.it/68dwz4
So far I just worked with flask rendering all websites itself. Example: http://flask.pocoo.org/
Yesterday I heard about RESTfull API. Example: https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
What is the advantage of separating the front end (VueJS, AngularJS, ...) and the backend (flask, returning JSON)? Unfortunately, I didn't understand the reason.
/r/flask
https://redd.it/68dwz4
Google assistant on MacOS
I got the google assistant to launch on macOS with one touch
I had to modify the python code samples slightly to exit when a conversation is complete. Used automator to create an app out of shell script that activates virtualenv and runs the code.
Finally, I am using better touch tool to launch the app with a corner-tap on the trackpad.
Best part is that it recognizes my accent perfectly :)
Demo: [YouTube] (https://www.youtube.com/watch?v=WJ-6TR2p9S8)
/r/Python
https://redd.it/68koid
I got the google assistant to launch on macOS with one touch
I had to modify the python code samples slightly to exit when a conversation is complete. Used automator to create an app out of shell script that activates virtualenv and runs the code.
Finally, I am using better touch tool to launch the app with a corner-tap on the trackpad.
Best part is that it recognizes my accent perfectly :)
Demo: [YouTube] (https://www.youtube.com/watch?v=WJ-6TR2p9S8)
/r/Python
https://redd.it/68koid
YouTube
google assistant on macbook
I got the google assistant working with mac with one touch. I had to modify the python code samples slightly to exit when a conversation is complete. Used au...
[New to Django & Python] Is the two scoops book good for learning Django as a beginner who doesn't have experience with frameworks?
I o a do-able tutorial from the djangobook.com site - title, but it's outdated and i already have Django 1.11 installed. It's like solving a puzzle now instead of following the tutorial/guide. I have to search on the web for the out-dated answers and i am thinking about reading the two scoops book but will it be to hard, isn't it just a reference book which expects you to be experienced already with Django?
/r/django
https://redd.it/68ls3d
I o a do-able tutorial from the djangobook.com site - title, but it's outdated and i already have Django 1.11 installed. It's like solving a puzzle now instead of following the tutorial/guide. I have to search on the web for the out-dated answers and i am thinking about reading the two scoops book but will it be to hard, isn't it just a reference book which expects you to be experienced already with Django?
/r/django
https://redd.it/68ls3d
reddit
[New to Django & Python] Is the two scoops book good... • r/django
I o a do-able tutorial from the djangobook.com site - title, but it's outdated and i already have Django 1.11 installed. It's like solving a...
yieldfrom 1.0.0: A backport of the `yield from` semantic from Python 3.x to Python 2.7
https://pypi.python.org/pypi/yieldfrom/1.0.0
/r/Python
https://redd.it/68l0hf
https://pypi.python.org/pypi/yieldfrom/1.0.0
/r/Python
https://redd.it/68l0hf
pypi.python.org
yieldfrom 1.0.0 : Python Package Index
A backport of the `yield from` semantic from Python 3.x to Python 2.7
How to Create Your First Python 3.6 AWS Lambda Function
https://www.fullstackpython.com/blog/aws-lambda-python-3-6.html
/r/Python
https://redd.it/68m6iu
https://www.fullstackpython.com/blog/aws-lambda-python-3-6.html
/r/Python
https://redd.it/68m6iu
Fullstackpython
How to Create Your First Python 3.6 AWS Lambda Function
Code, create and execute your first Amazon Web Services (AWS) Lambda function with Python 3.6. Great post on fullstackpython.com!
Problems using Flask and AngularJS together
Im making a simple web applciation right now using Flask and AngularJS. However, since adding some AngularJS code to my web page, im having problems running my website locally. I just keep getting errors saying things in my Angular code are not defined [like this](http://imgur.com/a/zvkRH) when they run perfectly when i just double click on the .html file without starting up my flask app.
My code is [here if](https://pastebin.com/e0aGnBCN) for you to take a look at if needed.
Is there something I should be doing to make them work together or are they not compatible or something?
/r/flask
https://redd.it/68mhnc
Im making a simple web applciation right now using Flask and AngularJS. However, since adding some AngularJS code to my web page, im having problems running my website locally. I just keep getting errors saying things in my Angular code are not defined [like this](http://imgur.com/a/zvkRH) when they run perfectly when i just double click on the .html file without starting up my flask app.
My code is [here if](https://pastebin.com/e0aGnBCN) for you to take a look at if needed.
Is there something I should be doing to make them work together or are they not compatible or something?
/r/flask
https://redd.it/68mhnc
Imgur
Imgur: The most awesome images on the Internet
Imgur: The most awesome images on the Internet.