3 Practical Python Automations

0CodeKit is a wonderful tool aimed at assisting users in different aspects, whether it is for personal or professional projects. 0CodeKit can make their workflow more efficient. In this blog post, three scenarios will be described to show how advantages can be gained from Make and 0CodeKit’s "Execute Python code" endpoint. Check for duplicate items in more than two lists, retrieve specific values from a list, or obtain transcripts from videos.
Suppose you are planning for your weekly fruit purchase. You’ve got two lists: one for fruits you still need to purchase and another for fruits that have already been purchased. It becomes difficult at times to distinguish between them and end up buying way more than is required. Wouldn’t it be wonderful to automatically find similarity between the two?
Therefore, we’ll use a Make module called "Set multiple variables". First, we set two variables: one called “Fruits bought”, where you will record all the fruits that have been bought, and another called “Fruits to Buy”, where you will record those fruits you intend to buy. After defining these variables, the data is forwarded to 0CodeKit’s Python Code Executor, which swiftly cross-checks between both lists and finds duplicate file items.
Let’s say you are monitoring the weather for a gardening project or a science class. But there is a list of temperatures, and you need to sort through them to figure out how many times the temperature has dropped below 20 degrees. Doing this process manually can be tiresome and may lead to some inaccuracies.
That's why we'll use a Make module called "Set variable", which will contain the list of temperatures. Subsequently, this information should be passed on to 0CodeKit’s Python Code Executor, which then scans through the list and isolates all temperatures that are less than 20 degrees. The result? A neat summary containing only the temperatures that interest you, no manual sorting required.
Imagine you've discovered a YouTube video that contains a lot of useful information that you need, and you wish to have a text version of it. Rather than sit down and transcribe it manually for hours, it can be done with the help of 0CodeKit’s Python Code Executor.
To do so, we're going to use the Make module called “Set variable”, where we set a YouTube video ID as the value of the variable. Then, this data is sent to 0CodeKit’s Python Code Executor, which will use the ID given to access the video and pull the transcript. The result? A ready-to-use document containing the full script of the video.