Keen Learner and Exp... • 2d
Day 23 of learning python as a beginner. Topic: multi-threading. Multi-threading is a technique to run multiple task (such as importing or downloading) within a single program and at the same time. Thus running multiple things parallelly, in a nutshell. Although you can use threading to download anything I practiced it for downloading images from the internet (pexels to be specific). I used multiple for loops first for appending the image_urls list from the inputs I am taking from my user. Then I am using another for loop with enumerate so that each url link in the list gets downloaded and threading.Thread sends this data to my download_image() function with all the related arguments necessary to download the image and and create a unique file. Just like calling functions and classes you need to use .start() function in order to start the threading process. and then use .join() function so that the program waits for both the images to get downloaded completely and then continues to execute the remaining code. Here's my code and its result and I would love to hear your all's amazing suggestion to my code.
A billion dollar dre... • 7m
🔮 No-Code AI Revolution: Multi-Agent Systems for Everyone! Multimodal LLM-based multi-agent systems are now accessible through no-code platforms. Game-changer alert! 🚀 Why it matters: - Non-technical teams can implement complex AI - Handle text,
See MoreDownload the medial app to read full posts, comements and news.