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
open System | |
open System.IO | |
type MyRecord = | |
{ IP : string | |
MAC : string | |
FriendlyName : string | |
ID : int } | |
let IsMatchByName record name = |
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
open System | |
open System.IO | |
type Shot = | |
{ X : float | |
Y : float | |
Speed : float | |
ExpectedDistance : float | |
Name : string } |
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
package main | |
import ( | |
//"os" | |
"log" | |
//"fmt" | |
//"io/ioutil" | |
"encoding/json" | |
"time" | |
"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" |
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
package cos | |
import scala.concurrent.duration._ | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import io.gatling.jdbc.Predef._ | |
class RecordedSimulation extends Simulation { |
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
import java.io.IOException; | |
import java.nio.file.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Observable; | |
import java.util.Observer; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.RunnableFuture; | |
import java.util.function.Consumer; |
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
module DNA (count, nucleotideCounts) where | |
import Data.Map (Map, fromList, unionWith, mapKeys) | |
import Data.List | |
import Data.Maybe | |
import Control.Arrow | |
data NucleotideType = A | C | G | T deriving (Eq, Ord, Show, Read) | |
toNucleotideType :: Char -> Maybe NucleotideType |
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
module Test where | |
import Data.Time | |
import Data.Maybe (catMaybes) | |
data DatabaseItem = DbString String | |
| DbNumber Integer | |
| DbDate UTCTime | |
deriving (Eq, Ord, Show) |
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
module C where | |
data BinaryTree a = Leaf | |
| Node (BinaryTree a) a (BinaryTree a) | |
deriving (Eq, Ord, Show) | |
insert' :: Ord a => a -> BinaryTree a -> BinaryTree a | |
insert' e Leaf = Node Leaf e Leaf | |
insert' e (Node left n right) | |
| e == n = Node left e right |
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
module E where | |
notThe :: String -> Maybe String | |
notThe "the" = Nothing | |
notThe w = Just w | |
replaceNothing :: Maybe String -> String | |
replaceNothing (Just w) = w | |
replaceNothing Nothing = "a" |
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
module Main where | |
import Control.Monad (forever) | |
import Data.Char (toLower) | |
import Data.Maybe (isJust, fromMaybe) | |
import Data.List (intersperse) | |
import System.Exit (exitSuccess) | |
import System.Random (randomRIO) | |
newtype WordList = WordList [String] deriving (Eq, Show) |