Skip to content

Instantly share code, notes, and snippets.

@meow-d
meow-d / test.py
Last active January 16, 2024 00:56
easiest way to implement the recipe recommendation algorithm
import re
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import linear_kernel
# load dataset
dataset = pd.read_csv("recipe_nlg_lite/train.csv", sep=" ")
dataset["combined"] = dataset.apply(
lambda row: " ".join(row[["name", "description", "ner", "steps"]]), axis=1

1. add yaml metadata for pandoc

# metadata for pandoc
title: Computer Systems Architecture individual assignment
subtitle: Comparisn Between Raspberry Pi OS and Fedora Linux
author:
  - 'hfsoahdaos'

# custom LaTeX
header-includes: 
Defaults editor=/usr/bin/micro
Defaults pwfeedback
Defaults passwd_timeout=0
Defaults passprompt="[sudo] gimme %p's password ( •̀ω•́ )σ: "