Skip to main content


Stack In Python

class Stack: def __init__(self): self.stack = [] def add(self, dataval): # Use list append method to add element if dataval not in self.stack: self.stack.append(dataval) return True else: return False # Use peek to look at the top of the stack def peek(self): return self.stack[-1] AStack = Stack() AStack.add("Mon") AStack.add("Tue") AStack.peek() print(AStack.peek()) AStack.add("Wed") AStack.add("Thu") print(AStack.peek())
Recent posts

Linkedlist in Python for begineers

class Node: def __init__(self, dataval=None): self.dataval = dataval self.nextval = None class SLinkedList: def __init__(self): self.headval = None def listprint(self): printval = self.headval while printval is not None: print (printval.dataval) printval = printval.nextval list = SLinkedList() list.headval = Node("Mon") e2 = Node("Tue") e3 = Node("Wed") # Link first Node to second node list.headval.nextval = e2 # Link second Node to third node e2.nextval = e3 list.listprint()

80/20 Rule - Pareto Principle

Originally, the Pareto Principle referred to the observation that 80% of Italy’s wealth belonged to only 20% of the population. More generally, the Pareto Principle is the observation (not law) that  most things in life are not distributed evenly . It can mean all of the following things: 20% of the input creates 80% of the result 20% of the workers produce 80% of the result 20% of the customers create 80% of the revenue 20% of the bugs cause 80% of the crashes 20% of the features cause 80% of the usage And on and on… But be careful when using this idea! First, there’s a common misconception that the numbers 20 and 80 must add to 100 — they don’t! Also recognize that the numbers don’t have to be “20%” and “80%” exactly. The key point is that  most things in life (effort, reward, output) are not distributed evenly – some contribute more than others .

Time Management using Corvey Time management Matrix

What is the Covey Time Management Matrix? The Covey Time Management Matrix is a framework for prioritizing your time and tasks for optimized efficiency and productivity. Created by Steven Covey, author of  The Seven Habits of Highly Effective People , this model uses a four-quadrant system to help you categorize each task, responsibility and facet of your life based on: Urgency:  Tasks and responsibilities requiring immediate action or attention Importance:  Those with high significance or value to goals The objective of using this method is to focus on improving both personal and professional relationships as well as promoting growth and accomplishment. The four quadrants of the Covey Time Management Matrix Each quadrant has a different property and is designed to help you prioritize your tasks and responsibilities. These quadrants are as follows: Quadrant 1: Urgent and important Quadrant 2: Not urgent but important Quadrant 3: Urgent but not important Quadrant 4: Not urgent and not i

Getting the Transcription of a Video From Youtube using google cloud platform.

So, the other day I was searching for python code that gives me a transcript of any video, I did what all we do I searched everywhere on Internet but was unfortunate. But we are programmers best thing we do is search more on the internet. finally, I got the code I wanted, all thanks to Pragnakalp Techlabs . Although the code was a little different from my expectations I did some filters on it and made it to view the transcripts of the youtube video. Be patient there are going to be few steps involved in our process !! # pip install google-api-python-client # pip install youtube_transcript_api from apiclient.discovery import build from youtube_transcript_api import YouTubeTranscriptApi api_key = "Secret Key" # replace it with your API key video_id = str ( input ( "Enter the video id: " )) # replace it with your channel id youtube = build ( 'youtube' , 'v3' , developerKey = api_key ) try : responses = YouTubeTranscrip

Getting to know API's

Getting to know API API stands for application programming interface An interface, that allows different systems to talk to each other without having to understand exactly what each other does Type of API's APIs can come in many forms or shapes APIs, used for actions like turning on your camera and audio for joining a Zoom call Or they can be web APIs, used for web-focused actions such as liking images on your Instagram or fetching the latest tweets. How Api's are operated(in simple terms) You usually make a request for information or data, and the API returns a response with what you requested.

Opensource... NO more free?!

So, few days ago a new technology entered in industry github copilot. Github copilot is basically a code suggestion software like other software like tabnine and kite but copilot is much more than that, it actually gives you the whole function of code just with one tab button on your keyboard. What is point of concern then? The problem is that github copilot will auto-complete your code if it has previously written somewhere on github. Then what? Github is web-based version control software, its free of cost all the people in whole world use this thing to save all their programs there so that everyone can work on same thing. It is believed that open source applications are free and everyone can use it but here comes game changing move from microsoft they are trying to commercialize copilot! The time ivested by billions of people in writing code for opensource just to help each other and to grow developer community will all be monetized, Microsoft wanted to make profit from these people