Skip to content

Instantly share code, notes, and snippets.

@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]],
@sguzman
sguzman / alg-geo.md
Last active February 24, 2023 05:22
A table of contents created by asking ChatGPT

Algebraic Geometry

Introduction

1.1. Overview of algebraic geometry

1.2. Historical background

1.3. Basic concepts and notation

Affine Varieties

2.1. Affine algebraic sets

2.2. The coordinate ring

@sguzman
sguzman / truth-as-process.md
Created January 22, 2023 20:50
My truth as process treatise.

Introduction

The Halting Problem and its constituent pedagogical discourse circumscribing it always has impressed me with its oddity. This peculiar problem, I would introspect in private, has availed itself lavishly to the contemplative spirit of the human imagination and very much ensconced notions of computation for our age. Through whatever inventive machinations it could afford, the broad outline of this logical exercise in futility had found purchase in the minds of many.

That this phenomena could be explained perhaps by the eagerness of computer scientists to have under their purview a body of literature rivaling that of more established intellectual traditions shines brightly for me. The zealotry in which a nascent school of thought possesses can of course be explained very much in this way without betraying any elucidating penetrative insight into the matter that animates this discussion in the first place of course. Should this explanation prevail, they can be forgiven for their overzealous effor