Automating My Life with Python: The Ultimate Guide | Code With Me

preview_player
Показать описание
Hi friends! In this video we are going to be building some fun things with Python that can actually help automate tasks in your life! What should we build next?

Make sure to checkout oneAPI #oneAPI :

0:00 Intro
0:53 OneApi
1:29 Python Project 1 Intro
2:13 How To Setup Your Python Environment
3:50 Coding First Python Project
7:03 Python Project 2 Intro
7:59 Coding Second Python Project

✅ Exclusive discounts
✅ Tips from people in the STEM world
✅ Stay up to date with the latest tech events and news
✅ And so much more!

// My Story

I am currently a software developer who once modeled and thought I wanted to pursue a career in the fashion industry. While I was modeling in Hong Kong, I eventually felt the desire to further my education. I decided to depart the modeling world and move back to Canada, knowing that could be the end of my modeling opportunities. I attended Ryerson University for GCM (Graphic Communications Management), as I thought I might still work in the fashion industry in another capacity. It was in my last year of university, I was introduced to a very basic coding course. I instantly fell in love. From there I knew I wanted to pursue software development but didn't have a clue where to start. I didn't want to go back to university as I just completed a four-year degree. I decided to enroll in a 10-week intensive coding Bootcamp. From there I started working at a small startup learning and growing my technical and soft skills. I then transitioned to a larger company where I am a software developer and technical consultant today.

Automating My Life with Python: The Ultimate Guide | Code With Me

#AutomatingMyLifewithPython #tiffintech
Рекомендации по теме
Комментарии
Автор

So, a really helpful function here would be the os walk function. It'll recursively iterate through every file in a directory. From there, in your loop you could check the file extension and remove based on that or any other condition. From there, you could use the argparse package and take arguments from the cli to ask the user things like what files they want to remove or the file extensions they want to remove. Then after that, you could think about putting everything in functions so as to not pollute the global namespace and use the standard "if __name__ == '__main__'" pattern. Lots of different, cool things you can do here, a great beginner project!

Shrmp
Автор

Hi friends! In this video we are going to be building some fun things with Python that can actually help automate tasks in your life! What should we build next?

TiffInTech
Автор

You finally convinced me to learn Python on my own. I'm a C++ and C# programmer and we don't use Python at work. You have been showing us what we can do with Python and I am amazed. Thanks for the tips. I'm interested in face recognition and fingerprints reading softwares.

yolamontalvan
Автор

Just started a Data Science bootcamp - binge watching for tonnes of research. This was a great insight into something a little more interesting than the boring mess I've had thrown at me so far. Cheers.

StorytellerDan
Автор

Beautiful and Smart! Just starting my Python journey - will be tuning in for more! Thx Tiff, keep 'em coming!

andywelch
Автор

I loved this. Would love to see more projects that youve done!

Seevawonderloaf
Автор

Awesome tutorial and video Tiff!! Thanks for partnering with us on sharing #oneAPI 💙

IntelSoftware
Автор

I read webnovels and few years ago before Tencent saw the huge western market there were a bunch of different websites for each novel, they were translated into english.
So keeping track of them became a bit tiring and if I used a webpage if it was down, well RIP.

So I taught myself javascript and made a chrome extension that I can use on my PC and Tablet, using firebase to store my novels database.
I love stats so keeping track of what I read, how many words, chapters etc. was fun and useful. Some novels have character names that I don't like or use censorship on words, replacing them is easy, saving it for each novel individually and so on. Using it daily.

Another project of mine is a tool to add some data into my spreadsheet, I made a project that does a lot of calculations for me and adds it to the Google spreadsheet.

ofc there are others, but those too are my most used and useful ones.

shi-woonyi
Автор

So I just discovered your channel. One thing many tech channels have in common is the presenter is horrible- fast paced, difficult to understand, and language barrier. This channel is none of those. So glad to find a channel that’s simple and straightforward.

Velo
Автор

Thanks for sharing Tiff, the pdf to audio project would create a lot of time savings for me!

alexyu
Автор

Filling out forms has really been a livesaver for me. Especially when you can make it dynamic to work for several webpages.

emmaaberg
Автор

Great video!!!
I would like to suggest a correction at 05:03 :-
text = actually works for PDFs that have a single page. But if a PDF has multiple pages, then the text gets overwritten with the contents of the new page. So, to avoid that we can append the new page's content to the current text and then format the text into clean_text after the end of the loop

teja
Автор

When you said "if even worse" I knew the downloads folder was coming haha... My work computer's downloads folder is the scariest place on Earth. Great vid!

vincenzo
Автор

Permission to come aboard TnT 1st., time viewer of your show I thought that online discovery learning coding, is cool! MerryXmas🎅🏻 & may you have a fantastic holiday season❄, 🤘🏼!

davidhernandez
Автор

1)Make a mouse and key logger, that saves mouse position, and major mouse events as a sequence. Use that to replay the sequence as fast as you want and as many times as u want using python.
2) find a way to put chatGPT talking to it self in python.

adrianojordao
Автор

For Project 2, I really like using pathlib. You can iterate through a dynamic file path if you just did "for file in file.unlink()" for pdf files. You can also do it via comprehension list.

guyonlead
Автор

This was an inspiring video, I like the first project but I think i want to investigate observing images and attempting to pull text from images. I have a ton of old PDF's of scanned books that are no longer in print, that don't have any digital versions available, so it's just scans or nothing. That would be nice to be able to digitize.

giantsbane
Автор

might be a bug in pdf to mp3. You re only converting the last page of the pdf since you don't concatenate each page together in your loop.

nicholastan
Автор

Thank you for the 2 inspiring projects.

When trying the first one, I had to spend quite a lot of time debugging, possibly due to the fact that the used modules have been updated since the video has been made and a number of functions had been renamed (even ChatGPT is not updated regarding PyPDF2 3.0.0 !). If you wish to save your time, here is the updated code, with a little correction to the loop:

import pyttsx3, PyPDF2

title = input("Which book would you like to listen to?\n") + ".pdf"
pdfreader = PyPDF2.PdfReader(open(title, 'rb'))
speaker = pyttsx3.init()

first_page = input("Starting with what page?\n")
last_page = input("Ending with what page?\n")

text = ""

for page_number in range(int(first_page - 1), int(last_page)):
text = text +

clean_text = text.strip().replace('\n', ' ')
print(clean_text)

speaker.save_to_file(clean_text, 'result2.mp3')
speaker.runAndWait

speaker.stop()

Now this version correctly prints out the converted text, but fails to create the mp3 file, don't know why. Chat GPT created this version of the code, which works, and the resulting voice reading is actually surprisingly clear:

import fitz # PyMuPDF
import pyttsx3

# Get the input file name
title = input("Which book would you like to listen to?\n") + ".pdf"

# Initialize the text-to-speech engine
speaker = pyttsx3.init()

# User input for page range
first_page = int(input("Starting with what page?\n"))
last_page = int(input("Ending with what page?\n"))

# Initialize an empty text variable
text = ""

# Open the PDF file
pdf_document = fitz.open(title)

# Loop through pages and extract text
for page_number in range(first_page - 1, min(last_page, len(pdf_document))):
page =
text += page.get_text()

# Close the PDF document
pdf_document.close()

# Save the MP3 file
mp3_output = input("How would you like to call the resulting .mp3 file?\n") + ".mp3"
speaker.save_to_file(text, mp3_output)
speaker.runAndWait()
speaker.stop()

print(f"Text extracted and saved as {mp3_output}")

SamB
Автор

Hey Tiff! This video is awesome! In your terminal for VSCode how do you get it to say "python"? My terminal shows a file path instead and doesn't look clean at all.

paydennordlund