Interesting Talks from PyData Amsterdam 2017
https://medium.com/@srdjan.santic/interesting-talks-from-pydata-amsterdam-2017-db009ca7c832
/r/pystats
https://redd.it/67x5m8
https://medium.com/@srdjan.santic/interesting-talks-from-pydata-amsterdam-2017-db009ca7c832
/r/pystats
https://redd.it/67x5m8
Medium
Interesting Talks from PyData Amsterdam 2017 – Srdjan Santic – Medium
I’ve always been fascinated by the openness and collaborative spirit that exist in the wider Python community. This is particularly…
[D] Off-Policy A3C reinforcement learning
Hello, I have a question and hope someone can help me understand:
What exactly does prevent the A3C algorithm from beeing used off-policy?
For example, the Actor-Critic algorithm from rlcode ( https://github.com/rlcode/reinforcement-learning/blob/master/Code%202.%20Cartpole/5.%20Actor-Critic/Cartpole_ActorCritic.py ) is off-policy:
It uses a replay-memory and trains on random batches of it, just like Q-Learning does. However, it does not use n-step-reward, it trains on "Critic(Next_State) - Critic(State)"
Sure, on-policy would mean not to use any replay memory but only learning on the newest state-action-reward pairs once (that reflect the current policy).
But if that was the only difference, one could easily use A3C off-policy, right? So what exactly does prevent an off-policy variant of A3C and why is it always stated as strictly on-policy (with sophisticated extensions needed to make it off-policy, like ACER)?
Is it because of the n-step-rewards, that can only be computed correctly for following a given policy and will become "obsolete" or "wrong" if the policy has changed?
This is the only explanation I could come up with, as n-step-rewards means to follow the current policy for n-steps and then calculating the reward of the past action in strict correlation with the current policy, hence its on-policy?!
So, is the only difference between a off-policy actor-critic algorithm and A3C the lack of a replay-memory and n-step-reward calculation??
Thanks in advance
/r/MachineLearning
https://redd.it/688cm9
Hello, I have a question and hope someone can help me understand:
What exactly does prevent the A3C algorithm from beeing used off-policy?
For example, the Actor-Critic algorithm from rlcode ( https://github.com/rlcode/reinforcement-learning/blob/master/Code%202.%20Cartpole/5.%20Actor-Critic/Cartpole_ActorCritic.py ) is off-policy:
It uses a replay-memory and trains on random batches of it, just like Q-Learning does. However, it does not use n-step-reward, it trains on "Critic(Next_State) - Critic(State)"
Sure, on-policy would mean not to use any replay memory but only learning on the newest state-action-reward pairs once (that reflect the current policy).
But if that was the only difference, one could easily use A3C off-policy, right? So what exactly does prevent an off-policy variant of A3C and why is it always stated as strictly on-policy (with sophisticated extensions needed to make it off-policy, like ACER)?
Is it because of the n-step-rewards, that can only be computed correctly for following a given policy and will become "obsolete" or "wrong" if the policy has changed?
This is the only explanation I could come up with, as n-step-rewards means to follow the current policy for n-steps and then calculating the reward of the past action in strict correlation with the current policy, hence its on-policy?!
So, is the only difference between a off-policy actor-critic algorithm and A3C the lack of a replay-memory and n-step-reward calculation??
Thanks in advance
/r/MachineLearning
https://redd.it/688cm9
GitHub
rlcode/reinforcement-learning
reinforcement-learning - Minimal and Clean Reinforcement Learning Examples
Help with django and MongoDB
Hi guys, I need a little bit of help. I'm a student and I got an assignment with NoSQL databases, we need to use MongoDB (we need to do a LinkedIn sort of web app). I decided to used django since I'm trying to learn it and I've been finding some issues trying to link MongoDB to my django app.
* OS: Windows 8.1
* Django version: 1.10
* MongoDB version: 3.0.4 (since I have a 32-bits laptop)
I've followed different tutorials and can't seem to get this running. I'm also using PyMongo 2.8 and Mongoengine 0.9.
* This is how I have my [settings.py](https://pastebin.com/RGLiZKQ4) file.
* The errors I'm getting is [this](https://pastebin.com/fAPwTVD8)
I'm assuming that the authentication failed because I might no me logging in correctly but this is the way I've seem in most tutorials. The 'root' user I created from mongo shell.
Sorry for the pastebin links I just don't want to make this post longer. And thank you.
@EDIT: So it results that my user 'root' doesn't exist on my testDB. I switched to admin db -> created user -> applied 'root' rolls ... I read it would give him access to all my databases it seems no, I also created another called 'admin' and gave him 'roll: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]' but it doesn't seem to work as well. Does anyone know the correct way to do this? Or this shall be done from my 'testDB' ?
/r/django
https://redd.it/686x5o
Hi guys, I need a little bit of help. I'm a student and I got an assignment with NoSQL databases, we need to use MongoDB (we need to do a LinkedIn sort of web app). I decided to used django since I'm trying to learn it and I've been finding some issues trying to link MongoDB to my django app.
* OS: Windows 8.1
* Django version: 1.10
* MongoDB version: 3.0.4 (since I have a 32-bits laptop)
I've followed different tutorials and can't seem to get this running. I'm also using PyMongo 2.8 and Mongoengine 0.9.
* This is how I have my [settings.py](https://pastebin.com/RGLiZKQ4) file.
* The errors I'm getting is [this](https://pastebin.com/fAPwTVD8)
I'm assuming that the authentication failed because I might no me logging in correctly but this is the way I've seem in most tutorials. The 'root' user I created from mongo shell.
Sorry for the pastebin links I just don't want to make this post longer. And thank you.
@EDIT: So it results that my user 'root' doesn't exist on my testDB. I switched to admin db -> created user -> applied 'root' rolls ... I read it would give him access to all my databases it seems no, I also created another called 'admin' and gave him 'roll: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]' but it doesn't seem to work as well. Does anyone know the correct way to do this? Or this shall be done from my 'testDB' ?
/r/django
https://redd.it/686x5o
Pastebin
setting.py - Pastebin.com
How do you make beautiful data visualizations in Python?
https://www.quora.com/How-do-you-make-beautiful-data-visualizations-in-Python
/r/Python
https://redd.it/688rs3
https://www.quora.com/How-do-you-make-beautiful-data-visualizations-in-Python
/r/Python
https://redd.it/688rs3
reddit
How do you make beautiful data visualizations in Python? • r/Python
29 points and 4 comments so far on reddit
How can I force a pandas table to resize to fit something I print out?
Here is the table: https://www.dropbox.com/s/2r4vb0wuc2icwp2/table2.xlsx?dl=0
Cell code:
table2 = pd.read_excel('table2.xlsx')
display(HTML(table2.to_html(index=False)))
When I try to print out the notebook the last two columns are cut off. Any ideas on how I can format it so that won't happen? I'm printing using chrome -> print preview. I use this method because the PDF via latex just doesn't capture a very similar PDF output.
/r/IPython
https://redd.it/687ope
Here is the table: https://www.dropbox.com/s/2r4vb0wuc2icwp2/table2.xlsx?dl=0
Cell code:
table2 = pd.read_excel('table2.xlsx')
display(HTML(table2.to_html(index=False)))
When I try to print out the notebook the last two columns are cut off. Any ideas on how I can format it so that won't happen? I'm printing using chrome -> print preview. I use this method because the PDF via latex just doesn't capture a very similar PDF output.
/r/IPython
https://redd.it/687ope
Dropbox
table2.xlsx
Shared with Dropbox
All you need to know about prefetching in Django
https://medium.com/@hakibenita/all-you-need-to-know-about-prefetching-in-django-f9068ebe1e60
/r/django
https://redd.it/689gli
https://medium.com/@hakibenita/all-you-need-to-know-about-prefetching-in-django-f9068ebe1e60
/r/django
https://redd.it/689gli
Medium
All you need to know about prefetching in Django
I have recently worked on a ticket ordering system for a conference. It was very important for the customer to see a table of orders…
[P] Predicting the outcome of Cricket Matches using Machine Learning
https://crickytics.com/predicting-the-outcome-of-cricket-matches-using-machine-learning/
/r/MachineLearning
https://redd.it/689r9b
https://crickytics.com/predicting-the-outcome-of-cricket-matches-using-machine-learning/
/r/MachineLearning
https://redd.it/689r9b
Crickytics
Predicting the outcome of Cricket Matches using Machine Learning
[AF] Using SQLAlchemy's ilike or contains operators
I'm building some simple search functionality into my site, and I'm using the `contains` operator to search my rows for some text. My query looks something like this: `User.query.filter(func.lower(User.name).contains(term))`
However, when I enter `_` or `%`, I get every single row! How can I escape these the proper way? I know I can probably just do a `.replace` on the search term but what do I replace it with? Is there an official SQLAlchemy way of doing this? Every other part of SQLAlchemy I've been exploring is really nice and polished, but apparently not this part!
/r/flask
https://redd.it/68998q
I'm building some simple search functionality into my site, and I'm using the `contains` operator to search my rows for some text. My query looks something like this: `User.query.filter(func.lower(User.name).contains(term))`
However, when I enter `_` or `%`, I get every single row! How can I escape these the proper way? I know I can probably just do a `.replace` on the search term but what do I replace it with? Is there an official SQLAlchemy way of doing this? Every other part of SQLAlchemy I've been exploring is really nice and polished, but apparently not this part!
/r/flask
https://redd.it/68998q
reddit
[AF] Using SQLAlchemy's ilike or contains operators • r/flask
I'm building some simple search functionality into my site, and I'm using the `contains` operator to search my rows for some text. My query looks...
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:...