How does OAuth 2.0 Work?
OAuth 2.0 is an authorization framework that enables applications to access a user’s data on another service (like Facebook or GitHub) without sharing the user’s password.
It’s essentially a digital handshake between the app, service, and user, with everyone agreeing on what is shared.
Now that we’ve covered what it is, let’s dive into how it works.
The process generally follows 6 steps with 4 components typically involved:
🔸 Client (app wanting access)
🔸 Resource owner (user)
🔸 Authorization server
🔸 Resource server
To understand the process, let’s take a look at how a game would connect to a player’s Facebook account.
Step 1) Request access:
Within the game (client), the player (user) clicks on a “connect with Facebook” button to link their profile and find friends.
Step 2) Redirect to service:
The game redirects the player to Facebook’s (service’s) login page.
Step 3) Permission request:
After logging in, the data that the game is requesting access to will be shown to the player which they can either allow or deny.
Step 4) Authorization code:
If the player gives their approval, Facebook redirects the player back to the game with an authorization code (from authorization server). The code is a temporary credential that proves the player’s consent.
Step 5) Exchange code for token:
The game now sends the authorization code along with its own identification to Facebook’s server in the background. Facebook identifies the authorization code and the game’s identity and returns an access token.
Step 6) Use the token:
The game can now use the access token to request the agreed-upon data from Facebook (from the resource server), like the player's friends list.
In this process, the player’s Facebook credentials were never shared, but the game was able to access the agreed-upon player data from Facebook. This is what OAuth 2.0 facilitates; allowing third-party applications to access data from services in a secure manner without sharing credentials.
You can learn more about OAuth 2.0 here: https://t.co/u7LlIXRqZO
~~~
A big thank you to our partner Postman who keeps our content free to the community.
If you found this helpful, I write an email every Thursday to help you level up your engineering and system design skills.
Subscribe here → https://t.co/fHE4h5TPej
Network protocols function as the main pillars that enable communication between devices over a network.
Understanding major networking protocols is important for developers.
However, there are a lot to remember. Here's a break down some of the most important ones:
OpenCopilot is at 4.2K GitHub stars! ⭐⭐
https://t.co/VG6nwctSxM
It's a way to let your product's users chat with your product functionality and execute stuff by text, a kind of custom AI copilot. & We released a lot of cool things.
Mostly, The could version now is much more reliable than before and can be used in product environments!
Powered by @langchain
🤖 Reinforcement Learning Lecture Series by @DeepMind
This Deep Learning Lecture Series on Reinforcement Learning is a collaboration between DeepMind and the UCL Centre for Artificial Intelligence.
🔗https://t.co/0p6b3P0ZK3
👉 From Zero to AI Research Scientist Full Resources Guide
This guide is for anybody with basic programming knowledge interested in becoming a Research Scientist in Deep Learning and NLP.
🔗 https://t.co/cseX6xDaVG
The original train-test split has one major issue:
You only have one chance!
But Cross-validation solves this problem.
Here it is clearly explained 🔽
Instead of one training set and model, in cross-validation, the data is divided into many groups, and multiple models are trained.
The most common cross-validation is called k-fold.
k defines the number of groups (folds) we are creating from the dataset.
In five-fold cross-validation, we have 5 equally sized folds.
Model training
For the first model Fold 2-5 are used as training data and Fold 1 is the test data.
This process is repeated k times. Every time a new fold is used as the test set.
Then we compute the accuracy of all the models, and average them, so we have an efficiency score based on several models.
Advantages
With 1 datasplit we cannot trust the train and test sets.
Consider this:
We want to classify fruits. Some fruits are easy to classify (apples, oranges), while some tropical fruits are hard.
What if after the split, we have the easy fruits in the training set and the hard fruits in the test set? Our model will be poor.
And vice versa. Training a model on hard samples, and then testing it on easy samples will result in an unrealistically good model.
So in cross-validation, the data usage is more efficient.
Disadvantage
Of course, training more models means more computational cost.
Training more models will require more time and resources.
___
That's it for today.
I hope you've found this Tweet helpful.
Like/Repost for support and follow @levikul09 for more Data Science content.
Thanks 😉
🔘 @MIT Deep Learning in Life Sciences
A course introducing foundations of ML for applications in genomics and the life sciences more broadly.
🔗 Course ➡️ https://t.co/2Vjii3Xpbw
🔗 Materials ➡️ https://t.co/iFgtNrxCTw
Residuals (Lesson 5 of 24): Residuals are the key to improving model performance. But it took me 5 years to figure this out. In 5 minutes, I'll share what took me 5 years to figure out. Let's go.
1. What are residuals? In statistics and machine learning, "residuals" refer to the differences between observed values and the values predicted by a model. These are your model errors.
2. Residual Analysis: The key to understanding if your model is any good is residual analysis. What I'm looking for is: Linearity, Homoskedasticity (constant variance), and lack of pattern.
3. Why it took me 5 years (what they don't teach you)? Residuals are a treasure trove of information. I assumed if the "diagnostic plots" in the Residual Analysis looked good, I was good. This is wrong.
4. The 2 mistakes I made: When residuals didn't look good, I tried to create a more complex model (Mistake 1). When I thought the residuals "looked good", I'd stop modeling and move on (Mistake 2).
5. My Epiphany 💡 (The Residual Trick): In 2019, I was researching time series competitions, and I stumbled upon one where the 2nd place solutions used what I call "Residual Modeling". The concept isn't new (in fact ARIMA actually uses residual modeling to model the errors in the "MA" part of the ARIMA model). But what was new was using XGBoost to do it. A light bulb went off...
6. The Residual Trick: What would often happen in my time series models is that ARIMA (or SARIMAX more specifically) would leave information in the residuals. Through trial and error, I found that adding an XGBoost model on the residuals of the first-pass ARIMA model worked awesome for extracting more information.
7. Birth of ARIMA Boost: In my Modeltime R package, I turned this simple 2-step process into a model called "ARIMA Boost". And it combines the strengths of both models. ARIMA for trend and basic seasonality. XGBoost for xregs and multiple seasonality.
Links (ARIMA Boost): https://t.co/kyxmXIysX9
===
Ready to learn Data Science for Business?
I put together a free on-demand workshop that covers the 10 skills that helped me make the transition to Data Scientist: https://t.co/LR39RJ5XKB
And if you'd like to speed it up, I have a live workshop where I'll share how to use ChatGPT for Data Science: https://t.co/EaMpKrJiqX
If you like this post, please reshare ♻️ it so others can get value.
Download 698-page PDF >> Everything You Always Wanted To Know About Mathematics*
(*But didn’t even know to ask)
A Guided Journey Into the World of Abstract Mathematics and the Writing of Proofs: https://t.co/JLsDOmpP1q
What is Retrieval-Augmented Generation (RAG)?
We will discuss:
- The origins of RAG
- The LLM's limitations that it tries to fix
- Its architecture
- Why is it so popular
Bonus: A list of open-source tools for RAG implementation! https://t.co/vWTG3dRnRL
@rowancheung We have 15,000+ GPT’s and 40,000+ shared AI conversations. You can upload videos and additional instructions and see how others have used the GPT’s through viewing shared conversations using those GPT’s. It’s Free!
https://t.co/soeZAGTWs6 https://t.co/LUCMW3GUV1
@ConsensusNLP 9. Healthy Chef GPT
A straightforward recipe and nutrition advisor built right into ChatGPT.
Link: https://t.co/CDFTCi3t8z
https://t.co/TL5ZrlIzT3
Stanford CS25 - Transformers United
Great set of lectures on advanced applications and topics related to Transformers.
My favorite lectures are the ones on common sense reasoning and generalist agents in open-ended worlds.
Some of the lectures are a bit old now but the authors have plans to keep releasing more new lectures soon.
Great series!
(link in the replies)