Skip to content

Instantly share code, notes, and snippets.

@Sushant-Padha
Sushant-Padha / gcc_vs_binexpr_test.jl
Last active January 3, 2022 15:21
Julia: JuMP constraint to only use a value `n` times
using JuMP
using ConstraintSolver
using Random: shuffle
const CS = ConstraintSolver
function my_global_cardinality_count(model, a, gcc)
for (i, count) in enumerate(gcc)
# my_count_ctr(model, x, val, s)
my_count_ctr(model, a, i, count)
end
@Sushant-Padha
Sushant-Padha / sodium-mixins.properties
Last active August 21, 2023 16:04
config for sodium reforged with all the mixin options stated with default values
# This is the configuration file for Sodium with all the default values
#
# You can find information on editing this file and all the available options here:
# https://github.com/spoorn/sodium-forge/blob/a75b718bd86ca6b70538afbcd070d598d808ef36/src/main/java/me/jellysquid/mods/sodium/common/config/SodiumConfig.java#L25
#
### OPTIONS START HERE (certain options will have a descriptive comment above them)
# enables Lithium (conflicts with mods like More Villagers)
# set to true in source code, but overriden and set to false by default in config because of its conflicts
@Sushant-Padha
Sushant-Padha / sodium-mixins.properties
Last active July 21, 2021 06:10
config for Sodium Reforged mod to make it compatible with MCMT (21/7/2021)
# This is the configuration file for Sodium.
#
# You can find information on editing this file and all the available options here:
# https://github.com/spoorn/sodium-forge/blob/a75b718bd86ca6b70538afbcd070d598d808ef36/src/main/java/me/jellysquid/mods/sodium/common/config/SodiumConfig.java#L25
#
# Comment out or remove the below line to enable Lithium (conflicts with some mods such as More Villagers)
mixin.ai=false
### ENABLE MCMT SUPPORT
# As of now, first problem is at world creating/opening stage (world never opens up)
@Sushant-Padha
Sushant-Padha / jmt_mcmt-common.toml
Last active July 21, 2021 06:10
config for MCMT mod to make it compatible with sodium reforged (21/7/2021)
[general]
#Globally disable all toggleable functionality
disabled = false
[general.parallelism]
#Other modes for paraMax
#Override: Standard but without the CoreCount Ceiling (So you can have 64k threads if you want)
#Reduction: Parallelism becomes Math.max(CoreCount-paramax, 2), if paramax is set to be -1, it's treated as 0
#Todo: add more
#Allowed Values: Standard, Override, Reduction