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
#!/bin/bash | |
# Copyright Matthew Bruenig <matthewbruenig@gmail.com> | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
#!/bin/bash | |
# Copyright Matthew Bruenig <matthewbruenig@gmail.com> | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
Function Send-Syslog { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true)] [string]$ServerName, | |
[Parameter(Mandatory=$false)] [string]$Severity = '1', | |
[Parameter(Mandatory=$false)] [string]$Facility = '22', | |
[Parameter(Mandatory=$false)] [string]$HostName = $env:COMPUTERNAME, | |
[Parameter(Mandatory=$false, ValueFromPipeline=$true)][string]$Message = 'From Powershell' | |
) | |
$Priority = ([int]$Facility * 8) + [int]$Severity |
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
{-# OPTIONS --universe-polymorphism #-} | |
module mybool where | |
-- http://www.cse.chalmers.se/~ulfn/code/tphols09/ ⟵ ../tphols09/ | |
-------------------------------------------------------------------------------- | |
-- data types | |
-------------------------------------------------------------------------------- | |
data 𝔹 : Set where |
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
+/(#~-.@(2&|)){."1@(]`(({:,+/)@])@.(>{:)^:(<_))&1 2 (4e6) |
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
#time | |
(fun _ -> | |
let initial = | |
[for x = 0 to 100 do | |
for y = 0 to 100 do | |
if (1 < x) && (x < y) && ((x + y) < 100) then | |
yield (x,y)] | |
List.iter (fun _ -> ()) initial | |
)() |
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
#time | |
(fun _ -> | |
let initial = | |
seq { for x = 0 to 100 do | |
for y = 0 to 100 do | |
if (1 < x) && (x < y) && ((x + y) < 100) then | |
yield (x,y) } | |
Seq.iter (fun _ -> ()) initial | |
)() |
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
// Learn more about F# at http://fsharp.net | |
namespace BasicConcepts | |
module Algorithms = | |
let ``1.1E`` (m : uint32) (n : uint32) = | |
let rec aux m n l = | |
let r = m % n | |
if r <> 0u then aux n r (r :: l) else l | |
aux m n [] |> Seq.head |
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
| |
(* original sample data.. search/replaced symbols from python | |
dictionary of dictionaries *) | |
let criticsList = [ | |
"Lisa Rose", [ | |
"Lady in the Water", 2.5; "Snakes on a Plane", 3.5; | |
"Just My Luck", 3.0; "Superman Returns", 3.5; | |
"You; Me and Dupree", 2.5; "The Night Listener", 3.0 | |
]; | |
"Gene Seymour", [ |
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 @"E:\Assemblies\OpenTK\OpenTK.dll" | |
open System | |
open System.Drawing | |
open System.Collections.Generic | |
open OpenTK | |
open OpenTK.Graphics | |
open OpenTK.Graphics.OpenGL |
NewerOlder