\documentclass[a4paper,margin=0.5cm,varwidth]{standalone}

\usepackage{luacode}

\begin{document}

\begin{luacode}
local repr = dofile("../../scripts/kmeans_steps.lua")
tex.print(repr)
\end{luacode}

\end{document}