Skip to content

Instantly share code, notes, and snippets.

View cafaxo's full-sized avatar

Lukas Mayrhofer cafaxo

View GitHub Profile
# this file contains a Julia port of https://github.com/karpathy/llama2.c
# all credit goes to Andrej Karpathy (author of llama2.c)
using LinearAlgebra
using StatsBase
using Printf
# Transformer and RunState structs, and related memory management
struct Config
function count_snakes(n)
c = 0
for x in 1:n
for y in 1:n
c += count_snakes_from(n, x, y)
end
end
return c