Skip to content

Instantly share code, notes, and snippets.

View OrangeChannel's full-sized avatar
✌️

Dave OrangeChannel

✌️
View GitHub Profile
@OrangeChannel
OrangeChannel / battlesort.py
Created February 26, 2024 00:54
battlesort
import math
from random import random
from abc import ABC
__all__ = [
'Thing', 'battle'
]
class Thing(ABC):
# region --- Imports ---------------------------------------------------------------------------------------------------
from sympy import * # symbolical algebra library
from numbers import Real
import math
from fractions import Fraction
from functools import wraps
from typing import Any, TypeVar, Callable, Optional, Final, TypeAlias
from enum import Enum, auto
"""
Duct sizing functions based on ASHRAE with extentions for Darcy/Colebrook formulas from Niazkar.
"""
# fmt: off
from datetime import date
__author__ = 'David Stein <dstein@ventrop.com>'
__date__ = date.fromisoformat('2022-11-09')
__company__ = 'Ventrop ECG, PLLC'
# __all__ = ["find_hydraulic_diameter", "find_second_dimension", "get_all_possible_dims", "minimum_ventilation_rates", "run"]
"""
Duct sizing functions based on ASHRAE with extentions for Darcy/Colebrook formulas from Niazkar.
"""
# fmt: off
from datetime import date
__author__ = 'David Stein <dstein@ventrop.com>'
__date__ = date.fromisoformat('2022-11-09')
__company__ = 'Ventrop ECG, PLLC'
__all__ = ["find_hydraulic_diameter", "find_second_dimension", "get_all_possible_dims", "minimum_ventilation_rates", "run"]
"""
Duct sizing functions based on ASHRAE with extentions for Darcy/Colebrook formulas from Niazkar.
"""
# fmt: off
from datetime import date
__author__ = 'David Stein <dstein@ventrop.com>'
__date__ = date.fromisoformat('2022-11-07')
__company__ = 'Ventrop ECG, PLLC'
__all__ = ["find_hydraulic_diameter", "find_second_dimension", "get_all_possible_dims", "minimum_ventilation_rates", "run"]
local sense=-20
local speed = mp.get_property("speed")
local detect = false
function f(msg)
if string.find(msg.text, "silence_end") and detect then
mp.set_property("speed",speed)
endmsg=msg.text
detect = false
--print("end")
elseif string.find(msg.text, "silence_start") and detect==false then
@OrangeChannel
OrangeChannel / fractions_ext.py
Created November 8, 2020 23:52
Function that extends the standard library Fraction constructor behavior to accept non-rational values.
import math
import fractions
import numbers
def Frac(
numerator: numbers.Real,
denominator: numbers.Real = 1,
frac_acc: int = 100,
places: int = 9,
@OrangeChannel
OrangeChannel / ipython_config.py
Last active October 23, 2020 18:50
IPython setup for vs shit and engineering
c.InteractiveShell.banner2 = '"math", "Fraction", "Decimal", "vs", and "core" added to dir.\nRich formatting has been activated for `print` and repr.\ndtrig functions added to math module.\nSI base units have been added to dir.\nPint\'s `ureg` and `Q_` constructor added to dir.'
c.TerminalInteractiveShell.confirm_exit = False
c.InteractiveShellApp.extensions.append("yuuno")
c.InteractiveShellApp.exec_lines = [
'import math',
'import vapoursynth as vs',
'core = vs.core',
@OrangeChannel
OrangeChannel / ref_none_blanktrack_own_noneattach_own_bothattach.log
Created August 15, 2020 21:20
Unexpectedly works, loads attachments from segment B into segment A
[ 0.003][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
[ 0.003][v][cplayer] built on UNKNOWN
[ 0.003][v][cplayer] ffmpeg library versions:
[ 0.003][v][cplayer] libavutil 56.31.100
[ 0.003][v][cplayer] libavcodec 58.54.100
[ 0.003][v][cplayer] libavformat 58.29.100
[ 0.003][v][cplayer] libswscale 5.5.100
[ 0.003][v][cplayer] libavfilter 7.57.100
[ 0.003][v][cplayer] libswresample 3.5.100
[ 0.003][v][cplayer] ffmpeg version: n4.2.4
@OrangeChannel
OrangeChannel / ref_both_blanktrack_own_noneattach_own_noneattach.log
Created August 15, 2020 20:37
Works perfectly, but not sure this is how it should work, this is probably good behavior though. All fonts get loaded from host file as none of the external segments have attachments.
[ 0.003][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
[ 0.003][v][cplayer] built on UNKNOWN
[ 0.003][v][cplayer] ffmpeg library versions:
[ 0.003][v][cplayer] libavutil 56.31.100
[ 0.003][v][cplayer] libavcodec 58.54.100
[ 0.003][v][cplayer] libavformat 58.29.100
[ 0.003][v][cplayer] libswscale 5.5.100
[ 0.003][v][cplayer] libavfilter 7.57.100
[ 0.003][v][cplayer] libswresample 3.5.100
[ 0.003][v][cplayer] ffmpeg version: n4.2.4