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
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
reddit
r/djangolearning - Has anyone else had issues with the default tutorial
0 votes and 0 comments so far on Reddit
How to Create an Index in Django Without Downtime – Real Python
https://realpython.com/create-django-index-without-downtime/
/r/django
https://redd.it/bbq007
https://realpython.com/create-django-index-without-downtime/
/r/django
https://redd.it/bbq007
Realpython
How to Create an Index in Django Without Downtime – Real Python
In this step-by-step Python tutorial, you'll get a solid understanding of the limitations of Django migrations by tackling a well known problem: creating an index in Django with no downtime.
@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
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
[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
Reddit
From the pics community on Reddit: This is Dr Katie Bouman the computer scientist behind the first ever image of a black-hole.…
Explore this post and more from the pics community
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
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
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
reddit
r/Python - Resume worthy python projects
0 votes and 4 comments so far on Reddit
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
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
GitHub
GitHub · Change is constant. GitHub keeps you ahead.
Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.
Vaex: A DataFrame with super strings (up to 1000x speedup)
https://towardsdatascience.com/vaex-a-dataframe-with-super-strings-789b92e8d861
/r/Python
https://redd.it/bbzwhq
https://towardsdatascience.com/vaex-a-dataframe-with-super-strings-789b92e8d861
/r/Python
https://redd.it/bbzwhq
Medium
Vaex: A DataFrame with super strings
Speed up your text processing up to a 1000x
[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
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
GitHub
GitHub - Omegastick/pytorch-cpp-rl: PyTorch C++ Reinforcement Learning
PyTorch C++ Reinforcement Learning. Contribute to Omegastick/pytorch-cpp-rl development by creating an account on GitHub.
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
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
reddit
r/django - Where can I find someone to hire to deploy existing code?
6 votes and 5 comments so far on Reddit
Combining SSH and subprocess pipe in Python asyncio
https://quan.hoabinh.vn/blog/2019/4/72-Combining-SSH-and-subprocess-pipe-in-asyncio
/r/Python
https://redd.it/bc8pni
https://quan.hoabinh.vn/blog/2019/4/72-Combining-SSH-and-subprocess-pipe-in-asyncio
/r/Python
https://redd.it/bc8pni
quan.hoabinh.vn
Combining SSH and subprocess pipe in Python asyncio
When creating tool for system administration tasks, we often have the need to execute some other command-line programs, execute some commands on remote machine, transferring data between local and remote machine via SSH. A straightforward thinking will be…
Keeping Logic out of templates (and views)
http://shibel.blot.im/django-keeping-logic-out-of-templates-and-views
/r/django
https://redd.it/bc62bx
http://shibel.blot.im/django-keeping-logic-out-of-templates-and-views
/r/django
https://redd.it/bc62bx
shibel.blot.im
Django: Keeping logic out of templates (and views) - foos & bars
When I first started dabbling with Django and web-development, a good friend with a little more experience advised that I should keep
[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
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
[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
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
arXiv.org
Densely Connected Convolutional Networks
Recent work has shown that convolutional networks can be substantially deeper, more accurate, and efficient to train if they contain shorter connections between layers close to the input and those...
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
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
reddit
r/Python - CS Senior looking for fun ways to help my Father learn Python(and make myself more comfortable with it at the same time).
4 votes and 4 comments so far on Reddit