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
################################################################################ | |
## stravant's Godot plugin auto-reloader ## | |
## For ease of plugin development ## | |
## MIT licensed ## | |
## ## | |
## Call preload("./reloader.gd").new() in your EditorPlugin component's ## | |
## _enter_tree method to enable automatic reloading whenever you save changes ## | |
## to any of the plugin files for a tighter plugin rapid prototyping loop. ## | |
## ## | |
## Source: https://gist.github.com/stravant/7aec484bb5e34e3a6196faaa13159ac3 ## |
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
''' | |
https://gist.github.com/kohya-ss/3f774da220df102548093a7abc8538ed | |
1. put this file in ComfyUI/custom_nodes | |
2. load node from <loaders> | |
''' | |
import torch | |
from comfy.ldm.modules.diffusionmodules.openaimodel import forward_timestep_embed, timestep_embedding, th | |
def apply_control(h, control, name): |
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 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
#!/bin/bash | |
### usage ./convert.sh game | |
## where game is baseName of the export | |
if [ ! "$1" ]; then | |
read -p 'Game name: ' game | |
else | |
game="$1" | |
fi |
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
using System; | |
using UnityEngine; | |
[Serializable] | |
public struct MinMax | |
{ | |
[SerializeField] | |
private float min; | |
[SerializeField] |
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
/// | |
/// Simple pooling for Unity. | |
/// Author: Martin "quill18" Glaude (quill18@quill18.com) | |
/// Extended: Simon "Draugor" Wagner (https://www.twitter.com/Draugor_/) | |
/// Latest Version: https://gist.github.com/Draugor/00f2a47e5f649945fe4466dea7697024 | |
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
/// UPDATES: | |
/// 2020-07-09: - Fixed a Bug with already inactive members getting Despawned again. thx AndySum (see: https://gist.github.com/Draugor/00f2a47e5f649945fe4466dea7697024#gistcomment-2642441) | |
/// 2020-06-30: - made the "parent" parameter avaible in the public API to spawn GameObjects as children | |
/// 2018-01-04: - Added Extension Method for Despawn on GameObjects |
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
private static string[] _persistentDataPaths; | |
public static bool IsDirectoryWritable(string path) { | |
try { | |
if (!Directory.Exists(path)) return false; | |
string file = Path.Combine(path, Path.GetRandomFileName()); | |
using (FileStream fs = File.Create(file, 1)) {} | |
File.Delete(file); | |
return true; | |
} catch { |
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
A collection of useful C# extension methods for the Unity engine. |
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
{% macro render_field(field) -%} | |
{% set with_label = kwargs.pop('with_label', False) %} | |
{% set placeholder = '' %} | |
{% if not with_label %} | |
{% set placeholder = field.label.text %} | |
{% endif %} | |
<div class="form-group {% if field.errors %}error{% endif %}"> | |
{% if with_label %} | |
<label for="{{ field.id }}" class="control-label"> | |
{{ field.label.text }}{% if field.flags.required %} *{% endif %}: |
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
class Ladder(object): | |
def __init__(self): | |
self.hight = 20 | |
class Table(object): | |
def __init__(self): | |
self.legs = 4 | |
my_factory = { | |
"target1": Ladder, |
NewerOlder