Resources To Learn DRF
I am struggling to learn DRF i have started the course from coursera but it is not going good so can anyone suggest me some resource to learn DRF
/r/django
https://redd.it/136wth9
I am struggling to learn DRF i have started the course from coursera but it is not going good so can anyone suggest me some resource to learn DRF
/r/django
https://redd.it/136wth9
Reddit
r/django on Reddit: Resources To Learn DRF
Posted by u/Appropriate-Fox-2575 - 2 votes and 1 comment
Python-Selenium-Action: Run Selenium with Python via Github Actions using Headless or Non-Headless browsers!
https://github.com/MarketingPipeline/Python-Selenium-Action
/r/Python
https://redd.it/1376pqe
https://github.com/MarketingPipeline/Python-Selenium-Action
/r/Python
https://redd.it/1376pqe
GitHub
GitHub - MarketingPipeline/Python-Selenium-Action: Run Selenium with Python via Github Actions using Headless or Non-Headless browsers!
Run Selenium with Python via Github Actions using Headless or Non-Headless browsers! - GitHub - MarketingPipeline/Python-Selenium-Action: Run Selenium with Python via Github Actions using Headless...
Discussion: Mark Zuckerberg on Meta's Strategy on Open Source and AI during the earnings call
During the recent earnings call, Mark Zuckerberg answered a question from Eric Sheridan of Goldman Sachs on Meta's AI strategy, opportunities to integrate into products, and why they open source models and how it would benefit their business.
I found the reasoning to be very sound and promising for the OSS and AI community.
The biggest risk from AI, in my opinion, is not the doomsday scenarios that intuitively come to mind but rather that the most powerful AI systems will only be accessible to the most powerful and resourceful corporations.
Quote copied from Ben Thompson's write up on Meta's earning in his Stratechery blog post which goes beyond AI. It's behind a paywall but I highly recommend it personally.
Some noteworthy quotes that signal the thought process at Meta FAIR and more broadly
We’re just playing a different game on the infrastructure than companies like Google or Microsoft or Amazon
We would aspire to and hope to make even more open than that. So, we’ll need to figure out a way to do that.
...lead us to do more work in terms of open sourcing, some of the lower level models and tools
Open
/r/MachineLearning
https://redd.it/1373nhq
During the recent earnings call, Mark Zuckerberg answered a question from Eric Sheridan of Goldman Sachs on Meta's AI strategy, opportunities to integrate into products, and why they open source models and how it would benefit their business.
I found the reasoning to be very sound and promising for the OSS and AI community.
The biggest risk from AI, in my opinion, is not the doomsday scenarios that intuitively come to mind but rather that the most powerful AI systems will only be accessible to the most powerful and resourceful corporations.
Quote copied from Ben Thompson's write up on Meta's earning in his Stratechery blog post which goes beyond AI. It's behind a paywall but I highly recommend it personally.
Some noteworthy quotes that signal the thought process at Meta FAIR and more broadly
We’re just playing a different game on the infrastructure than companies like Google or Microsoft or Amazon
We would aspire to and hope to make even more open than that. So, we’ll need to figure out a way to do that.
...lead us to do more work in terms of open sourcing, some of the lower level models and tools
Open
/r/MachineLearning
https://redd.it/1373nhq
Stratechery
Facebook Earnings, Generative AI and Messaging Monetization, Open Source and AI
Meta’s earnings showed that all of Meta’s Myths were, in fact, myths. Plus, how LLMs can benefit Meta ad products, and why Meta might open source more AI models.
D Oblivus Cloud | Scalable GPU servers from $0.29/hr
Greetings r/MachineLearning!
This is Doruk from Oblivus, and I'm excited to announce the launch of our platform, Oblivus Cloud. After more than a year of beta testing, we're excited to offer you a platform where you can deploy affordable and scalable GPU virtual machines in as little as 30 seconds! We believe that Oblivus Cloud is the perfect alternative to other cloud service providers when it comes to training your ML models.
https://oblivus.com/cloud
🤔 What sets Oblivus Cloud apart?
At the start of our journey, we had two primary goals in mind: to democratize High-Performance Computing and make it as straightforward as possible. We understand that maintaining GPU servers through major cloud service providers can be expensive, with hidden fees adding to the burden of running and maintaining servers.
Additionally, the cloud can sometimes be overly complex for individuals who don't have much knowledge but still require powerful computing resources.
That's why we decided to create a platform that offers affordable pricing, easy usability, and high-quality performance. Oblivus Cloud provides just that - a simple, affordable, and high-quality alternative for anyone in need of powerful computing resources.
⚪ Features
Oblivus Cloud comes packed with a wide range of features to make your experience smooth, seamless, and fully customizable. Here are some
/r/MachineLearning
https://redd.it/1370xg9
Greetings r/MachineLearning!
This is Doruk from Oblivus, and I'm excited to announce the launch of our platform, Oblivus Cloud. After more than a year of beta testing, we're excited to offer you a platform where you can deploy affordable and scalable GPU virtual machines in as little as 30 seconds! We believe that Oblivus Cloud is the perfect alternative to other cloud service providers when it comes to training your ML models.
https://oblivus.com/cloud
🤔 What sets Oblivus Cloud apart?
At the start of our journey, we had two primary goals in mind: to democratize High-Performance Computing and make it as straightforward as possible. We understand that maintaining GPU servers through major cloud service providers can be expensive, with hidden fees adding to the burden of running and maintaining servers.
Additionally, the cloud can sometimes be overly complex for individuals who don't have much knowledge but still require powerful computing resources.
That's why we decided to create a platform that offers affordable pricing, easy usability, and high-quality performance. Oblivus Cloud provides just that - a simple, affordable, and high-quality alternative for anyone in need of powerful computing resources.
⚪ Features
Oblivus Cloud comes packed with a wide range of features to make your experience smooth, seamless, and fully customizable. Here are some
/r/MachineLearning
https://redd.it/1370xg9
Oblivus
Oblivus | Compute
Explore top-tier NVIDIA GPUs with Oblivus, offering unparalleled configurability and availability. Tailored specifically for handling large-scale GPU-accelerated workloads!
Build a full stack social network - Django/DRF/Vue3/Tailwind - Free YouTube Series
Hey guys,
a few weeks ago I started publishing my newest course on my YouTube channel.
In this course, you will learn how to build a social network from scratch using Django with Django Rest Framework for the backend, and the frontend will be built using Vue and Tailwind.
Some of the features of the social network:
\-Authentication with jwt
\-Posts with attachments (showing on your feed, your profile and similar).
\-Direct messaging
\-Friends (sending/accepting friend requests)
\-Liking/discussing posts
So far, I have posted 4 parts with a total of almost 4 hours of content. And much more are coming :-D
I hope this sounds interesting and that it can help some of you.
If you're interested, you can find the playlist here:
https://www.youtube.com/playlist?list=PLpyspNLjzwBlobEvnZzyWP8I-ORQcq4IO
PS, I would love it if you subscribed to my channel if you want more content like this :-D
/r/djangolearning
https://redd.it/137c38x
Hey guys,
a few weeks ago I started publishing my newest course on my YouTube channel.
In this course, you will learn how to build a social network from scratch using Django with Django Rest Framework for the backend, and the frontend will be built using Vue and Tailwind.
Some of the features of the social network:
\-Authentication with jwt
\-Posts with attachments (showing on your feed, your profile and similar).
\-Direct messaging
\-Friends (sending/accepting friend requests)
\-Liking/discussing posts
So far, I have posted 4 parts with a total of almost 4 hours of content. And much more are coming :-D
I hope this sounds interesting and that it can help some of you.
If you're interested, you can find the playlist here:
https://www.youtube.com/playlist?list=PLpyspNLjzwBlobEvnZzyWP8I-ORQcq4IO
PS, I would love it if you subscribed to my channel if you want more content like this :-D
/r/djangolearning
https://redd.it/137c38x
Reddit
From the djangolearning community on Reddit: Build a full stack social network - Django/DRF/Vue3/Tailwind - Free YouTube Series
Explore this post and more from the djangolearning community
ML model RAM over usage issue
Hi everyone, I am having an issue of RAM over usage with my ML model. My model is based on Tfidf+Kmeans algo, and uses flask + gunicorn architecture.
I have multiple gunicorn workers running on my server to handle parallel requests. The issue is that the model is not being shared b/w workers. Instead, it makes a copy of itself for each worker.
Since the model is quite big in size, this is consuming a lot of RAM. How do I solve this issue such that the model is shared between workers without being replicated?
/r/flask
https://redd.it/137ec9y
Hi everyone, I am having an issue of RAM over usage with my ML model. My model is based on Tfidf+Kmeans algo, and uses flask + gunicorn architecture.
I have multiple gunicorn workers running on my server to handle parallel requests. The issue is that the model is not being shared b/w workers. Instead, it makes a copy of itself for each worker.
Since the model is quite big in size, this is consuming a lot of RAM. How do I solve this issue such that the model is shared between workers without being replicated?
/r/flask
https://redd.it/137ec9y
Reddit
r/flask on Reddit: ML model RAM over usage issue
Posted by u/Devinco001 - 1 vote and 2 comments
Are there any working examples I can download?
I know there are a number of tutorials but I was wondering if there are any working examples I can download of say, a basic bootstrap form.
Thanks
/r/flask
https://redd.it/137ko94
I know there are a number of tutorials but I was wondering if there are any working examples I can download of say, a basic bootstrap form.
Thanks
/r/flask
https://redd.it/137ko94
Reddit
r/flask on Reddit: Are there any working examples I can download?
Posted by u/MindTheStepSoupy - No votes and no comments
(Failed - but working 100%) Interview challenge
Recently I did not even make it to the interview due to the technical team not approving of my one-way directory sync solution.
I want to mention that I did it as requested and yet I did not even get a feedback over the rejection reason.
Can someone more experienced take a glance and let me know where \\ what I did wrong? pyAppz/dirSync.py at main · Eleuthar/pyAppz (github.com)
Thank you in advance!
​
LE: I much appreciate everyone's feedback and I will try to modify the code as per your advice and will revert asap with a new review, to ensure I understood your input.
/r/Python
https://redd.it/137gvt9
Recently I did not even make it to the interview due to the technical team not approving of my one-way directory sync solution.
I want to mention that I did it as requested and yet I did not even get a feedback over the rejection reason.
Can someone more experienced take a glance and let me know where \\ what I did wrong? pyAppz/dirSync.py at main · Eleuthar/pyAppz (github.com)
Thank you in advance!
​
LE: I much appreciate everyone's feedback and I will try to modify the code as per your advice and will revert asap with a new review, to ensure I understood your input.
/r/Python
https://redd.it/137gvt9
GitHub
pyAppz/dirSync.py at main · Eleuthar/pyAppz
Contribute to Eleuthar/pyAppz development by creating an account on GitHub.
Creating 2fa with pyotp
I have a flask app that I'm trying to add a 2fa option to. I'm using pyotp to generate a code that will be sent via email.
The user signs in normally (email, password) and and if they've opted-in to 2fa they are then redirected to a page asking them to submit the security code they received in an email.
The challenge I'm facing is figuring out how I can carry the user object info to the 2fa route so that if they enter the correct code I can login\_user(user)
If they enter the correct email and password but the wrong code I need to retain the fact that they entered the email and password correctly on their following attempts.
There's a login route, and a 2fa code route.
Currently I have the 2fa code generated when the user lands on the 2fa route, there's a function called otp() that creates the one time password:
```
@app.route("/twofactor", methods=\['GET', 'POST'\])
def twofactor():
if current\_user.is\_authenticated:
return redirect(url\_for('login'))
else:
x = otp()
form=TwoFactor()
if form.validate\_on\_submit():
/r/flask
https://redd.it/137lqpb
I have a flask app that I'm trying to add a 2fa option to. I'm using pyotp to generate a code that will be sent via email.
The user signs in normally (email, password) and and if they've opted-in to 2fa they are then redirected to a page asking them to submit the security code they received in an email.
The challenge I'm facing is figuring out how I can carry the user object info to the 2fa route so that if they enter the correct code I can login\_user(user)
If they enter the correct email and password but the wrong code I need to retain the fact that they entered the email and password correctly on their following attempts.
There's a login route, and a 2fa code route.
Currently I have the 2fa code generated when the user lands on the 2fa route, there's a function called otp() that creates the one time password:
```
@app.route("/twofactor", methods=\['GET', 'POST'\])
def twofactor():
if current\_user.is\_authenticated:
return redirect(url\_for('login'))
else:
x = otp()
form=TwoFactor()
if form.validate\_on\_submit():
/r/flask
https://redd.it/137lqpb
Reddit
r/flask on Reddit: Creating 2fa with pyotp
Posted by u/Karlesimo - 1 vote and 2 comments
Tutorial: Deploying a Django & django-q application with Kubernetes at Digital Ocean with CI/CD Github actions and SSL certificate using HTTPS communication.
Let me know if you have any thoughs about this, I'll try to keep the article updated. I've had issues deploying to Digital Ocean when having a django-q application, so I opted for using Kubernetes, but didn't found a good guide for this, so here is one! Hope you'll enjoy it.
https://medium.com/@alexanderlindgren\_17992/deploying-a-django-django-q-application-with-kubernetes-at-digital-ocean-with-ci-cd-github-e1580cc96ea5
If you enjoy this article and want to keep track of my future articles regarding Django, web-development and entrepreneurship, click here: https://medium.com/@alexanderlindgren\_guttae/subscribe
/r/django
https://redd.it/137kwt1
Let me know if you have any thoughs about this, I'll try to keep the article updated. I've had issues deploying to Digital Ocean when having a django-q application, so I opted for using Kubernetes, but didn't found a good guide for this, so here is one! Hope you'll enjoy it.
https://medium.com/@alexanderlindgren\_17992/deploying-a-django-django-q-application-with-kubernetes-at-digital-ocean-with-ci-cd-github-e1580cc96ea5
If you enjoy this article and want to keep track of my future articles regarding Django, web-development and entrepreneurship, click here: https://medium.com/@alexanderlindgren\_guttae/subscribe
/r/django
https://redd.it/137kwt1
Medium
Deploying a Django & django-q application with Kubernetes at Digital Ocean with CI/CD Github actions and SSL certificate using…
Preface
Noob Question: How to validate form when one button is pressed but not the other?
I have a very simple application going that allows you to either search a pokemon by name or get one randomly. I would like it so that my form is validated when submitting a name, but not when clicking 'random'. Currently, the form IS validated even when clicking the 'random' button. For example, if the field is empty and I click 'random' it complains about the DataRequired() validator. Here is the relevant code:
class PokemonNameForm(FlaskForm):
name = StringField('Enter a pokemon name...', validators=[DataRequired(), Length(3, 40)])
submit_button= SubmitField('Submit')
random_button = SubmitField('Random')
...
@app.route("/", methods=['GET', 'POST'])
def home():
form = PokemonNameForm()
pokemon = get_pokemon()
if form.is_submitted():
if form.submit_button.data:
/r/flask
https://redd.it/1379f46
I have a very simple application going that allows you to either search a pokemon by name or get one randomly. I would like it so that my form is validated when submitting a name, but not when clicking 'random'. Currently, the form IS validated even when clicking the 'random' button. For example, if the field is empty and I click 'random' it complains about the DataRequired() validator. Here is the relevant code:
class PokemonNameForm(FlaskForm):
name = StringField('Enter a pokemon name...', validators=[DataRequired(), Length(3, 40)])
submit_button= SubmitField('Submit')
random_button = SubmitField('Random')
...
@app.route("/", methods=['GET', 'POST'])
def home():
form = PokemonNameForm()
pokemon = get_pokemon()
if form.is_submitted():
if form.submit_button.data:
/r/flask
https://redd.it/1379f46
Reddit
r/flask on Reddit: Noob Question: How to validate form when one button is pressed but not the other?
Posted by u/freew1ll_ - 1 vote and 4 comments
Deploy a Voice-Based ChatGPT Clone with BentoML, LangChain, and Gradio
https://towardsdatascience.com/deploy-a-voice-based-chatbot-with-bentoml-langchain-and-gradio-7f25af3e45df
/r/Python
https://redd.it/137eoiv
https://towardsdatascience.com/deploy-a-voice-based-chatbot-with-bentoml-langchain-and-gradio-7f25af3e45df
/r/Python
https://redd.it/137eoiv
Medium
Deploy a Voice-Based Chatbot with BentoML, LangChain, and Gradio
BentoML is Like Lego for ML engineers
Selenium over scrapy
I keep seeing posts about using selenium to scrape pages and I’m curious why people prefer that over a library like scrapy
I’ve worked with both and absolutely prefer scrapy — just wondering out loud
Thank you
/r/Python
https://redd.it/137zeq8
I keep seeing posts about using selenium to scrape pages and I’m curious why people prefer that over a library like scrapy
I’ve worked with both and absolutely prefer scrapy — just wondering out loud
Thank you
/r/Python
https://redd.it/137zeq8
Reddit
r/Python on Reddit: Selenium over scrapy
Posted by u/geekluv - 4 votes and 11 comments
[D] Google "We Have No Moat, And Neither Does OpenAI": Leaked Internal Google Document Claims Open Source AI Will Outcompete Google and OpenAI
https://www.semianalysis.com/p/google-we-have-no-moat-and-neither
/r/MachineLearning
https://redd.it/137rxgw
https://www.semianalysis.com/p/google-we-have-no-moat-and-neither
/r/MachineLearning
https://redd.it/137rxgw
Semianalysis
Google "We Have No Moat, And Neither Does OpenAI"
Leaked Internal Google Document Claims Open Source AI Will Outcompete Google and OpenAI
What IDE do y’all use
I’m the process of learning python. I used net beans for Java
/r/Python
https://redd.it/1383eox
I’m the process of learning python. I used net beans for Java
/r/Python
https://redd.it/1383eox
Reddit
r/Python on Reddit: What IDE do y’all use
Posted by u/youngnebsi - 47 votes and 192 comments
Behave Driven Development Python library
There are Python BDD frameworks out there, most notably `behave` (https://github.com/behave/behave).
They are nice. However, from time to time I find myself fighting against some design choices made by their authors. I thought that things can be made more lightweight, flexible and less constrained.
I thought that a tool with more of a library-like architecture, rather than a framework, might be fit for the purpose.
`Rumex` is my work-in-progress implementation of such a tool: https://github.com/uigctaw/rumex
I would appreciate any feedback. Be it minor things or fundamental ones - like perhaps I'm misguided in my assessment of perceived inflexibility of the existing tools.
/r/Python
https://redd.it/13874wi
There are Python BDD frameworks out there, most notably `behave` (https://github.com/behave/behave).
They are nice. However, from time to time I find myself fighting against some design choices made by their authors. I thought that things can be made more lightweight, flexible and less constrained.
I thought that a tool with more of a library-like architecture, rather than a framework, might be fit for the purpose.
`Rumex` is my work-in-progress implementation of such a tool: https://github.com/uigctaw/rumex
I would appreciate any feedback. Be it minor things or fundamental ones - like perhaps I'm misguided in my assessment of perceived inflexibility of the existing tools.
/r/Python
https://redd.it/13874wi
GitHub
GitHub - behave/behave: BDD, Python style.
BDD, Python style. Contribute to behave/behave development by creating an account on GitHub.
Hosting recommendation
Hi all. I have a couple of dedi servers at inmotion, but they all lack the "Linux Cloud" feature and want to charge me rather high amounts to enable this feature. Ideally I was going to deploy via the "Setup Python App' in cpanel, but of course, this requires Cloud Linux.
Trying to do this without it via WHM has proven to be a nightmare and I was hoping somebody could recommend a suitable alternative for a domain (with sub domains), static IP and easy deployment of django apps?
/r/django
https://redd.it/138h1y4
Hi all. I have a couple of dedi servers at inmotion, but they all lack the "Linux Cloud" feature and want to charge me rather high amounts to enable this feature. Ideally I was going to deploy via the "Setup Python App' in cpanel, but of course, this requires Cloud Linux.
Trying to do this without it via WHM has proven to be a nightmare and I was hoping somebody could recommend a suitable alternative for a domain (with sub domains), static IP and easy deployment of django apps?
/r/django
https://redd.it/138h1y4
Reddit
r/django on Reddit: Hosting recommendation
Posted by u/bedroomsport - No votes and no comments
Concantantion of strings from fields of model
I'm trying to combine values passed to fields name and surname to create a string to be stored in full\_name field. When l was looking for solutions, I found suggestion to overwrite Django's save method. I tried, but get no expected results. Instead after making a few instances of Author class and trying to loop over them in Django shell. I get following results:
> \--snip--/models.py", line 13, in __str__
>
> """Override save method."""
>
>AttributeError: 'Author' object has no attribute 'full_name'
​
Code is here:
https://pastebin.com/Kx9ea6x4
/r/djangolearning
https://redd.it/138f5wx
I'm trying to combine values passed to fields name and surname to create a string to be stored in full\_name field. When l was looking for solutions, I found suggestion to overwrite Django's save method. I tried, but get no expected results. Instead after making a few instances of Author class and trying to loop over them in Django shell. I get following results:
> \--snip--/models.py", line 13, in __str__
>
> """Override save method."""
>
>AttributeError: 'Author' object has no attribute 'full_name'
​
Code is here:
https://pastebin.com/Kx9ea6x4
/r/djangolearning
https://redd.it/138f5wx
Pastebin
from django.db import models# Create your models here.class Author(model - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
When do you use Q?
A question that just came to my mind. I wrote:
etfs = ETF.objects.filter(Q(updated_at__lte=timezone.now() -timezone.timedelta(days=1)))
but to be honest, it's not a complex query. However, I am tending to automatically use a Q object. When do you use it, would you use it here?
I hope to read some opinions
/r/django
https://redd.it/138kki6
A question that just came to my mind. I wrote:
etfs = ETF.objects.filter(Q(updated_at__lte=timezone.now() -timezone.timedelta(days=1)))
but to be honest, it's not a complex query. However, I am tending to automatically use a Q object. When do you use it, would you use it here?
I hope to read some opinions
/r/django
https://redd.it/138kki6
Reddit
r/django on Reddit: When do you use Q?
Posted by u/palmy-investing - 3 votes and 4 comments