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
| // ----------------------------------------------------------------------- | |
| // Copyright (C) 2017 Adam Hancock | |
| // | |
| // Viewer.cs can not be copied and/or distributed without the express | |
| // permission of Adam Hancock | |
| // ----------------------------------------------------------------------- | |
| namespace Controls | |
| { | |
| using System; |
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
| public class MonotoneCubicSpline | |
| { | |
| private readonly double[] _x; | |
| private readonly double[] _y; | |
| private readonly int _n; | |
| private readonly double[] _m; | |
| public MonotoneCubicSpline(IList<Point> points) | |
| { | |
| _x = points.OrderBy(p => p.X).Select(p => p.X).ToArray(); |
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
| public abstract class Disposable : IDisposable | |
| { | |
| private bool _disposed; | |
| public void Dispose() | |
| { | |
| if (_disposed) | |
| { | |
| return; |
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
| public class FluentValidator : ComponentBase | |
| { | |
| private readonly IDictionary<Type, IValidator> _validators = | |
| new Dictionary<Type, IValidator>(); | |
| [CascadingParameter] | |
| public EditContext EditContext { get; set; } | |
| [Inject] |
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
| public interface ISocket : IDisposable | |
| { | |
| event Action<Exception> OnError; | |
| event Action<dynamic> OnData; | |
| event Action OnDisconnected; | |
| event Action OnConnected; |
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 System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| public interface ISeries | |
| { | |
| void Attach(ISeries series); |
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
| public class ClassifierSettings | |
| { | |
| public int WindowSize { get; set; } = 250; | |
| public int Estimators { get; set; } = 25; | |
| public int MaxDepth { get; set; } = 15; | |
| public int Features { get; set; } = 0; |
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 System; | |
| using System.Collections.Concurrent; | |
| using System.Reactive; | |
| using System.Reactive.Concurrency; | |
| using System.Reactive.Linq; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| public class RateLimiter | |
| { |
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
| MIT License | |
| Copyright (c) 2022 Adam Hancock | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
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 __future__ import annotations | |
| from typing import Callable, Generic, Protocol, TypeVar | |
| from typing import overload | |
| from typing import get_type_hints, get_args, get_origin | |
| T = TypeVar("T") | |
| class IServiceProvider(Protocol): |
OlderNewer