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 sympy as sp | |
import random | |
from functools import partial | |
# Define the symbol | |
x = sp.symbols('x') | |
# Rules dictionary mapping rule names to (operation, inverse operation) tuples | |
rules = { | |
'addition': (lambda f, n: f + n, lambda f, n: f - n), |
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
from PIL import Image | |
import os | |
import numpy as np | |
import sys | |
import cv2 | |
def video_to_frames(video_file, output_dir, one_every_n_frames): | |
# Create VideoCapture object | |
vidcap = cv2.VideoCapture(video_file) | |
fps = int(vidcap.get(cv2.CAP_PROP_FPS)) |
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
using UnrealBuildTool; | |
public class Necromonicon : ModuleRules | |
{ | |
public Necromonicon(ReadOnlyTargetRules Target) : base(Target) | |
{ | |
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; | |
CppStandard = CppStandardVersion.Latest; | |
CStandard = CStandardVersion.Latest; |
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
NecroAiTask UNecroAiComponent::MoveToPoint(const FVector Dest, const float AcceptanceRadius = 160.0f) const | |
{ | |
auto NavSys = Cast<UNavigationSystemV1>(GetWorld()->GetNavigationSystem()); | |
check(NavSys); | |
auto NavProps = FNavAgentProperties(ControlledCharacter->GetSimpleCollisionRadius(), 128.f); | |
NavProps.bCanWalk = true; | |
NavProps.bCanFly = false; | |
auto Query = FPathFindingQuery(); | |
Query.NavAgentProperties = NavProps; |
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
#include <coroutine> | |
#include <iostream> | |
#include <utility> | |
#include <vector> | |
#include <list> | |
#include <deque> | |
#include <functional> | |
struct Task { | |
struct promise_type; |
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
#include <coroutine> | |
#include <iostream> | |
#include <utility> | |
#include <vector> | |
#include <list> | |
struct Task { | |
struct promise_type; | |
using TaskHandle = std::coroutine_handle<promise_type>; | |
struct promise_type { |
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
#pragma once | |
#include <coroutine> | |
#include <utility> | |
struct CoroTask | |
{ | |
struct promise_type; | |
using HandleType = std::coroutine_handle<promise_type>; | |
struct promise_type | |
{ |
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 math | |
import os | |
from glob import glob | |
from pathlib import Path | |
from typing import Optional | |
import cv2 | |
import numpy as np | |
import torch | |
from einops import rearrange, repeat |
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
#pragma once | |
#include <coroutine> | |
namespace CoTools | |
{ | |
template<typename T> class TWeakPromise; | |
template<typename T> | |
struct [[nodiscard]] TWeakGenerator | |
{ |
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
#include "AbilitySystem/AbilityTasks/TargetDataUnderMouse.h" | |
#include "AbilitySystemComponent.h" | |
UTargetDataUnderMouse* UTargetDataUnderMouse::CreateTargetDataUnderMouse(UGameplayAbility* OwningAbility) | |
{ |