This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"podcastTitle": "The Joe Rogan Experience", | |
"primaryInterests": [ | |
"Funny Interviews", | |
"Philosophy & Ideas", | |
"Social Issues", | |
"Personal Stories" | |
], | |
"secondaryInterests": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
from dataclasses import dataclass | |
@dataclass | |
class UserCompodabilityStore: | |
interests: List[str] | |
top_pods: List[str] | |
most_listened_pods: List[str] | |
# Subscriptions are intentionally ignored |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function levenshteinDistance(s, t) { | |
const d = []; // 2d matrix | |
const n = s.length; | |
const m = t.length; | |
if (n == 0) return m; | |
if (m == 0) return n; | |
// Create an array of arrays in javascript (a descending loop is quicker) |