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
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
<?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
""" | |
Functions for editing the texel density | |
https://80.lv/articles/textel-density-tutorial/ | |
""" | |
import math | |
import maya.cmds as mc |
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_ifc(obj): | |
""" From a given object in lx sdk, find supported interfaces""" | |
supported_interfaces = [] | |
for name, ifc in lx.object.__dict__.items(): | |
try: | |
if isinstance(ifc, type): | |
o = ifc(obj) | |
supported_interfaces.append(ifc) |
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) | |
NewerOlder