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
// #r "nuget: TiraxTech.Uri" | |
open System | |
open System.Net | |
open System.Net.Http | |
open System.Text.Json | |
open Microsoft.Extensions.Primitives | |
open RZ.Foundation.Json | |
open TiraxTech |
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
open System | |
open PostBot | |
open FSharp.UMX | |
let [<Literal>] ChromeFolder = @"C:\Users\user-name\AppData\Local\Google\Chrome\User Data" | |
Scraper.killChrome() | |
let driver = Scraper.startBrowser { Scraper.StartBrowserOptions.Default with ChromeFolder = ValueSome ChromeFolder } |
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.Collections.Frozen; | |
using System.Runtime.CompilerServices; | |
using System.Text.Json; | |
using System.Text.Json.Nodes; | |
using Akka.Actor; | |
using Akka.DependencyInjection; | |
using Akka.IO; | |
using Microsoft.Extensions.Logging; | |
using TCRB.CoreApp; |
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
[<AutoOpen>] | |
module RunHelpers | |
#r "nuget: FSharp.Control.Reactive" | |
open System | |
open System.Diagnostics | |
open System.IO | |
open System.Threading | |
open FSharp.Control.Reactive |
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 LanguageExt; | |
using static LanguageExt.Prelude; | |
public static class Program { | |
public static void Main (string[] args) { | |
var program = | |
from v1 in Load | |
from _1 in eff(() => Console.WriteLine($"1st value = {v1}")) | |
from v2 in Load |
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
#r "nuget:Akka.Remote" | |
open System | |
open Akka.Actor | |
open Akka.Configuration | |
type Pinger() = | |
inherit UntypedActor() | |
let Context = ActorBase.Context |
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.Collections.Concurrent; | |
using Microsoft.Extensions.Logging; | |
namespace RZ.Foundation; | |
/// <summary> | |
/// A mailbox processor that allows some concurrent dispatching. | |
/// </summary> | |
/// <param name="logger">Microsoft Logger</param> | |
/// <param name="concurrentLimit">Maximum number of concurrent threads allowed to process the mailbox</param> |
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 MongoDB.Bson; | |
using MongoDB.Bson.Serialization; | |
using MongoDB.Bson.Serialization.Conventions; | |
using MongoDB.Bson.Serialization.Serializers; | |
using LanguageExt; | |
public class SeqSerializationProvider : IBsonSerializationProvider | |
{ | |
public IBsonSerializer? GetSerializer(Type type) | |
{ |
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
#nowarn "760" | |
#r "nuget:Confluent.Kafka" | |
open System | |
open System.Diagnostics | |
open System.Threading | |
open Confluent.Kafka | |
[<Literal>] | |
let Topic = "test-topic" |
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
// From: https://angrydexterous.github.io/typeclassish.html | |
type Num<'A> = | |
abstract member Add: 'A -> 'A -> 'A | |
abstract member Subtract: 'A -> 'A -> 'A | |
[<Struct; NoComparison; NoEquality>] | |
type TInt = | |
interface Num<int> with | |
member my.Add x y = x + y |
NewerOlder