This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
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.
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.
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.
NewerOlder