This file contains 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
use std::collections::HashSet; | |
#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)] | |
enum HandType { | |
HighCard, | |
OnePair, | |
TwoPair, | |
ThreeOfAKind, | |
FullHouse, | |
FourOfAKind, |
This file contains 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
fn main() { | |
// test input | |
let times = [7u64, 15u64, 30u64]; | |
let distances = [9u64, 40u64, 200u64]; | |
for time_held in 1..6 { | |
let time_left = 7 - time_held; | |
let distace_travelled = time_held * time_left; | |
if distace_travelled > 9 { | |
} |
This file contains 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
// | |
// Advent of Code 2023 - Day 5: If You Give A Seed A Fertilizer | |
// | |
use std::ops::Range; | |
use std::cmp::min; | |
fn main() { | |
// replace CR LF with LF, to run nicely on windows also, | |
let input = include_str!("input.txt").replace("\r\n", "\n"); |
This file contains 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<configuration> | |
<atom type="CommandHelp"> | |
<hash type="Item" key="py.delete.vmap@en_US"> | |
<atom type="UserName">Delete Vertex Map</atom> | |
<hash type="Channel" key="name"> | |
<atom type="UserName">Name</atom> | |
</hash> | |
<hash type="Channel" key="type"> | |
<atom type="UserName">Type</atom> |
This file contains 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
#include "HAL/IConsoleManager.h" | |
#if !UE_BUILD_SHIPPING | |
static FAutoConsoleCommand HelloWorld( | |
TEXT("hello.world"), | |
TEXT("Print Hello, World! to the console log"), | |
FConsoleCommandDelegate::CreateLambda([](){ | |
GLog->Log(TEXT("Hello, World!")); | |
}) | |
); |
This file contains 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 unreal | |
if __name__ == "__main__": | |
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry() | |
static_class = unreal.StaticMesh.static_class() | |
package = static_class.get_package() | |
top_level_asset = unreal.TopLevelAssetPath(package.get_name(), static_class.get_name()) | |
static_meshes = asset_registry.get_assets_by_class(top_level_asset) | |
This file contains 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
""" | |
Manual implementation of the SDK chanmod double | |
""" | |
import lx | |
import lxifc | |
This file contains 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
""" | |
Command to print the component under the mouse using lx api in Foundry Modo | |
To try it out, map the command to a hotkey and execute while mouse is over corresponding component. | |
py.mouse.component type:{vert|edge|poly} | |
You will likely want to use the already existing method |
This file contains 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 lx | |
def get_command(name: str) -> lx.object.Command: | |
""" Spawn and return the command of given name """ | |
cmd_svc = lx.service.Command() | |
try: | |
tag = cmd_svc.Lookup(name) | |
return cmd_svc.Spawn(tag, name) | |
except RuntimeError as e: |
NewerOlder