Do you want to learn python from me with a lot of interactive quizzes, and exercises? Here is my project-based python learning course: codebasics.io/courses/python-for-beginner-and-intermediate-learners
@myrusEW
11 ай бұрын
I'm back. had this tab up for like 2 weeks. I was working OT and picking up shifts at my second job. I quit one of em tho so back to the study grind!! Gotta get myself in a better position in life, no one else is gonna do the work for me!
@TheDoc-Worker
4 ай бұрын
Hope you're doing well, it ain't fuckin easy.
@smaransure2234
3 ай бұрын
@@TheDoc-Worker Ye lmao
@shawzhang4498
Жыл бұрын
For those of you wondering why queue has O(1) inserting and deleting item, it is because queue is usually implemented using doubly linked list.
@harshitsharma6834
3 жыл бұрын
Hey Dhaval I m watching u from long time just commenting here to let u know how awsm your content is your efforts money u put is worth a every single penny ! God bless you
@codebasics
3 жыл бұрын
I am happy this was helpful to you.
@quyenscc
3 жыл бұрын
Great tutorial. I love your channel! Thanks for creating these amazing tutorials.
@omkarbhabal1694
3 жыл бұрын
Thanks for proving the exercises, they are really helpful.
@codebasics
3 жыл бұрын
Glad you like them!
@deepaksrinivasan8188
3 жыл бұрын
Agree with Omkar.... What a simple and magnificent exercise to use the data structure. Just brilliant again....:)
@codebasics
3 жыл бұрын
Thanks again!
@tevfikklas15
2 жыл бұрын
please dont waste your time with watching Udemy courses. This gentleman teach everything you image about python.
@joeg464
3 жыл бұрын
Great lecture. I appreciate the upload.
@nilupulperera
4 жыл бұрын
Dear Sir, Your approach to teaching is really amazing. You open the underlying core knowledge, which will help to understand the subject very well. Meanwhile, your guide to search the internet to gather more information is really worthwhile. So we can add more and more flesh on to the skeleton you develop in us. I started to follow your Data Science Series two weeks ago. Now I am going through it for the second time while doing all the exercises. Being medical personnel, I really started loving Data Science because of your superb explanations and encouragement!! I believe your video series will do invaluable service to the Data Science field. Please continue your great job. Your service is needed more than ever for the Data Science world. You can squeeze out the palatability of the subject for the people who are craving for knowledge. Thank you so much.
@codebasics
4 жыл бұрын
Nilupul, thanks for your kind words of appreciation and detailed feedback :) Comments like this gives me motivation to continue my work. Thanks again and I wish you all the best :)
@kratugautam304
4 ай бұрын
@@codebasics Sir you are Genius, How can i become genius like you?
@TK-vt3ep
4 жыл бұрын
Hello Sir, Could you make video on recursion and its application. Besides, i really appreciate sharing your tutorial videos they are really helpful. If you can also make it in Hindi for your hindi channel , it would be awesome ☺️
@codebasics
4 жыл бұрын
Sure, i will cover a topic of recursion. I've codebasics hindi channel as well, it has few tutorials on python and machine learning. check that out.
@sagardulal2028
3 жыл бұрын
oh god my laptop is too heated. next time upload video on how to cool it... jokin. really the best tutorial and easy way to understand . thank you
@dreamraw1438
4 жыл бұрын
sir, you are awesome because your teaching style is also good and your video tutorial for python is really good sirrr plz you also make the another main concept of python and python algorithms...
@prakhardixit2597
3 жыл бұрын
Can you tell me how come pq.buffer print the values
@muhammedcanozdemir6447
Ай бұрын
is there any need for appendleft, we can do it with append and we can remove the first index of the list
@saulgoodman980
4 жыл бұрын
5:12 In C++ pop() returns void i.e. it only removes the front without returning anything...
@omnipotentcoder9401
3 жыл бұрын
you are using a different compiler.he's using jupter notebook that's why he is getting it as output
@devashishnigam5971
3 жыл бұрын
Amazing exercise questions
@codebasics
3 жыл бұрын
☺️👍
@mrwilbroadtv4230
3 жыл бұрын
thanks for knowledge ,i realy appriciate
@amarkumarsingh014
2 жыл бұрын
Class implemented will again have the issues same as the list explained earlier. We can add another check in the dqueue method to check if the queue is empty or not.
@davidhuang3830
3 жыл бұрын
Thank you so much. I have taken a Data Structure course before but it was taught in Java. Your videos are so helpful in implementing it in python. I am confused at what does ".buffer" do?
@rahulbirhade9030
3 жыл бұрын
that was just an instance of deque() created in calling properties of the class. self.buffer = deque() see the 4th line of code 10:21
@ankitchoudhury9678
3 жыл бұрын
love the details apart from Queue.. knowledge is beautiful
@manjinderrandhawa5094
2 жыл бұрын
do we need circular queue if we implement queue this way in python? What I mean is since deque/list is dynamic and we are appending at the left, so no issues of running out of capacity per se. Thoughts?
@KiranSharma-ey6xp
2 жыл бұрын
Just one thing to notify here, Example Yahoo and Google finance can not use same dequeue method, as only the first who access will get correct result than it will remove (pop) from queue
@ArunKumar-lb5jr
2 жыл бұрын
great work sir
@sunmolasolomon3403
3 жыл бұрын
Good day, Please how will you break the code? It keeps printing even after queue is empty?
@sayantanisaha
3 жыл бұрын
why does my jupyter notebook throws this error?--------- descriptor 'appendleft' for 'collections.deque' objects doesn't apply to a 'int' object
@mayurhegde6903
3 жыл бұрын
hey there's an error in the order placing code, replace True in line 37 with not food_order_queue.is_empty():
@maheshpatil9055
2 жыл бұрын
Sir my laptop has 100 and 5 degree fever what should I do 😅
@daivikbhatia5041
4 жыл бұрын
hello sir, I'm really confused. I'm in my final year of engineering and I want to be a Data Scientist but I also want to keep Software Developer as a backup option. The problem is I'm only good at python. So do I need to learn a new language like Java or C++ or can I give SDE interviews with just python?
@codebasics
4 жыл бұрын
just python is good.
@daivikbhatia5041
4 жыл бұрын
@@codebasics Thank-you sir!
@randyorton4435
3 жыл бұрын
@@daivikbhatia5041with the only help of python have your get placed now??
@daivikbhatia5041
3 жыл бұрын
@@randyorton4435 yes i have been placed in 3 companies out of which 2 as a junior data scientist (both via ppo from internship)..All are based on Python only.. i still don't know any other languages
@user-tz6zl6gm6j
2 жыл бұрын
@@daivikbhatia5041 should we learn DSA for data analyst roles.
@zohaibramzan6381
3 жыл бұрын
How will u define loose and strong coupling?
@hustler98989
3 жыл бұрын
sir, in list if we append new element it reallocate the memory and copy so list is not recommended but what do a queue do if a new element is appended???...how does it manage the memory?
@codebasics
3 жыл бұрын
There are multiple ways of implementing a queue but if you use linked list it will be better because you don't have to worry about shifting elements
@mihaimyh
3 жыл бұрын
Insert and pop are methods specific for a Stack not a Queue, a queue usually has methods like enqueue or dequeue so I am not sure why you are referring to a list as a queue.
@ronsinha21
2 жыл бұрын
Hey Buddy...If you understand correctly he's showing "how to create a Queue using a list", you can create a queue using a List or already available deque from collections or using a LinkedList(which again U can create). The methods "Insert" and "Pop" are built-in methods available for Python lists, similarly there are methods available for deque. The objective of the videos is to teach Data Structures and then implement with Python.
@pavithran7776
4 жыл бұрын
Amazing sir...Thank you so much. I have doubt that in Order code(exercise) Thread is not stopped after all orders are over..What I have to do now??
@codebasics
4 жыл бұрын
Did you do thread.join? In my python tutorials series I have multithreading tutorial please watch that so that you get an idea. Also I have a solution link in exercise page so please refer to that
@pavithran7776
4 жыл бұрын
@@codebasics ok sir...Thank you
@nishchaysingh7601
3 жыл бұрын
do this it will stop: def serve_orders(): time.sleep(1) while food_order_queue.size() != 0: order = food_order_queue.dequeue() print("Now serving: ",order) time.sleep(2)
@devils_arena
3 жыл бұрын
the code u provided in the solution it is coming a non ending loop of none and serve orders how to fix that
@devils_arena
3 жыл бұрын
1. question
@KiranSharma-ey6xp
2 жыл бұрын
Update function server_orders() by below function, to get rid of unwanted infinite process. def serve_orders(): time.sleep(1) while True: order = food_order_queue.dequeue() if order: print("Now serving: ",order) time.sleep(2) else: return False
@apoorvshrivastava3544
4 жыл бұрын
Thanks sir , Sir how many videos are left in this playlist
@codebasics
4 жыл бұрын
I am going to upload few videos on tree, graph and also few more videos comparing different data structures. I dont have exact count but atleast 5 more videos.
@mrjhon6432
2 жыл бұрын
sir mere computer mai COVID 19 aagya hai sir kya kru vaccination kam nhi ayi kya kru 😰
@sagar_bro
2 жыл бұрын
why do we use this in code: if __name__ == '__main__':
@manjinderrandhawa5094
2 жыл бұрын
basically for the scenario if the script is not being exported and is executed directly.
@vandanapal7321
4 жыл бұрын
hi..actually I got an project to make using machine learning but I don't know how to start and what to do and where to get data from as I haven't looked into this kind of thing ...so kindly guide me with the project : crawl popular websites and create a database of Indian movie celebrities with their images and personality traits
@codebasics
4 жыл бұрын
Vandana, can you send me your entire project description and some more details on learnpythonlanguage@gmail.com? We can discuss more on email.
@vandanapal7321
4 жыл бұрын
@@codebasics I had emailed you . please do check
@rushlearning5158
3 жыл бұрын
Hello Sir, can you give a data structure in a different programming language slide Thx.
@faisalnazik
4 жыл бұрын
can u teach us how to predict the next lottery or prize bonds numbers sequences with IA , using import requests from bs4 import BeautifulSoup as bs import threading import queue python
@seanli75
2 жыл бұрын
🤣🤣🤣Covid-19 virus
@pythonenthusiast9292
4 жыл бұрын
this is really good.. thankyou so much sir. Also, i have a request, please include more questions in the excercises in future videos as then the topic becomes very clear!..
@priyanshumaity6780
Жыл бұрын
Ohhh no! I got COVID-19 virus in my computer!!!!!!😱😱😱
@sukurcf
3 жыл бұрын
whoa. deque is double ended queue. Used deque for so long but never noticed.
@saiyedali561
4 жыл бұрын
from collections import deque import time import threading class Queue : def __init__(self): self.buffer = deque() def pop(): return self.buffer.pop() def enqueue(self , val): self.buffer.appendleft(val) def dequeue(self): return self.buffer.pop() def is_empty(self): return len(self.buffer) == 0 def size(self): return len(self.buffer) def place_order(li ,q): for each in li : print("Placing order for:",each) q.enqueue(each) time.sleep(.5) def serve_order(q) : time.sleep(1) # this condition is bz , time_enqueue() < time_deque() while not q.is_empty() : print("Enjoy the served order : " + q.dequeue()) time.sleep(2) if __name__ == "__main__" : li = ['pizza','samosa','pasta','biryani','burger','litti-chokha','dal-wada','mendu-wada'] q = Queue() t = time.time() t1 = threading.Thread(target = place_order , args = (li , q,)) t2 = threading.Thread(target = serve_order , args=(q,)) t1.start() t2.start() t1.join() t2.join() print("Total time taken(for comparision) : " + str(time.time() - t))
@saiyedali561
4 жыл бұрын
More better
@codebasics
4 жыл бұрын
Great.thabks for working in exercise 👍😊
@nikhilreddy9411
Жыл бұрын
Multi threading required for exercise. So use below link to understand. kzitem.info/news/bejne/qKd-sq6qqqthg4o
@fkgaasdkjnv4824
8 ай бұрын
Oops I accidentally clicked solution and my computer got covid 19 virus 😢
@jyotiphulwariya6723
3 жыл бұрын
from collections import deque class Queue: def __init__(self): self.buffer=deque() def enqueue(self,val): self.buffer.appendleft(val) def dequeue(self): return self.buffer.pop() def front(self): return self.buffer[-1] def is_empty(self): return len(self.buffer)==0 def size(self): return len(self.buffer) def rem(i): s=Queue() for n in range(1,i+1): z="" while n>0: a=n%2 z+=str(a) n=n//2 s.enqueue(z[::-1]) c=len(s.buffer) while c>0: print(s.buffer[c-1]) c-=1 print(rem(10))
@danyahsan3958
5 ай бұрын
TIME COMPLEXITY?
@shahbazkhalilli8593
Жыл бұрын
in 4:43 explanation picture is incorrect
@cawaynebryan4324
2 жыл бұрын
My computer needs a PCR test kit
@chiragkumargohil9917
2 жыл бұрын
Does every API use queue data structure?
@deepanshujain002
4 жыл бұрын
Can you please explain why did we use self.container in stack and self.buffer while implementing queue? What is their significance?
@codebasics
4 жыл бұрын
there is no difference. those are just two different variable names :)
@deepanshujain002
4 жыл бұрын
@@codebasics got it..
@AaronBrand
4 жыл бұрын
Can you tell me where you "copy and paste" the class from? I'm trying to document all my practice and I want to make sure to make a proper reference! Thanks for the great videos. I'm learning a lot from you. BTW, I've read elsewhere that some people will pronounce deque like "deck," to differentiate from dequeue.
@codebasics
4 жыл бұрын
Aaron, what I do is I prepare the code in advance and while doing KZitem recording I start with blank and copy paste my own code. So all my content is my own genuine hard work. I spend lot of time in preparing this content. It is 100% genuinely my own content so please give a reference to codebasics youtube channel. If you want to put my name than it's Dhaval Patel
@hkdelhivlogs
4 жыл бұрын
Sir you are doing very well...you are my best teacher for data science and machine learning..😃😃😃 looking for more videos on this...
@codebasics
4 жыл бұрын
I will try my best
@Joyboy_1044_
Жыл бұрын
Add this line to stop Empty queue loop: def ServeOrder(orders): time.sleep(1) while True: if food_order.isempty(): print("All items Served") break order = food_order.dequeue() print("Serving order: ",order) time.sleep(2)
@shankar7588
Жыл бұрын
Also may be replace the while condition to check food_order_queue.size() !=0
@zack176
Жыл бұрын
Bro i tested out the same code as in the solution but it gives me random results like first order the second order then after serve
@tapabratacse
2 жыл бұрын
your code for example 1 ....food_ordering_system.py should be having infinite loop while serving item. There are no checks on whether order queue is empty
@optimalrider
2 жыл бұрын
Yes, precisely. Either Make And If Statement Stating If food_order_queue.is_empty() break Something Like This In server_order So When There Is No More Order It Should Stop Or Wait For More Orders.
@optimalrider
2 жыл бұрын
If You Know The Correct Solution Please Let Us Know.
@motivationalyug1546
2 жыл бұрын
Thank you...
@a2zfunbegins273
2 жыл бұрын
sir but i performed queue using list in python and its working well.
@tvtrauma7024
Жыл бұрын
Where can I learn more about software infastructure mentioned at the beginning of the video
@Mohib3
3 жыл бұрын
why do i feel like this is to easy to be true
@manjinderrandhawa5094
2 жыл бұрын
right, no mention of ciruclar queue here
@sumitdhiman5381
3 жыл бұрын
Hello sir, Can you please tell me..if this is the right way to do 2nd ques or not?if __name__ == "__main__": q = Queue() numbers = int(input("Enter numbers:")) for i in range(1,numbers+1): q.enqueue((bin(i).replace("0b",""))) print(q.dequeue())
@meralmaradia4774
2 жыл бұрын
Hello Sir, can you please create a video developing of project using only DSA ?
@shawzhang4498
Жыл бұрын
why queue has different time complexity than array??
@muhammedcanozdemir6447
Ай бұрын
isn't it obvious, because queue behaves like a linked list, if you want to access a specific element in the queue, you can access it when its turn comes. Think like you are in a queue, how they access you if your turn does not comes. But thin you are in a room with a number written on your chest. When they call your number, they immediately reach you
@shawzhang4498
Ай бұрын
@@muhammedcanozdemir6447 how is array different in terms of access?
@optimalrider
2 жыл бұрын
Can Anyone Help Me With Question 2 in Exercise, Not Able To Understand The Logic Even After Checking Out The Solution. It Would Be Great Help!
@ronsinha21
2 жыл бұрын
@Optimal Rider I implemented it in my own way using "front" as a variable which will store the dequeue and inside the loop, append "0" with front first then "1" print front and then print newline inside the loop. Even simpler and easy to understand logic than the Solution. Also I modified dequeue to do a pop(0)rather than pop. always better to implement any solution in your own way(that's the best way of determining your understanding). Do you still need help to understand the solution code?
@zack176
Жыл бұрын
Is your forst problem worked perfectly
@h_coder
Жыл бұрын
Thank you so much ... may Allah guide you to accept Islam 😊
@aswath8265
3 жыл бұрын
Sir the problems are amazing
@studycode4142
2 жыл бұрын
good example for queue.
@172yogendra
4 жыл бұрын
Dear sir could you please make some videos on algorithms ......which are important for product-based companies placement??
@dinesh.p8642
3 жыл бұрын
Thank you dhaval sir
@moumitabose2864
3 жыл бұрын
thank you sir...
@sahebsaha8788
4 жыл бұрын
sir is this all 11 videos are covered the whole data structure in python or not and sir, plz make a tutorial on algorithms also
@prakharsingh2672
4 жыл бұрын
Hiii Sir. Can you please upload these series videos fast.
@codebasics
4 жыл бұрын
I have not prepared all videos. I am adding them as and when I get time to prepare them but yes I am trying my best. Next one is going to be on a tree.
@ducnguyenminh4289
3 жыл бұрын
Thank you so much, It's so useful for me
@codebasics
3 жыл бұрын
Glad it was helpful!
@prasantakarmakar8554
4 жыл бұрын
As I know you are the only saviour on web, who replies very fast with some effective suggestions my bunch of questions are below Hi Sir, I have a question obviously not related to this video....Is that Data Gathering from web or anywhere else also comes under a Data Analyst responsibility?? If yes then , Can I collect it using Python through api links?? If yes then from where can I get the api links of any social media? Is it doable.....or am I asking a correct questions?? I'm totally confused.....please help.
@codebasics
4 жыл бұрын
Your questions are very valid prasanta. Often data collection is done by data analyst but not all the times. Sometimes companies already have huge collection of data that is owned by different engineering and infrastructure teams. Business analysts also help with data collection process. People use data scrapping tools such as web crawlers to crawl internet for data collection. You can read about python scrapy library which is used for this purpose. However remember that no website would like you to crawl their portal in automated way hence many times the question arises if it is even legal to crawl web. So really there is no good or easy way to collect data from internet. There are portals like quandl or kaggle that provide datasets. I work for Bloomberg and we have api product where you pay a price and get financial data in form of feed through excel etc.
@prasantakarmakar8554
4 жыл бұрын
@@codebasics Thank You for your reply Sir,...So I can say data scraping is in ...grey part.... but if I want to collect some reaction of users from social media or any online shopping websites....Suppose I want to get the comments of facebook or instagram users for a particular post to get peoples thoughts about that post. so, can I also call it data scrapping ? Is it also in a grey part? If it is legal..then Is it possible to collect those comments data by any scrapping tools? if yes then can I use any algorithm on those word datas converting them into numerical data , like how we get insights from twitter comments though data mining?
@headach09
2 жыл бұрын
Wow! Enjoy the sense of humor in your tutorial very much. Thanks
@poojavispute2228
4 жыл бұрын
Thank you sir......for making such kind of videos which is veey helpful for us.
Пікірлер: 125