Skip to content

Instantly share code, notes, and snippets.

View sguzman's full-sized avatar
🎯
Focusing

Salvador Guzman sguzman

🎯
Focusing
View GitHub Profile
@sguzman
sguzman / build.sbt
Created October 5, 2023 18:51
Working SBT version of the maven pom file for runelite project
val scala3Version = "3.3.1"
lazy val root = project
.in(file("."))
.settings(
name := "Runelite-scala",
organization := "net.runelite",
version := "0.1.0-SNAPSHOT",
scalaVersion := scala3Version,
resolvers ++= Seq(
@sguzman
sguzman / read-list.md
Last active July 11, 2023 23:21
Reading list from The Secret History of the 20th Century

Reading List

  • Tragedy and Hope, Carroll Quigley
  • The Evolution of Civilizations, Carroll Quigley
  • Bloodlands, Timothy Snyder
  • Liberalism, Paul Gottfried
  • War in Human Civilization, Azar Gat
  • The Master and His Emissary, McGhilchrist
  • Man and His Symbols, Carl Jung
  • The Origin of Ideology, Todd Immanuel
@sguzman
sguzman / collatz-extension.wsl
Created June 23, 2023 06:10
My extension of the collatz conjecture to add fix point instead of a orbit
co[n_Integer /; EvenQ[n]] := co[n] = n / 2
co[n_Integer /; OddQ[n]] := co[n] = 3 n + 1
co[1] = 0
co[0] = 0
@sguzman
sguzman / languages.md
Created May 20, 2023 09:50
Languages I would like to know

Languages

Languages I know

  • English
  • Spanish

Languages I am studying

  • Danish
  • Dutch
  • Portuguese
@sguzman
sguzman / games.md
Last active May 19, 2023 11:01
Playing games in diff langs for fun

Playing games in diff langs for fun and profit

Xbox Games

Language Game
Spanish Grim Fandango
German Eastward
Italian Genesis Noir
Japanese Ghostwire: Tokyo
Chinese Wo Long Fallen Dynasty
@sguzman
sguzman / games.md
Last active May 18, 2023 22:39
Playing games in different languages

Playing games in diff langs for fun and profit

Since I am practicing on my fluency for Spanish, I will choose Spanish as the language of choice for some text-based games whose story I would really like to be able to follow along.

Spanish games

ID Game
1 Kentucky Road Zero
2 Grim Fandango
@sguzman
sguzman / convert_to_safe.py
Created March 18, 2023 08:21 — forked from zer0TF/convert_to_safe.py
Convert all CKPT files to SAFETENSOR files in a directory
# Got a bunch of .ckpt files to convert?
# Here's a handy script to take care of all that for you!
# Original .ckpt files are not touched!
# Make sure you have enough disk space! You are going to DOUBLE the size of your models folder!
#
# First, run:
# pip install torch torchsde==0.2.5 safetensors==0.2.5
#
# Place this file in the **SAME DIRECTORY** as all of your .ckpt files, open a command prompt for that folder, and run:
# python convert_to_safe.py
@sguzman
sguzman / README.md
Last active September 25, 2023 18:39 — forked from kinnala/README.md
Install Mathematica in NixOS

First you find a copy of Mathematica_13.2.1_LINUX.sh or similar and find its sha256sum. Then you go to nixpkgs and copy all Mathematica files to a local directory. You need to modify default.nix and wrap its contents into

let pkgs = import <nixpkgs> {};
in pkgs.callPackage (
  # whatever is in default.nix
) {}
@sguzman
sguzman / llama_sizes.txt
Created March 7, 2023 06:30 — forked from shawwn/llama_sizes.txt
The size of each file distributed with LLaMA, for reference. See https://github.com/shawwn/llama-dl
./tokenizer_checklist.chk 50
./tokenizer.model 499723
./7B/checklist.chk 100
./7B/consolidated.00.pth 13476939516
./7B/params.json 101
./13B/checklist.chk 154
./13B/consolidated.00.pth 13016334699
./13B/consolidated.01.pth 13016334699
./13B/params.json 101
./30B/checklist.chk 262
(* Projection from the sphere to the plane *)
stereo = Compile[{{xyz, _Real, 1}, {XYZ, _Real, 1}}, Module[{
r = Sqrt[(xyz[[1]] - XYZ[[1]])^2 + (xyz[[2]] - XYZ[[2]])^2],
theta = ArcTan[(xyz[[1]] - XYZ[[1]]), (xyz[[2]] - XYZ[[2]])]},
{(r (1 + xyz[[3]]))/(1 - XYZ[[3]] + xyz[[3]]) Cos[theta + Pi] + xyz[[1]],
(r (1 + xyz[[3]]))/(1 - XYZ[[3]] + xyz[[3]]) Sin[theta + Pi] + xyz[[2]], 0}]];
(* Projection from the plane to the sphere *)
stereoInv = Compile[{{pq, _Real, 1}, {xyz, _Real, 1}},
{2 pq[[1]], 2 pq[[2]],