Skip to content

Instantly share code, notes, and snippets.

View theXYZT's full-sized avatar
🐻

Nikhil Mahajan theXYZT

🐻
  • Toronto, ON
View GitHub Profile
@theXYZT
theXYZT / boo.py
Created August 28, 2023 02:22
Square of Sums / Sum of Squares
import numba as nb
import numpy as np
from tqdm.auto import tqdm
import dask.array as da
@nb.njit([nb.float64[:](nb.float64[:, :]),])
def g(x):
res = np.zeros(x.shape[0], dtype=np.float64)
for i in range(res.shape[0]):
@theXYZT
theXYZT / mapgen.py
Created April 4, 2025 10:29
FPO Mesh Gen
from pathlib import Path
import numpy as np
import numba as nb
import scipy
import pickle
import matplotlib.pyplot as plt
from matplotlib.collections import PatchCollection
from collections import Counter
@theXYZT
theXYZT / metric.ipynb
Created April 26, 2025 10:09
A metric for a world that is "bigger on the inside"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@theXYZT
theXYZT / camera.gd
Created May 9, 2025 14:04
Pan/Zoom Camera2D Script (Godot 4.4)
extends Camera2D
const MIN_ZOOM: float = 1.0
const MAX_ZOOM: float = 16.0
const PAN_SPEED: float = 2000
const ZOOM_SPEED: float = 1.1
const ZOOM_INTERVAL: float = 0.1
var zoom_tween: Tween