Database design
Hi guys, so I was wondering if there were any online tool, or your favourite method how to design DB tables/Django Models and relations between them. I seem to have a really hard time when trying to visualize in my head what I need to do to. I am kinda unable to see how to models are going to work together until I test it in the admin interface, only then it makes sense, but it's just highly ineffective and I had to completely wipe out the whole DB and re-do it again many times because I broke something when creating migrations. I never really know, what to set as defaults. I can make a functional DB, but I want to do it well, normalized.
​
Maybe even some typical examples would help. Like I know that a foreign key is a column that branches out to rows in another column, but when the table it points to consists of another foreign key, my head is about to explode xD
​
For example I am building an eshop but without prices, carts, payments etc. just like a gallery and the rest is discussed with a customer. Now this is what I have so
/r/django
https://redd.it/bb9yos
Hi guys, so I was wondering if there were any online tool, or your favourite method how to design DB tables/Django Models and relations between them. I seem to have a really hard time when trying to visualize in my head what I need to do to. I am kinda unable to see how to models are going to work together until I test it in the admin interface, only then it makes sense, but it's just highly ineffective and I had to completely wipe out the whole DB and re-do it again many times because I broke something when creating migrations. I never really know, what to set as defaults. I can make a functional DB, but I want to do it well, normalized.
​
Maybe even some typical examples would help. Like I know that a foreign key is a column that branches out to rows in another column, but when the table it points to consists of another foreign key, my head is about to explode xD
​
For example I am building an eshop but without prices, carts, payments etc. just like a gallery and the rest is discussed with a customer. Now this is what I have so
/r/django
https://redd.it/bb9yos
reddit
r/django - Database design
0 votes and 0 comments so far on Reddit
MLConjug. A Python library to conjugate verbs in French, English, Spanish, Italian, Portuguese and Romanian (more soon) using Machine Learning techniques.
Hi all,
​
I am the author of the open source project [mlconjug](https://pypi.org/project/mlconjug/), a Python library to conjugate verbs in French, English, Spanish, Italian, Portuguese and Romanian (more soon) using Machine Learning techniques.
​
Any verb in one of the supported language can be conjugated, as the module contains a Machine Learning model of how the verbs behave. Even completely new or made-up verbs can be successfully conjugated in this manner. The supplied pre-trained models are composed of:
* a custom-made binary feature extractor,
* a feature selector using Linear Support Vector Classification,
* a classifier using Stochastic Gradient Descent.
MLConjug uses scikit-learn to implement the Machine Learning algorithms.Users of the library can use any compatible classifiers from scikit-learn to modify and retrain the models.
* Free software: MIT license
* Documentation: [https://mlconjug.readthedocs.io](https://mlconjug.readthedocs.io/).
### Supported Languages
* French
* English
* Spanish
* Italian
* Portuguese
* Romanian
### Features
* Easy to use API.
* Includes pre-trained models with 99% + accuracy in predicting conjugation class of unknown verbs.
* Easily train new models or add new languages.
* Easily integrate MLConjug in your own projects.
* Can be used as a command line tool.
​
Do not hesitate to try it out and let me know if you find bugs, want to propose improvements or want some specific languages added.
​
Cheers,
​
SekouD
/r/Python
https://redd.it/bb8400
Hi all,
​
I am the author of the open source project [mlconjug](https://pypi.org/project/mlconjug/), a Python library to conjugate verbs in French, English, Spanish, Italian, Portuguese and Romanian (more soon) using Machine Learning techniques.
​
Any verb in one of the supported language can be conjugated, as the module contains a Machine Learning model of how the verbs behave. Even completely new or made-up verbs can be successfully conjugated in this manner. The supplied pre-trained models are composed of:
* a custom-made binary feature extractor,
* a feature selector using Linear Support Vector Classification,
* a classifier using Stochastic Gradient Descent.
MLConjug uses scikit-learn to implement the Machine Learning algorithms.Users of the library can use any compatible classifiers from scikit-learn to modify and retrain the models.
* Free software: MIT license
* Documentation: [https://mlconjug.readthedocs.io](https://mlconjug.readthedocs.io/).
### Supported Languages
* French
* English
* Spanish
* Italian
* Portuguese
* Romanian
### Features
* Easy to use API.
* Includes pre-trained models with 99% + accuracy in predicting conjugation class of unknown verbs.
* Easily train new models or add new languages.
* Easily integrate MLConjug in your own projects.
* Can be used as a command line tool.
​
Do not hesitate to try it out and let me know if you find bugs, want to propose improvements or want some specific languages added.
​
Cheers,
​
SekouD
/r/Python
https://redd.it/bb8400
PyPI
mlconjug
A Python library to conjugate French, English, Spanish, Italian, Portuguese and Romanian verbs using Machine Learning techniques.
The problem with inheriting from dict and list in Python
https://treyhunner.com/2019/04/why-you-shouldnt-inherit-from-list-and-dict-in-python/
/r/Python
https://redd.it/bbak7w
https://treyhunner.com/2019/04/why-you-shouldnt-inherit-from-list-and-dict-in-python/
/r/Python
https://redd.it/bbak7w
Treyhunner
The problem with inheriting from dict and list in Python
I’ve created dozens of Python Morsels since I started it last year.
At this point at least 10 of these exercises involve making a custom …
At this point at least 10 of these exercises involve making a custom …
The most loved and most disliked programming languages revealed in Stack Overflow survey
https://www.techrepublic.com/article/the-most-loved-and-most-disliked-programming-languages-revealed-in-stack-overflow-survey/
/r/Python
https://redd.it/bb8xgz
https://www.techrepublic.com/article/the-most-loved-and-most-disliked-programming-languages-revealed-in-stack-overflow-survey/
/r/Python
https://redd.it/bb8xgz
TechRepublic
The most loved and most disliked programming languages revealed in Stack Overflow survey
The annual Stack Overflow survey is one of the most comprehensive snapshots of how programmers work.
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