Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
[D] Machine Learning - WAYR (What Are You Reading) - Week 88

This is a place to share machine learning research papers, journals, and articles that you're reading this week. If it relates to what you're researching, by all means elaborate and give us your insight, otherwise it could just be an interesting paper you've read.

Please try to provide some insight from your understanding and please don't post things which are present in wiki.

Preferably you should link the arxiv page (not the PDF, you can easily access the PDF from the summary page but not the other way around) or any other pertinent links.

Previous weeks :

|1-10|11-20|21-30|31-40|41-50|51-60|61-70|71-80|81-90|
|----|-----|-----|-----|-----|-----|-----|-----|-----|
|[Week 1](https://www.reddit.com/4qyjiq)|[Week 11](https://www.reddit.com/57xw56)|[Week 21](https://www.reddit.com/60ildf)|[Week 31](https://www.reddit.com/6s0k1u)|[Week 41](https://www.reddit.com/7tn2ax)|[Week 51](https://reddit.com/9s9el5)|[Week 61](https://reddit.com/bfsx4z)|[Week 71](https://reddit.com/d7vno3)|[Week 81](https://reddit.com/f1f0iq)|||||||
|[Week 2](https://www.reddit.com/4s2xqm)|[Week 12](https://www.reddit.com/5acb1t)|[Week 22](https://www.reddit.com/64jwde)|[Week 32](https://www.reddit.com/72ab5y)|[Week 42](https://www.reddit.com/7wvjfk)|[Week 52](https://reddit.com/a4opot)|[Week 62](https://reddit.com/bl29ov)|[Week 72](https://reddit.com/de8h48)|[Week 82](https://reddit.com/f8fs6z)||
|[Week 3](https://www.reddit.com/4t7mqm)|[Week 13](https://www.reddit.com/5cwfb6)|[Week 23](https://www.reddit.com/674331)|[Week 33](https://www.reddit.com/75405d)|[Week 43](https://www.reddit.com/807ex4)|[Week 53](https://reddit.com/a8yaro)|[Week 63](https://reddit.com/bqlb3v)|[Week 73](https://reddit.com/dkox1s)|[Week 83](https://reddit.com/ffi41b)||
|[Week 4](https://www.reddit.com/4ub2kw)|[Week 14](https://www.reddit.com/5fc5mh)|[Week 24](https://www.reddit.com/68hhhb)|[Week 34](https://www.reddit.com/782js9)|[Week 44](https://reddit.com/8aluhs)|[Week 54](https://reddit.com/ad9ssz)|[Week 64](https://reddit.com/bw1jm7)|[Week 74](https://reddit.com/dr6nca)|[Week 84](https://reddit.com/fn62r1)||
|[Week 5](https://www.reddit.com/4xomf7)|[Week 15](https://www.reddit.com/5hy4ur)|[Week 25](https://www.reddit.com/69teiz)|[Week 35](https://www.reddit.com/7b0av0)|[Week 45](https://reddit.com/8tnnez)|[Week 55](https://reddit.com/ai29gi)|[Week 65](https://reddit.com/c7itkk)|[Week 75](https://reddit.com/dxshkg)|[Week 85](https://reddit.com/fvk7j6)||
|[Week 6](https://www.reddit.com/4zcyvk)|[Week 16](https://www.reddit.com/5kd6vd)|[Week 26](https://www.reddit.com/6d7nb1)|[Week 36](https://www.reddit.com/7e3fx6)|[Week 46](https://reddit.com/8x48oj)|[Week 56](https://reddit.com/ap8ctk)|[Week 66](https://reddit.com/cd7gko)|[Week 76](https://reddit.com/e4nmyk)|[Week 86](https://reddit.com/g4eavg)||
|[Week 7](https://www.reddit.com/52t6mo)|[Week 17](https://www.reddit.com/5ob7dx)|[Week 27](https://www.reddit.com/6gngwc)|[Week 37](https://www.reddit.com/7hcc2c)|[Week 47](https://reddit.com/910jmh)|[Week 57](https://reddit.com/auci7c)|[Week 67](https://reddit.com/cj0kyc)|[Week 77](https://reddit.com/eb4lxk)|[Week 87](https://reddit.com/gcx3uf)||
|[Week 8](https://www.reddit.com/53heol)|[Week 18](https://www.reddit.com/5r14yd)|[Week 28](https://www.reddit.com/6jgdva)|[Week 38](https://www.reddit.com/7kgcqr)|[Week 48](https://reddit.com/94up0g)|[Week 58](https://reddit.com/azjoht)|[Week 68](https://reddit.com/cp1jex)|[Week 78](https://reddit.com/ehbfst)||
|[Week 9](https://www.reddit.com/54kvsu)|[Week 19](https://www.reddit.com/5tt9cz)|[Week 29](https://www.reddit.com/6m9l1v)|[Week 39](https://www.reddit.com/7nayri)|[Week 49](https://reddit.com/98n2rt)|[Week 59](https://reddit.com/b50r5y)|[Week 69](https://reddit.com/cvde5a)|[Week 79](https://reddit.com/entcxy)||
|[Week 10](https://www.reddit.com/56s2oa)|[Week 20](https://www.reddit.com/5wh2wb)|[Week 30](https://www.reddit.com/6p3ha7)|[Week 40](https://www.reddit.com/7qel9p)|[Week 50](https://reddit.com/9cf158)|[Week 60](https://reddit.com/bakew0)|[Week
70](https://reddit.com/d1g1k9)|[Week 80](https://reddit.com/euctyw)||

Most upvoted papers two weeks ago:

/u/MohamedRashad: [https://openreview.net/pdf?id=Hkxzx0NtDB](https://openreview.net/pdf?id=Hkxzx0NtDB)

/u/Agent_KD637: [https://arxiv.org/abs/2002.11328](https://arxiv.org/abs/2002.11328)

/u/PabloSun: [https://arxiv.org/abs/1703.10135](https://arxiv.org/abs/1703.10135)

Besides that, there are no rules, have fun.

/r/MachineLearning
https://redd.it/glm6sv
This media is not supported in your browser
VIEW IN TELEGRAM
Websocket based Table that runs on Django Channels

/r/django
https://redd.it/go5cp1
A new React Library to go with Flask-File-Upload

https://preview.redd.it/hxknxpq9z6051.jpg?width=2053&format=pjpg&auto=webp&s=54188da03a9961a45ba3dd2259a017c40fa30dd9

https://preview.redd.it/lvuljz6az6051.jpg?width=2200&format=pjpg&auto=webp&s=ff9feae3c0b87500a07aaa8362c84187fc1df1f6

Hi guy,

I'm just releasing a new React library to make creating forms super easy & fast - [React-Bare-Forms](https://github.com/joegasewicz/react-bare-forms)

This works really nicely with one of my other libraries that makes uploading files in your Flask app very intuitive and handles all the server / db work for you:

[Flask-File-Upload](https://github.com/joegasewicz/flask-file-upload)

If you are a full stack developer or are building your next app with Flask & React, please take a look at these 2 libraries.

Thanks for your time!

/r/flask
https://redd.it/go6h3t
Image processing in Python

Long story short, I am Computer Science with no Python experience yet (I code using C and Java), however I got offered by a Physicists to work in image processing with them, something which I have no prior knowledge about. Is it something one can pick up in not much time when someone has programming experience?

/r/Python
https://redd.it/goen4x
Safest way to store and display code blocks in html?

I have a flask backend, and I'd like to do something similar to Reddit or Stackoverflow in terms of styling and displaying code. The code and associated data would be stored in a DB, Flask would fetch it and insert it into the template.

Example

def example():
return "something like this"

How would I safely submit, store, and render code blocks?

/r/flask
https://redd.it/gogvig
Flask App - need help creating route for sql table data

Hi everyone,

I have a Flask app that pulls SQL data into a datatable working away nicely. It's intended for internal use in our warehouse. What I am trying to do is have a link attached to each item name that when clicked, opens a new table with the historical sales listed. I have this working if I manually pass in the name of the product into the SQL stored procedure but how can I get this passing in from clicking on the item in the table.My route looks like this -

\#@app.route('/prev-orders/<itemid>', methods=\['GET'\])

def previous\_orders(itemid):

cursor = cnxn.cursor()

cursor.execute(order\_history)

data = cursor.fetchall() <--this should be fetchone?

return render\_template('previous-orders.html', data=data)

&#x200B;

My href in the <a> tag is href="{url\_for('previous\_orders', itemid=ItemId)}"

Edit - I forgot to show the stored procedure for SQL -

exec Web\_ProductHistory 'APRONS ROLL WHT 2903 (2)' - again, I can manually change the parameter being passed but I need the value passed from clicking on the item name on the table.

Any help would be great and apologies if the question is phrased poorly.

Thank you!

/r/flask
https://redd.it/gogbxd
Front-end JS frameworks are an overkill for Django?

I wanted to learn Vue, so I started looking for examples of Vue projects to get some inspiration. However, most of what I find are re-implementing functionality already available in Django.

For example, adding routes is the same as adding urls, the templating system is relatively similar. So I started wondering where is the value of adding thigns like Vue or React to a Django App.

Do you have any examples of projects where front-end frameworks actually achieve something that couldn't have been done directly with Django templates? To mind, I can think only about Wagtail, which uses React (I think) to manage content.

For what I see, unless it is fairly complex user interaction there is no real gain in adding yet another framework. But I may be mistaken. Any examples or ideas to light up the discussion are always appreciated.

/r/django
https://redd.it/gof2g2
This media is not supported in your browser
VIEW IN TELEGRAM
Made a bot that sends the whole Bee Movie script via Whatsapp

/r/Python
https://redd.it/gok9dd
This media is not supported in your browser
VIEW IN TELEGRAM
A tool that copies a selected area of your screen, not as a picture, but as pastable text (GitHub in comments)

/r/Python
https://redd.it/goldxf
How to automatically activate virtualenvs

How to automatically activate virtualenvs or is there any easy to do it

/r/django
https://redd.it/gomkar
Partner for a Social Welfare Web App? (built on flask)

Hi guys,

I am a student with experience in Python, Flask, MySQL and HTML. I am currently in the process of building a web app to track general health information of impoverished children living in my area. This is a tech solution to an event that is ongoing (in jeopardy now due to Covid19 :( ) Privately message me for further details, or any other questions about this project!

/r/flask
https://redd.it/gojs1t
Advice on getting started with Channels, ultimately to be deployed to Heroku

Hello experts, I'm about to start a Django project where I will use Channels for the first time. Users will get views "pushed" to them as part of a market research activity (answering questions together as a group while on video chat etc).

I will be hosting on Heroku when it's live. I'm in the process of reading tutorials, walkthroughs etc and I have a couple of questions please.

Context:

* Installing channels is fine - **pip install channels**
* I know I need a backend and have no reason not to go with the standard Redis. But there are so many different ways I'm totally confused what to do:
* The [Channels tutorial](https://channels.readthedocs.io/en/latest/tutorial/part_1.html) recommends a docker install.
* [Redis themselves](https://redis.io/download#installation) use a wget procedure to build from source...
* [This](https://realpython.com/getting-started-with-django-channels/) realpython walkthrough recommends installing **asgi\_redis** and then **brew install redis**.
* [Heroku themselves](https://devcenter.heroku.com/articles/heroku-redis#connecting-in-python) take a different tack with **pip install redis** and **django-redis-cache**

To my questions:

1. Let's assume that I want a vanilla setup, because I'm new that this, and given that I will be deploying to Heroku, which goes through requirements.txt to install all the right packages, is the Heroku path the right way

/r/django
https://redd.it/goops8
My Python Youtube channel just hit 20,000 subscribers - buildwithpython

Hey guys,

About a 2 years ago, I started a YouTube channel because I wanted to learn python. Teaching is the best way to learn. Both the channel and I have come a long way.

I wanted to thank the Python community for being so awesome. Thank-you for sticking around.

If someone is curious about the channel - youtube.com/c/buildwithpython

Or you can just search for buildwithpython on YouTube.

Just wanted to share my happiness with the community :)

/r/Python
https://redd.it/gon77w
Connecting second site to digital ocean droplet

I am trying to connect a second domain to my server on a new port. I have connected the site successfully to the IP and port, but the domain still routes to the Apache 2 default page. Here are the 2 links:

[(raw IP and port)](http://161.35.7.202:81/)

[(where the site should be)](http://entredeveloperslab.com)

/r/flask
https://redd.it/gos6s4
Building a multiplayer chess game with Channels

Hey guys,

I've been learning django-channels lately and wanted to make a small project to understand how it works better so I thought about building a site where you can create a new game room and play chess with other people.

I've been researching the best way to build and structure my project but I have a few questions.

1. Let's say I have created a GameBoard model that represents the current state of the game, would it be a good idea to send that object over the websockets back and forth everytime the player makes a move, or clicks on a piece (to see possible moves) in order to update the board. Or should I implement some of the game logic inside the js code.
2. How do I go about rendering the game board inside the html, do I need to "redraw" the entire board everytime a change has been made? Could I use django templating here or just javascript to do this without refreshing the page.

I don't have any experience making web-games so please excuse me if anything is not understood.

Thanks in advance for any help.

/r/django
https://redd.it/gok688
Made a super basic role-requirement decorator for flask-login

I wanted to add an admin user-type to my flask app, in addition to the basic authorized user that flask-login provides. I didn't want to use flask-user or flask-security, which I understand have role-based authorization, because they require additional database tables. I wanted the bare minimum, where a User's role attribute is just a string. I just wanted the extra decorator, not anything else.

Here's the result. A single file, customizable route decorator for adding a required roll to a view.

[https://github.com/schwartz721/role\_required.git](https://github.com/schwartz721/role_required.git)

/r/flask
https://redd.it/gou2r6