Skip to content

Instantly share code, notes, and snippets.

View patel-zeel's full-sized avatar
Life is On

Zeel B Patel patel-zeel

Life is On
View GitHub Profile
@patel-zeel
patel-zeel / system-wide-anaconda.md
Created April 27, 2025 11:33
Instructions to set up system-wide anaconda installation

System-wide Miniconda Installation and Cache Directory Setup

This guide walks you through the steps to install Miniconda system-wide, configure permissions for shared environments, and set up the cache directory with appropriate ACL and sticky bit permissions.

Step 1: Install Miniconda System-Wide

  1. Download Miniconda: Download the appropriate Miniconda installer for your platform from the Miniconda website.

  2. Install Miniconda:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@patel-zeel
patel-zeel / query.kml
Last active November 4, 2024 05:53
KML example
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Query.kml</name>
<Style id="inline">
<LineStyle>
<color>ff0000ff</color>
<width>2</width>
</LineStyle>
</Style>
@patel-zeel
patel-zeel / test_readme.py
Created August 24, 2024 20:52
Test README code snippets
import re
def test_readme():
"""Test the code snippets in the README."""
# Read the README file
with open("README.md", "r") as f:
readme = f.read()
# Get the code snippets
@patel-zeel
patel-zeel / jaxtyping.py
Created June 15, 2024 17:29
Type and shape safe code with `beartype` and `jaxtyping`
from beartype import beartype
from jaxtyping import Float, jaxtyped
@jaxtyped(typechecker=beartype)
def perceptron(x: Float[Tensor, "n d"],
w: Float[Tensor, "d 1"],
b: Float[Tensor, "1"]) -> Float[Tensor, "n 1"]:
out = x @ w + b
return out
@patel-zeel
patel-zeel / ssl.ipynb
Created January 26, 2024 06:42
Jigsaw SSL
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@patel-zeel
patel-zeel / siren.py
Last active July 20, 2023 07:50
SIREN Model in PyTorch, JAX and Keras
##########################################
## PyTorch
##########################################
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
@patel-zeel
patel-zeel / gp_gen.md
Created February 7, 2023 03:26
Generate Smooth Data
import jax.random as jr
import jax.numpy as jnp

from tinygp import GaussianProcess, kernels
import matplotlib.pyplot as plt

seed = jr.PRNGKey(12)

X = jnp.linspace(-5, 5, 100).reshape(-1, 1)
@patel-zeel
patel-zeel / matrix_algebra.md
Last active November 8, 2022 08:12
Math matrix tricks that come handy
  • $\boldsymbol{a}^T I\boldsymbol{a} = \boldsymbol{a}^T\boldsymbol{a}$

  • $(ABCD...)^{-1} = ...D^{-1}C^{-1}B^{-1}A^{-1}$