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 @"..\packages\Accord.2.8.1.0\lib\Accord.dll" | |
#r @"..\packages\Accord.Math.2.8.1.0\lib\Accord.Math.dll" | |
#r @"..\packages\Accord.Statistics.2.8.1.0\lib\Accord.Statistics.dll" | |
#r @"..\packages\Accord.MachineLearning.2.8.1.0\lib\Accord.MachineLearning.dll" | |
open System | |
open System.IO | |
open Accord.MachineLearning | |
open Accord.MachineLearning.VectorMachines |
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 Org.BouncyCastle.Crypto; | |
using Org.BouncyCastle.Crypto.Parameters; | |
using Org.BouncyCastle.OpenSsl; | |
using Org.BouncyCastle.Security; | |
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
namespace MyProject.Data.Encryption | |
{ |
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
USE [HobbyDB] | |
GO | |
/****** Object: Table [dbo].[AspNetRoleClaims] Script Date: 6/4/2018 10:18:03 PM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AspNetRoleClaims]') AND type in (N'U')) | |
BEGIN | |
CREATE TABLE [dbo].[AspNetRoleClaims]( |
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 ChironB.Benchmarks | |
open Chiron | |
open BenchmarkDotNet.Attributes | |
open Newtonsoft.Json | |
open Newtonsoft.Json.Linq | |
module Bench = | |
open System.IO | |
open System.Text |
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 __future__ import print_function | |
from IPython.core.magic import register_cell_magic | |
import subprocess as sp | |
import tempfile | |
import os | |
IRON_PYTHON_PATH = r'C:\HOMEWARE\IronPython-2.7.5\ipy64.exe' | |
@register_cell_magic | |
def iron(line, cell): |
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
console.table((function listAllEventListeners() { | |
const allElements = Array.prototype.slice.call(document.querySelectorAll('*')); | |
allElements.push(document); // we also want document events | |
const types = []; | |
for (let ev in window) { | |
if (/^on/.test(ev)) types[types.length] = ev; | |
} | |
let elements = []; | |
for (let i = 0; i < allElements.length; i++) { |
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
const listeners = (function listAllEventListeners() { | |
let elements = []; | |
const allElements = document.querySelectorAll('*'); | |
const types = []; | |
for (let ev in window) { | |
if (/^on/.test(ev)) types[types.length] = ev; | |
} | |
for (let i = 0; i < allElements.length; i++) { | |
const currentElement = allElements[i]; |
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
// This is a conversion to F# of the C# code presented in | |
// MSDN Magazine, March 2015, by James McCaffrey: | |
// https://msdn.microsoft.com/en-us/magazine/dn913188.aspx | |
open System | |
let sumprod (v1:float[]) (v2:float[]) = | |
Seq.zip v1 v2 |> Seq.sumBy (fun (x,y) -> x * y) | |
let sigmoid z = 1.0 / (1.0 + exp (- z)) |
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 |
NewerOlder