5 Projects You Can Build To Become a Better Web Developer
https://storage.googleapis.com/open-source-delights/5-projeccts-to-become-a-better-web-developer.htm?source=python
/r/Python
https://redd.it/iggwhf
https://storage.googleapis.com/open-source-delights/5-projeccts-to-become-a-better-web-developer.htm?source=python
/r/Python
https://redd.it/iggwhf
Challenge to scientists: does your ten-year-old code still run?
https://www.nature.com/articles/d41586-020-02462-7
/r/Python
https://redd.it/igzl9a
https://www.nature.com/articles/d41586-020-02462-7
/r/Python
https://redd.it/igzl9a
Nature
Challenge to scientists: does your ten-year-old code still run?
Nature - Missing documentation and obsolete environments force participants in the Ten Years Reproducibility Challenge to get creative.
I couldn't find much resources on how to write tests against Elasticsearch in Django, so I wrote up a guide.
Like the title says, I couldn't find much resources on how to write tests against Elasticsearch in Django, so I figured I'd write something up after I got it working.
https://yanglinzhao.com/posts/test-elasticsearch-in-django
I hope others who have a similar tech stack find it useful.
/r/django
https://redd.it/igyyma
Like the title says, I couldn't find much resources on how to write tests against Elasticsearch in Django, so I figured I'd write something up after I got it working.
https://yanglinzhao.com/posts/test-elasticsearch-in-django
I hope others who have a similar tech stack find it useful.
/r/django
https://redd.it/igyyma
Yanglinzhao
Yanglin Zhao | Test Elasticsearch in Django without mocking
Tutorial on how to write automated unit tests against Elasticsearch with Django/Python without mocking.
Hosting custom-domain Flask based web app
I want to host my Flask web application but don’t know where to go. Maybe Google Cloud Platform, AWS or Pythonanywhere are a valid option? How to figure out the most efficient and budget-friendly company?
/r/flask
https://redd.it/ih4wk6
I want to host my Flask web application but don’t know where to go. Maybe Google Cloud Platform, AWS or Pythonanywhere are a valid option? How to figure out the most efficient and budget-friendly company?
/r/flask
https://redd.it/ih4wk6
reddit
Hosting custom-domain Flask based web app
I want to host my Flask web application but don’t know where to go. Maybe Google Cloud Platform, AWS or Pythonanywhere are a valid option? How to...
Database Performance Tips with Django
https://www.youtube.com/watch?v=-5503tXOU7A
/r/Python
https://redd.it/ih3xu2
https://www.youtube.com/watch?v=-5503tXOU7A
/r/Python
https://redd.it/ih3xu2
YouTube
Database Performance Tips with Django
Most performance problems in web applications come down to one thing: the database. In this webinar, veteran #Python developer Andrew Brookins helps you squeeze every ounce of database performance from your #Django application.
Timestamps:
00:00 - Introduction…
Timestamps:
00:00 - Introduction…
New hosted Notebooks
Hi all, we currently use an in house jupyter solution, but we started exploring new options. We see AWS sagemaker and AI Platform Notebooks in Google. We have large amount of data in BigQuery, so.the obvious choice seems to be GCP, but hesitant as the support hasn't been great experience so far with BQ specially many libraries changes which are always breaking, so not sure if GCP is the right option any ideas?
/r/JupyterNotebooks
https://redd.it/igqyco
Hi all, we currently use an in house jupyter solution, but we started exploring new options. We see AWS sagemaker and AI Platform Notebooks in Google. We have large amount of data in BigQuery, so.the obvious choice seems to be GCP, but hesitant as the support hasn't been great experience so far with BQ specially many libraries changes which are always breaking, so not sure if GCP is the right option any ideas?
/r/JupyterNotebooks
https://redd.it/igqyco
reddit
New hosted Notebooks
Hi all, we currently use an in house jupyter solution, but we started exploring new options. We see AWS sagemaker and AI Platform Notebooks in...
Looking For: Exemplar Django Project
I'm wondering if anyone has a suggestion for an existing Django project that you'd consider to be really well put together / has lots of interesting examples?
I know all about Cookie Cutters, what I'm talking about more is if there are any sites / projects on Git that you ever look at to see an example of organizing code or a complicated architecture.
/r/django
https://redd.it/ihb99s
I'm wondering if anyone has a suggestion for an existing Django project that you'd consider to be really well put together / has lots of interesting examples?
I know all about Cookie Cutters, what I'm talking about more is if there are any sites / projects on Git that you ever look at to see an example of organizing code or a complicated architecture.
/r/django
https://redd.it/ihb99s
reddit
Looking For: Exemplar Django Project
I'm wondering if anyone has a suggestion for an existing Django project that you'd consider to be really well put together / has lots of...
Juypter Notenotebooks.ai module error
Hi everyone
I'm a newbie trying to use Jupyter [notebooks.ai](https://notebooks.ai) I am able to import pandas, and other modules no problem. But everytime I attempt to *import geopandas as gpd* I get this error ModuleNotFoundError: No module named 'geopandas. Has anyone else had similar trouble? I am just a newbie to the juypter [notebooks.ai](https://notebooks.ai) and python coding in general so there's probably something simple that I am missing. Any help would be appreciated.
/r/JupyterNotebooks
https://redd.it/ihegst
Hi everyone
I'm a newbie trying to use Jupyter [notebooks.ai](https://notebooks.ai) I am able to import pandas, and other modules no problem. But everytime I attempt to *import geopandas as gpd* I get this error ModuleNotFoundError: No module named 'geopandas. Has anyone else had similar trouble? I am just a newbie to the juypter [notebooks.ai](https://notebooks.ai) and python coding in general so there's probably something simple that I am missing. Any help would be appreciated.
/r/JupyterNotebooks
https://redd.it/ihegst
www.notebooks.ai
DataWars.io - Free Data Science Interactive Projects
DataWars is a Project-based playground with +1000 ready-to-solve, interactive, Data Science projects. Practice your skills solving real life challenges in an interactive, real-life Data Science simulator.
How do you encrypt customer data?
I'm curious how you guys encrypt customer data using Django and Postgres. By Customer data I mean data which is owned by a customer of your website which could be considered sensitive such as passwords or financial information (like revenue or cost).
/r/django
https://redd.it/ih7mgq
I'm curious how you guys encrypt customer data using Django and Postgres. By Customer data I mean data which is owned by a customer of your website which could be considered sensitive such as passwords or financial information (like revenue or cost).
/r/django
https://redd.it/ih7mgq
reddit
How do you encrypt customer data?
I'm curious how you guys encrypt customer data using Django and Postgres. By Customer data I mean data which is owned by a customer of your...
How to get objects with certain foreignkey relationships in ORM?
Assume we have a product model:
`class Product(models.Model):`
`name = models.Charfield()`And a property model where possible properties are defined (like "price", "color", "weight"...):
`class Property(models.Model):`
`name = models.CharField()`
And we keep product properties in a separate model:
`class ProductProperty(models.Model):`
`propery = models.ForeignKey(Property)`
`product = models.ForeignKey(Product)`
`value = models.Charfield()`
I want to get product objects which have certain properties. For instance, **I want to get objects only if "price" and "color" is defined for them in ProductPropery table.**
I obtain the required properties as objects, but I could not solve how can I get products that have all of the given properties.
To rephrase, I'm looking for something like this:
`properties = Property.objects.filter(Q(name__contains="Price") | Q(name__contains="Color")) #this could return one or multiple property objects`
​
`products = properties.productproperty_set.product_set # imaginary line I made up to show what I want to get`
I could only think of: looping through properties and sub-loop for related ProductProperties to get their products and create multiple lists, and then create a list that's made of common elements (products that are included in each list)
It would be great if you could help,
Best wishes
/r/django
https://redd.it/ihhszo
Assume we have a product model:
`class Product(models.Model):`
`name = models.Charfield()`And a property model where possible properties are defined (like "price", "color", "weight"...):
`class Property(models.Model):`
`name = models.CharField()`
And we keep product properties in a separate model:
`class ProductProperty(models.Model):`
`propery = models.ForeignKey(Property)`
`product = models.ForeignKey(Product)`
`value = models.Charfield()`
I want to get product objects which have certain properties. For instance, **I want to get objects only if "price" and "color" is defined for them in ProductPropery table.**
I obtain the required properties as objects, but I could not solve how can I get products that have all of the given properties.
To rephrase, I'm looking for something like this:
`properties = Property.objects.filter(Q(name__contains="Price") | Q(name__contains="Color")) #this could return one or multiple property objects`
​
`products = properties.productproperty_set.product_set # imaginary line I made up to show what I want to get`
I could only think of: looping through properties and sub-loop for related ProductProperties to get their products and create multiple lists, and then create a list that's made of common elements (products that are included in each list)
It would be great if you could help,
Best wishes
/r/django
https://redd.it/ihhszo
reddit
How to get objects with certain foreignkey relationships in ORM?
Assume we have a product model: `class Product(models.Model):` `name = models.Charfield()`And a property model where possible properties are...
Would I need the rest framework to do something like /review/bandname instead of /review/1?
Hopefully my title makes sense. As a learning project, I'm making a Django app that you can review bands. I was wondering how to make the url have the band name in it instead of the primary key. 127.0.0.0:8000/review/metallica instead of 127.0.0.0:8000/review/1
/r/djangolearning
https://redd.it/ihdot3
Hopefully my title makes sense. As a learning project, I'm making a Django app that you can review bands. I was wondering how to make the url have the band name in it instead of the primary key. 127.0.0.0:8000/review/metallica instead of 127.0.0.0:8000/review/1
/r/djangolearning
https://redd.it/ihdot3
reddit
Would I need the rest framework to do something like...
Hopefully my title makes sense. As a learning project, I'm making a Django app that you can review bands. I was wondering how to make the url have...
How to get objects with certain foreignkey relationships in ORM?
Assume we have a product model:
`class Product(models.Model):`
`name = models.Charfield()`
And a property model where possible properties are defined (like "price", "color", "weight"...):
`class Property(models.Model):`
`name = models.CharField()`
And we keep product properties in a separate model:
`class ProductProperty(models.Model):`
`propery = models.ForeignKey(Property)`
`product = models.ForeignKey(Product)`
`value = models.Charfield()`
I want to get product objects which have certain properties. For instance, **I want to get objects only if "price" and "color" is defined for them in ProductPropery table.**
I obtain the required properties as objects, but I could not solve how can I get products that have all of the given properties.
To rephrase, I'm looking for something like this:
`properties = Property.objects.filter(Q(name__contains="Price") | Q(name__contains="Color")) #this could return one or multiple property objects`
​
`products = properties.productproperty_set.product_set # imaginary line I made up to show what I want to get`
I could only think of: looping through properties and sub-loop for related ProductProperties to get their products and create multiple lists, and then create a list that's made of common elements (products that are included in each list)
It would be great if you could help,
Best wishes
/r/django
https://redd.it/ihisa1
Assume we have a product model:
`class Product(models.Model):`
`name = models.Charfield()`
And a property model where possible properties are defined (like "price", "color", "weight"...):
`class Property(models.Model):`
`name = models.CharField()`
And we keep product properties in a separate model:
`class ProductProperty(models.Model):`
`propery = models.ForeignKey(Property)`
`product = models.ForeignKey(Product)`
`value = models.Charfield()`
I want to get product objects which have certain properties. For instance, **I want to get objects only if "price" and "color" is defined for them in ProductPropery table.**
I obtain the required properties as objects, but I could not solve how can I get products that have all of the given properties.
To rephrase, I'm looking for something like this:
`properties = Property.objects.filter(Q(name__contains="Price") | Q(name__contains="Color")) #this could return one or multiple property objects`
​
`products = properties.productproperty_set.product_set # imaginary line I made up to show what I want to get`
I could only think of: looping through properties and sub-loop for related ProductProperties to get their products and create multiple lists, and then create a list that's made of common elements (products that are included in each list)
It would be great if you could help,
Best wishes
/r/django
https://redd.it/ihisa1
reddit
How to get objects with certain foreignkey relationships in ORM?
Assume we have a product model: `class Product(models.Model):` `name = models.Charfield()` And a property model where possible properties are...
DS Slideshow, My first Flask/ Python Project.
Hi, I'm an 18 year old college student going into university this year! I've been working on a small Flask based app for a while now and I think its about ready to share! I created a simple lightweight digital signage application for use on a Raspberry Pi or similar. It works by hosting a website on the host machine which you can then access from any number of other screens to display your slideshow.
This is a passion project for me, I intern at a small company that was looking for a digital signage solution for their office. They were not satisfied with any of the applications on the market so I volunteered to see what I could come up with. After a couple of days, I had a simple HTML and JS webpage that you could drop images into a file and they would rotate on a slideshow. Although this was all that was required by the company, I continued to develop this software on my own time and I'm really happy with how it's turning out!
Features:
* Currently there is support for Images and Webpages with video support coming soon!
* Login page to ensure nobody alters the slides without
/r/flask
https://redd.it/ihjqnp
Hi, I'm an 18 year old college student going into university this year! I've been working on a small Flask based app for a while now and I think its about ready to share! I created a simple lightweight digital signage application for use on a Raspberry Pi or similar. It works by hosting a website on the host machine which you can then access from any number of other screens to display your slideshow.
This is a passion project for me, I intern at a small company that was looking for a digital signage solution for their office. They were not satisfied with any of the applications on the market so I volunteered to see what I could come up with. After a couple of days, I had a simple HTML and JS webpage that you could drop images into a file and they would rotate on a slideshow. Although this was all that was required by the company, I continued to develop this software on my own time and I'm really happy with how it's turning out!
Features:
* Currently there is support for Images and Webpages with video support coming soon!
* Login page to ensure nobody alters the slides without
/r/flask
https://redd.it/ihjqnp
reddit
DS Slideshow, My first Flask/ Python Project.
Hi, I'm an 18 year old college student going into university this year! I've been working on a small Flask based app for a while now and I think...
[P] GenRL: PyTorch-First Reinforcement Learning library centered around reproducible and generalizable algorithm implementations
Github: [https://github.com/SforAiDl/genrl](https://github.com/SforAiDl/genrl)
Check out the [documentation](https://genrl.readthedocs.io/) and [tutorials](https://genrl.readthedocs.io/en/latest/usage/tutorials/index.html).
Reinforcement learning research is moving faster than ever before. In order to keep up with the growing trend and ensure that RL research remains reproducible, GenRL aims to aid faster paper reproduction and benchmarking by providing the following main features:
* **PyTorch-first**: Modular, Extensible and Idiomatic Python
* **Unified Trainer and Logging class**: code reusability and high-level UI
* **Ready-made algorithm implementations**: ready-made implementations of popular RL algorithms.
* **Faster Benchmarking**: automated hyperparameter tuning, environment implementations etc.
By integrating these features into GenRL, we aim to eventually support **any new algorithm implementation in less than 100 lines**.
Currently, the library has implementations of popular classical and Deep RL agents that ready to be deployed. Apart from these, various Bandit algorithms are a part of GenRL. It has various abstraction layers that make the addition of new algorithms easy for the user.
The library aims to add other key research areas like Multi-agent RL, Evolutionary RL and hyperparameter optimization and provide extensive support for distributed training of agents.
**We are looking for Open Source Contributors.**
/r/MachineLearning
https://redd.it/ihhtiw
Github: [https://github.com/SforAiDl/genrl](https://github.com/SforAiDl/genrl)
Check out the [documentation](https://genrl.readthedocs.io/) and [tutorials](https://genrl.readthedocs.io/en/latest/usage/tutorials/index.html).
Reinforcement learning research is moving faster than ever before. In order to keep up with the growing trend and ensure that RL research remains reproducible, GenRL aims to aid faster paper reproduction and benchmarking by providing the following main features:
* **PyTorch-first**: Modular, Extensible and Idiomatic Python
* **Unified Trainer and Logging class**: code reusability and high-level UI
* **Ready-made algorithm implementations**: ready-made implementations of popular RL algorithms.
* **Faster Benchmarking**: automated hyperparameter tuning, environment implementations etc.
By integrating these features into GenRL, we aim to eventually support **any new algorithm implementation in less than 100 lines**.
Currently, the library has implementations of popular classical and Deep RL agents that ready to be deployed. Apart from these, various Bandit algorithms are a part of GenRL. It has various abstraction layers that make the addition of new algorithms easy for the user.
The library aims to add other key research areas like Multi-agent RL, Evolutionary RL and hyperparameter optimization and provide extensive support for distributed training of agents.
**We are looking for Open Source Contributors.**
/r/MachineLearning
https://redd.it/ihhtiw
GitHub
GitHub - SforAiDl/genrl: A PyTorch reinforcement learning library for generalizable and reproducible algorithm implementations…
A PyTorch reinforcement learning library for generalizable and reproducible algorithm implementations with an aim to improve accessibility in RL - GitHub - SforAiDl/genrl: A PyTorch reinforcement l...
Bare essential javascript to learn to help with flask
I feel that recently lack of ability to interact with dom is getting in the way of me communicating between back and front-end. (ofc, I could be entirely wrong too)
i really want to focus on python and flask at this period but am ope to invest time to JS to help with that journey. I am building things for myself so do not need to achieve anything fancy.
In order for me to make the most of that time what subjects should I focus on? (I hear eloquent is a good book)
Thank you for helping/reading
/r/flask
https://redd.it/ihgum3
I feel that recently lack of ability to interact with dom is getting in the way of me communicating between back and front-end. (ofc, I could be entirely wrong too)
i really want to focus on python and flask at this period but am ope to invest time to JS to help with that journey. I am building things for myself so do not need to achieve anything fancy.
In order for me to make the most of that time what subjects should I focus on? (I hear eloquent is a good book)
Thank you for helping/reading
/r/flask
https://redd.it/ihgum3
reddit
Bare essential javascript to learn to help with flask
I feel that recently lack of ability to interact with dom is getting in the way of me communicating between back and front-end. (ofc, I could be...
Python Flask Tutorial - Creating Slider with Bootstrap 5, Grid Layout in Flask App
https://www.youtube.com/watch?v=kcWYe64SFB8
/r/flask
https://redd.it/ihi3jb
https://www.youtube.com/watch?v=kcWYe64SFB8
/r/flask
https://redd.it/ihi3jb
YouTube
#6 Python Flask Tutorial - Creating Slider with Bootstrap 5 in Flask App - Grid Layout - Code Jana
Join Code Jana --- Flask Discord Server : https://discord.gg/78pgAs8ez6.
Share your issues & problems & chat with everyone regarding Python Flask web-framework. Hi Coders, print("Love you all"). In this video, we'll create a slider with Bootstrap 5 Carousel…
Share your issues & problems & chat with everyone regarding Python Flask web-framework. Hi Coders, print("Love you all"). In this video, we'll create a slider with Bootstrap 5 Carousel…
Thursday megathread: Python careers!
Discussion of using Python in a professional environment, getting jobs in Python and more!
**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**
/r/Python
https://redd.it/ihaiio
Discussion of using Python in a professional environment, getting jobs in Python and more!
**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**
/r/Python
https://redd.it/ihaiio
reddit
Thursday megathread: Python careers!
Discussion of using Python in a professional environment, getting jobs in Python and more! **This thread is not for recruitment, please see**...
Django admin: adding objects for foreignkey from other side
so I have these two models:
class Recipe(models.Model):
short_description = HTMLField(max_length=400)
likes = models.ManyToManyField(User, blank=True,
related_name='recipe_likes')
slug = models.SlugField(blank=True, unique=True)
published_date = models.DateTimeField(blank=True, default=datetime.now)
ratings = GenericRelation(Rating, related_query_name='recipes')
class Ingredient(models.Model):
name = models.CharField(max_length=20)
amount = models.FloatField()
recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE,
/r/django
https://redd.it/ihij82
so I have these two models:
class Recipe(models.Model):
short_description = HTMLField(max_length=400)
likes = models.ManyToManyField(User, blank=True,
related_name='recipe_likes')
slug = models.SlugField(blank=True, unique=True)
published_date = models.DateTimeField(blank=True, default=datetime.now)
ratings = GenericRelation(Rating, related_query_name='recipes')
class Ingredient(models.Model):
name = models.CharField(max_length=20)
amount = models.FloatField()
recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE,
/r/django
https://redd.it/ihij82
reddit
Django admin: adding objects for foreignkey from other side
so I have these two models: class Recipe(models.Model): short_description = HTMLField(max_length=400) likes =...
Are my tests okay?
I read on Two Scoops of Django that you should test the following aspects of your models:
>Two Scoops of Django 3.x
>
>Models: Creating/updating/deletingofmodels,modelmethods,modelmanagermethods.
however, there is not an example of how to do it with pytest, is my approach correct for these tests?
​
models.py
from model_utils.models import TimeStampedModel
import uuid
# from mysocialbeer.accounts.models import Account
from django.db import models
from django.utils.translation import gettext_lazy as _
from django.urls import reverse
class Post(TimeStampedModel):
"""
This is the model that represent posts in MySocialBeer
"""
uid = models.UUIDField(default=uuid.uuid4())
title = models.CharField(verbose_name=_("Title"), max_length=50)
body = models.TextField(verbose_name=_("Body"))
latitude = models.FloatField(verbose_name=_("Latitude"))
/r/djangolearning
https://redd.it/ihskvi
I read on Two Scoops of Django that you should test the following aspects of your models:
>Two Scoops of Django 3.x
>
>Models: Creating/updating/deletingofmodels,modelmethods,modelmanagermethods.
however, there is not an example of how to do it with pytest, is my approach correct for these tests?
​
models.py
from model_utils.models import TimeStampedModel
import uuid
# from mysocialbeer.accounts.models import Account
from django.db import models
from django.utils.translation import gettext_lazy as _
from django.urls import reverse
class Post(TimeStampedModel):
"""
This is the model that represent posts in MySocialBeer
"""
uid = models.UUIDField(default=uuid.uuid4())
title = models.CharField(verbose_name=_("Title"), max_length=50)
body = models.TextField(verbose_name=_("Body"))
latitude = models.FloatField(verbose_name=_("Latitude"))
/r/djangolearning
https://redd.it/ihskvi
reddit
Are my tests okay?
I read on Two Scoops of Django that you should test the following aspects of your models: >Two Scoops of Django 3.x > >Models:...