Python Code Execution for Lists, Transcripts and More

Check for duplicate items in shopping lists, find temperatures below 20 degrees, and get accurate YouTube transcripts with 0CodeKit's Python Code Executor.

Published
August 8, 2024

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 0CodeKit’s Python Code Executor: Check for duplicate items in more than two lists, retrieve specific values from a list, or obtain transcripts from videos.

Use Case #1: Are Words Repeated?

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 which 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 one be 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, who swiftly cross checks between both lists and finds duplicated files items.  

Use Case #2: Are There Temperatures Lower Than 20?

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, who 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.

Use Case #3: Can I Get a Transcript?

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 who 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.

Wrap Up

By incorporating similar use cases into your routine, you can save time and ensure precision. It can allow you to focus on more important aspects of your work or personal projects.

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.