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
| #r "nuget: ModelContextProtocol,0.4.0-preview.1" | |
| open ModelContextProtocol.Client | |
| open ModelContextProtocol.Protocol | |
| open System | |
| open System.Threading.Tasks | |
| module McpClient = | |
| let clientTransport = | |
| StdioClientTransport( | |
| StdioClientTransportOptions( |
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
| /// Written with “powerful” inspiration from the https://pub.dev/packages/email_validator. | |
| /// An abstract strategy for validating objects of type [T]. | |
| /// | |
| /// Implementations of this class define specific validation rules | |
| /// for a given type, allowing flexible and reusable validation logic. | |
| abstract class ValidationStrategy<T, E extends Exception> { | |
| /// Validates the given [value] of type [T]. | |
| /// | |
| /// If the validation fails, an exception of type [E] is thrown. |
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.Buffers; | |
| using System.Net.WebSockets; | |
| var builder = WebApplication.CreateBuilder(args); | |
| var app = builder.Build(); | |
| app.MapGet("/ws", async (HttpContext context) => | |
| { | |
| const int MaxMessageSize = 1024 * 1024; |
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
| namespace HttpClient.FSharp | |
| open System | |
| open System.Net.Http | |
| type HttpMethod = | |
| | Post | |
| | Put | |
| | Delete | |
| | Get |
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
| [StructLayout(LayoutKind.Sequential, Size = 256)] | |
| public unsafe struct Bitset | |
| { | |
| public void Set(int bitIndex) => ((int*) Unsafe.AsPointer(ref Unsafe.AsRef(this)))[(bitIndex & ~7) >> 5] |= 1 << (bitIndex & 7); | |
| public void Unset(int bitIndex) => ((int*)Unsafe.AsPointer(ref Unsafe.AsRef(this)))[(bitIndex & ~7) >> 5] ^= 1 << (bitIndex & 7); | |
| public void SetAll() => Unsafe.InitBlock(Unsafe.AsPointer(ref Unsafe.AsRef(this)), 0xff, (uint) Unsafe.SizeOf<Bitset>()); | |
| public void UnsetAll() => Unsafe.InitBlock(Unsafe.AsPointer(ref Unsafe.AsRef(this)), 0x00, (uint) Unsafe.SizeOf<Bitset>()); | |
| } |
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
| #r "paket: | |
| nuget Fake.Core.SemVer | |
| nuget Fake.Core.Target | |
| nuget Fake.DotNet.Cli | |
| nuget Fake.Tools.Git //" | |
| #load "./.fake/build.fsx/intellisense.fsx" | |
| open Fake.Core | |
| open Fake.DotNet | |
| open Fake.Tools |
- not in any order, and i know few of these have been fixed, like having conference in separate window
- This first list is for Classic version, New Teams specific are in the gist below (but new Teams has most of the classic bugs still too)
- If you typed message in some chat, then alt tab and go to another chat, that message is still in the chatbox (wrong room)
- if there is many single messages, with link on each, tooltip emoji menu popups and blocks your view to previews item (and you can accidentally click it if tried to click the previous link)
- if paste image to messagebox, messagebox stays very small 2 rows.. so cannot see anything (or wait, it expands after you alt tab away..)
- channel mention doesnt show alerts for people by default
- replies minimize automatically if leave chat open for a while (so context is lost where you left it)
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
| // Given previous tokens, predict the next token (and runners up) | |
| let predictNextToken (previousKinds : SyntaxKind[]) : Prediction[] = | |
| if ios11 then | |
| let model : MLModel = model.Value // Load the cached model | |
| let mutable predictions : Prediction[] = [| |] | |
| // RNNs require external memory | |
| let mutable lstm_1_h : MLMultiArray = null | |
| let mutable lstm_1_c : MLMultiArray = null |
NewerOlder