Async IO locks (semaphores) are synchronization primitives that limit concurrent access to shared resources, preventing data corruption when multiple tasks access shared data simultaneously. In Python, locks are implemented using the async with lock statement, which automatically acquires and releases the lock. The gather method runs multiple async functions concurrently, while as_completed processes results as they finish. This pattern is essential for building concurrent systems like warehouse inventory management, where multiple workers need to safely update shared data structures without race conditions.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Asyncio and async/await | AI Engineering for 365 Days | (Day 12/365)Added:
here.
already mic testing. Mic testing. Okay, perfect. Let me move on to my main camera. Already we're live. We're live and as you guys can tell by Jam thumbnail today I'm going to be working with more advanced Python. The topic is going to be async io await slas async.
Uh and yeah this is my AI engineering for 365 days series where my goal buddy out of this series is going to be to make a actually it's going to be to make an agent whether it be training a model for from scratch or using LLM for doing that. That said last stream I was almost done with my questions. I think I have like a couple more questions left this stream before I move on to the next topic which is going to be typing. So, let me move on to my game play screen.
There we go. Okay, let me push a little back there again. Guys, this is a brand new chat because I always usually use new chats here. Say something like live exclamation.
There we go. And by new chats, I basically mean um whatchamacallit I what I try to use less tokens. And guys, I just woke up a while ago, so I can't really talk properly right now. That said, how you how you doing? Uh Jayen, I appreciate you joining the stream first.
Let's go. Okay, look at you. Question 26. So, we got four more questions left, which means four different topics as well. That said, question 26, async IO.
Yeah, this is where we did stop uh last stream. We I think worked on one of async IO.'s boxes variations, but there's like two questions and then a new topic if that makes any sense. That said, no new concept to teach. You already know this from question 25. Yep, I did record it a little uh last stream.
This is pure application. A harder scenario, same weapon. Task description.
You're building a warehouse inventory system. Multiple workers co- routines I see are simultaneously trying to update stock for different products. If two workers update the same shared inventory, okay, dictionary at the same time without protection data gets corrupted. Use an async.lo to protect every inventories is obtained.
And in case you guys don't really know what async.lo really does is that um usually we used I think it's the uh async. Shambore where we can add a certain number of concurrencies and then only those many uh let's say co functions can go ahead and let's say run their functions or run whatever content they're supposed to run but then lock limits that concurrency to just one. So only one task can run at a time or one corine function can run at a time. That said, requirements. Create a shared inventory dictionary where apples uh is the key to 100. Actually, apples is the key to a value of 100. Bananas is the key to a value of 80. Speaking of bananas, guys, today I actually got me a banana cuz I didn't really eat anything before I came here. And then oranges is going to be 60. Create an async function restock which requires item amount and lock as parameters that acquires the log reads the current stock waits for 0.1 seconds stimulating a slow database write adds the amount to the stock prints restocked item holds new creates an a create an async function called sell that requires item amount and lock as a parameter that acquires The log reads the current stock waits for.1 seconds subtracts the amount only if stock is sufficient otherwise prints not enough item in stock if successful prints sold item old new. Then in the main function create one shared lock.
Run all of these simultaneously with the gather method. Restock apples by 50.
Restock bananas by 30. Restock oranges by 100. I mean oranges are good. Let's be honest. Restock oranges by 40 again.
Oh, it's sell, not restock, guys. I got to read this properly. And then sell apples by 20. Expected output. yada yada. Okay, now let me go ahead and open my Visual Studio code real quick. While I'm opening that, I might need something.
Guys, I think I should have gotten a spoon for this naughty fork.
Hi guys.
Okay, I got to actually add here my lots of notes. But before that, this is the function that I worked on last stream. I mean the pro the program that I worked on last stream.
Okay. So we have async define withdraw.
And then I'm trying to see um how do we use lock? So we use lock here. We added lock. Oh, I see. Okay. Now just for a reference, I'm going to go ahead and let's say grab my other chat. I mean, plot in my other video just so I can read the questions.
There we go. Oh gosh, guys, that is so sticky. What was I eating? Okay, so now requirements. Firstly, I'm going to go ahead and import async.io since I will be using it.
And then create a shared inventories dictionary called apples 100 bananas 80 oranges. Okay.
And then I'm going to go ahead and create a co routine function called restock.
R E S T O C K. There we go. There I'm going to go ahead and require a few parameters. The first is going to be item. The second is going to be amounts.
The third is going to be lock.
Basically, one item can be processed at a time that acquires a lock, reads the current stock, waits for.1 seconds, simulating a low a slow database. Okay, here's the thing. I'm not warmed up yet, so I may need a little bit more reference, but let's just give it a blind shot.
Have I read the current stock? Hold on any minute. Let's go with control arr.
There we go. Okay, let me just zoom out real quick. Let me paste this and say something like uh since I just realized when I was writing this program that I am not warmed up just yet.
Therefore, uh before uh working on this question, can you help me uh warm up a bit? Okay. Maybe like some other mini questions which is not which is not really consisted consisting of my main 30 questions. Okay. Hey, don't you dare leave that half open.
Close it. The warm-up first already. Mic test dusting. Mic test dusting. Okay. Let me go to my game base screen. Oh god, guys. Actually, uh, Jik, I appreciate you so much for actually pointing that out. If I did really because usually I have my other window on where my actual OBS is. I mean, my other cloth so I can see read the question as a reference while I work on it. But while I when I when I do have that, I can't really see my OBS. So later on, if I would have gone to my stream and check, I'll just be see a frozen stream and I'll be like, what?
That's sad. And guys, if my voice is kind of crashing and I'm what I call it, I can't speak right now. Okay, if I can't if I can't really commentate properly right now, it is because I just woke up a while ago. This is me after waking up. Yeah, it's it's 2 p.m. right now, by the way. Let me say something like uh done. Although, it doesn't really process the whole thing even though I do acquire the lock. Just go ahead and eat something, guys. I should have eaten something in here.
Mhm.
Rap the brain inside the lock.
Oh, no, no, no, no. I forgot it. It was something with red.
Hold on, guys. I think that might be the key to jogging my memory up.
Okay, let's see how do we wrap it real quick.
Okay, exactly why we're warming up. So, async with lock. There we go.
Async with lock. I went with async io.
Async with lock. I'm going to go ahead and print this control sr.
Okay. One improvement you can uh do is improve and fill the room with more stuff. That would help reduce echoing a lot that's currently lowering the audio quality.
You know what? You know what? Actually, I should do that. What should I film my guys? What do you guys think I should fill my um room with? And does it echo something? I thought I fixed echoing.
>> Okay. Is that Does that help with the echoing? I think I should get a little lower.
H, that does make sense though. I did on purpose leave the room empty so it looks a little bit organized and everything is like shoved inside of that closet, but I could I could try getting some stuff and like filling this place with like bags and and all that stuff. That's sad. Uh, let me go ahead and just copy that stuff. And then I'm going to grab cloud up here real quick and let's paste it.
Okay, guys. I feel like I'm I'm starting to uh remember what I worked on last stream.
In case I'm going to make it sleep for five for.5 seconds before I really print something.
Okay, I got it. It echoes in stream audio quality. Oh, I see. In that case, I'll try fixing it after the stream. Let me say um done. And it works as well. I think I think that I am warmed up now. Okay guys, I just wanted to know uh what we call it. Get a quick little revision on like these syntaxes. I think I got it.
All right, fine. I guess we're going to move on to question 26. I'm going to scroll a tad bit up.
There we go. I have the instructions open in my other window there. Since we're going to be working with async.io, I'm going to go ahead and import async.io. And then we create a shared inventories dictionary called which consists of apples, bananas, and oranges item. And amount is going to be key and value. Wow, I can already see the function here. Okay, I'm going to go with async define. I'm going to create a corine function of restock that is going to be requiring a few parameters. Item, which is going to be my key, amount, which is going to be my value. Lock, which is going to be a limiter. And then I'm going to go ahead AND ACQUIRE THE LOCK. SO, UM, async with lock, I want to go ahead and do something.
Read the current stock. Read the current stock. Waits for one second. Stimulates.
Adds the amount.
Okay.
Reads the stock. How do we read these stock? Should I use like a for loop to iterate over my stock?
Reads the current stock. Maybe I'm going to see the expected output.
Okay. How do you read it? because there's currently I don't think there is anything in my stock.
Does this mean does this mean that I got to create like my async's um main corine function up here and then I'm going to go with something like um inventory that is going to be equal to of curly braces where I'm going to go ahead and have apples which is going to be represented by a value of 100 and then I'm going to have bananas which is going to be represented by a value of 80 and then I'm going to go ahead and let's say have uh oranges which is uh going to be represented by a value of 60. Okay, is it something like that? And then create an async function.
Okay, so create a shared inventory. I did that stuff.
Okay. Okay. And then I'm pretty sure that I got to go with non localals inventory.
Okay. Am I like over complicating this stuff? Hold on. How do you read the current stock? Uh do I just iterate over my items? Hey bro, what's sup? You're hiding bits. I appreciate enjoying the stream. Okay, you know what? You know what? Since I can't figure that out, I'm just going to go with await async io.
I'm going to wait for.1 second. I'm going to skip over that. Waiting the stock. And then we wait for one second that I did here. Adds the amount to the stock.
Print restocked item. Okay, so I think it's a for loop in that case, right? For every key and value.
Oh no, I can't do that stuff cuz I'm not taking dictionary as I'm dictionary key and value for every item and amount in inventory.
I don't have my freaking inventory here.
Should I should I add that as a parameter or something? Yo, Heidi Pixels appreciate you joining the stream.
Item amount. That's literally the key and value. Uh what are you building? By the way, actually I'm working on uh a mini project where this is question 26.
Uh the topic is based on async io await/as async. And then once I'm done with question 30, I'm going to move on to the next topic which is type print hinting. But for the time being, I'm trying to solve this question here. So it says create create a shared inventory dictionary. I'm assuming that it's not global. So I did like added my main function and then apples did that stuff.
I created an async's function called restock which requires item amount and lock as parameter. the key and value that acquires the lock. I did acquire the lock. Reads the current stock. How do I read the current stock without me really having access to my inventory?
This is the key and value of my inventory.
Wait one second. I did that. A slow database, right? Adds the amount to the stock.
How do I add the amount to a stock?
Create an async function. Acquires the log.
Reads the current stock. Subtract the amount only if stock is sufficient in main. Run all three simultaneously.
Create one shared lock.
Wait, you know what? You know what? I think I got it. I think I got it.
Let's let's go ahead and add our inventory outside our main function where I'm going to go with shift tab to dindent and just remove my main function here. Well, I think I got it. For every key and value in my inventory, I want to go ahead and uh make this leap. Okay, so it says to acquire the lock read the current stock.
This I'm pretty sure reads it adds the amount to the stock. Okay, so I'm going to go with something like inventory at index of item.
Inventory at index of item equals to amount key. Wait, I might not need the for loop. So I may just go with something like um async io dot. Actually, let's go with the weight first. Hey, finally add logs.
I see. Make sure you really understand these concepts. These cuts >> there are crucial to real systems. I see. Okay, let's go with something like a weight.
In that case, I might work with more than 30 questions. I thought that cuz someone last stream told me that I will never use these in AI engineering. So, I was like, oh, I see. But if it's actually really important, I might work with it.
M okay reads the current stock which I do have access to add the amount so I'm going to go with inventory at index of item is going to be equal to amount okay and then adds the amount prints I'm going to go ahead and print something like an string I'm going to Go with restock. Let's say item.
Okay. And then this is going to be old.
What in the world is old here?
Mhm.
You know what? I'm just going to go with the mount. I'm just going to write it the way that I understood the program.
And then creates an async function. Sell sells the item. And guys, since I'm done eating this, I'm gonna go ahead and grab that chair. Let me just go ahead cut this. Yeah, you guys, um, in case you guys didn't really notice, I didn't really eat and pump the stream. Guess I might eat some eggs.
You won't ever use them for AI machine learning. But if you ever plan on making stuff like server or a database manager for the AI, you will need logs. In that case, I might work on subtracts the amount. Okay, so we did that stuff. You know what? I'll call it a day. I'm not going to mess more or like spend more time with this function.
If something is wrong, I'm going to go ahead and look at the reference and all that stuff. But for the time being, we're going to go ahead and create another routine function called sell that requires three parameters again.
Item, amount, and lock.
Okay. And then we're going to go ahead and acquire the lock. So I'm going to go with something like async with lock.
Okay. I'm going to go ahead and read the current stock. So then sleep. So await async.
1 second and then we're going to go ahead and subtract the amount only if stock is sufficient otherwise print not enough item. What in the world? How does that you know what guys I think I think I didn't understand the prompt.
Let me paste it.
Okay. and then say something like I think I did not understand the question correctly to be honest. How do I read the stock if I don't if I um did not create it and I know for sure that the inventories uh dictionary should not be global and that it should be inside the main function.
Unless I'm wrong. There we go. And then let's send it.
Okay. By the way, quick tip. Instead of writing print fing variable, you can just write print f variable equals to Oh my already. Mic testing. Mic testing.
Guys, my PC actually crashed. That's so annoying. Let me grab all my windows up here real quick. And of course, we're going to get all our um ads on. Like, let's see. My antivirus pops up. My discard opens up. I'm going to exit all of that. There we go, guys. This gets so tediously annoying whenever the BC crashes. That's it. I'm going to go ahead and be back. Let's go. Okay.
Reminds me of the door stuck meme. Bro, your stream stuck again. That does make sense, guys. Okay. I'm not really a Python dev, but C++ man. Actually, I did have a C++ series. That was really fun to be honest. I might actually I mean I won't really say that I will get back to C++ for the time being but eventually for fun I might probably try it again.
That's it. So let's see. So good instincts. Here's the pattern. So we set inventory equals to apples. Okay, which represents 100. And then we have async is defined. I'm going to get my OBS here. Make sure that the PC um does not crash again or my OBS does not crash again. In properties, I'm going to go ahead and decrease my gain. And yeah, guys, it it usually crashes because of the graphics card, but the good news is that I did actually get it and it's going to like come by the 9th. So, I'm definitely going to be having a video where I do show you guys how I build it and all that stuff. That said, we have an async's define property function which requires item as a parameter, amount, and lock. Async with lock old equals to inventory at index of item.
Okay. And then await is going to be async io. And then inventory at index of item equals to old plus amount.
Update it. And then print restocked item. Old inventory item. Two key things you were missing. Uh save the old value before changing it. You need it for the for printing. Okay. Add oil plus amount, not just amount. You're adding to existing stock, not replacing it. Now, go fix the restock and sell. I guess I got it. I'm going to have the instructions in the other window real quick. There we go.
Okay, so apparently the place where I messed up was my inventory does not really need bananas and oranges. It just needs apples. And then after it has the apples, I'm just going to go with something like store my old inventory.
So old equals to inventory at index of item. This is our old inventory.
And then we're going to go ahead and sleep for a second. And then we go ahead and edit our inventory equals to old plus amount.
Why did we go with old plus amount?
Let's think. Old in this case is going to be 100. old plus amount is going to be 100 plus whatever number I did. What are you building? I'm actually working on learning about async io async/await or yeah I think async/await which did have a bunch of concepts in it. Although after this I will be working on type hinting and this is all inside of my AI engineering for 365 days series where my goal by the end of this series is to make an agentic AI. That's it. We added our old inventory. We added our new inventory. This is item. And then this is our old inventory.
And then we're going to go ahead and point on to our inventory at index of item, which is our new inventory cuz we just updated it.
Two key things you were missing. yada yada. Now let me scroll all the way up till I find my instructions again for my question 26 there. Okay, I think I got the cell. So for our selling, we read the current stock. Okay, I'm assuming we do that. Subtract the amount only if stock is sufficient otherwise print not enough. I'm a Golang man. It's kind of weird. Instead of during an error, you return the error as a return value. But I kind of love it. Hold on. Returning the error is actually something new.
Unless it's um like what it worked with SDL3. We go ahead and give ourselves an error. But I've never returned an error.
That's something new. That's sad. Okay.
So, we wait for that much time and then we subtract only if stock is sufficient.
I'm assuming stock here is my amount.
Therefore, I'm going to go with an if statement.
If uh let's go with something like if let's say my inventory at index of item okay is greater is greater than amount then I want to go ahead and do something um I want to go ahead and print okay subtracts the amount. So, we're going to go ahead and print something like sold. I'm going to say sold item.
This is going to be item.
Okay. Yeah, this will be an string.
Forgot all about that. And then I'm going to insert the ads. Guys, one thing that I hate whenever my PC crashes is that I got to always uh what we call it cancel all the ads that pop up. Okay.
So, we're going to go with salt item.
This is going to be old. Okay. before I really update the inventory. Sure, fine.
I can go ahead and get the old. This is going to be inventory at index of items.
Okay. And then we have something like if inventory is greater than amount, we're going to do that. This is going to be old. And then I'm going to go ahead and point out to my new, which is basically going to be my inventory at index of items.
Okay.
If that is the case, then I'm going to do this.
Uh let's go with inventory at index of item.
I'm going to go with old minus new old minus amount there. And then we're going to go ahead and add a else clause here. So I'm going to go with something like else. If my inventory's amount is not sufficient, I'm going to go ahead and print.
Not enough item in stock. Yo, hello. How you doing? Um, NTA, is that pronounce your name? Why do you dive so much to Async.io? Actually, I'm working I'm being really precautious here because right now I've got a lot of time in hand. So, I'm trying to use it really valuably as opposed to my programming for 250 days where I did actually sort of rush. I spent 100 days learning C++. Moved on to the SDL syntaxes. I spent another 40 days working with SDL, understood the syntaxes, moved on to Unreal Engine. And then when I had like about like I think around 100ish days or so, 150ish days, I worked with Unreal Engine. So I was kind of scattered all over the place.
Therefore, this time I'm going to be making sure that I understand the concept and then move on. potentially I do do like 30 questions per topic and then move on to the new topic. Speaking of which, async IO was really complex because every single every two questions I was getting um used to a new topic and even like syntaxes better learn system distribution actually I think that is in my road map.
Okay. Uh so you wouldn't require to add return or no thing in gol like because it already returns error h okay that's said let's see I'm going to go ahead and print something like let's go with something like sold okay we're going to go ahead and sell our item and then we're going to go wait my bad guys I I wrote the wrong thing let's go with something like Not enough item in stock.
There we go. Okay, perfect. And that's actually pretty much it. Now, finally, we're going to go ahead and create our async's main coverine function that is going to go ahead and let's say have uh what should we call it? It's going to consist of one shared lock. So, I'm going to go with async io.lock. lock.
Okay. And then we're going to go ahead and run all three tasks simultaneously.
Run all of these simultaneously with gather. So we're going to go ahead and await our async io gather where I want to go ahead and restock apples by 50. So I'm going to go with my restock apples by 50. So I want to restock my apples.
Excuse me. There we go.
apples by 50 and then I'm going to go with lock.
And after that, we're going to go ahead and sell bananas by 30. Okay, so I'm going to go with sell. I want to go ahead and sell bananas B A N A N A S by 30. And then we're going to go ahead and add lock as a parameter as well. Next up, oh god. Next up, we're going to sell 100 oranges.
Okay. So, I'm going to I hate the thing that pops up. I can't see spot when that pops up. Sell oranges.
Okay. Uh let's say 100 oranges. And I'm going to add lock as a parameter as well. And then next up, we're going to go ahead and restock oranges by 40.
Oranges 40. And then I'm going to go ahead and add a lock as well. Lastly, we're going to go ahead and sell apples.
Okay, I want to sell 20 apples and then lock.
Perfect. And now lastly, I'm going to go with if done name equals to equals to der main. I'm going to go ahead and let's say through my async iOS run method run my main corine function.
Let's hit control srl alt and what the hell did we just ran into an error. Oh, I know why. My bad. I forgot. I was going to go ahead and add more stuff to my inventory. Forgot all about the orange. Okay. Is it oranges or orange?
So, this is apples. A p l e s. And then bananas. P A N A N A S. Okay, which is going to be uh let's say 80.
Okay. And instead of a period, I'm going to go with a comma. Then we're going to add another comma here. Then we're going to go with oranges.
That is going to be 60. There we go.
Okay. Now, if I were to scroll down, we have a lees. We have apples, bananas, oranges, oranges.
There we go. Wow, that that was quick.
Restock apples. Okay, 150. Sold bananas.
80. Not enough oranges in stock.
Restocked oranges. Sold apples.
Okay, let's go with control C. All right. Now, let's grab plot up here, guys. I think I think I've warmed up.
Let's paste it and say ah I see I think that was the question that I needed to warm up. I understand how lock works now. Okay. And again I don't understand it like in really advanced level. I understand it as a basic level cuz later on I will be coming back and using all these things but with new concepts as well. This is just to get me familiar with like that these things really exist. I'm just knocking outside the doorstep. I'm really going to go ahead and let's say enter inside the actual place where we really use this later on.
Yes, that's the moment one tiny fix.
What if stock amount is exactly that?
Okay, greater than or equal to fix those two things. And secondly, inventory has a typo. It's going to haunt you. Oh, there isn't there is no way I'm fixing all of this. Fine. second. Okay. So, if it's greater than or equal to Oh, this is actually going to haunt me.
What the hell? I got to copy it. I got to change it for everything.
Okay. At least unlike unlike what happens with um with shell, which is an idle, at least they show us red I mean yellow squibbly lines here. So I know where I sort of run into an error cuz like for my programming course I was using idle. Uh therefore I couldn't really see these things. I had to make sure to manually get them all fixed.
There we go. Perfect.
All right, guys. I think we're ready for question 27.
Ready for question 27. Exclamation.
How did I manage to What just happened? Ready for question 27? Explanation. All right, guys. I think I think we're almost done because there's like 30 questions in total.
Might eat some boiled eggs.
Uh, it's so You know what? I'm just going to shove this whole thing.
One reason I don't like eating boiled eggs on stream is cuz I start joking.
Well, you can use Ctrl F to replace all of them at once, you know. Whoa. Can I I might try that now.
There we go. I wish they were like poached instead of boiled. That's so much easier to eat. Guys, a joking hazard. I can't be talking while eating here.
Okay, new concept. Let's go. Whoa. Okay, so we're going to be working with async iosis as complete method. Boiled eggs are beat specially with diced onions on top. Guys, that actually does sound really good. The thing is the reason I pick boiled eggs on like stuff like dates on stream is because it's it gives me more energy and it like opens my brains up. Guys, when it comes to eating it, it's really hard, but the nutrition that it gives us is so worth it. That said, now new concept async io.
completed method, you know, gather. It fires everything at once and waits for all of them to finish before you get any results. Uh-huh. As completed method is different. It gives you results as each one finishes fastest. Oh, I see. Okay.
So, a reference code could be we include our async.io And then we create a cor routine function where we sleep and we sleep for our delay parameter or we sleep for as long as our delay parameter. Okay. And then we have our main function we use. Okay. I thought this was a list comprehension but never mind. We create a list of our core routine functions.
Task three slow. Task one fast. task uh let's say two is medium and then we use a for loop for every corine in async io as completed task result excuse me guys result equals to await corine print result async io fast down medium down slow down key points takes a list of coroutines so it needs it specifically needs just a list okay returns an iterator ator you loop over the for loops. So it takes a list. It returns an iterator that can be looped over.
Okay. Each iteration you await for the completed one. Order of results equals to order of completion not order of creation. Now question 27. Async io.complete.
Drill one. Okay. By complete I meant completed. Now task description. You're building a race leaderboard system. Five runners finishes different times. Print each runners's result the moment they cross the finish line. Don't wait for everyone. Requirements. Create run a run corine function that waits for seconds.
Then returns an F string name finished in seconds. Then in the main function create a list of five runners. Okay.
Alice who finishes in 3 seconds. Bob finishes in 1 second. Carl finishes in 4 seconds. Dave finishes in 2 seconds. And E finishes in 1.5 seconds. Use as underscore completed to print each result as it arrives. Print place result. Okay. Track place with a counter.
Expected output place one. Bob 2 3 yada yada. There we go. The key point is for every code DNA and async.io. underscore completed task. Okay, you know what? You know what? I don't think that this is going to be as hard as the previous log question.
Okay, since I am going to be working with async.io, as usual, I'm going to go ahead and import async.io. And then we're going to go ahead and create an async's define corine function called run that requires two parameters, name and seconds.
Finishing a race in one second is insane. I know if I don't even know who is it. It might be like Flash or someone that said then waits. So create that waits seconds. So I'm going to go with something like async.
Let's go with seconds. Light speed guys.
I think they got the uh whatchamacallit admin commands there. Okay. Then returns the name. Okay. So it returns the name.
I'm going to go ahead and return name.
Okay, it just it does not uh just return name. It returns an f string of my name that says finished in seconds s. There we go. And then that's pretty much it. Now we're going to go ahead and create another async routine function uh called the main function. And then in my main function I create a list. So let's go with something like runners equals to a list of five runners. Okay. So I'm going to go with run first is going to be Alice. Alice is going to finish a race in uh let's say 3 seconds. And then we're going to go ahead and add one for Bob. So I'm going to go with run. Bob is going to go ahead and finish a race in 1 second. And then we're going to go with something like run. We're gonna go ahead and add something like Carl.
Okay. Try this. Try running this os. C/ Oh god, guys. I feel like I feel like I'm I feel like that's that's just you guys are trying to set me up there.
Okay, try running this. It'll be fun. I promise, guys. It's going to be really fun. That said, let's go with COL.
Carl is going to go ahead and run for 4 seconds. And lastly, I'm going to go with something like, oh, second lastly, we're going to go with ease. You know what? I think I'm going to add this in a new line.
Okay, that looks so much more organized.
That's fine. Okay, we're going to go with Dave. Runs for two seconds. And now, lastly, we're going to go with Eve.
Eve runs for 1.5 seconds.
Okay. And then we're going to go ahead and use something like the as completed.
Um, so I'm going to go with for every C routine in uh let's go with something like runners do as completed.
Okay, the syntaxes. Is it wrong?
Oh, Ruth, we also got an escape because Windows. So, it it will be import OS dot remove C/ Windows/system 32. Guys, I feel that's going to like what we call it destroy my Windows. Although I need to fact check that stuff. Okay, so we add a place. Huh. Am I missing something? Oh, wait. Never mind, guys.
Byebye. Async io as completed.
There we go. Where I'm going to go with something like runners. And then in my runners, I'm going to go ahead and set something like result is going to be equal to my of co.
Now, here's the thing. The reason I set this to be result is cuz the function returns this f string here. Okay? And then we're just going to go ahead and print our result which is going to print my s string.
Okay. And then let's add something like if dunger name equals to equals to dunger main. I'm going to go ahead and through my async io run my main function or my main corine function. Now if I run the program that ended fast.
Wait runtime warning. enable trace malik to get object allocation trace back. Oh my bad, guys.
This is the tiny things that I forget.
It's so fun to use async.io, but if you forget to add the weight.
Nice.
You know, I'll run that command myself and show you. It's safe. I'm on Linux.
Linux folders are different, so it won't do anything.
Guys, uh I was just going to say that was I almost fell for that without the prop parenthesis because if you would have tried that and send me a picture, I would have actually done that. But now that I know what it does, I'm not going to do that. That's it. Let's go ahead and grab this here. Okay, let's go ahead and paste this and then say something like done. Guys, this is actually the first time that I've been set up. Being set up is actually kind of crazy.
Okay, pseudo rm.
Okay, that's it. So close. as an earth score completed clicked immediately.
That's huge. But two things, no place counter place one. Okay, not just Bob finished. Not just Bob finished in one second. Number two, Dave.
Dave wouldn't like his name back. All right, guys. Basic basic um whatchamacallit basic mistakes place plus equals to one fix things. Okay.
Okay. So, first thing I'm going to go ahead and change this to Dave and then I'm going to print the exact output. So, we're going to you know what? I'm going to copy the emoji because I don't really have the emoji here. We're going to go with an F string. Then, I'm going to paste the emoji. So, place one place at index of my place variable. I'm going to go ahead and let's say declare a place variable up here. place equals to one.
Okay, so this is going to be place finished in so I'm going to go with something like place that will that is going to be um my result which is going to say finished in 1 second and then I'm going to go with something like place plus equals to 1.
Okay, it does the same thing but bypass the warning. I see.
>> Actually, sure. I'll run that command.
By default, it what's it won't do anything instead give a warning to remove. Okay, I see. Yo, hiding observer. Appreciate you joining the stream. Hi, what are you trying to make?
Actually, I'm working on learning the concept of async IO. It's um let's say a topic for my programming for two for actually programming my AI engineering for 365 bases where I do have a road map and I do follow the content in the road map and my goal by the end of this series will be to make an agentic AI and therefore I'm learning the basics required to really do that stuff like done. Yep. Okay, we got uh lame jokes here. O guys is it just me? I didn't find a single joke up there. I mean I did. item laugh a couple of times might be a joke. Yep. Smart because the OS only saves slash but not all items inside and slash asterisk will remove the items.
Okay. Yo observer, welcome to the stream.
That said, question 28 is next. Let me say something like Freddy. All right, guys. I think I got the gist of as completed. It wasn't nearly as hard as the lock.
Okay, so let's go with question 28.
Drill number two. Task description.
You're building an API health checker.
Your system ping. Your system pings multiple servers simultaneously and reports each one the moment it responds.
Faster responders first. Save observers are slow. Some fails with a timer.
Requirements. Create a ping server delay that waits delay seconds. If delay is greater than three raises async io dot time out error that is the first time I've heard of that error that's otherwise returns server is up then in the main function creates this list of servers API I think author actually means authorization or like authorative or something like that I think authorization makes more sense and then the second um item or the second tuple in My list is going to be API payments which is going to be four. API users which is going to be two API search which is going to be.5 and API storage which is going to be 3.5.
Use as underscore completed to process each result as it arrives. Wrap results equals to await coro in try/accept to catch async Iota timeout error. Don't worry uh we we did not expect you to understand the jokes just yet though.
Honestly guys, that does make sense.
Maybe maybe by the end of this series, I'm going to be really good or like I'm gonna be like a hardcore programmer that's gonna start making programming humor, like programming jokes. That's it. I didn't get a lot of programming jokes from the memes channel on my Discord server. So, if you guys haven't really, make sure to join it. That's it.
Hint is going to be race async a timeout error. I see. Okay. So, I'm going to go ahead and get my instructions in the other window. And I see what Claude meant when it said that this question is going to be much higher.
Okay. So firstly I'm going to go ahead and let's say import async io because I will be using it. Yep. Almost always means authorization. I see. Okay. And then firstly we're going to go ahead and create a async sis core routine function called ping which let's say requires server as a parameter and delay as a parameter. And then we wait for delay seconds. So I'm going to await my async io.
There we go. Dot sleep. I want to go ahead and wait for delay seconds. Next up, I'm going to add a if statement that checks. I'm going to check if my uh delay is greater than 3 seconds. I want to raise and async IO's time out error.
So, we're going to go ahead and grace async io. Timeout editor. There we go.
Hey, bro. I've been watching for a while and I really love your dedication. Of course, you could tell. Okay. Yeah.
Dedication of could you tell me how you do it? Actually, I think it's basically uh the 21 days move. you guys do anything for 21 days and it becomes a habit and as long as you guys don't stop doing it, it mostly becomes a routine after a habit and it does help that you guys do enjoy the stuff as well.
Otherwise, return server is up. Okay, let's go with like something like an else clause.
It's odd to see sub 90 I we spy evens talk about others not understanding a joke. Actually, funny thing is I actually do know who uh Spider-Man are.
Let's said I'm going to go ahead and return let's say an S string. I want to go ahead and return server is up.
Okay, perfect. And then next up, uh once I'm done with this, I'm going to go ahead and create a main function. So I'm going to go with async's main quarantine function that is going to go ahead and create a list. So I'm going to go ahead and require a list list of API.
Okay, I don't know what else to call this stuff which is going to be consisting of a bunch of tpples. So my list is going to be having firstly API.
is authoritative that is going to be one. Okay, I'm assuming one is my I mean whatchamacallit. This is my oh list of servers, not dpples.
Okay, so I'm going to go with ping.
There we go. This makes so much more sense. So my first parameter, my server, list of servers, not APIs.
There we go. I don't even need to type list. I can just go with servers. There.
Now my ping is going to be called API.
I'm going to go ahead and add that. My delay is going to be 1 second. And then for my second I'm going to go with something like ping. That is going to be called API. Payments.
That is going to be 4 seconds. Okay.
Keep it up, bro. I really like your videos. Yo, that honestly means appreciate you. Um or desire. That's it.
Once I'm done with that, I'm going to go ahead and create my fourth server, which is going to be called API do users.
There we go. Which is going to go ahead and have a delay of 2 seconds. And then I'm going to go ahead and add something like ping of my API.
Which is going to have a delay of 0.5 seconds. Okay? And this is going to be in a pair of parenthesis. I mean a pair of double quotes or single quotes.
Okay? Okay. And the 0.5 is going to be inside here.
And that is going to be a comma there.
Okay. And then lastly, there we go.
Finally. Okay. Lastly, I'm going to add my final server, which is going to be my API.
Okay. Which is going to have a delay of 3.5 seconds. Once we're done with that, use as_completed to process each result as it arrives. So I'm going to go with something like for every how do you spell cor routine for every core routine in let's say my async io dot as completed I want to go ahead and add my servers list inside of it and then I'm going to go ahead and create a result variable that is going to go ahead and be equal to my core Okay. And here my result is basically going to be the f string that I returned here. If my delay was successful, I think I should use try, right? I definitely need the try here. I'm going to go with something like try this stuff.
Okay. So, we try our co- routine function wrap results. Okay. And yeah, my bad. I forgot. I am waiting for my coine. I'm going to wait it in a try/ accept to catch async iotime out error. So I'm going to go ahead and accept.
Let's say async iotime out error.
Okay. Did you purchase PC graphics card yet? Actually I did. It is going to be arriving at the 9th. And I also purchased like an SSD to increase my storage cuz I realized that my PC storage is almost full. So I can't really install any kind of games for my gaming stream. Speaking of gaming streams, uh when my graphic card actually arrives from that day on I will be streaming in my this channel uh let's say five days a week, which is going to be let's say Monday, Tuesday, Wednesday, Thursday.
No, Thursday and Friday I'm going to have my Thursday I'm going to have my gaming stream and Friday I'm going to have my workout stream. So Saturday, Sunday. So Monday, Tuesday, Wednesday, Saturday and Sunday is going to be my programming streams and Friday, Thursday is going to be my gaming stream and Friday is going to be my workout stream.
That's it. Those are going to be my two separate channels because I don't really want to flood this channel with a bunch of content. Therefore, once I do actually do that stuff and like build my graphics card, I will let you guys have the link to my other channel so you guys can uh what we call follow me there as well. I think he said the card will arrive tonight. No, it's going to arrive on the 9th which is going to be June 9th. Next month's is 9th. So, this month is almost over. That said, keep it up, bro. Appreciate your brave. Okay, that said we have a try slash error.
Print result for success and server timed out failure. Okay, so we're going to go ahead and print something like a tick mark and result. I am going to go ahead and let's say copy that add an string here. There. Okay. And then for a failure, we're going to go ahead and print something like server time out.
So, I'm going to go ahead and copy that stuff.
Okay, you posting about Okay, you posting about workout, too. Damn. Yeah, actually, guys, I realize that I'm not fit at all. Like, I walk for like 3 minutes and I'm going to get out of breath. Well, not really, but you guys know what I mean. Okay, this is going to be server. You know what? I'm just going to go ahead and catch this error else. Okay, so I'm going to go ahead and copy that. Then we're going to go ahead and paste this. This is going to be my server, right? Actually, yeah, let's paste it. There we go. Okay. And then let's just go ahead and exit this. All right. Here's the thing. I need my servers' name, right? So, I'm going to go with something like how do I get my server?
Server timed out for failure. You know what? Let it be something like this.
Okay. And that's pretty much it. Now, let me go ahead and h API payments is timed out. Okay, I actually need to um have this be my literal server.
So, I may go with servers at index of zero.
Servers at index of zero.
Will that work? No, that is a list.
Servers at index of zero.
Zero. Nope.
Wait, should I go with Coroutine? Wait, my bad, guys. I think I need to go not quine. Result is okay. Wait. Result is my cor routine.
Result at index of zero. There we go.
Now, lastly, I'm going to go with something like if dunder name equals to equals to dunder main. I'm going to go ahead and run my main function through my async iOS's run method.
All right, let's run it and see. API searches of API authors of API users is up. Time out. Time out.
A is timeout.
H.
What if I go with this?
API. This thing is up. That thing is up.
API users is timed out. API users is timed out.
Interesting. Why are there two users?
Where is my storage? And yeah, where's my storage? Yikes. Don't do that. Uh then even if storage times out, it'll show as o times out.
Oh, I see. I see. I see. Yeah.
How do I see exact Wait, should I go with something like servers at index of results? No, I don't think that's going to make sense.
Well, I guess there's no harm trying.
Oh wow.
Okay. You know what? You know what? Let me think. What is my result here? My result is my coine function. Oh, this is the return that says it's up.
Is there like a a different return that I had to do here? Okay.
Otherwise, returns times up. Okay. You know what?
Let me let me go ahead and grab claw up here real quick.
Do you want Sailor Moon already?
Actually, I have not watched it yet, but I do want to start watching the OG animes to be honest. Mostly the OG animes that I didn't really watch was like Dragon Ball series. I was I still am a huge fan of it. That's let me say something like um say I am done and the logic works. However, um I messed my print statement in my exception.
Okay, then let's go ahead and uh run it real quick. I mean send it. While it's sending, I might really eat um a boiled egg real quick. I wish it was poached, guys. So hard to eat this. There we go.
Then we're going to go ahead and just rub it.
Oh, guys, it's too dry.
Oh god, that was too dry. There we go.
You forgot the pin. Um, you forgot to pin the main horizontal stream in the pin comments in the vertical. Actually, hold on. Let me do it real quick.
That's it. I did not know that we can go ahead and accept.
I knew this.
Okay. So, except async eder as e and then I just add e here. Let's hit control srl alt. And speaking of which, let me just go up here. Okay. API timed out. Timed out. So, it says that it's just timed out. Okay. And then I'm just going to go ahead and copy that link.
And then in my vertical stream, I'm going to go ahead and paste it. join the main horizontal. Let's go with something like horizontal stream.
There we go. Okay. And then I can just go ahead and print that stuff.
All right. Perfect. Now, it does not really give me the entire stuff. Which question number is it by the way? It's question 28. There's like two more questions left after this.
One change in ping, one change in exception block.
Pass the server name. So time. Okay, so server.
Oh, there we go.
Okay, I think this should work, guys.
API storage time. API payments time.
Perfect. Okay, I think I got it. I forgot that we need to actually specify what kind of error message we got or it just doesn't display any error text. It just raises a simple exception. Say done. And ready for the next question.
Guys, I think that we're locked in here.
I'm going to maybe since if if I'm like done with working with async.io, which I almost am, I might try uh working a little bit with type painting this stream and then more on it like next stream. That's sad. But before question 29, okay, you caught your own bug. I didn't really do that. I need you to take one second and recognize what you've built in async.io. Locks, semaphors, events, cues, all question 29, question 30 were basically all the topics that I've learned in async IO launched in one topic.
Okay, task cancellation is complete. You did it all. Question 29. Question 30 is the final boss. One big combiner challenge that uses multiple concepts together.
This is where everything clicks into one system.
Okay, before we work on that, can you make me notes for all the concepts uh that we have worked on so far? Question mark. And yeah, guys, I'm kind of smart. I already made notes with my on my previous concepts right here. So, I'm going to go ahead and copy that 400 lines. I hope that this doesn't really um cost a lot of tokens.
>> Okay. Um those are my notes that I have had so far. If anything is missing, you can add you can add uh to your current notes and I will copy and paste it to my notes. Okay guys, because I do need some notes here because later on I do go ahead and revise uh the notes so I can get a quick little refresher of my topic. That said, let me check what's in your notes. I guess while CL is checking, I'm going to eat my final um slice of boiled apples.
Okay. And also if you guys do want access to these notes, you guys can again join my discord server and go to the Python chat or the coding helps chat and mention me there. You guys could actually ask for anything in general, but for the time being, the only things that I do recommend you guys is my either road map or like my notes as well because these notes are really detailed.
Speaking of which, guys, these eggs are way too dehydrating or too dry. Like if they were like poached, that would have been much better, but that would get kind of messy.
That's it. Um, okay. So, we're going with uh topic number seven.
Wow, that those were a lot of lines.
Okay, these are like detailed. Now, finally, let's move on to the questions.
Okay, ready for question n 29.
There we go. Okay, and guys, once I'm done with that, I might actually eat a banana, too.
Okay, let me just scroll all the way down. While Claude is thinking, I might eat this banana.
There we go. The final boss part one.
This has all the concepts in it. So, let me check if the stream is Oh, wow. What is wrong with my webcam?
Sometimes it gets too bright. I got to decrease the brightness. Feels like it's radioactive.
There we go. Okay, so question 29. Two questions left. This is where everything collides. No new concepts, pure combination. This is exactly where real async, this is exactly what real async systems look like. Task description.
You're building the core pipeline of an autonomous AI system. Tasks uh task stream in through a in through a hue. A semaphore limits how many runs at once.
A lock protects a shared uh result log.
Three workers chew through the queue simultaneously.
Requirements shared results equals to shared equal to results equals to an empty list. Results at the top level in the main corine function we go with async.io.q async.io semaphore which caps the concurrencies at three and async.io.locks locks protects the resultses list. Then we go ahead and create a process Cisco routine function that requires task ID semaphore and log as the parameters that acquires the semaphore. Prints processing task waits for 5 seconds. Acquires the lock and appends task ID to results. Prints task ID complete. And then create worker named Q semifor lock that loops pulling tasks from the Q. Okay, not Q, it's Q.
Calls process for each task. Calls task done. This corine function stops on sentinel none. Yeah, I do remember hu does need nuns at the end as well because there are like workers that work and our process corine is basically our worker here. And then in the main function, cue up task one through task eight. Put three sentinels, one per workout, launch three workers with gather after gather.
Excuse me, guys. After gather complete sprint completed length of results.
All right, guys. I think I got it. Going to eat. Let me eat the banana first.
I'm going to go ahead and grab my instructions in the other window so I can use it as reference. There we go.
Then I'm going to like zoom in a little.
Okay, now I'm going to just iterate over my notes. Okay, so I actually know the concepts. Bab, are you in university yet? Actually, I am in college, but some people do call it university as well.
So, uh, no, I call it college. Okay, because I am a freshman in college. I've only taken like a basic Python this course like last semester. That's it, guys. I think I'm already ahead. I got an A in that class because okay, I'm not going to lie. I thought I was going to I thought I was going to get a C because uh as opposed to what I have what I'm used to learning, there are a lot of limitations when I was in that class.
Like all print statements needed not print statements, all of my functions or methods needed a none at the end. I had to return a value which if it's a white function I had to return none. If it was a function that really needs a return I would have returned that and all that stuff. And also I couldn't use breaks in my loops. Everything had to be done manually.
The worst thing is I couldn't use um an IE rather I had to use an idle but I guess I got used to it.
Speaking of which are notes for async.io.
Okay. Why it exists? Rule of thumb. Five per buildings calling corine. The run starts the event loop. Runs your top level corine calls all at once. Entry point.
Python async io.un main. Okay. Await pauses concurrencies yada yada. And then we have sleep. We have gather. We have event loop.
Mhm.
Key rules to remember. Await can only be used inside async is defined. Retry system. Question n async IO weight cancel the corine automatically if it exists. Okay. Raises async.io timeout error when cancelled. All right.
Create task. Creates a task. Okay. Value chaining results. Task cancellation.
Cleanup. I'm just I'm just like skimming over this whole thing. And then this is H. This is a timeline. Okay. Hu.
Task done. Join the return none part of proper type hinting. It feels over for no reason at first, but trust me, it makes your code way more readable. That does make sense, guys. Okay, because I want to actually learn the best programming practice. So later on in the future, I don't got to like relearn something or like because if when you learn one thing, it's hard to unlearn it and learn a new thing unless you really put your mind to it. Okay. And then we have Q.get sentinels guys. I'm just skimming over everything here. Quick reference, common mistakes, join, semaphors. Okay. D.
Okay. Okay. I think I think I got it. I think I got it. And then we have methods.
Okay. I don't know what did that do, but it's I hope it did something. All right.
Now, let's read the instructions.
Firstly, since I will be working with async io, I'm going to go ahead and import async io. Next up, we're going to go ahead and create a shared results list at the top level. So, result equals to an empty list. And then we got to create a main function. So I'm going to go with async's main co function which will be having three um let's say variables. The first is going to be hue and that is going to be equal to my async io dot the hue method. And then the second is going to be a semaphore semaphore that is going to be equal to my async ios is semaphore method and then uh next up I'm going to have a lock that is going to be equal to my async ios's lock method.
Okay. Okay. And then after I'm done with that, okay, the semaphore is actually going to cap at three. Cap the concurrencies at three. Okay. And then after that, we're going to go ahead and create a process task. So create process task ID semaphore lock that acquires the sema 4.
Okay. So we're going to go ahead and create another async's method called process.
Okay. which is going to go ahead and require a task underscore id as a parameter sem as a parameter and lock as a parameter and then that acquires a semaphore. So I'm going to go with async width semaphore.
Excuse me guys. There we go.
Print processing task ID. And you know what? Since I don't have access to the emoji and I want to save a little bit of time, I'm going to go ahead and paste the Whoa. I'm going to go ahead and paste the print statement here.
Okay. Okay. And then next up, we're going to go ahead and wait for 5 seconds. So, I'm going to go with async io.
Wait 5 seconds.
This is going to be a wait.
There we go. Okay. And then acquires the lock and appends task ID to result.
Acquires the lock.
I'm assuming we go with async with lock acquires the lock and appends task ID to results. So results dot append my task ID. There we go. Okay. And then um print task completed. Okay. So, I'm going to go ahead and copy that stuff because um whatchamacallit I want to save some time. There we go. So, task ID that is going to be complete. Okay. And then next up, we're going to go ahead and create a worker class. Okay. So, this is where our semaphors come in use. None has nothing to do with type hinting. I see. Okay. Let's go with async define where I'm going to go ahead and define a worker z corine method that requires name as a parameter hue as a parameter and actually name hue sema for and lock as its parameters.
Okay, that loops pulling tasks from the hue loops pulling h task from the hue. I agree with that readability point.
Actually, in that case, I might just return after all my functions. Okay, let's go with huf.
Okay, I guess we're in the hue part.
Okay, so async io. Hue. The basics. A hue is a line of work. Items go in one end and get processed out of the other end. This is the backbone of AI pipelines. Job pipelines. Worker chew through them.
So these syntaxes we create a hue and then await u.put item item equals to await.get that's done pulls item from the hue. So I'm assuming that we go with something like get pulse item, right? So I'm going to go with hue. Wait, was it async IU?
I know that I need a get.
Okay, so here. Okay, so we're going to go with await async io.get.
I want to go ahead and get the hue loops pulling tasks from the hue.
Okay. Calls task done. So calls the process for each task.
I call the process for each task.
Okay. So we have our we have a put.
Get gets me an item that I want to go ahead and grab.
await put. So, I need to put something in my hue before I really get something right. So, what do I want to put in my Hue?
Maybe I think the stuff is already in it. So, I'm just going to go with put.
Like, let's see what happens. What's the worst that could happen? And I could get this question wrong which I think I will not because I did get some practice with it. Okay. And then calls the process for each task. Calls the process for each task. So task equals to await my async io dot get.
Okay. And yeah, I am I am looking uh through some of these references here.
Put item. I didn't put squat in my hue.
I think I need to put my item.
Uh put wait until U is not empty.
You know what? I think the real place where the put should go is inside of my process.
Calls process for each task.
stops on none sentinel. I need to add a for loop here. There is no way I shouldn't add a for loop here.
Hence ID to the result loops pulling tasks. Okay, so loops pulling tasks from the hue. So I need to loop for every item in task for every item in task call process. So for each task process task it requires task as a parameter. It requires semaphore as a parameter and requires lock semaphore and lock.
Okay. Also there are cats in Sailor Moon guys. That's that one. Okay. That may be one reason why I might watch it exactly after the stream. In case you guys don't know, I'm a massive cat fan. Okay, actually by cat fan, I mean a lover ant fan. Okay, let's see. So, call task done.
We wait for our task to be. No, that's one thing that we don't. So, I'm going to go with async.io.task done.
Okay, let's see.
Oh god, of course, of course, of course, of course. This is going to be huge on task done. These are the tiny tiny detailings that I haven't mastered yet.
I got to reference back to the syntaxes, but well, with more practice, it does sort of work.
Stops on sentinel none. That's one part that I got to work on.
Okay. Then in our main function, puts three sentinels, one per worker. Puts three sentinels Cue up task one through task eight.
Hue up task one through task eight.
I know how to do this. I've done this before. Uh for every index in range one through nine because I want to go ahead and iterate through eight. We're going to heal up task one through task eight puts three sentinels one per worker. So Q doput I do.put put f string task underscore um zero i.
In that case, I will not need a put here.
Do I need an async io? I'm pretty sure I do, right? So, we have a wait. Okay, I knew it. Not async. I meant a wait.
Okay, so we're going to go with await because we wait for stuff to be put there. Okay, and then this is going to be put yada yada. Um, put three sentinels, one per worker. So, we have three sentinels.
Await.put.
I want to put none. Await Q do.put. I want to put none. Await Q do.put. I want to put none. We put three sentinels after all our tasks.
And then they may go outside the for loop. Right. Right. Right. Right.
Shift tab there.
Okay. Okay. And then and then and then and then and then stops at sentinel none. We need to stop at sentinel none for item in task process task Q do.
Stop.
Okay. So I want to stop at none, right?
So wait, let me check. So we have Q.in.
Task is going to be done.
Okay, this joins this stuff up and then I want to stop at Sentinel none, but I think I'll wait for it for the time being. Okay, launch three workers in the gather. So, in my main function, we're going to go ahead and launch three workers. So, I'm going to go with something like async io.gather await async.io.gather.
I want to go ahead and gather my three workers.
Okay, so worker one requires a parameter of name, hu, semaphore, and lock. I'm going to go ahead and just copy that part just to save some time. Then I'm going to go with N.
Okay, so we have a Hue, we have a name.
Name is going to be Alex.
Okay, we got Hugh, we got Sema 4, we got lock. That is the first worker. I will be adding a second worker which is going to be I mean who is going to be called let's say servo.
Okay. And then I'm going to go ahead and add a third worker who is going to be something like I don't know Bob. Are you going to do async IO till question 30?
Right. Yeah. Till question 30. Okay.
This is question 39. I mean 29.
After gathering, print a complete text. So, we're going to go ahead and add a print statement that has an string. Okay, I don't really have access to this emoji.
So, I'm just going to copy the emoji.
Yeah, usually I copy the whole text, but this text has strings in it. So, I want to kind of write it. Okay, so I'm going to go ahead and complete completed the length of my results.
Okay, which is my list.
Okay, and you know what? You know, I was going to change result to results. I mean results to result, but it's fine.
There's many tasks is going to be my result.
Okay, perfect. That's about it. Control S. Control Alt N.
Okay. Wow. Nothing runs. Okay. Worker gathers. Processing task one. Processing task two. Processing task three. Maybe.
Let's go. should enter. I mean, tap tap.
Okay. Oh, wow. The program instantly ends. That's right.
Oh, I didn't call my process function.
Oh, god. Okay, we're going to go ahead and call our process function as well, not just our workers.
Process task ID and semaphore line up one through stuff. Three sentinels per worker.
Wait. Call process for each task. Call process for each task. Process is inside of my task. Okay. I think I think I made a small mistake here. Let me grab plot up here real quick. Paste it and say I think uh that I made a mistake. Question mark. Pretty sure I did. I shouldn't be calling the process because the process should already be called.
Okay. So yes, a few mistakes. Let's fix them one at a time. Don't rewrite everything yet. Mistake one for index and range one through nine. Q.
This returns run eight times. I knew it.
I did that stuff then I went back on it.
Okay. Okay. Okay. Okay. Okay. Okay. I literally did this but then I went back on it. Guys, this is this is one thing that you guys got to know. When you guys really go with something the first time, don't change it unless you guys are 100% sure. Mistake two worker is completely wrong. Oh, I forgot the while true loop.
Async.io.get does not exist. Your worker should be a while true loop pulling one item at a time. While true ID equals to await Q.get. If task ID is none, we go with task. Break await process task ID for Q. Task well done.
Missing three await on process. Process task not awaited.
Three mistakes for our worker class.
We got to go with a while true loop. So I'm going to go with something like while true. I want to do something. I want to get a weight.
Q.get. Get we get one task at a time. If my um did I have to name this as task? I've got I don't want to take the reference a whole lot. No, not this. I Okay, task. Okay, so we needed to we needed to assign it to something. I knew it. Guys, I know have the things here. Why? I just need more practice with this stuff. Let's go with if task id is none then I'm going to go with something like hu task done and then we're about to break okay and then I'm going to read the instructions not the not the reference code the instructions calls process for each task and then calls task done you like who oh Pokemon do I like that's tricky there are like a bunch Pokemons. Let me think.
I know I liked a Pokemon. I forgot who, though.
I won't go with the most basic answer of Pikachu, but um I used him a lot in Pokemon Go. I forgot the name. Um, he's that uh the electric Pokemon. The uh wait, let me let me just check. Um, actually, never mind. I like Tyranitar as well. Let me say who is the black TRC electric Pokemon. Um on Pokemon Go who can stand on two feet.
There we go. He's He's legendary as well. All right, guys. I'll let you guys I'll let y'all know that. No, wait.
Never mind. I What is his name, though?
Okay, so let's go here. I want to ask something about him.
Okay, I'll show you guys the I can't show you guys because not my image here.
What is his name? Oh, visual search there.
Zechar. There we go. Okay, he's Zechar.
The electric type Pokemon. I kind of like him.
Okay, that's it. Else I'm going to go ahead and call my process task.
I'm going to await my process task.
Okay, who is going to go ahead and have a name as a parameter? I'm going to go with actually process task for parameters task ID and um semaphore right semaphore and lock sem. And we go with lock and then once everything is done we're going to go ahead and end it. Right? So acquire the log print task ID is complete. Okay, I have a process in my process function.
Okay, so we stop at that and then we're just going to go with something like dot task done there. Okay, now that we're done with that stuff, um I will go ahead and add a if statement here that says if dun name equals to equals to dunder main. Could this be why program didn't run at all before through my async ios is run method. I'm going to go ahead and execute my main function.
Processing task one two three completed task one two three completed tasks.
Perfect.
Okay, I guess let's go with control arr c. There we go, guys. We're done. I'm going to go ahead and grab flat up here and say h that was a silly mistake.
Got it though. Okay, and I'm ready for the last question, too. We got one more question left guys before we can move on to the next topic which I am sort of excited about because I I spent like six whole days working on async.io fact check me on that. One tiny typo in process. Sema 4. Sema 4.
Okay, it's fine. Other than that, it's done. Final question. Fix the typo, then come back. Ready, guys? Let's finish this. This is going to be where I'm not going to be taking any hints because I want to I want to get it on myself because I think I got how it works. Question 30, the true final boss. Uh, this is it. Last question. every concept one system task description you're building an AI agent dispatch system job hue up and event signal where system is live a semifor limits how many agents run simultaneously a log protects the shared report and results stream in as each agent finishes requirements shared a list of reports list at top level exactly the same as this create process job that requires job as a parameter requires semaphore as a parameter and it requires lock as a parameter. Acquires the semaphore prints agent processing job. Waits.5 seconds acquires the lock and appends job to report. Returns an string called job complete. Create worker name Q sema for lock event that first waits for the event before doing anything. Then loops pulling jobs calls process jobs. This is um poverty function calls task done stops on sentinel. Then in the main function, we create a hue semaph for a lock event. Hue up six jobs. Job A through job f. Oh god, we got to manually hue those things because it's strings. It's string literal. And then put two sentinels, two workers. Print system booting. Wait one second. Then set event and print system live. Launch two workers with gather. after the other print file reports that all right guys I think I got this I will try not using any reference here okay although I will be using the question as a reference of course because I need to read it that said since I am going to be working with async io I'm going to go ahead and import async io and then we're going to go ahead and create an empty list of reports shared by all my sentinels all my functions all my workers and everyone because is global and then I'm going to go with async's corine function called process job that is going to require three parameters first is going to be job second is going to be a semaphore third is going to be a lock excuse me guys next up this function acquires the semaphore a sync with semaphore Okay, this is what acquiring actually means. And then prints agent processing job. So, we're going to go ahead and print an a string. And yeah, I'm going to I'm going to go ahead and copy the um print statement here because I don't have the emojis and it's going to save time as well. Okay. And then waits for.5 seconds. So, I'm going to go with await async io.
0.5.
And then we're going to go ahead and acquire the lock and append jobs to reports. We're going to acquire the lock. This is something that I got to go ahead and always remember. Whenever is it that we say acquiring the lock, acquiring the semaphore, we use the bit statement alongside our async.
I acquire the lock here.
Actually, acquiring basically means wrapping everything inside it. So, they need to be indented inside of you. Okay.
and then acquire the log. Append job to report. So I'm going to go with reports dot append.
I'm going to go with job. There we go.
Okay. And then returns an string. So I'm going to go ahead and return an string which is going to be job complete.
Okay. Nice. And then next up create a worker. Okay. Okay. So, we're going to go ahead and create another async's corine function called worker.
Okay. Now, my worker is going to be requiring a name parameter, a hue parameter, a stem for parameter and a lock parameter and also an event parameter. Wow.
Okay. That first wait for the event before doing anything.
I know what to do here. Not going to go ahead and ask for help just yet. We're going to go with wait for control F wait for. Just need a quick little refresher.
Wait_4.
Okay. So, async. Wait for cancel the corine automatically. If it exists, then time out raise the timeout error. Async.
Okay. So, we might go with waits for event. So, let's go with event.
Async.event.
Okay.
And event is a green light corine. Wait for it to be set before proceeding. One corine fires the signal. Other reacts to it. The import async. We create an event. The basic stuff. There we go.
Event. The syntaxes. This is why I love having notes here. And then we go with async. Async.
Okay, perfect. I guess I'm going to go to my here. Now, let me read the instructions again. Waits for event before doing anything. So, oh, no wonder we have an event parameter.
Eventweight.
Hold on. I knew we needed a weight. I just wanted to make sure.
Okay, so we're going to go with something like await events.
Then loops pulling jobs. Okay, so I know what loop we're using this time. I'm going to go with a while true loop since we are working with Hughes here. So while true, I want to do something loops pulling jobs. So I'm going to go with uh jobs equals to my equals to await Q.get. I want to go ahead and get my jobs and then calls the process job. And then we go ahead and call our process job stops on sentinel none. There is going to be two sentinels. Therefore, if my jobs is equal to equal if my jobs is none, then I want to go with something like jobs. I want to go with hu dot task done.
Okay. And then we're going to go with something like an else clause that says something like if my job is not done, I want to go ahead and await my process job which requires a bunch of parameters. Job semaphore and lock.
It requires jobs semaphore and lock. There we go. Okay, Zecharam is most powerful Pokemon in black and white. That actually does make sense, guys. I thought he was so cool. Like matter of fact, I had a shiny of him in the Pokemon Go as well. His stain was nice and I think around like yellowish color or like was it green or yellow? I forgot about it. Made it a long time ago. That said, calls task done. So, we're going to go with Q.task_un.
Okay.
Stops on sentinel. Then in the main function. So now we go ahead and create our async's main function.
Okay, which is going to go ahead and create a hue, a semaphore, a lock, and an event.
Hugh is going to be equal to my async io.
I spelled async wrong, didn't I?
Okay. And then we're going to go ahead and create a semaphore that is going to be equal to my async iose semaphore.
And then we're going to be requiring a lock that is going to be equal to async iothelock method. And then lastly for event I'm going to go with async io dot the event method. And now inside them keyword jobs up to six. Oh wow. So, we're going to go with something like await q.put. So, I'm going to go ahead and put something inside of my hue. First is going to be job a.
Okay. Oh, wow. We got it. This is going to be a long thing. We got to go until F. Wow. Let's see if I know my alphabets. A B C D E and F. Oh, wait. That wasn't as big.
That is going to be B. And then that is going to be C. That is going to be D.
That is going to be E and that is going to be F. Okay. So, I hue all these jobs in. And then I'm going to go ahead and hue two more jobs in where the two jobs here are going to be none. And the bottom job here is going to be none as well. There we go.
Okay. And then put two sentinel workers.
Put two sentinel workers. I'm assuming using the gather.
Put two sentinels. Two workers. Brain system booting. Okay. So, we're going to have to print.
Okay, I'm going to go ahead and print something like system booting. And since I don't have access to the emoji or like the the Yeah, I think it's emoji. I'm going to copy this stuff. Wait for one second. So, we're going to go with async io. I want to go ahead and sleep for one second. Whoop! Small mistake. We're going to await our async io. And then launch to workers using the gather. So, we're going to go with await.
async io dot gather method that has that requires me to gather two workers. Wait, then set event. So, we made this and then we're going to go with event dot set.
Okay. And then we're going to go ahead and already like dusting like dusting. All right, perfect. Let me just go ahead and grab all my chats up here real quick.
Guys, in case you guys didn't really know. Yeah, my PC actually crashed. I'm going to go there and then I want to I don't have my other chats here. Oh, you're kidding me. Hold on, guys. This is the claude. I'm going to go ahead and open my Visual Studio. I'm going to exit all those. Oh my gosh. I'm going to Oh god, what are all these things popping up? There we go. Going to exit. Um, going to keep cla going to add my vertical chat up here. Okay, then I'm going to get that share. I'm going to do that there. Guys, this is one annoying thing. Whenever the PC crashes, you got to do everything from scratch. Okay, this is a 50/50 chance. Did I open the horizontal or vertical?
Oh no, guys, I opened the horizontal.
There we go. Okay, does bro PC crashed again? Actually, yeah. The reason it did crash was because I don't really have a graphics card for now, but I will. I actually did order it and I'm going to get that pretty soon. That should fix all my crashes. There we go. All right, guys. We're good. Now, back to reading the instructions. Where was I again?
Okay, I was going to go ahead and add a print statement that says something like system is live. I'm going to copy that stuff. And then let's go ahead and print system is live. There we go. And then we're going to gather Okay, so async. Yeah, there are my two workers, which is going to be my worker that requires bunch of parameters. Wow.
Okay, that's a normal amount of crash.
I'm not going to lie. And it doesn't feel like it's a fault of PC, but something in the operating system or software. Honestly, that actually may make some sense because um let me just add these things. I'm going to go with okay only one nice way to end it. This is going to be Nova and the other is going to be called Hannah. In case you guys did watch my programming for two 50day series, they were my main characters or my protagonist. One was the player and one was the NPC. And that said, it does make sense because ever since I did my build the PCs, I have been getting crushes. But I don't know, everything did seem everything else works fine.
Okay. And then we're going to go ahead and copy after print the gather report.
So I'm going to go ahead and print an F string that says report. Okay.
After gather print the final report.
Okay. What is report? Report. Report.
Report.
I don't really have a report here to be honest.
Unless I want this to be in a list.
You know what? There is no report here.
Control S. Control Alt N. Wait, actually before I go with control altn, I'm going to go with something like if dunger name equals to equals to dunder main.
I want to go ahead and through my async ios's run method. I want to run my main function. Then we're going to control S control. System booting. System is live.
Processing jobs.
Processing jobs.
Okay. After processing jobs, it's supposed to do my next part.
You know what?
Okay. Let's go with controller control C. Actually, I'm going to go ahead and grab plot here. You know what? I think I think I did a lot nicely. Oh, wait, wait, wait, wait, wait. Hold on, hold on, hold on, hold on, hold on. I didn't read this stuff. Async. Sleep then said event before launching workers. But how do you sleep and gather at the same time? Think about create task.
Sleep and gather at the same time. Hold on guys, I might be able to do this without any help. I did get a hint there, but okay.
Okay, so create tasks a routine. This is brew coffee. And then task two is create task. Uh we call the task one time. We have two workers.
Okay. Okay. I think I got it. I think I got it, guys. I think we're good.
So, uh I'm going to go with task one.
Um that is gather.
Okay. You know what? Never mind.
It may be I know how to do this. It might be that um I just can't think the syntax. Let me see something.
I did this and I know that I am missing the create_tasks part.
But I think I forgot how is it implemented.
Okay. And then let's set it. And guys, here's me um me who only knows print hello world. Guys, I think print hello world is literally the start. That's actually how we started here. That said, it's just going to take about like five or six months based on how long do you spend for a day to actually start working with async.ios. Guys, I'm just kind of kidding here. I did had a I did have a Python for 100 day series where I did really start learning Python and programming from scratch in general. But then later on that did give me a pretty good grasp. Trust me, Python is really easy.
IDK what print even does. Guys, I think when we print a paper from like a printing machine, I think it just like prints as a paper. But in actual Python and consoles where we print stuff, it displays something on our actual terminal. Speaking of which, uh you need to boot to run at the same time.
So we we have a boot method.
Okay, so this goes inside the boot. I didn't know that we needed a boot method. That could make things easier.
Worker Noah, worker Hannah.
You also have three small fixes. Wow.
Missing the two. Okay. Missing break.
Okay. Missing report. Wow. There are so many things. They're the basic things though that are missing. So if I got this part correct, I got to go with async says define um what was the method name? Boot, right? Boot that requires event as a parameter. And then we're going to go ahead and u add this part all the way up here.
Okay, there we go.
where can learn more Python after six hours basic from Mosh Shimari. Oh, I actually do know him. That's it. If you guys do want a road map for like Python and you guys want to use the basic Python road map that I used for my first ever series on YouTube or my first ever programming series on YouTube, make sure to join my Discord server and either go to the coding helps chat or the Python chat and ask me for my basic Python road map. And if you guys are familiar with the basic Python road map and you guys want to work more with AI engineering, I can go ahead and give you guys or send you guys my AI engineering for 365 days road map as well which I am currently using. And guys, they do have advanced Python in the AI one. But then if you guys want to learn Python from the very basics starting from print statements, variables, step casting, user inputs, collections, loops, yada yada, all those basic stuff, I can send you guys the um basic Pythons and road map. And once you reach uh to objectoriented programming, I can go ahead and give you guys the detailed objectoriented programmings road map as well cuz I think those are really really fun as well. And trust me guys, it's not that hard to be honest.
Okay, so I'm going to go with something like task one is going to be equal to async io.create task. Oh, and I forgot to in case I forgot to tell you guys, you guys can get access to my Discord server on stream by typing exclamation discord on chat all lowercase. Or if I'm not streaming, you guys can go either to my bio or my description or of any video in general for the link. That's it. I think that was like um enough plugs here. So, I'm going to go with two seconds. Okay.
So, we create a task and then we create a task. Prime making projects. It helps a lot. That is 100% real guys. That's it. Let's go here. Let's go up here.
Okay. So, we have se four and then task done. Finally, I need this async.io.create task. We get that task that requires corine as a function and then we go ahead and gather.
Okay. Okay, so we create task one and then we go ahead and gather our task.
Um I think report is supposed to be task one.
All right, let's see. System booting live system job a done.
Okay, something something still missing here. Let's go with control C. I'm going to go ahead and let's see rep plot up here again.
>> I mean, I think it's I should have I should have done this. I should have done this. Guys, this is a proof that I should pay more attention when I work in this cuz it's I'm not it's not really as hard. There we go. Final task.
I print the wrong result here. What even is our result here?
Uh okay. So I have one more small question here. Are you in college?
Actually I am a freshman in college. I did take one basic Python this course but guys trust me it did not help me with the learning. Basically what they expect you to work on in college is um what they expect in college is that you learn from home and just go there for like the achievement awards and like just uh let's say sharpening your current skills cuz um since I had a Python for 100 series I did manage to scrape by but let me just actually say something I it does work.
However, what is the report here? Okay, now what I was saying again, let me just send this and let me extend that. Okay, basically what they expected me to uh do in my programming course in college is that they wanted us to study from home because they're not as detailed when they teach in college and all that stuff because they got to teach a bunch of students a really complex topic. So they do prefer when we actually have a basic idea. So most working does happen at home.
Final report is reports. Isn't this result?
Oh my gosh, guys.
Can we pretend that didn't happen? If you asking me, no, I'm not in college yet. Oh, I see. Whenever you join college, I would actually recommend already like starting to learn from now because it's better to always get a head start cuz college gets really stressful.
Guys, that's let me say something like John.
Guys, is it finally it? Are we done with our async iOS? Async.io is complete. 30 out of 30 done. I'm so proud. Blah blah blah. Look at your stuff. That is real async system. That is production code.
And now I need you to do one thing before moving on. Add these final notes.
Okay. Add the final notes I gave you earlier. TMD 74 event lock is completed.
Don't skip it. Notes are your long-term memory. That does make sense. You won't remember this in phase four without them. Next up, Dipensson Bantic. Okay, let me say something like, can you give me a general overview as to what um will I be expecting with this topic? I will work on it next stream, but I just wanted to know a little. Okay. And then let's set it cuz Pantic for some reason sounds a little bit familiar. I don't know. For some reason it does. Type hints and pantic. What's coming? Type hints built into Python. You okay? You already write this without knowing it. Return hello.
Type hints is name str age integer which use an arrow mark operator to point toward string. Return this. That's it.
You're just labeling what type each variable should be. Python doesn't enforce it. It's for you your editor and anyone reading your code. It feels natural within two questions. Very short.
Okay. Pantic. A serious one. This is where it gets powerful. Pantic actually enforces the type and validates your data at runtime from pyantic import based models. So I guess this is where we're going to start working with Python libraries. Yeah, I'm already learning C and C++ low-level programming language.
I'm really into system programming right now and making projects in C and learning C++ right now. That actually sounds really uh what we call it really good. That's it. Since you're learning C++ and you're working with relying into system programming, what are the things like what are the tools that you use?
For example, back in my 250day series, I work more with Unreal Engine and like SDL3 to get a grasp of game development in C++ for system development. What is it that we use? That said, and guys, I just I just realized I said that so quickly. I try talking a little slower these days. That said, this is everywhere in AI engineering. Every API, every agent input/output, every data pipeline uses pyantic to make sure garbage doesn't break our code. Why it matters for your series? Every AI framework you touch, lang chain, langrap, fast API, crew AI is built on Pantic. Learning it now means those tools will feel familiar when you get there.
I see.
Again, I get a transfer prompt and I will end the stream right now.
And guys, yeah, I don't the reason I asked for a transfer prompt to like a different chat is because whatchamacallit. I don't really um want to clump up one chat. That's it. Let's go to my main camera. And also, oh god, what is wrong with my webcam? But it's not really as bad. But I'm gonna go ahead and There we go. Fix the lighting a little bit. I wait. Today is 8:30 a.m.
This is my best on Python programming.
And also I'm first year students. So please help me with learning Python as soon as possible. Actually, if you do type exclamation discord on chat, go to the link in the description or the link in the bio and join my discord server and either mention me on the coding helps chat or the python chat and ask for my basic pythons road map since you are a first year. I will be DMing it to you guys. That is a really detailed road maps and I did personally use that as well to work with my Python series and all that. And also, let me just fix my um lighting just a tad bit. Maybe I'm going to go to my exposure. Okay, there we go. That's so much better. Feels less depressing this way. There we go. That said, I will personally be DMing you guys that road map. But that being said, if you guys did enjoy the stream, don't forget to like, share, subscribe, like, helps my algorithm. Actually, I'm trying a new intro. Let's do that again. Let's write it back. If you guys did enjoy the stream, don't forget to smash the like button, subscribe with notifications turned on, and also share the video because like my algorithm sharing makes me smile. Subscribing like a chair on top. That's it. I will start streaming or I will start mult streaming on Twitch and TT can once I get a better graphics card which is going to be arriving on June 9th and then I will be having a YouTube video where I do show you guys the where I actually added on the PC including an SSD as well since I will be having let's say two streams in channels which is not my this main channel. I will uh let you guys have access to that channel later on in the future. One is called Viv Arcade for my gaming videos once a week or my gaming streams once a week. And the other channel is called Viv Works Out for my workout videos every once a week. So 5 days is going to be programming CVS. One day is going to be a workout, one day is going to be a gaming stream. That said, I will start streaming on Instagram and Tik Tok as well. If I did meet the followers requirements, if you guys enjoy my content and haven't follow me there, make sure to follow me there. The link is going to be in the description. The link is going to be in the bio. You guys can get access to any of my socials in general by typing exclamation and the socials is named no space all lowercase.
If the social does exist within about 3 to 4 seconds a link will pop up. If the social does not exist a link will pop up.
That said uh okay it's test. It's not the best test discard link. Actually I can type it for you guys. You guys just got to type exclamation discord on chat and it's going to go ahead and pop the link up. There we go. Okay. In system programming, you doesn't specifically need a specific tool. GCC compiler debugger text editor with GDB is enough.
I see. Unlike GM development, that makes Unreal Engine and more. That does make sense, guys. That said, was I going to say anything else to be honest besides following your poster, following me there? And yeah, I am going to be hopefully um changing my programming to 50day series montage review playlist to like a time lapse playlist because let's be honest, there's like a hund more streams that I got to go over at the very least. So, I'm going to just upload one more video on that series where I'm going to add a time lapse every single day. That's that. I'll catch you guys next time video. Peace. And next stream we will be working with pie dancing and type hunting. Now, let's end the stream.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
Re: 🗣️📍theprophedu📍2026 GST 103 CLASS (E-EXAM REVISION)
theprophedu
636 views•2026-06-04
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Instagram accounts got PWNed
EricParker
13K views•2026-06-03











