Skip to content

Instantly share code, notes, and snippets.

View praateekmahajan's full-sized avatar

Praateek Mahajan praateekmahajan

  • NVIDIA
  • San Francisco, California
View GitHub Profile
@praateekmahajan
praateekmahajan / moving_mnist.py
Last active December 10, 2021 13:47 — forked from tencia/moving_mnist.py
Generate Moving MNIST dataset and save it as npz or jpeg. Commented and Python 3 Version of : https://gist.github.com/tencia/afb129122a64bde3bd0c
import math
import os
import sys
import numpy as np
from PIL import Image
###########################################################################################
# script to generate moving mnist video dataset (frame by frame) as described in
@praateekmahajan
praateekmahajan / padding_slow.ipynb
Last active December 16, 2020 05:05
Pack padded sequence is slower than unpacked sequence
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@praateekmahajan
praateekmahajan / schema_mismatch_dd_read.ipynb
Last active December 13, 2024 07:30
Dask DataFrame read behavior when schema / metadata (column order) across files doesn't match (for pandas / cudf)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@praateekmahajan
praateekmahajan / gpu_monitor.py
Last active May 8, 2025 23:03
Python GPU Monitor (using gpustat + context)
"""
You need gpustat for this to work.
Optionally install pandas / seaborn / matplotlib if you want plotting features.
```python
from gpu_monitor import GPUUtilizationManager
gpu_monitor = GPUUtilizationManager(gpu_ids=[0,1], interval=0.1)
with gpu_monitor.monitor():
@praateekmahajan
praateekmahajan / embeddinggemma-300m-bug.ipynb
Last active October 9, 2025 23:02
google/embeddinggemma-300m Embedding is different depending on batch contents (when sequence lengths are different) https://huggingface.co/google/embeddinggemma-300m/discussions/28
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@praateekmahajan
praateekmahajan / deepseek-ocr-vllm.ipynb
Created October 23, 2025 00:50
Using `deepseek-ai/DeepSeek-OCR` with vLLM
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.