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
open System | |
open Microsoft.AspNetCore.Builder | |
open Microsoft.AspNetCore.SignalR | |
open Microsoft.Extensions.DependencyInjection | |
open Microsoft.Extensions.Hosting | |
type ChatHub() = | |
inherit Hub() | |
member this.SendMessage(user : string, message : string) = |
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 XPlot.Plotly.Bolero | |
open System.Text.RegularExpressions | |
open Bolero.Html | |
open XPlot.Plotly | |
[<AutoOpen>] | |
module BoleroHelper = | |
let plotToNode (chart: PlotlyChart) = |
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 bs4 import BeautifulSoup | |
import markdown2 | |
def markdown_to_text(markdown_string): | |
""" Converts a markdown string to plaintext """ | |
# md -> html -> text since BeautifulSoup can extract text cleanly | |
html = markdown2.markdown(markdown_string, extras=["fenced-code-blocks", "spoiler", "tables", "task_list"]) | |
# remove code snippets |