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
Django Hyper Editor - Django Integration of Hyper Editor

Couple of days back I have released a Block Based Content Editor. Now its Django integration is ready to play with. Really love to hear what you guys think. Any suggestions or thought would be very helpful.

[https://github.com/DivineITLimited/django-hyper-editor](https://github.com/DivineITLimited/django-hyper-editor)

/r/django
https://redd.it/bbop9q
[N] Google launches an end-to-end AI platform

https://cloud.google.com/ai-platform/

And a TC article, which did a decent job explaining what this is about.

https://techcrunch.com/2019/04/10/google-expands-its-ai-services/

Google launches an end-to-end AI platform. It promises the ability to handle the whole lifecycle of an ML project, from prototyping to production serving. There's also a new labeling service.

What do you guys think?

/r/MachineLearning
https://redd.it/bbpuh8
Has anyone else had issues with the default tutorial



I am following this[ tutorial](https://docs.djangoproject.com/en/2.2/intro/tutorial01/)

and I am getting 404 errors when I try the first test saying it cannot find "polls/" below is some of my code in mysite/urls.py

from django.contrib import admin
from django.urls import include, path

urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]

in polls/urls.py

from django.urls import path

from . import views

urlpatterns = [
path('', views.index, name='index'),
]

I am not sure what is going on because I am following the tutorial step by step and I am getting a 404 error

/r/djangolearning
https://redd.it/bbu73m
@csrf_exempt not working.

I am trying to attach my Angular front end to my Django backend. To do this I have created my own source of session control. I have added this to my view...

​

from django.views.decorators.csrf import csrf_exempt

@require_POST
@csrf_exempt
def my_view_function(request):
# do something

​

I have this code on my actual server, and I am hosting Angular locally. When I submit a request I get this error in the google chrome console:

>Access to XMLHttpRequest at '[https://fake\_real\_url/signin/checkemail/](https://mooch.me/signin/checkemail/)' from origin '[https://localhost:4200](https://localhost:4200)' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

​

And the apache server log says

> Forbidden (CSRF cookie not set.): /signin/checkemail/

I thought that csrf\_exempt would fix this issue? Am I missing something?

/r/django
https://redd.it/bbvuke
Blackhole image was generated with Python and Matplotlib

[Here's the paper](https://iopscience.iop.org/article/10.3847/2041-8213/ab0c57/meta) with some more specifics. They mention:

- Numpy (van der Walt et al. 2011)
- Scipy (Jones et al. 2001)
- Pandas (McKinney 2010)
- Jupyter (Kluyver et al. 2016)
- Matplotlib (Hunter 2007).

Also, shown in [this picture](https://www.reddit.com/r/pics/comments/bbql1i/this_is_dr_katie_bouman_the_computer_scientist/).

/r/IPython
https://redd.it/bbrpwp
YouTube channel aimed at explaining Machine learning in simple terms

Hello everyone,

I have created a small YouTube channel aimed at teaching machine learning in simple terms. Do have a look at the videos in the given link below. I have included a lot of examples in Python.

Link - [https://www.youtube.com/bhaveshbhatt8791/](https://www.youtube.com/bhaveshbhatt8791/)

If you enjoy these tutorials & would like to support them then the easiest way is to simply like the video & give it a thumbs up & also it's a huge help to share these videos with anyone who you think would find them useful. Be sure to subscribe for future videos.

/r/Python
https://redd.it/bbz65g
Resume worthy python projects

Forgive me if this has been posted, i didnt see anything . But i was wondering what may be some examples of python projects that would stand out on a resume.

/r/Python
https://redd.it/bc0rcv
Auto-complete some fields when adding a new model?

I'm trying to create an e-portfolio, one feature that I want is a page for each coding project.

​

Each project has 3 fields:

* Name
* Readme
* GitHub link

​

I'm looking for a way to enter the Project Name and have it fetch/build the rest of the info for me.

The current problem is that I cannot access the text in the CharField, ie:

class Project(models.Model):
name = models.CharField(max_length=50)
g_link = 'https://github.com/' + USER_NAME + name.text
github_link = models.URLField(default=g_link)
readme_link = (
'https://raw.githubusercontent.com/'
+ USER_NAME
+ name.text
+ '/master/README.md'
)
readme = MarkdownxField(


/r/django
https://redd.it/bc1cjz
Just Found the Best Python Book...Cover

/r/Python
https://redd.it/bc2606
[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