Let's code a DIGITAL CLOCK in Python! 🕒
#python #pythontutorial #pythoncourseforbeginners 00:00:00 pip install PyQt5 00:00:41 imports 00:01:57 class DigitalClock(QWidget) 00:02:59 if __name__ == "__main__" 00:04:48 setting up __init__() 00:05:29 initUI() 00:10:03 update_time() 00:12:47 custom font ## Python PyQt5 Digital Clock import sys from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout from PyQt5.QtCore import QTimer, QTime, Qt from PyQt5.QtGui import QFont, QFontDatabase class DigitalClock(QWidget): def __init__(self): super().__init__() self.time_label = QLabel(self) self.timer = QTimer(self) self.initUI() def initUI(self): self.setWindowTitle("Digital Clock") self.setGeometry(600, 400, 300, 100) vbox = QVBoxLayout() vbox.addWidget(self.time_label) self.setLayout(vbox) self.time_label.setAlignment(Qt.AlignCenter) self.time_label.setStyleSheet("font-size: 150px;" "color: hsl(111, 100%, 50%);") self.setStyleSheet("background-color: black;") ## Use a custom font ## font_id = QFontDatabase.addApplicationFont("DS-DIGIT.TTF") ## font_family = QFontDatabase.applicationFontFamilies(font_id)[0] ## my_font = QFont(font_family, 300) ## self.time_label.setFont(my_font) self.timer.timeout.connect(self.update_time) self.timer.start(1000) self.update_time() def update_time(self): current_time = QTime.currentTime().toString("hh:mm:ss AP") self.time_label.setText(current_time) if __name__ == "__main__": app = QApplication(sys.argv) clock = DigitalClock() clock.show() sys.exit(app.exec_())
7/31/2024 1:01:24 PM
Psychology of money part 1 | Financial goals | Financial Literacy | Khan Academy
Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now! https://www.khanacademy.org/college-careers-more/financial-literacy/xa6995ea67a8e9fdd:financial-goals/xa6995ea67a8e9fdd:money-personality/v/psychology-of-money-part-1 Money biases like herd mentality and anchoring bias can lead people to make financial decisions based on peer actions or initial information, potentially distracting them from making rational, well-informed choices. This often results in missed opportunities or unnecessary financial losses. Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success in school and beyond. Khan Academy has been translated into dozens of languages, and 15 million people around the globe learn on Khan Academy every month. As a 501(c)(3) nonprofit organization, we would love your help! Donate or volunteer today! Donate here: https://www.khanacademy.org/donate?utm_source=youtube&utm_medium=desc Volunteer here: https://www.khanacademy.org/contribute?utm_source=youtube&utm_medium=desc
8/1/2024 6:01:01 PM
Should You Pay Off Your Mortgage Early or Invest? | Financial Advisor Explains
In this video, we go over the best way to go about where to put your excess cash when you have an existing mortgage. What is the optimal decision? Is it really smarter to invest the money instead of paying off the home? What are the other intangible factors? All that will be answered today. Mortgage Payoff Calculator: https://www.calculator.net/mortgage-payoff-calculator FREE STOCKS + RESOURCES: 🏆 Webull Deposit a Minimum of $500 and Get a Guaranteed $50 Free Stock: https://www.webull.com/k/HumphreyYang 🏆 Webull UK: https://www.webull-uk.com/i/humphreyUK 💸 SoFi Checking & Savings: https://sofi.com/humphrey Get up to 4.40% APY, pay no account fees and earn $250 when you sign up and set up direct deposit. Terms apply. RESOURCES: 💵 Free Templates: https://beacons.ai/humphreytalks/freedownloads 🐪 Hump Days Newsletter ➭ https://humpdays.substack.com ▶️ See What I Invest In ➭ https://patreon.com/humphreytalks 💳 My Favorite Credit Cards ➭ https://cardonomics.com/i/humphrey 👾 Join our free Discord Community: https://discord.gg/xJzsaGaaDE MY SOCIALS: Secret Channel -- https://youtube.com/@hug Instagram -- https://instagram.com/humphreytalks Twitter -- https://twitter.com/humphreytalks TikTok -- https://tiktok.com/@humphreytalks Rickie (Editor) ➭ https://instagram.com/coldgamerick WHO AM I? Hello 👋 I’m Humphrey, I used to be a financial advisor, worked in gaming/tech, and started my own eCommerce business. I make practical, rational content on investing, personal finance, the news, and much more with a data-backed approach. My goal is to help you with financial literacy and creating wealth. PS: I am no longer a current Financial Advisor, any investment commentary are my opinions only. Some of the links in this description are affiliate links that I do receive a commission for & they help support the channel! ⏱️ Timestamps: 0:00 - Start Here 0:55 - How Mortgages Actually Work 4:24 - Stock Market Returns 9:16 - Tips to Pay Off Mortgage Early
6/20/2024 6:00:12 PM
Let's Buy a Car! | Teacher Resources | Financial Literacy | Khan Academy
Meet Wally. He wants to buy a car! Unfortunately, Wally is the most gullible man alive, and he'll fall for every trick in the car dealer's book. Follow along, so you don't follow his example! Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now! https://www.khanacademy.org/college-careers-more/financial-literacy/xa6995ea67a8e9fdd:teacher-resources/xa6995ea67a8e9fdd:about-this-unit-investments-and-retirement/v/the-case-of-the-early-bird Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success in school and beyond. Khan Academy has been translated into dozens of languages, and 15 million people around the globe learn on Khan Academy every month. As a 501(c)(3) nonprofit organization, we would love your help! Donate or volunteer today! Donate here: https://www.khanacademy.org/donate?utm_source=youtube&utm_medium=desc Volunteer here: https://www.khanacademy.org/contribute?utm_source=youtube&utm_medium=desc All music and sound effects are either Creative Commons 0 or own work.
7/15/2024 4:15:36 PM