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 powerbi.visuals { | |
| export interface ViewModel { | |
| value: number; | |
| color?: string; | |
| min?: number; | |
| max?: number; | |
| } | |
| export class Thermometer implements IVisual { | |
| public static capabilities: VisualCapabilities = { |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <startup> | |
| <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> | |
| </startup> | |
| <appSettings> | |
| <add key="AzureStorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=*****;AccountKey=*****" /> | |
| </appSettings> | |
| <runtime> | |
| <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
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.Collections.Generic | |
| open Microsoft.FSharp.Collections | |
| [<RequireQualifiedAccess>] | |
| module Folds = | |
| // These are the fast implementations we actually want to use |
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 WebSocket | |
| // Appache 2.0 license | |
| // References: | |
| // [1] Proposed WebSockets Spec December 2011 http://tools.ietf.org/html/rfc6455 | |
| // [2] John McCutchan (Google Dart Team Member) http://www.altdevblogaday.com/2012/01/23/writing-your-own-websocket-server/ | |
| // [3] A pretty good Python implemenation by mrrrgn https://github.com/mrrrgn/websocket-data-frame-encoder-decoder/blob/master/frame.py | |
| // [4] WebSockets Organising body http://www.websocket.org/echo.html | |
| // [5] AndrewNewcomb's Gist (starting point) https://gist.github.com/AndrewNewcomb/711664 |
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
| (* | |
| CapabilityBasedSecurity_ConfigExample.fsx | |
| An example of a simple capability-based design. | |
| Related blog post: http://fsharpforfunandprofit.com/posts/capability-based-security/ | |
| *) | |
| /// Configuration system | |
| module Config = |
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
| /** | |
| * Executes a transducer to transform the observable sequence | |
| * @param {Transducer} transducer A transducer to execute | |
| * @returns {Observable} An Observable sequence containing the results from the transducer. | |
| */ | |
| observableProto.transduce = function(transducer) { | |
| var source = this; | |
| function transformForObserver(observer) { | |
| 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
| namespace WebSocket | |
| // Appache 2.0 license | |
| // References: | |
| // [1] Proposed WebSockets Spec December 2011 http://tools.ietf.org/html/rfc6455 | |
| // [2] John McCutchan (Google Dart Team Member) http://www.altdevblogaday.com/2012/01/23/writing-your-own-websocket-server/ | |
| // [3] A pretty good Python implemenation by mrrrgn https://github.com/mrrrgn/websocket-data-frame-encoder-decoder/blob/master/frame.py | |
| // [4] WebSockets Organising body http://www.websocket.org/echo.html | |
| // [5] AndrewNewcomb's Gist (starting point) https://gist.github.com/AndrewNewcomb/711664 |
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 Tsunami.Server | |
| open System | |
| open System.IO | |
| open System.Linq | |
| open System.Net | |
| open System.Net.Sockets | |
| open System.Text | |
| open System.Threading | |
| open System.Runtime.Serialization |
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.Net | |
| open Microsoft.FSharp.Control.WebExtensions | |
| open System.Diagnostics | |
| open System | |
| let fetch name (url:string) = | |
| printfn "fetching %s" name | |
| let uri = new System.Uri(url) | |
| use webClient = new WebClient() | |
| let stopwatch = Stopwatch() |
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
| let trampoline f c n = | |
| let rec loop = function | |
| | Choice1Of2 x -> x | |
| | Choice2Of2 x -> loop (f x) | |
| loop (Choice2Of2 (c,n)) | |
| // Test | |
| let factorial n = | |
| let rec factorialT (current, n) = | |
| if n = bigint 0 then Choice1Of2 current |