Has anyone built a project based on Guardian?
Long story short, I'm working on a project in which I need to be able to assign users to a group and groups to an event. I have read through the guardian documentation and I believe this does exactly that, providing the ability to create unique events with groups over users that can modify them.
This is the first project of this kind that I've worked on, so I'm interested to see if anyone can chime in. Specifically:
1. Did you create an intermediate model to link the group to the event?
2. Should this live in three separate apps: User, Group, Event?
Thanks in advance.
/r/django
https://redd.it/bbbhcm
Long story short, I'm working on a project in which I need to be able to assign users to a group and groups to an event. I have read through the guardian documentation and I believe this does exactly that, providing the ability to create unique events with groups over users that can modify them.
This is the first project of this kind that I've worked on, so I'm interested to see if anyone can chime in. Specifically:
1. Did you create an intermediate model to link the group to the event?
2. Should this live in three separate apps: User, Group, Event?
Thanks in advance.
/r/django
https://redd.it/bbbhcm
reddit
r/django - Has anyone built a project based on Guardian?
3 votes and 1 comment so far on Reddit
GitHub - ReviewNB/treon: Easy to use test framework for Jupyter Notebooks
https://github.com/ReviewNB/treon
/r/IPython
https://redd.it/bbadxr
https://github.com/ReviewNB/treon
/r/IPython
https://redd.it/bbadxr
GitHub
GitHub - ReviewNB/treon: Easy to use test framework for Jupyter Notebooks
Easy to use test framework for Jupyter Notebooks. Contribute to ReviewNB/treon development by creating an account on GitHub.
Django with Graphene
Hey guys,
​
I'm creating my first django graphql api with graphene and wondering how can this be written in a shorter way:
​
[https://pastebin.com/T4nsEZMj](https://pastebin.com/T4nsEZMj) \- [models.py](https://models.py)
[https://pastebin.com/71Q6KC4q](https://pastebin.com/71Q6KC4q) \- schema.py
​
[https://pastebin.com/3Lu7268q](https://pastebin.com/3Lu7268q) \- graphql\_query
[https://pastebin.com/3VQSb3Wy](https://pastebin.com/3VQSb3Wy) \- graphql\_results
/r/django
https://redd.it/bbceyd
Hey guys,
​
I'm creating my first django graphql api with graphene and wondering how can this be written in a shorter way:
​
[https://pastebin.com/T4nsEZMj](https://pastebin.com/T4nsEZMj) \- [models.py](https://models.py)
[https://pastebin.com/71Q6KC4q](https://pastebin.com/71Q6KC4q) \- schema.py
​
[https://pastebin.com/3Lu7268q](https://pastebin.com/3Lu7268q) \- graphql\_query
[https://pastebin.com/3VQSb3Wy](https://pastebin.com/3VQSb3Wy) \- graphql\_results
/r/django
https://redd.it/bbceyd
Pastebin
class Category(TimeStampedModel): name = models.CharField(_("Category nam - Pastebin.com
My second article in the series of articles on Rust language aiming at Python developers
[https://medium.com/@rajasekar3eg/rust-for-python-developers-ownership-and-borrowing-cd85fc10cae4](https://medium.com/@rajasekar3eg/rust-for-python-developers-ownership-and-borrowing-cd85fc10cae4)
/r/Python
https://redd.it/bbdj5p
[https://medium.com/@rajasekar3eg/rust-for-python-developers-ownership-and-borrowing-cd85fc10cae4](https://medium.com/@rajasekar3eg/rust-for-python-developers-ownership-and-borrowing-cd85fc10cae4)
/r/Python
https://redd.it/bbdj5p
Medium
Rust for Python Developers: Ownership and Borrowing
Following the previous post, here I am going to introduce the key concepts of Rust — Ownership and Borrowing.
Congratulations Python community we are still dominanting !
Heads-up to the community for creating such a lovable and supporting ecosystem. Python is the forth most popular language, second most loved language and the most wanted and fastest growing language in the latest stack overflow survey.
https://insights.stackoverflow.com/survey/2019
/r/Python
https://redd.it/bbgi5w
Heads-up to the community for creating such a lovable and supporting ecosystem. Python is the forth most popular language, second most loved language and the most wanted and fastest growing language in the latest stack overflow survey.
https://insights.stackoverflow.com/survey/2019
/r/Python
https://redd.it/bbgi5w
Stack Overflow
Stack Overflow Developer Survey 2019
Nearly 90,000 took this comprehensive, annual survey of people who code. Demographics. Most loved, dreaded and wanted technologies. Salary and careers.
A gallery of interesting Jupyter Notebooks: Reproducible academic publications
https://scinapse.io/collections/201046
/r/IPython
https://redd.it/bbighn
https://scinapse.io/collections/201046
/r/IPython
https://redd.it/bbighn
Scinapse
A gallery of interesting Jupyter Notebooks: Reproducible academic publications | Scinapse
Yoonji Kim 's A gallery of interesting Jupyter Notebooks: Reproducible academic publications collection
Sharing a text-based game I made in about a week
Hello everyone,
I don't know if this is the place to share but I didn't know where else would I post this so here it is.
I wrote pretty much all of the core code in about a week and then I spent the next few days polishing some stuff and adding some more features. I embarked on this project as an excuse to get to finally start learning Python since I've been wanting to do so for some time now.
After about 3 weeks now, I feel that I've come a long way (after struggling with many things, which is good!). Nonetheless, I'm still beginning the journey, and there's a lot more to learn.
Anyways, without further ado, here's the link:
[Github Repository](https://github.com/anzorein/tavern-game)
You can either download the installer, or just download the files and run the main file.
It has a description in there but I'll explain a little bit here.
* * *
## Description
In this game you are an innkeeper and you have to manage your tavern.
Your main resources are money and renown, which you can use to improve your tavern so more peope can come to drink or stay the night. Also you can hire adventurers and send them on quests.
* * *
Anyways,
/r/Python
https://redd.it/bbgjnt
Hello everyone,
I don't know if this is the place to share but I didn't know where else would I post this so here it is.
I wrote pretty much all of the core code in about a week and then I spent the next few days polishing some stuff and adding some more features. I embarked on this project as an excuse to get to finally start learning Python since I've been wanting to do so for some time now.
After about 3 weeks now, I feel that I've come a long way (after struggling with many things, which is good!). Nonetheless, I'm still beginning the journey, and there's a lot more to learn.
Anyways, without further ado, here's the link:
[Github Repository](https://github.com/anzorein/tavern-game)
You can either download the installer, or just download the files and run the main file.
It has a description in there but I'll explain a little bit here.
* * *
## Description
In this game you are an innkeeper and you have to manage your tavern.
Your main resources are money and renown, which you can use to improve your tavern so more peope can come to drink or stay the night. Also you can hire adventurers and send them on quests.
* * *
Anyways,
/r/Python
https://redd.it/bbgjnt
GitHub
anzorein/tavern-game
Contribute to anzorein/tavern-game development by creating an account on GitHub.
GitHub - ReviewNB/treon: Easy to use test framework for Jupyter Notebooks
https://github.com/ReviewNB/treon
/r/JupyterNotebooks
https://redd.it/bbblrj
https://github.com/ReviewNB/treon
/r/JupyterNotebooks
https://redd.it/bbblrj
GitHub
GitHub - ReviewNB/treon: Easy to use test framework for Jupyter Notebooks
Easy to use test framework for Jupyter Notebooks. Contribute to ReviewNB/treon development by creating an account on GitHub.
Heroku - Serving static files through Flask
I have a Flask app that's deployed on Heroku and have just been reading how inefficient it is to serve static files through Flask. And from what I have gathered, nginx + gunicorn are the stack that is used to solve this. Please correct me if I am wrong.
My questions are:
1. If my app is deployed on Heroku, how can I serve static files elsewhere and not through Flask? Is it possible to use Nginx in Heroku to do that?
2. I also read a lot of "how" to serve static files on Nginx, but not "why", why is it inefficient to use Flask for this task? Say I have less than 50 users, is this still inefficient? When should I consider not serving it through Flask?
/r/flask
https://redd.it/bbknws
I have a Flask app that's deployed on Heroku and have just been reading how inefficient it is to serve static files through Flask. And from what I have gathered, nginx + gunicorn are the stack that is used to solve this. Please correct me if I am wrong.
My questions are:
1. If my app is deployed on Heroku, how can I serve static files elsewhere and not through Flask? Is it possible to use Nginx in Heroku to do that?
2. I also read a lot of "how" to serve static files on Nginx, but not "why", why is it inefficient to use Flask for this task? Say I have less than 50 users, is this still inefficient? When should I consider not serving it through Flask?
/r/flask
https://redd.it/bbknws
reddit
r/flask - Heroku - Serving static files through Flask
7 votes and 2 comments so far on Reddit
Flask-Admin and Flask-Login with Flask-JWT or Flask-Praetorian?
Perhaps it's a dumb question. I'm a newbie for this things.
​
It's possible to use Flask-Admin and Flask-Login combined with these extensions?
​
I want to have some the features of Flask-Admin and Flask-Login for register the users using the browser and make requests from a desktop app to do some calculations using JWT.
/r/flask
https://redd.it/bbd3w6
Perhaps it's a dumb question. I'm a newbie for this things.
​
It's possible to use Flask-Admin and Flask-Login combined with these extensions?
​
I want to have some the features of Flask-Admin and Flask-Login for register the users using the browser and make requests from a desktop app to do some calculations using JWT.
/r/flask
https://redd.it/bbd3w6
reddit
r/flask - Flask-Admin and Flask-Login with Flask-JWT or Flask-Praetorian?
11 votes and 1 comment so far on Reddit
March Release of Saleor E-commerce: Including Model Translations and Dark Mode
https://medium.com/saleor/march-release-of-saleor-dark-mode-model-translations-and-saleor-cloud-d33bad97eb4
/r/django
https://redd.it/bbmj9p
https://medium.com/saleor/march-release-of-saleor-dark-mode-model-translations-and-saleor-cloud-d33bad97eb4
/r/django
https://redd.it/bbmj9p
Medium
March Release of Saleor: Dark Mode, Model Translations and… Saleor Cloud!
Welcome to the March 2019 release of Saleor. Read on to learn about the newest changes and for a very special announcement!
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
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
GitHub
GitHub - DivineITLimited/django-hyper-editor: Django Integration of Hyper Editor
Django Integration of Hyper Editor. Contribute to DivineITLimited/django-hyper-editor development by creating an account on GitHub.
They use python to produce black hole image
3 years ago MIT grad student Katie Bouman led the creation of a new algorithm to produce the first-ever image of a black hole.
Today, that image was released.
https://twitter.com/SmithsonianChan/status/1115970184659910656
TED - Katie Bouman: How to take a picture of a black hole
https://www.youtube.com/watch?v=BIvezCVcsYs
software used python
https://github.com/achael/eht-imaging
/r/Python
https://redd.it/bbrhr4
3 years ago MIT grad student Katie Bouman led the creation of a new algorithm to produce the first-ever image of a black hole.
Today, that image was released.
https://twitter.com/SmithsonianChan/status/1115970184659910656
TED - Katie Bouman: How to take a picture of a black hole
https://www.youtube.com/watch?v=BIvezCVcsYs
software used python
https://github.com/achael/eht-imaging
/r/Python
https://redd.it/bbrhr4
Twitter
Smithsonian Channel
Breaking! The first image of a black hole has been captured using data from the #EventHorizon telescope. We captured the magic in this video. Catch the full story of this landmark discovery on Friday at 9PM when #BlackHole Hunters premieres: bit.ly/2I6tgUc…
[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
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
Google Cloud
Vertex AI Platform
Enterprise ready, fully-managed, unified AI development platform. Access and utilize Vertex AI Studio, Agent Builder, and 160+ foundation models.
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