Skip to content

Instantly share code, notes, and snippets.

@cloneofsimo
cloneofsimo / vis.py
Created December 5, 2024 00:57
twodimropevis
import torch
class TwoDimRotary(torch.nn.Module):
def __init__(self, dim, base=100, h = 128, w = 128):
super().__init__()
self.inv_freq = 1.0 / (base ** (torch.arange(0, dim, 2).float() / (dim)))
self.h = h
self.w = w
@yashkant
yashkant / epipolar_mask.py
Created January 11, 2024 16:56
Code snippet to create epipolar masks for the work — SPAD: Spatially Aware Multiview Diffusers
import numpy as np
import torch
import time
import imageio
import cv2
from tqdm import tqdm
import torch.nn.functional as Fu
from pytorch3d.implicitron.tools.point_cloud_utils import get_rgbd_point_cloud
from pytorch3d.renderer import (AlphaCompositor, MultinomialRaysampler,
NDCMultinomialRaysampler,
@yashkant
yashkant / splat.py
Last active August 9, 2024 16:24
Code snippet to create partial views for the work — iNVS : Repurposing Diffusion Inpainters for Novel View Synthesis, SIGGRAPH 2023
import numpy as np
import torch
import time
import imageio
import cv2
from tqdm import tqdm
import torch.nn.functional as Fu
from pytorch3d.implicitron.tools.point_cloud_utils import get_rgbd_point_cloud
from pytorch3d.renderer import (AlphaCompositor, MultinomialRaysampler,
NDCMultinomialRaysampler,
@sekstini
sekstini / Residual_FSQ_Example.ipynb
Last active April 23, 2024 07:41
Residual FSQ MNIST Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MatrixManAtYrService
MatrixManAtYrService / Dockerfile
Last active March 4, 2025 15:34
tini vs dumb init
FROM ubuntu
RUN apt update
RUN apt install -y tini dumb-init python3-pip
RUN pip install apache-airflow
# place the entrypoint script
COPY entrypoint.sh /entrypoint
RUN chmod +x /entrypoint
# a script that calls airflow (and does test-relevant things too)
@Onurtag
Onurtag / ExploreEverything.ahk
Last active March 27, 2025 19:50
ExploreEverything.ahk: An autohotkey (ahk v1) script that allows you to search the current explorer folder, your desktop and more using Everything
#SingleInstance Force
#NoTrayIcon ;If you want the tray icon to be visible; comment this line by adding a semicolon ; in front of the #. Example: ;#NoTrayIcon
; ALTERNATIVE METHOD: Try the built-in Everything option "hotkey_explorer_path_search"
; ^^^INFO: https://www.voidtools.com/forum/viewtopic.php?p=17390#p17390
EverythingPath := "C:\Program Files\Everything\Everything.exe" ;Set this to your everything.exe path. Keep the quotes.
;---Optional setup for special folders---
MyRecycleBin := "Recycle Bin" ;If your OS is not English, go to your explorer's "Recycle Bin" (🚮) folder and change this to the title of that window. Keep the quotes.