Skip to content

Instantly share code, notes, and snippets.

View hathibelagal-dev's full-sized avatar
🎯
Focusing

Ashraff Hathibelagal hathibelagal-dev

🎯
Focusing
View GitHub Profile
@hathibelagal-dev
hathibelagal-dev / nqueens_thrml.py
Created November 10, 2025 16:19
Using Extropic's THRML to solve the n-queens puzzle
import jax
import jax.numpy as jnp
import random
import sys
import numpy as np
from thrml.block_management import Block
from thrml.block_sampling import BlockGibbsSpec, sample_states, SamplingSchedule
from thrml.pgm import CategoricalNode
from thrml.factor import AbstractFactor, FactorSamplingProgram
from thrml.interaction import InteractionGroup
@hathibelagal-dev
hathibelagal-dev / 8queens_gibbs.py
Last active November 10, 2025 16:22
This code solves the eight queens puzzle using Gibbs sampling
import random
import math
from typing import List, Optional
def total_conflicts(state: List[int]) -> int:
"""Count total number of attacking pairs (each pair counted once)."""
n = len(state)
conflicts = 0
for i in range(n):
for j in range(i + 1, n):
@hathibelagal-dev
hathibelagal-dev / deepseekocr.ipynb
Last active October 27, 2025 09:44
deepseekocr.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hathibelagal-dev
hathibelagal-dev / comfyui_headless.py
Created September 23, 2025 05:07
A minimal script to get started with using ComfyUI as a library
import sys, os
comfy_path = "/content/ComfyUI"
sys.path.insert(0, comfy_path)
import importlib.util
utils_path = os.path.join(comfy_path, "utils")
spec = importlib.util.spec_from_file_location("utils", os.path.join(utils_path, "__init__.py") if os.path.exists(os.path.join(utils_path, "__init__.py")) else os.devnull)
utils = importlib.util.module_from_spec(spec)
@hathibelagal-dev
hathibelagal-dev / chatterbox.ipynb
Last active May 29, 2025 11:43
ChatterBox.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hathibelagal-dev
hathibelagal-dev / sarvam-m-test.ipynb
Created May 24, 2025 06:47
Sarvam-M-Test.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hathibelagal-dev
hathibelagal-dev / AceStepLora.ipynb
Last active May 20, 2025 23:02
AceStepLora.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hathibelagal-dev
hathibelagal-dev / lipsync.ipynb
Last active September 9, 2025 14:30
LipsyncUpdated.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hathibelagal-dev
hathibelagal-dev / stableaudiosmall.ipynb
Created May 16, 2025 05:04
StableAudioSmall.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hathibelagal-dev
hathibelagal-dev / acestep.ipynb
Last active May 20, 2025 23:07
AceStepLora.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.