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
[P] CppRl: A C++ reinforcement learning library using the new PyTorch C++ frontend

I'm really excited to show you guys what I've been working on lately: [https://github.com/Omegastick/pytorch-cpp-rl](https://github.com/Omegastick/pytorch-cpp-rl)

It is *very* heavily based on [Ikostrikov's wonderful pytorch-a2c-ppo-acktr-gail](https://github.com/ikostrikov/pytorch-a2c-ppo-acktr-gail). You could even consider this a port. The API and underlying algorithms are almost identical (with the necessary changes involved in the move to C++).

It also contains a reimplementation simple OpenAI Gym server that communicates via [ZeroMQ](http://zeromq.org/) to test the framework on Gym environments.

CppRl aims to be an extensible, reasonably optimized, production-ready framework for using reinforcement learning in projects where Python isn't viable. It should be ready to use in desktop applications on user's computers with minimal setup required on the user's side.

## Motivation

At the time of writing, there are no general-use reinforcement learning frameworks for C++. I needed one for a personal project, and the PyTorch C++ frontend had recently been released, so I figured I should make one.

## Features

* Implemented algorithms:
* A2C
* PPO
* Recurrent policies (GRU based)
* Cross-platform compatibility (tested on Windows 10, Ubuntu 16.04, and Ubuntu 18.04)
* Solid test coverage
* Decently optimized (always open to pull requests improving optimization though)

# Sample

*Processing gif r1w6ksghemr21...*

​

**If you want to help with the project, please submit a PR!**

/r/MachineLearning
https://redd.it/bbyqdk
Where can I find someone to hire to deploy existing code?

Hi there, I'm a hobbyist dev who is way over my head. I learned how to deploy to Heroku, but the webapp I'm working on is for a family member who wants to keep using his existing host (and county specific domain) in another country. Unfortunately, I keep hitting walls in trying to deploy it and my family member is getting impatient.

I can't afford to waste any more time working on this and would like to hire someone to deploy it for me, but I don't know where to look. Any help in finding someone would be greatly appreciated - thanks a bunch!

/r/django
https://redd.it/bc63pf
I, as a self taught developer

/r/Python
https://redd.it/bc9jr7
[P] A (cat) machine learning game I've been working on...

I've finished working on the new algorithm which is based on ID3; entropy and information gain. Interested to see feedback! [Challenge Incredicat](https://incredicat.com/)!

\-------

Wasn't sure where to post this as I'm still working on it but wanted to put it out there to get any useful feedback or thoughts from the experts. It's basically a game similar to 20 Questions (or Animal, Vegetable, Mineral) that attempts to ask you questions to work out an object you are thinking about. You can think of everyday items (animals, household objects, food, quite a bit of other stuff etc) and it has 30 questions to try and guess the item. I've been working on it for a while but not sure what to do next so interested to hear anyone's thoughts...

The link for anyone that wants to try it out is [incredicat.com](https://incredicat.com/)

Thanks in advance!

/r/MachineLearning
https://redd.it/bc89ku
It's recursive!

/r/Python
https://redd.it/bcbi1v
[D] Kaiming He's original residual network results in 2015 have not been reproduced, not even by Kaiming He himself.

What's going on here? I have not found a single paper that reproduces or compares against the results shown in Table 4 of the original residual network paper. All papers report significantly worse numbers.

​

[https://arxiv.org/pdf/1512.03385.pdf](https://arxiv.org/pdf/1512.03385.pdf)

top1 err numbers from the paper:

>ResNet-50 @ 20.74
>
>ResNet-101 @ 19.87
>
>ResNet-152 @ 19.38

​

This paper have 20,000+ citations. DenseNet ([https://arxiv.org/abs/1608.06993](https://arxiv.org/abs/1608.06993), 3000+ citations) and Wide ResNets ([https://arxiv.org/abs/1605.07146](https://arxiv.org/abs/1605.07146), \~1000 citations) don't use this result. Not even one of Kaiming He's recent papers ([https://arxiv.org/abs/1904.01569](https://arxiv.org/abs/1904.01569)) use this result. Since I'm new to the community, maybe I'm missing something here. But isn't this paper one of the most cited pieces of work in the field??

/r/MachineLearning
https://redd.it/bcee2r
CS Senior looking for fun ways to help my Father learn Python(and make myself more comfortable with it at the same time).

Hey, everyone. I am a CS Senior who will be graduating in the fall. I have relatively strong front end skills(for a student), and am comfortable with Java, C#, C++ and JavaScript. I know Python some, understand a good bit of its' general idiosyncrasies, and can write basic programs with it.


 
My Father is a 59 year old thermal engineer, who is very strong in his field, and(in my opinion) a pretty brilliant guy. He really wants to start learning Python in order to help him with his job. I think he also just wants to learn it for something new to do. He has asked me to help him, since he has zero programming knowledge. I am so excited to have the chance to do so. My Father and I had a rough relationship growing up, and only in the last ~5 years have we gotten close, and now I call him my best friend(I'm 32). Because of that, I really want this to be something special.


 
That's why I came to you fine folks for advice. I'm looking for fun and informative ways to teach my Father Python. I'd also like to use this experience to help reinforce my knowledge

/r/Python
https://redd.it/bceo8l
Chrome Extension for scheduling Jupyter Notebooks to run with three clicks

We're currently developing a [Chrome Extension](https://chrome.google.com/webstore/detail/seekwell/mefkdbekccdbdihhondepjimindlbpfg) for Jupyter Notebooks that includes:

- Scheduling (e.g. automatically run a notebook daily, hourly, or every 5 minutes)
- Tight integrations with Google Sheets and Slack (e.g. automatically send DataFrames to Google Sheets to share with non-technical teammates)
- Collaboration features (e.g. share code amongst your team)
- A dark theme

We're looking for beta users to help test and shape the product. The first version is live on the [Web Store](https://chrome.google.com/webstore/detail/seekwell/mefkdbekccdbdihhondepjimindlbpfg), so please give it a shot and let me know if you run into any problems or have any suggestions to make it better!

/r/IPython
https://redd.it/bcgvya
Chrome Extension for scheduling Jupyter Notebooks

We're currently developing a [Chrome Extension](https://chrome.google.com/webstore/detail/seekwell/mefkdbekccdbdihhondepjimindlbpfg) for Jupyter Notebooks that includes:

- Scheduling (e.g. automatically run a notebook daily, hourly, or every 5 minutes)
- Tight integrations with Google Sheets and Slack (e.g. automatically send DataFrames to Google Sheets to share with non-technical teammates)
- Collaboration features (e.g. share code amongst your team)
- A dark theme

We're looking for beta users to help test and shape the product. The first version is live on the [Web Store](https://chrome.google.com/webstore/detail/seekwell/mefkdbekccdbdihhondepjimindlbpfg), so please give it a shot and let me know if you run into any problems or have any suggestions to make it better!

A little more on scheduling:

1. Open the extension while on the Notebook you want scheduled
2. Select your interval (e.g. daily, hourly, etc.)
3. Save the schedule

This notebook will now run on a Google Cloud Compute Engine at your set interval. The engine image is one of Google's [Deep Learning VM's](https://cloud.google.com/deep-learning-vm/docs/images), which comes with many popular Python packages, but if you need another package, please let me know! I'm keeping a running list of the most requested packages and will add them this weekend.

/r/JupyterNotebooks
https://redd.it/bch98s
[D] PyTorch implementation best practices

Hi r/MachineLearning! Let's discuss PyTorch best practices.


I recently finished a PyTorch [**re-implementation**](https://github.com/joel-huang/zeroshot-capsnet-pytorch) (with help from various sources) for the paper [Zero-shot User Intent Detection via Capsule Neural Networks](https://arxiv.org/abs/1809.00385), which originally had Python 2 code for TensorFlow.


I'd like to request perhaps a critique on the code I've written so far (it's not perfect, yet!) and any suggestions if there are best practices specifically in PyTorch, for implementing directly from research papers as well as converting them from other frameworks.


Some thoughts I had while programming (feel free to raise more!):

1. I've been implementing a Dataset class and custom batch functions for every dataset I've been working with. Is this the PyTorch best practice?

2. Where is the optimal place to shift `Tensors` to `.cuda()`? I've been doing this in the training loop, just before feeding it into the model.

3. How to manage the use of both `numpy` and `torch`, seeing as PyTorch aims to reinvent many of the basic operations in `numpy`?


If you're a fellow PyTorch user/contributor please share a little!

/r/MachineLearning
https://redd.it/bcfyo2
I'm on a windows machine, I want flask to serve HTTPS, I don't want "we don't trust this website" whenever I browse to my app. What do I do to fix this?

I know it's because I'm using self-signed certs, but I don't see a way to use Let'sEncrypt / Certbot on windows. So, as a windows python user, is there a way to have Flask serve HTTPS without raising flags on the browser?

/r/flask
https://redd.it/bchuay
Serving files using Flask

I am currently trying to server a few static files using the following code, however no files seem to be hosted by the site, any ideas on what I'm doing wrong?

​

​

https://i.redd.it/lzyiy8xhqwr21.png

All help is appreciated!

/r/flask
https://redd.it/bcjm9c
Linux Python devs, what distro do you use and why?

I am curious what others are using and why? So far I have been using CentOS, because it is the default (mandatory) one in my organisation.

/r/Python
https://redd.it/bcn90f
Is Django a popular choice for real-time applications like messaging apps?

Is Django with Channels a popular choice for real-time apps? I'm curious about building a messaging app and I'm wondering if Django is a good choice, compared to Node or Go.

/r/django
https://redd.it/bcm6gs
Real world projects recommendation for go to next level

I have some background in django: drf basics, models, forms etc etc. But my projects are just cruds and basic things, such as requests lib to call github apis and view some data about repos, wagtail for basic cms, such as site for articles.

But in the projects could have more complex things, such as: get the posta with more comments in the week, learn pillow to image manipulation etc.

but I do not know much more to learn than this, and I want something that is more than four or five lines of a slightly more complex queryset.

I try learn react for learn about auth with api in the front end, but js and react is not easy, and by fact that i'm not proficient in back-end, i'm learning more about django, python (i will read the fluent python in the next week too), and i need finish the sql/postsgres book and maybe learn mongodb. After some months, i will learn js using ydkjs books (really learn) .

I read about some companies looking for "backoffice", but I'm not quite sure what that is and how to build it. I also saw a vacancy needing to create a website

/r/django
https://redd.it/bcnj2u