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
// wrapper function over TestKit.ActorOfAsTestActorRef | |
let spawnAsTestRef (tck:Tck) (props: Props<'T>) : IActorRef<'T> = | |
typed (tck.ActorOfAsTestActorRef<FunActor<'T>>(props.ToProps(), tck.TestActor) :> IActorRef) | |
[<Fact>] | |
let ``Parent should create child`` () = testDefault <| fun tck -> | |
// child actor definition | |
let child (ctx: Actor<_>) msg = ctx.Sender() <! "hello" |> ignored | |
// parent actor defintion | |
let rec parent (ctx: Actor<_>) = |
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.Generic; | |
using System.Linq; | |
using System.Text; | |
using NLog; | |
using NLog.Common; | |
using NLog.Targets; | |
using NLog.Config; | |
namespace ConsoleApplication1 |
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
1. Yaml configuration section | |
<?xml version="1.0" encoding="utf-8"?> | |
<akka.persistence> | |
<hocon> | |
<![CDATA[ | |
akka { | |
persistence{ | |
query.journal.sql { | |
max-buffer-size = 10000 |
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
import pytds | |
import pandas as pd | |
import credentials as cred | |
conn = pytds.connect(dsn=cred.newserver, database=cred.newdb, user=cred.user, password=cred.passwd) | |
pid = '716cfb8f' | |
begin = '2020-04-15' |
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
import functools | |
def force_async(fn): | |
''' | |
turns a sync function to async function using threads | |
''' | |
from concurrent.futures import ThreadPoolExecutor | |
import asyncio | |
pool = ThreadPoolExecutor() |
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
#if INTERACTIVE | |
#r "nuget: Akka.Cluster" | |
#r "nuget: Akka.Cluster.Sharding" | |
#r "nuget: Akka.FSharp" | |
#r "nuget: Hyperion" | |
#r "nuget: Akka.Serialization.Hyperion" | |
#else | |
module akkaTest | |
#endif |
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
module SelfHostedServer = | |
open global.Owin | |
open System.Net | |
open Suave | |
open Suave.Types | |
open Suave.Http.Successful | |
open Suave.Web | |
open Suave.Owin | |
open WebSharper.Owin |
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.Generic; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Threading; | |
public class WebSocketServer | |
{ | |
public readonly List<WebSocketSession> Clients = new List<WebSocketSession>(); |
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 bookman | |
open WebSharper | |
open WebSharper.Sitelets | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Server | |
type EndPoint = | |
| [<EndPoint "/">] Home | |
| [<EndPoint "/about">] About |
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 bookman | |
open WebSharper | |
open WebSharper.Sitelets | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Server | |
type EndPoint = | |
| [<EndPoint "/">] Home | |
| [<EndPoint "/about">] About |